@@ -1,70 +1,70 | |||||
1 | <h2><%=l(:label_activity)%>: <%= "#{month_name(@month).downcase} #{@year}" %></h2> |
|
1 | <h2><%=l(:label_activity)%>: <%= "#{month_name(@month).downcase} #{@year}" %></h2> | |
2 |
|
2 | |||
3 | <% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %> |
|
3 | <% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %> | |
4 | <h3><%= day_name(day.cwday) %> <%= day.day %></h3> |
|
4 | <h3><%= day_name(day.cwday) %> <%= day.day %></h3> | |
5 | <ul> |
|
5 | <ul> | |
6 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| %> |
|
6 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| %> | |
7 | <li><p> |
|
7 | <li><p> | |
8 | <% if e.is_a? Issue %> |
|
8 | <% if e.is_a? Issue %> | |
9 | <%= e.event_datetime.strftime("%H:%M") %> <%= link_to_issue e %>: <%=h e.subject %><br /> |
|
9 | <%= e.event_datetime.strftime("%H:%M") %> <%= link_to_issue e %>: <%=h e.subject %><br /> | |
10 | <i><%= e.author.name %></i> |
|
10 | <i><%= e.author.name %></i> | |
11 | <% elsif e.is_a? Journal %> |
|
11 | <% elsif e.is_a? Journal %> | |
12 | <%= e.created_on.strftime("%H:%M") %> <%= link_to_issue e.journalized %> |
|
12 | <%= e.created_on.strftime("%H:%M") %> <%= link_to_issue e.journalized %> | |
13 | (<%=h (status = IssueStatus.find_by_id(e.details.first.value)) ? status.name : '?' %>): <%=h e.journalized.subject %><br /> |
|
13 | (<%=h (status = IssueStatus.find_by_id(e.details.first.value)) ? status.name : '?' %>): <%=h e.journalized.subject %><br /> | |
14 | <em><%=h e.user.name %><%=h ": #{truncate(e.notes, 500)}" unless e.notes.blank? %></em> |
|
14 | <em><%=h e.user.name %><%=h ": #{truncate(e.notes, 500)}" unless e.notes.blank? %></em> | |
15 | <% elsif e.is_a? News %> |
|
15 | <% elsif e.is_a? News %> | |
16 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to h(e.title), :controller => 'news', :action => 'show', :id => e %><br /> |
|
16 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to h(e.title), :controller => 'news', :action => 'show', :id => e %><br /> | |
17 | <% unless e.summary.empty? %><%=h e.summary %><br /><% end %> |
|
17 | <% unless e.summary.empty? %><%=h e.summary %><br /><% end %> | |
18 | <i><%= e.author.name %></i> |
|
18 | <i><%= e.author.name %></i> | |
19 | <% elsif (e.is_a? Attachment) and (e.container.is_a? Version) %> |
|
19 | <% elsif (e.is_a? Attachment) and (e.container.is_a? Version) %> | |
20 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_attachment)%> (<%=h e.container.name %>): <%= link_to e.filename, :controller => 'projects', :action => 'list_files', :id => @project %><br /> |
|
20 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_attachment)%> (<%=h e.container.name %>): <%= link_to e.filename, :controller => 'projects', :action => 'list_files', :id => @project %><br /> | |
21 | <i><%= e.author.name %></i> |
|
21 | <i><%= e.author.name %></i> | |
22 | <% elsif (e.is_a? Attachment) and (e.container.is_a? Document) %> |
|
22 | <% elsif (e.is_a? Attachment) and (e.container.is_a? Document) %> | |
23 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_attachment)%>: <%= e.filename %> (<%= link_to h(e.container.title), :controller => 'documents', :action => 'show', :id => e.container %>)<br /> |
|
23 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_attachment)%>: <%= e.filename %> (<%= link_to h(e.container.title), :controller => 'documents', :action => 'show', :id => e.container %>)<br /> | |
24 | <i><%= e.author.name %></i> |
|
24 | <i><%= e.author.name %></i> | |
25 | <% elsif e.is_a? Document %> |
|
25 | <% elsif e.is_a? Document %> | |
26 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to h(e.title), :controller => 'documents', :action => 'show', :id => e %><br /> |
|
26 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to h(e.title), :controller => 'documents', :action => 'show', :id => e %><br /> | |
27 | <% elsif e.is_a? WikiContent.versioned_class %> |
|
27 | <% elsif e.is_a? WikiContent.versioned_class %> | |
28 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_wiki_edit)%>: <%= link_to h(WikiPage.pretty_title(e.title)), :controller => 'wiki', :page => e.title %> |
|
28 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_wiki_edit)%>: <%= link_to h(WikiPage.pretty_title(e.title)), :controller => 'wiki', :page => e.title %> | |
29 | (<%= link_to '#' + e.version.to_s, :controller => 'wiki', :page => e.title, :version => e.version %><%= ', ' + link_to('diff', :controller => 'wiki', :action => 'diff', :page => e.title, :version => e.version) if e.version > 1 %>)<br /> |
|
29 | (<%= link_to '#' + e.version.to_s, :controller => 'wiki', :page => e.title, :version => e.version %><%= ', ' + link_to('diff', :controller => 'wiki', :action => 'diff', :page => e.title, :version => e.version) if e.version > 1 %>)<br /> | |
30 | <% unless e.comments.blank? %><em><%=h e.comments %></em><% end %> |
|
30 | <% unless e.comments.blank? %><em><%=h e.comments %></em><% end %> | |
31 | <% elsif e.is_a? Changeset %> |
|
31 | <% elsif e.is_a? Changeset %> | |
32 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_revision)%> <%= link_to h(e.revision), :controller => 'repositories', :action => 'revision', :id => @project, :rev => e.revision %><br /> |
|
32 | <%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_revision)%> <%= link_to h(e.revision), :controller => 'repositories', :action => 'revision', :id => @project, :rev => e.revision %><br /> | |
33 | <em><%=h e.committer.blank? ? "anonymous" : e.committer %><%= h(": #{truncate(e.comments, 500)}") unless e.comments.blank? %></em> |
|
33 | <em><%=h e.committer.blank? ? "anonymous" : e.committer %><%= h(": #{truncate(e.comments, 500)}") unless e.comments.blank? %></em> | |
34 | <% end %> |
|
34 | <% end %> | |
35 | </p></li> |
|
35 | </p></li> | |
36 |
|
36 | |||
37 | <% end %> |
|
37 | <% end %> | |
38 | </ul> |
|
38 | </ul> | |
39 | <% end %> |
|
39 | <% end %> | |
40 |
|
40 | |||
41 | <% if @events_by_day.empty? %> |
|
41 | <% if @events_by_day.empty? %> | |
42 | <p class="nodata"><%= l(:label_no_data) %></p> |
|
42 | <p class="nodata"><%= l(:label_no_data) %></p> | |
43 | <% end %> |
|
43 | <% end %> | |
44 |
|
44 | |||
45 | <div style="float:left;"> |
|
45 | <div style="float:left;"> | |
46 | <% prev_params = params.clone.update :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) %> |
|
46 | <% prev_params = params.clone.update :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) %> | |
47 | <%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), |
|
47 | <%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), | |
48 | {:update => "content", :url => prev_params}, {:href => url_for(prev_params)} %> |
|
48 | {:update => "content", :url => prev_params}, {:href => url_for(prev_params)} %> | |
49 | </div> |
|
49 | </div> | |
50 | <div style="float:right;"> |
|
50 | <div style="float:right;"> | |
51 | <% next_params = params.clone.update :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) %> |
|
51 | <% next_params = params.clone.update :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) %> | |
52 | <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), |
|
52 | <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), | |
53 | {:update => "content", :url => next_params}, {:href => url_for(next_params)} %> |
|
53 | {:update => "content", :url => next_params}, {:href => url_for(next_params)} %> | |
54 | |
|
54 | | |
55 | </div> |
|
55 | </div> | |
56 | <br /> |
|
56 | <br /> | |
57 |
|
57 | |||
58 | <% content_for :header_tags do %> |
|
58 | <% content_for :header_tags do %> | |
59 | <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :year => nil, :month => nil, :key => User.current.rss_key})) %> |
|
59 | <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :year => nil, :month => nil, :key => User.current.rss_key})) %> | |
60 | <% end %> |
|
60 | <% end %> | |
61 |
|
61 | |||
62 | <% content_for :sidebar do %> |
|
62 | <% content_for :sidebar do %> | |
63 | <% form_tag do %> |
|
63 | <% form_tag do %> | |
64 | <h3><%= l(:label_activity) %></h3> |
|
64 | <h3><%= l(:label_activity) %></h3> | |
65 | <p><% @event_types.each do |t| %> |
|
65 | <p><% @event_types.each do |t| %> | |
66 | <%= check_box_tag "show_#{t}", 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%><br /> |
|
66 | <label><%= check_box_tag "show_#{t}", 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label><br /> | |
67 | <% end %></p> |
|
67 | <% end %></p> | |
68 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> |
|
68 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> | |
69 | <% end %> |
|
69 | <% end %> | |
70 | <% end %> |
|
70 | <% end %> |
@@ -1,88 +1,88 | |||||
1 | <% cache(:year => @year, :month => @month, :tracker_ids => @selected_tracker_ids, :subprojects => params[:with_subprojects], :lang => current_language) do %> |
|
1 | <% cache(:year => @year, :month => @month, :tracker_ids => @selected_tracker_ids, :subprojects => params[:with_subprojects], :lang => current_language) do %> | |
2 | <h2><%= l(:label_calendar) %>: <%= "#{month_name(@month).downcase} #{@year}" %></h2> |
|
2 | <h2><%= l(:label_calendar) %>: <%= "#{month_name(@month).downcase} #{@year}" %></h2> | |
3 |
|
3 | |||
4 | <table width="100%"> |
|
4 | <table width="100%"> | |
5 | <tr><td align="left"> |
|
5 | <tr><td align="left"> | |
6 | <%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), |
|
6 | <%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), | |
7 | {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }}, |
|
7 | {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }}, | |
8 | {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])} |
|
8 | {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])} | |
9 | %> |
|
9 | %> | |
10 | </td><td align="right"> |
|
10 | </td><td align="right"> | |
11 | <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), |
|
11 | <%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), | |
12 | {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }}, |
|
12 | {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }}, | |
13 | {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])} |
|
13 | {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1), :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects])} | |
14 | %> |
|
14 | %> | |
15 | </td></tr> |
|
15 | </td></tr> | |
16 | </table> |
|
16 | </table> | |
17 |
|
17 | |||
18 | <table class="cal"> |
|
18 | <table class="cal"> | |
19 | <thead> |
|
19 | <thead> | |
20 | <tr> |
|
20 | <tr> | |
21 | <td></td> |
|
21 | <td></td> | |
22 | <% 1.upto(7) do |d| %> |
|
22 | <% 1.upto(7) do |d| %> | |
23 | <th style="width:14%"><%= day_name(d) %></th> |
|
23 | <th style="width:14%"><%= day_name(d) %></th> | |
24 | <% end %> |
|
24 | <% end %> | |
25 | </tr> |
|
25 | </tr> | |
26 | </thead> |
|
26 | </thead> | |
27 | <tbody> |
|
27 | <tbody> | |
28 | <tr style="height:100px"> |
|
28 | <tr style="height:100px"> | |
29 | <% day = @date_from |
|
29 | <% day = @date_from | |
30 | while day <= @date_to |
|
30 | while day <= @date_to | |
31 | if day.cwday == 1 %> |
|
31 | if day.cwday == 1 %> | |
32 | <th><%= day.cweek %></th> |
|
32 | <th><%= day.cweek %></th> | |
33 | <% end %> |
|
33 | <% end %> | |
34 | <td valign="top" class="<%= day.month==@month ? "even" : "odd" %> <%= Date.today == day ? 'today' : '' %>" style="width:14%;"> |
|
34 | <td valign="top" class="<%= day.month==@month ? "even" : "odd" %> <%= Date.today == day ? 'today' : '' %>" style="width:14%;"> | |
35 | <p class="textright"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p> |
|
35 | <p class="textright"><%= day==Date.today ? "<b>#{day.day}</b>" : day.day %></p> | |
36 | <% ((@ending_events_by_days[day] || []) + (@starting_events_by_days[day] || [])).uniq.each do |i| %> |
|
36 | <% ((@ending_events_by_days[day] || []) + (@starting_events_by_days[day] || [])).uniq.each do |i| %> | |
37 | <% if i.is_a? Issue %> |
|
37 | <% if i.is_a? Issue %> | |
38 | <div class="tooltip"> |
|
38 | <div class="tooltip"> | |
39 | <%= if day == i.start_date and day == i.due_date |
|
39 | <%= if day == i.start_date and day == i.due_date | |
40 | image_tag('arrow_bw.png') |
|
40 | image_tag('arrow_bw.png') | |
41 | elsif day == i.start_date |
|
41 | elsif day == i.start_date | |
42 | image_tag('arrow_from.png') |
|
42 | image_tag('arrow_from.png') | |
43 | elsif day == i.due_date |
|
43 | elsif day == i.due_date | |
44 | image_tag('arrow_to.png') |
|
44 | image_tag('arrow_to.png') | |
45 | end %> |
|
45 | end %> | |
46 | <small> |
|
46 | <small> | |
47 | <%= h("#{i.project.name} -") unless @project && @project == i.project %> |
|
47 | <%= h("#{i.project.name} -") unless @project && @project == i.project %> | |
48 | <%= link_to_issue i %>: |
|
48 | <%= link_to_issue i %>: | |
49 | <%= h(truncate(i.subject, 30)) %> |
|
49 | <%= h(truncate(i.subject, 30)) %> | |
50 | </small> |
|
50 | </small> | |
51 | <span class="tip"> |
|
51 | <span class="tip"> | |
52 | <%= render :partial => "issues/tooltip", :locals => { :issue => i }%> |
|
52 | <%= render :partial => "issues/tooltip", :locals => { :issue => i }%> | |
53 | </span> |
|
53 | </span> | |
54 | </div> |
|
54 | </div> | |
55 | <% else %> |
|
55 | <% else %> | |
56 | <small><%= link_to_version i, :class => "icon icon-package" %></small> |
|
56 | <small><%= link_to_version i, :class => "icon icon-package" %></small> | |
57 | <% end %> |
|
57 | <% end %> | |
58 | <% end %> |
|
58 | <% end %> | |
59 | </td> |
|
59 | </td> | |
60 | <%= '</tr><tr style="height:100px">' if day.cwday >= 7 and day!=@date_to %> |
|
60 | <%= '</tr><tr style="height:100px">' if day.cwday >= 7 and day!=@date_to %> | |
61 | <% |
|
61 | <% | |
62 | day = day + 1 |
|
62 | day = day + 1 | |
63 | end %> |
|
63 | end %> | |
64 | </tr> |
|
64 | </tr> | |
65 | </tbody> |
|
65 | </tbody> | |
66 | </table> |
|
66 | </table> | |
67 |
|
67 | |||
68 | <%= image_tag 'arrow_from.png' %> <%= l(:text_tip_task_begin_day) %><br /> |
|
68 | <%= image_tag 'arrow_from.png' %> <%= l(:text_tip_task_begin_day) %><br /> | |
69 | <%= image_tag 'arrow_to.png' %> <%= l(:text_tip_task_end_day) %><br /> |
|
69 | <%= image_tag 'arrow_to.png' %> <%= l(:text_tip_task_end_day) %><br /> | |
70 | <%= image_tag 'arrow_bw.png' %> <%= l(:text_tip_task_begin_end_day) %><br /> |
|
70 | <%= image_tag 'arrow_bw.png' %> <%= l(:text_tip_task_begin_end_day) %><br /> | |
71 | <% end %> |
|
71 | <% end %> | |
72 |
|
72 | |||
73 | <% content_for :sidebar do %> |
|
73 | <% content_for :sidebar do %> | |
74 | <h3><%= l(:label_calendar) %></h3> |
|
74 | <h3><%= l(:label_calendar) %></h3> | |
75 |
|
75 | |||
76 | <% form_tag() do %> |
|
76 | <% form_tag() do %> | |
77 | <p><%= select_month(@month, :prefix => "month", :discard_type => true) %> |
|
77 | <p><%= select_month(@month, :prefix => "month", :discard_type => true) %> | |
78 | <%= select_year(@year, :prefix => "year", :discard_type => true) %></p> |
|
78 | <%= select_year(@year, :prefix => "year", :discard_type => true) %></p> | |
79 |
|
79 | |||
80 | <% @trackers.each do |tracker| %> |
|
80 | <% @trackers.each do |tracker| %> | |
81 | <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %><br /> |
|
81 | <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %></label><br /> | |
82 | <% end %> |
|
82 | <% end %> | |
83 | <% if @project.active_children.any? %> |
|
83 | <% if @project.active_children.any? %> | |
84 | <br /><%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%=l(:label_subproject_plural)%> |
|
84 | <br /><label><%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%=l(:label_subproject_plural)%></label> | |
85 | <% end %> |
|
85 | <% end %> | |
86 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> |
|
86 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> | |
87 | <% end %> |
|
87 | <% end %> | |
88 | <% end %> |
|
88 | <% end %> |
@@ -1,42 +1,42 | |||||
1 | <h2><%=l(:label_change_log)%></h2> |
|
1 | <h2><%=l(:label_change_log)%></h2> | |
2 |
|
2 | |||
3 | <% if @versions.empty? %> |
|
3 | <% if @versions.empty? %> | |
4 | <p class="nodata"><%= l(:label_no_data) %></p> |
|
4 | <p class="nodata"><%= l(:label_no_data) %></p> | |
5 | <% end %> |
|
5 | <% end %> | |
6 |
|
6 | |||
7 | <% @versions.each do |version| %> |
|
7 | <% @versions.each do |version| %> | |
8 | <a name="<%= version.name %>"><h3 class="icon22 icon22-package"><%= version.name %></h3></a> |
|
8 | <a name="<%= version.name %>"><h3 class="icon22 icon22-package"><%= version.name %></h3></a> | |
9 | <% if version.effective_date %> |
|
9 | <% if version.effective_date %> | |
10 | <p><%= format_date(version.effective_date) %></p> |
|
10 | <p><%= format_date(version.effective_date) %></p> | |
11 | <% end %> |
|
11 | <% end %> | |
12 | <p><%=h version.description %></p> |
|
12 | <p><%=h version.description %></p> | |
13 | <% issues = version.fixed_issues.find(:all, |
|
13 | <% issues = version.fixed_issues.find(:all, | |
14 | :include => [:status, :tracker], |
|
14 | :include => [:status, :tracker], | |
15 | :conditions => ["#{IssueStatus.table_name}.is_closed=? AND #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')})", true], |
|
15 | :conditions => ["#{IssueStatus.table_name}.is_closed=? AND #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')})", true], | |
16 | :order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty? |
|
16 | :order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty? | |
17 | issues ||= [] |
|
17 | issues ||= [] | |
18 | %> |
|
18 | %> | |
19 | <% if !issues.empty? %> |
|
19 | <% if !issues.empty? %> | |
20 | <ul> |
|
20 | <ul> | |
21 | <% issues.each do |issue| %> |
|
21 | <% issues.each do |issue| %> | |
22 | <li><%= link_to_issue(issue) %>: <%=h issue.subject %></li> |
|
22 | <li><%= link_to_issue(issue) %>: <%=h issue.subject %></li> | |
23 | <% end %> |
|
23 | <% end %> | |
24 | </ul> |
|
24 | </ul> | |
25 | <% end %> |
|
25 | <% end %> | |
26 | <% end %> |
|
26 | <% end %> | |
27 |
|
27 | |||
28 | <% content_for :sidebar do %> |
|
28 | <% content_for :sidebar do %> | |
29 | <% form_tag do %> |
|
29 | <% form_tag do %> | |
30 | <h3><%= l(:label_change_log) %></h3> |
|
30 | <h3><%= l(:label_change_log) %></h3> | |
31 | <% @trackers.each do |tracker| %> |
|
31 | <% @trackers.each do |tracker| %> | |
32 | <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> |
|
32 | <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> | |
33 | <%= tracker.name %><br /> |
|
33 | <%= tracker.name %></label><br /> | |
34 | <% end %> |
|
34 | <% end %> | |
35 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> |
|
35 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> | |
36 | <% end %> |
|
36 | <% end %> | |
37 |
|
37 | |||
38 | <h3><%= l(:label_version_plural) %></h3> |
|
38 | <h3><%= l(:label_version_plural) %></h3> | |
39 | <% @versions.each do |version| %> |
|
39 | <% @versions.each do |version| %> | |
40 | <%= link_to version.name, :anchor => version.name %><br /> |
|
40 | <%= link_to version.name, :anchor => version.name %><br /> | |
41 | <% end %> |
|
41 | <% end %> | |
42 | <% end %> |
|
42 | <% end %> |
@@ -1,247 +1,247 | |||||
1 | <% zoom = 1 |
|
1 | <% zoom = 1 | |
2 | @zoom.times { zoom = zoom * 2 } |
|
2 | @zoom.times { zoom = zoom * 2 } | |
3 |
|
3 | |||
4 | subject_width = 330 |
|
4 | subject_width = 330 | |
5 | header_heigth = 18 |
|
5 | header_heigth = 18 | |
6 |
|
6 | |||
7 | headers_height = header_heigth |
|
7 | headers_height = header_heigth | |
8 | show_weeks = false |
|
8 | show_weeks = false | |
9 | show_days = false |
|
9 | show_days = false | |
10 |
|
10 | |||
11 | if @zoom >1 |
|
11 | if @zoom >1 | |
12 | show_weeks = true |
|
12 | show_weeks = true | |
13 | headers_height = 2*header_heigth |
|
13 | headers_height = 2*header_heigth | |
14 | if @zoom > 2 |
|
14 | if @zoom > 2 | |
15 | show_days = true |
|
15 | show_days = true | |
16 | headers_height = 3*header_heigth |
|
16 | headers_height = 3*header_heigth | |
17 | end |
|
17 | end | |
18 | end |
|
18 | end | |
19 |
|
19 | |||
20 | g_width = (@date_to - @date_from + 1)*zoom |
|
20 | g_width = (@date_to - @date_from + 1)*zoom | |
21 | g_height = [(20 * @events.length + 6)+150, 206].max |
|
21 | g_height = [(20 * @events.length + 6)+150, 206].max | |
22 | t_height = g_height + headers_height |
|
22 | t_height = g_height + headers_height | |
23 | %> |
|
23 | %> | |
24 |
|
24 | |||
25 | <div class="contextual"> |
|
25 | <div class="contextual"> | |
26 | </div> |
|
26 | </div> | |
27 |
|
27 | |||
28 | <h2><%= l(:label_gantt) %></h2> |
|
28 | <h2><%= l(:label_gantt) %></h2> | |
29 |
|
29 | |||
30 | <% form_tag(params.merge(:month => nil, :year => nil, :years => nil)) do %> |
|
30 | <% form_tag(params.merge(:month => nil, :year => nil, :years => nil)) do %> | |
31 | <table width="100%"> |
|
31 | <table width="100%"> | |
32 | <tr> |
|
32 | <tr> | |
33 | <td align="left"> |
|
33 | <td align="left"> | |
34 | <input type="text" name="months" size="2" value="<%= @months %>" /> |
|
34 | <input type="text" name="months" size="2" value="<%= @months %>" /> | |
35 | <%= l(:label_months_from) %> |
|
35 | <%= l(:label_months_from) %> | |
36 | <%= select_month(@month_from, :prefix => "month", :discard_type => true) %> |
|
36 | <%= select_month(@month_from, :prefix => "month", :discard_type => true) %> | |
37 | <%= select_year(@year_from, :prefix => "year", :discard_type => true) %> |
|
37 | <%= select_year(@year_from, :prefix => "year", :discard_type => true) %> | |
38 | <%= hidden_field_tag 'zoom', @zoom %> |
|
38 | <%= hidden_field_tag 'zoom', @zoom %> | |
39 | <%= submit_tag l(:button_submit), :class => "button-small" %> |
|
39 | <%= submit_tag l(:button_submit), :class => "button-small" %> | |
40 | </td> |
|
40 | </td> | |
41 |
|
41 | |||
42 | <td align="right"> |
|
42 | <td align="right"> | |
43 | <%= if @zoom < 4 |
|
43 | <%= if @zoom < 4 | |
44 | link_to image_tag('zoom_in.png'), {:zoom => (@zoom+1), :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects]} |
|
44 | link_to image_tag('zoom_in.png'), {:zoom => (@zoom+1), :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects]} | |
45 | else |
|
45 | else | |
46 | image_tag 'zoom_in_g.png' |
|
46 | image_tag 'zoom_in_g.png' | |
47 | end %> |
|
47 | end %> | |
48 | <%= if @zoom > 1 |
|
48 | <%= if @zoom > 1 | |
49 | link_to image_tag('zoom_out.png'),{:zoom => (@zoom-1), :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects]} |
|
49 | link_to image_tag('zoom_out.png'),{:zoom => (@zoom-1), :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects]} | |
50 | else |
|
50 | else | |
51 | image_tag 'zoom_out_g.png' |
|
51 | image_tag 'zoom_out_g.png' | |
52 | end %> |
|
52 | end %> | |
53 | </td> |
|
53 | </td> | |
54 | </tr> |
|
54 | </tr> | |
55 | </table> |
|
55 | </table> | |
56 | <% end %> |
|
56 | <% end %> | |
57 |
|
57 | |||
58 | <% cache(:year => @year_from, :month => @month_from, :months => @months, :zoom => @zoom, :tracker_ids => @selected_tracker_ids, :subprojects => params[:with_subprojects], :lang => current_language) do %> |
|
58 | <% cache(:year => @year_from, :month => @month_from, :months => @months, :zoom => @zoom, :tracker_ids => @selected_tracker_ids, :subprojects => params[:with_subprojects], :lang => current_language) do %> | |
59 |
|
59 | |||
60 | <table width="100%" style="border:0; border-collapse: collapse;"> |
|
60 | <table width="100%" style="border:0; border-collapse: collapse;"> | |
61 | <tr> |
|
61 | <tr> | |
62 | <td style="width:<%= subject_width %>px;"> |
|
62 | <td style="width:<%= subject_width %>px;"> | |
63 |
|
63 | |||
64 | <div style="position:relative;height:<%= t_height + 24 %>px;width:<%= subject_width + 1 %>px;"> |
|
64 | <div style="position:relative;height:<%= t_height + 24 %>px;width:<%= subject_width + 1 %>px;"> | |
65 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= headers_height %>px;background: #eee;" class="gantt_hdr"></div> |
|
65 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= headers_height %>px;background: #eee;" class="gantt_hdr"></div> | |
66 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= t_height %>px;border-left: 1px solid #c0c0c0;overflow:hidden;" class="gantt_hdr"></div> |
|
66 | <div style="right:-2px;width:<%= subject_width %>px;height:<%= t_height %>px;border-left: 1px solid #c0c0c0;overflow:hidden;" class="gantt_hdr"></div> | |
67 | <% |
|
67 | <% | |
68 | # |
|
68 | # | |
69 | # Tasks subjects |
|
69 | # Tasks subjects | |
70 | # |
|
70 | # | |
71 | top = headers_height + 8 |
|
71 | top = headers_height + 8 | |
72 | @events.each do |i| %> |
|
72 | @events.each do |i| %> | |
73 | <div style="position: absolute;line-height:1.2em;height:16px;top:<%= top %>px;left:4px;overflow:hidden;"><small> |
|
73 | <div style="position: absolute;line-height:1.2em;height:16px;top:<%= top %>px;left:4px;overflow:hidden;"><small> | |
74 | <% if i.is_a? Issue %> |
|
74 | <% if i.is_a? Issue %> | |
75 | <%= link_to_issue i %><%= " (#{i.project.name})" unless @project && @project == i.project %>: |
|
75 | <%= link_to_issue i %><%= " (#{i.project.name})" unless @project && @project == i.project %>: | |
76 | <%=h i.subject %> |
|
76 | <%=h i.subject %> | |
77 | <% else %> |
|
77 | <% else %> | |
78 | <%= link_to_version i, :class => "icon icon-package" %> |
|
78 | <%= link_to_version i, :class => "icon icon-package" %> | |
79 | <% end %> |
|
79 | <% end %> | |
80 | </small></div> |
|
80 | </small></div> | |
81 | <% top = top + 20 |
|
81 | <% top = top + 20 | |
82 | end %> |
|
82 | end %> | |
83 | </div> |
|
83 | </div> | |
84 | </td> |
|
84 | </td> | |
85 | <td> |
|
85 | <td> | |
86 |
|
86 | |||
87 | <div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;"> |
|
87 | <div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;"> | |
88 | <div style="width:<%= g_width-1 %>px;height:<%= headers_height %>px;background: #eee;" class="gantt_hdr"> </div> |
|
88 | <div style="width:<%= g_width-1 %>px;height:<%= headers_height %>px;background: #eee;" class="gantt_hdr"> </div> | |
89 | <% |
|
89 | <% | |
90 | # |
|
90 | # | |
91 | # Months headers |
|
91 | # Months headers | |
92 | # |
|
92 | # | |
93 | month_f = @date_from |
|
93 | month_f = @date_from | |
94 | left = 0 |
|
94 | left = 0 | |
95 | height = (show_weeks ? header_heigth : header_heigth + g_height) |
|
95 | height = (show_weeks ? header_heigth : header_heigth + g_height) | |
96 | @months.times do |
|
96 | @months.times do | |
97 | width = ((month_f >> 1) - month_f) * zoom - 1 |
|
97 | width = ((month_f >> 1) - month_f) * zoom - 1 | |
98 | %> |
|
98 | %> | |
99 | <div style="left:<%= left %>px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> |
|
99 | <div style="left:<%= left %>px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> | |
100 | <%= link_to "#{month_f.year}-#{month_f.month}", { :year => month_f.year, :month => month_f.month, :zoom => @zoom, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }, :title => "#{month_name(month_f.month)} #{month_f.year}"%> |
|
100 | <%= link_to "#{month_f.year}-#{month_f.month}", { :year => month_f.year, :month => month_f.month, :zoom => @zoom, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] }, :title => "#{month_name(month_f.month)} #{month_f.year}"%> | |
101 | </div> |
|
101 | </div> | |
102 | <% |
|
102 | <% | |
103 | left = left + width + 1 |
|
103 | left = left + width + 1 | |
104 | month_f = month_f >> 1 |
|
104 | month_f = month_f >> 1 | |
105 | end %> |
|
105 | end %> | |
106 |
|
106 | |||
107 | <% |
|
107 | <% | |
108 | # |
|
108 | # | |
109 | # Weeks headers |
|
109 | # Weeks headers | |
110 | # |
|
110 | # | |
111 | if show_weeks |
|
111 | if show_weeks | |
112 | left = 0 |
|
112 | left = 0 | |
113 | height = (show_days ? header_heigth-1 : header_heigth-1 + g_height) |
|
113 | height = (show_days ? header_heigth-1 : header_heigth-1 + g_height) | |
114 | if @date_from.cwday == 1 |
|
114 | if @date_from.cwday == 1 | |
115 | # @date_from is monday |
|
115 | # @date_from is monday | |
116 | week_f = @date_from |
|
116 | week_f = @date_from | |
117 | else |
|
117 | else | |
118 | # find next monday after @date_from |
|
118 | # find next monday after @date_from | |
119 | week_f = @date_from + (7 - @date_from.cwday + 1) |
|
119 | week_f = @date_from + (7 - @date_from.cwday + 1) | |
120 | width = (7 - @date_from.cwday + 1) * zoom-1 |
|
120 | width = (7 - @date_from.cwday + 1) * zoom-1 | |
121 | %> |
|
121 | %> | |
122 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> </div> |
|
122 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> </div> | |
123 | <% |
|
123 | <% | |
124 | left = left + width+1 |
|
124 | left = left + width+1 | |
125 | end %> |
|
125 | end %> | |
126 | <% |
|
126 | <% | |
127 | while week_f <= @date_to |
|
127 | while week_f <= @date_to | |
128 | width = (week_f + 6 <= @date_to) ? 7 * zoom -1 : (@date_to - week_f + 1) * zoom-1 |
|
128 | width = (week_f + 6 <= @date_to) ? 7 * zoom -1 : (@date_to - week_f + 1) * zoom-1 | |
129 | %> |
|
129 | %> | |
130 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> |
|
130 | <div style="left:<%= left %>px;top:19px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr"> | |
131 | <small><%= week_f.cweek if width >= 16 %></small> |
|
131 | <small><%= week_f.cweek if width >= 16 %></small> | |
132 | </div> |
|
132 | </div> | |
133 | <% |
|
133 | <% | |
134 | left = left + width+1 |
|
134 | left = left + width+1 | |
135 | week_f = week_f+7 |
|
135 | week_f = week_f+7 | |
136 | end |
|
136 | end | |
137 | end %> |
|
137 | end %> | |
138 |
|
138 | |||
139 | <% |
|
139 | <% | |
140 | # |
|
140 | # | |
141 | # Days headers |
|
141 | # Days headers | |
142 | # |
|
142 | # | |
143 | if show_days |
|
143 | if show_days | |
144 | left = 0 |
|
144 | left = 0 | |
145 | height = g_height + header_heigth - 1 |
|
145 | height = g_height + header_heigth - 1 | |
146 | wday = @date_from.cwday |
|
146 | wday = @date_from.cwday | |
147 | (@date_to - @date_from + 1).to_i.times do |
|
147 | (@date_to - @date_from + 1).to_i.times do | |
148 | width = zoom - 1 |
|
148 | width = zoom - 1 | |
149 | %> |
|
149 | %> | |
150 | <div style="left:<%= left %>px;top:37px;width:<%= width %>px;height:<%= height %>px;font-size:0.7em;<%= "background:#f1f1f1;" if wday > 5 %>" class="gantt_hdr"> |
|
150 | <div style="left:<%= left %>px;top:37px;width:<%= width %>px;height:<%= height %>px;font-size:0.7em;<%= "background:#f1f1f1;" if wday > 5 %>" class="gantt_hdr"> | |
151 | <%= day_name(wday).first %> |
|
151 | <%= day_name(wday).first %> | |
152 | </div> |
|
152 | </div> | |
153 | <% |
|
153 | <% | |
154 | left = left + width+1 |
|
154 | left = left + width+1 | |
155 | wday = wday + 1 |
|
155 | wday = wday + 1 | |
156 | wday = 1 if wday > 7 |
|
156 | wday = 1 if wday > 7 | |
157 | end |
|
157 | end | |
158 | end %> |
|
158 | end %> | |
159 |
|
159 | |||
160 | <% |
|
160 | <% | |
161 | # |
|
161 | # | |
162 | # Tasks |
|
162 | # Tasks | |
163 | # |
|
163 | # | |
164 | top = headers_height + 10 |
|
164 | top = headers_height + 10 | |
165 | @events.each do |i| |
|
165 | @events.each do |i| | |
166 | if i.is_a? Issue |
|
166 | if i.is_a? Issue | |
167 | i_start_date = (i.start_date >= @date_from ? i.start_date : @date_from ) |
|
167 | i_start_date = (i.start_date >= @date_from ? i.start_date : @date_from ) | |
168 | i_end_date = (i.due_date <= @date_to ? i.due_date : @date_to ) |
|
168 | i_end_date = (i.due_date <= @date_to ? i.due_date : @date_to ) | |
169 |
|
169 | |||
170 | i_done_date = i.start_date + ((i.due_date - i.start_date+1)*i.done_ratio/100).floor |
|
170 | i_done_date = i.start_date + ((i.due_date - i.start_date+1)*i.done_ratio/100).floor | |
171 | i_done_date = (i_done_date <= @date_from ? @date_from : i_done_date ) |
|
171 | i_done_date = (i_done_date <= @date_from ? @date_from : i_done_date ) | |
172 | i_done_date = (i_done_date >= @date_to ? @date_to : i_done_date ) |
|
172 | i_done_date = (i_done_date >= @date_to ? @date_to : i_done_date ) | |
173 |
|
173 | |||
174 | i_late_date = [i_end_date, Date.today].min if i_start_date < Date.today |
|
174 | i_late_date = [i_end_date, Date.today].min if i_start_date < Date.today | |
175 |
|
175 | |||
176 | i_left = ((i_start_date - @date_from)*zoom).floor |
|
176 | i_left = ((i_start_date - @date_from)*zoom).floor | |
177 | i_width = ((i_end_date - i_start_date + 1)*zoom).floor - 2 # total width of the issue (- 2 for left and right borders) |
|
177 | i_width = ((i_end_date - i_start_date + 1)*zoom).floor - 2 # total width of the issue (- 2 for left and right borders) | |
178 | d_width = ((i_done_date - i_start_date)*zoom).floor - 2 # done width |
|
178 | d_width = ((i_done_date - i_start_date)*zoom).floor - 2 # done width | |
179 | l_width = i_late_date ? ((i_late_date - i_start_date+1)*zoom).floor - 2 : 0 # delay width |
|
179 | l_width = i_late_date ? ((i_late_date - i_start_date+1)*zoom).floor - 2 : 0 # delay width | |
180 | %> |
|
180 | %> | |
181 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;" class="task task_todo"> </div> |
|
181 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;" class="task task_todo"> </div> | |
182 | <% if l_width > 0 %> |
|
182 | <% if l_width > 0 %> | |
183 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= l_width %>px;" class="task task_late"> </div> |
|
183 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= l_width %>px;" class="task task_late"> </div> | |
184 | <% end %> |
|
184 | <% end %> | |
185 | <% if d_width > 0 %> |
|
185 | <% if d_width > 0 %> | |
186 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= d_width %>px;" class="task task_done"> </div> |
|
186 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:<%= d_width %>px;" class="task task_done"> </div> | |
187 | <% end %> |
|
187 | <% end %> | |
188 | <div style="top:<%= top %>px;left:<%= i_left + i_width + 5 %>px;background:#fff;" class="task"> |
|
188 | <div style="top:<%= top %>px;left:<%= i_left + i_width + 5 %>px;background:#fff;" class="task"> | |
189 | <%= i.status.name %> |
|
189 | <%= i.status.name %> | |
190 | <%= (i.done_ratio).to_i %>% |
|
190 | <%= (i.done_ratio).to_i %>% | |
191 | </div> |
|
191 | </div> | |
192 | <% # === tooltip === %> |
|
192 | <% # === tooltip === %> | |
193 | <div class="tooltip" style="position: absolute;top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;height:12px;"> |
|
193 | <div class="tooltip" style="position: absolute;top:<%= top %>px;left:<%= i_left %>px;width:<%= i_width %>px;height:12px;"> | |
194 | <span class="tip"> |
|
194 | <span class="tip"> | |
195 | <%= render :partial => "issues/tooltip", :locals => { :issue => i }%> |
|
195 | <%= render :partial => "issues/tooltip", :locals => { :issue => i }%> | |
196 | </span></div> |
|
196 | </span></div> | |
197 | <% else |
|
197 | <% else | |
198 | i_left = ((i.start_date - @date_from)*zoom).floor |
|
198 | i_left = ((i.start_date - @date_from)*zoom).floor | |
199 | %> |
|
199 | %> | |
200 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:15px;" class="task milestone"> </div> |
|
200 | <div style="top:<%= top %>px;left:<%= i_left %>px;width:15px;" class="task milestone"> </div> | |
201 | <div style="top:<%= top %>px;left:<%= i_left + 12 %>px;background:#fff;" class="task"> |
|
201 | <div style="top:<%= top %>px;left:<%= i_left + 12 %>px;background:#fff;" class="task"> | |
202 | <strong><%= i.name %></strong> |
|
202 | <strong><%= i.name %></strong> | |
203 | </div> |
|
203 | </div> | |
204 | <% end %> |
|
204 | <% end %> | |
205 | <% top = top + 20 |
|
205 | <% top = top + 20 | |
206 | end %> |
|
206 | end %> | |
207 |
|
207 | |||
208 | <% end # cache |
|
208 | <% end # cache | |
209 | %> |
|
209 | %> | |
210 |
|
210 | |||
211 | <% |
|
211 | <% | |
212 | # |
|
212 | # | |
213 | # Today red line (excluded from cache) |
|
213 | # Today red line (excluded from cache) | |
214 | # |
|
214 | # | |
215 | if Date.today >= @date_from and Date.today <= @date_to %> |
|
215 | if Date.today >= @date_from and Date.today <= @date_to %> | |
216 | <div style="position: absolute;height:<%= g_height %>px;top:<%= headers_height + 1 %>px;left:<%= ((Date.today-@date_from+1)*zoom).floor()-1 %>px;width:10px;border-left: 1px dashed red;"> </div> |
|
216 | <div style="position: absolute;height:<%= g_height %>px;top:<%= headers_height + 1 %>px;left:<%= ((Date.today-@date_from+1)*zoom).floor()-1 %>px;width:10px;border-left: 1px dashed red;"> </div> | |
217 | <% end %> |
|
217 | <% end %> | |
218 |
|
218 | |||
219 | </div> |
|
219 | </div> | |
220 | </td> |
|
220 | </td> | |
221 | </tr> |
|
221 | </tr> | |
222 | </table> |
|
222 | </table> | |
223 |
|
223 | |||
224 | <table width="100%"> |
|
224 | <table width="100%"> | |
225 | <tr> |
|
225 | <tr> | |
226 | <td align="left"><%= link_to ('« ' + l(:label_previous)), :year => (@date_from << @months).year, :month => (@date_from << @months).month, :zoom => @zoom, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] %></td> |
|
226 | <td align="left"><%= link_to ('« ' + l(:label_previous)), :year => (@date_from << @months).year, :month => (@date_from << @months).month, :zoom => @zoom, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] %></td> | |
227 | <td align="right"><%= link_to (l(:label_next) + ' »'), :year => (@date_from >> @months).year, :month => (@date_from >> @months).month, :zoom => @zoom, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] %></td> |
|
227 | <td align="right"><%= link_to (l(:label_next) + ' »'), :year => (@date_from >> @months).year, :month => (@date_from >> @months).month, :zoom => @zoom, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects] %></td> | |
228 | </tr> |
|
228 | </tr> | |
229 | </table> |
|
229 | </table> | |
230 |
|
230 | |||
231 | <div class="contextual"><%= l(:label_export_to) %> |
|
231 | <div class="contextual"><%= l(:label_export_to) %> | |
232 | <%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'pdf'}, :class => 'icon icon-pdf' %> |
|
232 | <%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'pdf'}, :class => 'icon icon-pdf' %> | |
233 | <%= link_to 'PNG', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'png'}, :class => 'icon icon-image' if respond_to?('gantt_image') %> |
|
233 | <%= link_to 'PNG', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'png'}, :class => 'icon icon-image' if respond_to?('gantt_image') %> | |
234 | </div> |
|
234 | </div> | |
235 |
|
235 | |||
236 | <% content_for :sidebar do %> |
|
236 | <% content_for :sidebar do %> | |
237 | <h3><%= l(:label_gantt) %></h3> |
|
237 | <h3><%= l(:label_gantt) %></h3> | |
238 | <% form_tag(params.merge(:tracker_ids => nil, :with_subprojects => nil)) do %> |
|
238 | <% form_tag(params.merge(:tracker_ids => nil, :with_subprojects => nil)) do %> | |
239 | <% @trackers.each do |tracker| %> |
|
239 | <% @trackers.each do |tracker| %> | |
240 | <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %><br /> |
|
240 | <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %></label><br /> | |
241 | <% end %> |
|
241 | <% end %> | |
242 | <% if @project.active_children.any? %> |
|
242 | <% if @project.active_children.any? %> | |
243 | <br /><%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%=l(:label_subproject_plural)%> |
|
243 | <br /><label><%= check_box_tag "with_subprojects", 1, params[:with_subprojects] %> <%=l(:label_subproject_plural)%></label> | |
244 | <% end %> |
|
244 | <% end %> | |
245 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> |
|
245 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> | |
246 | <% end %> |
|
246 | <% end %> | |
247 | <% end %> |
|
247 | <% end %> |
@@ -1,73 +1,73 | |||||
1 | <h2><%=l(:label_roadmap)%></h2> |
|
1 | <h2><%=l(:label_roadmap)%></h2> | |
2 |
|
2 | |||
3 | <% if @versions.empty? %> |
|
3 | <% if @versions.empty? %> | |
4 | <p class="nodata"><%= l(:label_no_data) %></p> |
|
4 | <p class="nodata"><%= l(:label_no_data) %></p> | |
5 | <% end %> |
|
5 | <% end %> | |
6 |
|
6 | |||
7 | <% @versions.each do |version| %> |
|
7 | <% @versions.each do |version| %> | |
8 | <a name="<%= version.name %>"><h3 class="icon22 icon22-package"><%= version.name %></h3></a> |
|
8 | <a name="<%= version.name %>"><h3 class="icon22 icon22-package"><%= version.name %></h3></a> | |
9 | <% if version.completed? %> |
|
9 | <% if version.completed? %> | |
10 | <p><%= format_date(version.effective_date) %></p> |
|
10 | <p><%= format_date(version.effective_date) %></p> | |
11 | <% elsif version.overdue? %> |
|
11 | <% elsif version.overdue? %> | |
12 | <p><strong><%= l(:label_roadmap_overdue, distance_of_time_in_words(Time.now, version.effective_date)) %> (<%= format_date(version.effective_date) %>)</strong></p> |
|
12 | <p><strong><%= l(:label_roadmap_overdue, distance_of_time_in_words(Time.now, version.effective_date)) %> (<%= format_date(version.effective_date) %>)</strong></p> | |
13 | <% elsif version.effective_date %> |
|
13 | <% elsif version.effective_date %> | |
14 | <p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p> |
|
14 | <p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p> | |
15 | <% end %> |
|
15 | <% end %> | |
16 | <p><%=h version.description %></p> |
|
16 | <p><%=h version.description %></p> | |
17 | <% issues = version.fixed_issues.find(:all, |
|
17 | <% issues = version.fixed_issues.find(:all, | |
18 | :include => [:status, :tracker], |
|
18 | :include => [:status, :tracker], | |
19 | :conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"], |
|
19 | :conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"], | |
20 | :order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty? |
|
20 | :order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty? | |
21 | issues ||= [] |
|
21 | issues ||= [] | |
22 |
|
22 | |||
23 | total = issues.size |
|
23 | total = issues.size | |
24 | complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c } |
|
24 | complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c } | |
25 | percentComplete = total == 0 ? 100 : (100.0 / total * complete).floor |
|
25 | percentComplete = total == 0 ? 100 : (100.0 / total * complete).floor | |
26 | percentIncomplete = 100 - percentComplete |
|
26 | percentIncomplete = 100 - percentComplete | |
27 | %> |
|
27 | %> | |
28 | <table class="progress"> |
|
28 | <table class="progress"> | |
29 | <tr> |
|
29 | <tr> | |
30 | <% if percentComplete > 0 %> |
|
30 | <% if percentComplete > 0 %> | |
31 | <td class="closed" style="width: <%= percentComplete %>%"></td> |
|
31 | <td class="closed" style="width: <%= percentComplete %>%"></td> | |
32 | <% end; if percentIncomplete > 0 %> |
|
32 | <% end; if percentIncomplete > 0 %> | |
33 | <td class="open" style="width: <%= percentIncomplete %>%"></td> |
|
33 | <td class="open" style="width: <%= percentIncomplete %>%"></td> | |
34 | <% end %> |
|
34 | <% end %> | |
35 | </tr> |
|
35 | </tr> | |
36 | </table> |
|
36 | </table> | |
37 | <em><%= link_to(complete, :controller => 'projects', :action => 'list_issues', :id => @project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1) %> <%= lwr(:label_closed_issues, complete) %> (<%= percentComplete %>%)   |
|
37 | <em><%= link_to(complete, :controller => 'projects', :action => 'list_issues', :id => @project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1) %> <%= lwr(:label_closed_issues, complete) %> (<%= percentComplete %>%)   | |
38 | <%= link_to((total - complete), :controller => 'projects', :action => 'list_issues', :id => @project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1) %> <%= lwr(:label_open_issues, total - complete)%> (<%= percentIncomplete %>%)</em> |
|
38 | <%= link_to((total - complete), :controller => 'projects', :action => 'list_issues', :id => @project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1) %> <%= lwr(:label_open_issues, total - complete)%> (<%= percentIncomplete %>%)</em> | |
39 | <br /> |
|
39 | <br /> | |
40 | <br /> |
|
40 | <br /> | |
41 | <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %> |
|
41 | <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %> | |
42 | <ul> |
|
42 | <ul> | |
43 | <% if total == 0 %> |
|
43 | <% if total == 0 %> | |
44 | <li><%=l(:label_roadmap_no_issues)%></li> |
|
44 | <li><%=l(:label_roadmap_no_issues)%></li> | |
45 | <% else %> |
|
45 | <% else %> | |
46 | <% issues.each do |issue| %> |
|
46 | <% issues.each do |issue| %> | |
47 | <li> |
|
47 | <li> | |
48 | <%= link = link_to_issue(issue) |
|
48 | <%= link = link_to_issue(issue) | |
49 | issue.status.is_closed? ? content_tag("del", link) : link %>: <%=h issue.subject %> |
|
49 | issue.status.is_closed? ? content_tag("del", link) : link %>: <%=h issue.subject %> | |
50 | <%= content_tag "em", "(#{l(:label_closed_issues)})" if issue.status.is_closed? %> |
|
50 | <%= content_tag "em", "(#{l(:label_closed_issues)})" if issue.status.is_closed? %> | |
51 | </li> |
|
51 | </li> | |
52 | <% end %> |
|
52 | <% end %> | |
53 | <% end %> |
|
53 | <% end %> | |
54 | </ul> |
|
54 | </ul> | |
55 | <% end %> |
|
55 | <% end %> | |
56 |
|
56 | |||
57 | <% content_for :sidebar do %> |
|
57 | <% content_for :sidebar do %> | |
58 | <% form_tag do %> |
|
58 | <% form_tag do %> | |
59 | <h3><%= l(:label_roadmap) %></h3> |
|
59 | <h3><%= l(:label_roadmap) %></h3> | |
60 | <% @trackers.each do |tracker| %> |
|
60 | <% @trackers.each do |tracker| %> | |
61 | <%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> |
|
61 | <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> | |
62 | <%= tracker.name %><br /> |
|
62 | <%= tracker.name %></label><br /> | |
63 | <% end %> |
|
63 | <% end %> | |
64 | <br /> |
|
64 | <br /> | |
65 | <label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %> |
|
65 | <label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %> | |
66 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> |
|
66 | <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> | |
67 | <% end %> |
|
67 | <% end %> | |
68 |
|
68 | |||
69 | <h3><%= l(:label_version_plural) %></h3> |
|
69 | <h3><%= l(:label_version_plural) %></h3> | |
70 | <% @versions.each do |version| %> |
|
70 | <% @versions.each do |version| %> | |
71 | <%= link_to version.name, :anchor => version.name %><br /> |
|
71 | <%= link_to version.name, :anchor => version.name %><br /> | |
72 | <% end %> |
|
72 | <% end %> | |
73 | <% end %> |
|
73 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now