diff --git a/app/views/projects/roadmap.rhtml b/app/views/projects/roadmap.rhtml
index 38e5fbd1..19a3032b 100644
--- a/app/views/projects/roadmap.rhtml
+++ b/app/views/projects/roadmap.rhtml
@@ -17,21 +17,44 @@
<% @versions.each do |version| %>
<%= version.name %>
- <%= format_date(version.effective_date) %>
- <%=h version.description %>
-
- <% version.fixed_issues.find(:all,
+ <%=h version.description %>
+ <%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)
+ <% issues = version.fixed_issues.find(:all,
:include => :status,
:conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
- :order => "position").each do |issue| %>
- -
- <%=
- 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? %>
- <% end %>
+ :order => "position")
+
+ 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
+ %>
+
+
+ <% if percentComplete > 0 %>
+ |
+ <% end; if percentIncomplete > 0 %>
+ |
+ <% end %>
+
+
+ <%= 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 %>%)
+
+
+
+ <% if total == 0 %>
+ - <%=l(:label_roadmap_no_issues)%>
+ <% else %>
+ <% issues.each do |issue| %>
+ -
+ <%= 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? %>
+
+ <% end %>
+ <% end %>
<% end %>
-
\ No newline at end of file
+
diff --git a/lang/de.yml b/lang/de.yml
index 3046dceb..82c61551 100644
--- a/lang/de.yml
+++ b/lang/de.yml
@@ -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
diff --git a/lang/en.yml b/lang/en.yml
index 6ed10aa8..2b5ceb60 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -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
diff --git a/lang/es.yml b/lang/es.yml
index a0a04562..20cadb62 100644
--- a/lang/es.yml
+++ b/lang/es.yml
@@ -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
diff --git a/lang/fr.yml b/lang/fr.yml
index 9a2195b1..7ec3e93f 100644
--- a/lang/fr.yml
+++ b/lang/fr.yml
@@ -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
diff --git a/lang/it.yml b/lang/it.yml
index df89120f..d9abb0d2 100644
--- a/lang/it.yml
+++ b/lang/it.yml
@@ -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
diff --git a/lang/ja.yml b/lang/ja.yml
index 57d3df41..d0a255a8 100644
--- a/lang/ja.yml
+++ b/lang/ja.yml
@@ -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 件の結果
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index ea0aaa4c..6239fafc 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -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;