##// END OF EJS Templates
Version details view changes:...
Jean-Philippe Lang -
r1193:9b59ea725658
parent child
Show More
@@ -18,12 +18,7
18 module ProjectsHelper
18 module ProjectsHelper
19 def link_to_version(version, options = {})
19 def link_to_version(version, options = {})
20 return '' unless version && version.is_a?(Version)
20 return '' unless version && version.is_a?(Version)
21 link_to version.name, {:controller => 'projects',
21 link_to h(version.name), { :controller => 'versions', :action => 'show', :id => version }, options
22 :action => 'roadmap',
23 :id => version.project_id,
24 :completed => (version.completed? ? 1 : nil),
25 :anchor => version.name
26 }, options
27 end
22 end
28
23
29 def format_activity_day(date)
24 def format_activity_day(date)
@@ -34,6 +34,16 class Version < ActiveRecord::Base
34 effective_date
34 effective_date
35 end
35 end
36
36
37 # Returns the total estimated time for this version
38 def estimated_hours
39 @estimated_hours ||= fixed_issues.sum(:estimated_hours).to_f
40 end
41
42 # Returns the total reported time for this version
43 def spent_hours
44 @spent_hours ||= TimeEntry.sum(:hours, :include => :issue, :conditions => ["#{Issue.table_name}.fixed_version_id = ?", id]).to_f
45 end
46
37 # Returns true if the version is completed: due date reached and no open issues
47 # Returns true if the version is completed: due date reached and no open issues
38 def completed?
48 def completed?
39 effective_date && (effective_date <= Date.today) && (open_issues_count == 0)
49 effective_date && (effective_date <= Date.today) && (open_issues_count == 0)
@@ -4,11 +4,46
4
4
5 <h2><%= h(@version.name) %></h2>
5 <h2><%= h(@version.name) %></h2>
6
6
7 <div id="version-summary">
8 <% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
9 <fieldset><legend><%= l(:label_time_tracking) %></legend>
10 <table>
11 <tr>
12 <td width="130px" align="right"><%= l(:field_estimated_hours) %></td>
13 <td width="240px" class="total-hours"width="130px" align="right"><%= html_hours(lwr(:label_f_hour, @version.estimated_hours)) %></td>
14 </tr>
15 <% if User.current.allowed_to?(:view_time_entries, @project) %>
16 <tr>
17 <td width="130px" align="right"><%= l(:label_spent_time) %></td>
18 <td width="240px" class="total-hours"><%= html_hours(lwr(:label_f_hour, @version.spent_hours)) %></td>
19 </tr>
20 <% end %>
21 </table>
22 </fieldset>
23 <% end %>
24
7 <div id="status_by">
25 <div id="status_by">
8 <%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
26 <%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
9 </div>
27 </div>
28 </div>
10
29
30 <div id="roadmap">
11 <%= render :partial => 'versions/overview', :locals => {:version => @version} %>
31 <%= render :partial => 'versions/overview', :locals => {:version => @version} %>
12 <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
32 <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
13
33
34 <% issues = @version.fixed_issues.find(:all,
35 :include => [:status, :tracker],
36 :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") %>
37 <% if issues.size > 0 %>
38 <fieldset class="related-issues"><legend><%= l(:label_related_issues) %></legend>
39 <ul>
40 <% issues.each do |issue| -%>
41 <li><%= link = link_to_issue(issue)
42 issue.status.is_closed? ? content_tag("del", link) : link %>: <%=h issue.subject %></li>
43 <% end -%>
44 </ul>
45 </fieldset>
46 <% end %>
47 </div>
48
14 <% html_title @version.name %>
49 <% html_title @version.name %>
@@ -174,14 +174,18 div#roadmap .wiki h1:first-child { display: none; }
174 div#roadmap .wiki h1 { font-size: 120%; }
174 div#roadmap .wiki h1 { font-size: 120%; }
175 div#roadmap .wiki h2 { font-size: 110%; }
175 div#roadmap .wiki h2 { font-size: 110%; }
176
176
177 div#version-summary { float:right; width:380px; margin-left: 16px; margin-bottom: 16px; background-color: #fff; }
178 div#version-summary fieldset { margin-bottom: 1em; }
179 div#version-summary .total-hours { text-align: right; }
180
177 table#time-report td.hours { text-align: right; padding-right: 0.5em; }
181 table#time-report td.hours { text-align: right; padding-right: 0.5em; }
178 table#time-report tbody tr { font-style: italic; color: #777; }
182 table#time-report tbody tr { font-style: italic; color: #777; }
179 table#time-report tbody tr.last-level { font-style: normal; color: #555; }
183 table#time-report tbody tr.last-level { font-style: normal; color: #555; }
180 table#time-report tbody tr.total { font-style: normal; font-weight: bold; color: #555; background-color:#EEEEEE; }
184 table#time-report tbody tr.total { font-style: normal; font-weight: bold; color: #555; background-color:#EEEEEE; }
181 table#time-report .hours-dec { font-size: 0.9em; }
185 table#time-report .hours-dec { font-size: 0.9em; }
182
186
183 div.total-hours { text-align: left; font-size: 110%; font-weight: bold; }
187 .total-hours { font-size: 110%; font-weight: bold; }
184 div.total-hours span.hours-int { font-size: 120%; }
188 .total-hours span.hours-int { font-size: 120%; }
185
189
186 .autoscroll {overflow-x: auto; padding:1px; width:100%; margin-bottom: 1.2em;}
190 .autoscroll {overflow-x: auto; padding:1px; width:100%; margin-bottom: 1.2em;}
187 #user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; }
191 #user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; }
@@ -337,8 +341,6 table.progress td.open { background: #FFF none repeat scroll 0%; }
337 p.pourcent {font-size: 80%;}
341 p.pourcent {font-size: 80%;}
338 p.progress-info {clear: left; font-style: italic; font-size: 80%;}
342 p.progress-info {clear: left; font-style: italic; font-size: 80%;}
339
343
340 div#status_by { float:right; width:380px; margin-left: 16px; margin-bottom: 16px; }
341
342 /***** Tabs *****/
344 /***** Tabs *****/
343 #content .tabs {height: 2.6em; border-bottom: 1px solid #bbbbbb; margin-bottom:1.2em; position:relative;}
345 #content .tabs {height: 2.6em; border-bottom: 1px solid #bbbbbb; margin-bottom:1.2em; position:relative;}
344 #content .tabs ul {margin:0; position:absolute; bottom:-2px; padding-left:1em;}
346 #content .tabs ul {margin:0; position:absolute; bottom:-2px; padding-left:1em;}
General Comments 0
You need to be logged in to leave comments. Login now