Patch #9530 Progress bars for roadmap versions (Nick Read)
Slightly edited and links to issues list added git-svn-id: http://redmine.rubyforge.org/svn/trunk@379 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d7f1b873c8
commit
887f11435b
|
@ -17,20 +17,43 @@
|
|||
|
||||
<% @versions.each do |version| %>
|
||||
<h3 class="icon22 icon22-package"><%= version.name %></h3>
|
||||
<p><%= format_date(version.effective_date) %><br />
|
||||
<%=h version.description %></p>
|
||||
<ul>
|
||||
<% version.fixed_issues.find(:all,
|
||||
<p><%=h version.description %></p>
|
||||
<p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p>
|
||||
<% issues = version.fixed_issues.find(:all,
|
||||
:include => :status,
|
||||
:conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
|
||||
:order => "position").each do |issue| %>
|
||||
<li>
|
||||
<%=
|
||||
link = link_to("#{issue.tracker.name} ##{issue.id}", :controller => 'issues', :action => 'show', :id => issue)
|
||||
issue.status.is_closed? ? content_tag("del", link) : link
|
||||
%> : <%=h issue.subject %>
|
||||
:order => "position")
|
||||
|
||||
<%= content_tag "em", "(#{l(:label_closed_issues)})" if issue.status.is_closed? %></li>
|
||||
total = issues.size
|
||||
complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c }
|
||||
percentComplete = total == 0 ? 100 : (100 / total * complete).floor
|
||||
percentIncomplete = 100 - percentComplete
|
||||
%>
|
||||
<table class="progress">
|
||||
<tr>
|
||||
<% if percentComplete > 0 %>
|
||||
<td class="closed" style="width: <%= percentComplete %>%"></td>
|
||||
<% end; if percentIncomplete > 0 %>
|
||||
<td class="open" style="width: <%= percentIncomplete %>%"></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
</table>
|
||||
<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 %>%)  
|
||||
<%= 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>
|
||||
<br />
|
||||
<br />
|
||||
<ul>
|
||||
<% if total == 0 %>
|
||||
<li><%=l(:label_roadmap_no_issues)%></li>
|
||||
<% else %>
|
||||
<% issues.each do |issue| %>
|
||||
<li>
|
||||
<%= link = link_to("#{issue.tracker.name} ##{issue.id}", :controller => 'issues', :action => 'show', :id => issue)
|
||||
issue.status.is_closed? ? content_tag("del", link) : link %>
|
||||
: <%=h issue.subject %>
|
||||
<%= content_tag "em", "(#{l(:label_closed_issues)})" if issue.status.is_closed? %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
|
@ -325,6 +325,8 @@ label_sort_higher: eins höher
|
|||
label_sort_lower: eins tiefer
|
||||
label_sort_lowest: Ende
|
||||
label_roadmap: Roadmap
|
||||
label_roadmap_due_in: Due in
|
||||
label_roadmap_no_issues: No issues for this version
|
||||
label_search: Suche
|
||||
label_result: %d Resultat
|
||||
label_result_plural: %d Resultate
|
||||
|
|
|
@ -325,6 +325,8 @@ label_sort_higher: Move up
|
|||
label_sort_lower: Move down
|
||||
label_sort_lowest: Move to bottom
|
||||
label_roadmap: Roadmap
|
||||
label_roadmap_due_in: Due in
|
||||
label_roadmap_no_issues: No issues for this version
|
||||
label_search: Search
|
||||
label_result: %d result
|
||||
label_result_plural: %d results
|
||||
|
|
|
@ -325,6 +325,8 @@ label_sort_higher: Subir
|
|||
label_sort_lower: Bajar
|
||||
label_sort_lowest: Último
|
||||
label_roadmap: Roadmap
|
||||
label_roadmap_due_in: Due in
|
||||
label_roadmap_no_issues: No issues for this version
|
||||
label_search: Búsqueda
|
||||
label_result: %d resultado
|
||||
label_result_plural: %d resultados
|
||||
|
|
|
@ -325,6 +325,8 @@ label_sort_higher: Remonter
|
|||
label_sort_lower: Descendre
|
||||
label_sort_lowest: Descendre en dernier
|
||||
label_roadmap: Roadmap
|
||||
label_roadmap_due_in: Echéance dans
|
||||
label_roadmap_no_issues: Aucune demande pour cette version
|
||||
label_search: Recherche
|
||||
label_result: %d résultat
|
||||
label_result_plural: %d résultats
|
||||
|
|
|
@ -325,6 +325,8 @@ label_sort_higher: Su
|
|||
label_sort_lower: Giù
|
||||
label_sort_lowest: Sposta in fondo
|
||||
label_roadmap: Roadmap
|
||||
label_roadmap_due_in: Due in
|
||||
label_roadmap_no_issues: No issues for this version
|
||||
label_search: Ricerca
|
||||
label_result: %d risultato
|
||||
label_result_plural: %d risultati
|
||||
|
|
|
@ -326,6 +326,8 @@ label_sort_higher: 上へ
|
|||
label_sort_lower: 下へ
|
||||
label_sort_lowest: 一番下へ
|
||||
label_roadmap: ロードマップ
|
||||
label_roadmap_due_in: Due in
|
||||
label_roadmap_no_issues: No issues for this version
|
||||
label_search: 検索
|
||||
label_result: %d 件の結果
|
||||
label_result_plural: %d 件の結果
|
||||
|
|
|
@ -501,6 +501,20 @@ img.calendar-trigger {
|
|||
margin-left: 34px;
|
||||
}
|
||||
|
||||
.progress {
|
||||
border: 1px solid #D7D7D7;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0pt;
|
||||
empty-cells: show;
|
||||
padding: 3px;
|
||||
width: 40em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.progress td { height: 1em; }
|
||||
.progress .closed { background: #BAE0BA none repeat scroll 0%; }
|
||||
.progress .open { background: #FFF none repeat scroll 0%; }
|
||||
|
||||
/***** Contextual links div *****/
|
||||
.contextual {
|
||||
float: right;
|
||||
|
|
Loading…
Reference in New Issue