summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/projects_controller.rb5
-rw-r--r--app/helpers/projects_helper.rb9
-rw-r--r--app/models/version.rb4
-rw-r--r--app/views/projects/calendar.rhtml2
-rw-r--r--app/views/projects/changelog.rhtml7
-rw-r--r--app/views/projects/gantt.rhtml2
-rw-r--r--app/views/projects/roadmap.rhtml22
-rw-r--r--lang/bg.yml1
-rw-r--r--lang/de.yml1
-rw-r--r--lang/en.yml1
-rw-r--r--lang/es.yml1
-rw-r--r--lang/fr.yml1
-rw-r--r--lang/it.yml1
-rw-r--r--lang/ja.yml1
-rw-r--r--lang/pt.yml1
-rw-r--r--lang/zh.yml1
-rw-r--r--public/images/arrow_bw.pngbin997 -> 998 bytes
-rw-r--r--public/images/arrow_from.pngbin994 -> 995 bytes
-rw-r--r--public/images/arrow_to.pngbin991 -> 997 bytes
19 files changed, 41 insertions, 19 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index ca6ea8d8e..971d0acd3 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -448,10 +448,11 @@ class ProjectsController < ApplicationController
def roadmap
@trackers = Tracker.find(:all, :conditions => ["is_in_roadmap=?", true], :order => 'position')
- retrieve_selected_tracker_ids(@trackers)
+ retrieve_selected_tracker_ids(@trackers)
+ conditions = ("1" == params[:completed] ? nil : [ "#{Version.table_name}.effective_date > ?", Date.today])
@versions = @project.versions.find(:all,
- :conditions => [ "#{Version.table_name}.effective_date>?", Date.today],
+ :conditions => conditions,
:order => "#{Version.table_name}.effective_date ASC"
)
end
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index c7e80b0a0..74805ba53 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -16,4 +16,13 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module ProjectsHelper
+ def link_to_version(version, options = {})
+ return '' unless version && version.is_a?(Version)
+ link_to version.name, {:controller => 'projects',
+ :action => 'roadmap',
+ :id => version.project_id,
+ :completed => (version.completed? ? 1 : nil),
+ :anchor => version.name
+ }, options
+ end
end
diff --git a/app/models/version.rb b/app/models/version.rb
index ddae037a6..463ca3354 100644
--- a/app/models/version.rb
+++ b/app/models/version.rb
@@ -33,6 +33,10 @@ class Version < ActiveRecord::Base
effective_date
end
+ def completed?
+ effective_date && effective_date <= Date.today
+ end
+
private
def check_integrity
raise "Can't delete version" if self.fixed_issues.find(:first)
diff --git a/app/views/projects/calendar.rhtml b/app/views/projects/calendar.rhtml
index 2a53831fe..48fdaf64d 100644
--- a/app/views/projects/calendar.rhtml
+++ b/app/views/projects/calendar.rhtml
@@ -74,7 +74,7 @@ while day <= @date_to
</span>
</div>
<% else %>
- <%= image_tag('milestone.png') %> <small><%= "#{l(:label_version)}: #{i.name}" %></small>
+ <small><%= link_to_version i, :class => "icon icon-package" %></small>
<% end %>
<% end %>
</td>
diff --git a/app/views/projects/changelog.rhtml b/app/views/projects/changelog.rhtml
index 51724f149..f42f32c42 100644
--- a/app/views/projects/changelog.rhtml
+++ b/app/views/projects/changelog.rhtml
@@ -1,14 +1,12 @@
<h2><%=l(:label_change_log)%></h2>
-<div>
-
<div class="rightbox" style="width:140px;">
<% form_tag do %>
-<p><strong><%=l(:label_tracker_plural)%></strong></p>
+<p><strong><%=l(:label_tracker_plural)%></strong><br />
<% @trackers.each do |tracker| %>
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
<%= tracker.name %><br />
-<% end %>
+<% end %></p>
<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p>
<% end %>
</div>
@@ -27,4 +25,3 @@
end %>
<li><%= link_to_issue issue %>: <%=h issue.subject %></li>
<% end %>
-</div> \ No newline at end of file
diff --git a/app/views/projects/gantt.rhtml b/app/views/projects/gantt.rhtml
index 317fd993d..ccc9a019a 100644
--- a/app/views/projects/gantt.rhtml
+++ b/app/views/projects/gantt.rhtml
@@ -90,7 +90,7 @@ top = headers_height + 8
<%= link_to_issue i %><%= " (#{i.project.name})" unless @project && @project == i.project %>:
<%=h i.subject %>
<% else %>
- <strong><%= "#{l(:label_version)}: #{i.name}" %></strong>
+ <%= link_to_version i, :class => "icon icon-package" %>
<% end %>
</small></div>
<% top = top + 20
diff --git a/app/views/projects/roadmap.rhtml b/app/views/projects/roadmap.rhtml
index e1449dcfa..ab591a830 100644
--- a/app/views/projects/roadmap.rhtml
+++ b/app/views/projects/roadmap.rhtml
@@ -1,14 +1,13 @@
<h2><%=l(:label_roadmap)%></h2>
-<div>
-
-<div class="rightbox" style="width:140px;">
+<div class="rightbox">
<% form_tag do %>
-<p><strong><%=l(:label_tracker_plural)%></strong></p>
+<p><strong><%=l(:label_tracker_plural)%></strong><br />
<% @trackers.each do |tracker| %>
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
<%= tracker.name %><br />
-<% end %>
+<% end %></p>
+<p class="small"><label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label></p>
<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p>
<% end %>
</div>
@@ -16,13 +15,17 @@
<% if @versions.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
<% @versions.each do |version| %>
- <h3 class="icon22 icon22-package"><%= version.name %></h3>
+ <a name="<%= version.name %>"><h3 class="icon22 icon22-package"><%= version.name %></h3></a>
+ <% if version.completed? %>
+ <p><%= format_date(version.effective_date) %></p>
+ <% else %>
+ <p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p>
+ <% end %>
<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,
+ :include => [:status, :tracker],
:conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
- :order => "position")
+ :order => "#{Tracker.table_name}.position")
total = issues.size
complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c }
@@ -56,4 +59,3 @@
<% end %>
</ul>
<% end %>
-</div>
diff --git a/lang/bg.yml b/lang/bg.yml
index 1e348cb75..3db6cc891 100644
--- a/lang/bg.yml
+++ b/lang/bg.yml
@@ -383,6 +383,7 @@ label_start_to_start: start to start
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Вход
button_submit: Изпращане
diff --git a/lang/de.yml b/lang/de.yml
index 1fc529bad..bb43bf393 100644
--- a/lang/de.yml
+++ b/lang/de.yml
@@ -383,6 +383,7 @@ label_start_to_start: start to start
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Einloggen
button_submit: OK
diff --git a/lang/en.yml b/lang/en.yml
index 1800b5d33..ef56872e5 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -383,6 +383,7 @@ label_start_to_start: start to start
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Login
button_submit: Submit
diff --git a/lang/es.yml b/lang/es.yml
index 3a66e0bcf..dce15514f 100644
--- a/lang/es.yml
+++ b/lang/es.yml
@@ -383,6 +383,7 @@ label_start_to_start: start to start
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Conexión
button_submit: Someter
diff --git a/lang/fr.yml b/lang/fr.yml
index bd1973b4d..e332f1c6d 100644
--- a/lang/fr.yml
+++ b/lang/fr.yml
@@ -383,6 +383,7 @@ label_start_to_start: début à début
label_start_to_end: début à fin
label_stay_logged_in: Rester connecté
label_disabled: désactivé
+label_show_completed_versions: Voire les versions passées
button_login: Connexion
button_submit: Soumettre
diff --git a/lang/it.yml b/lang/it.yml
index c1e964548..4d100a2e8 100644
--- a/lang/it.yml
+++ b/lang/it.yml
@@ -383,6 +383,7 @@ label_start_to_start: start to start
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Login
button_submit: Invia
diff --git a/lang/ja.yml b/lang/ja.yml
index 955799494..ac5e48ee1 100644
--- a/lang/ja.yml
+++ b/lang/ja.yml
@@ -384,6 +384,7 @@ label_start_to_start: start to start
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: ログイン
button_submit: 変更
diff --git a/lang/pt.yml b/lang/pt.yml
index 3c6debfbe..33da15fe0 100644
--- a/lang/pt.yml
+++ b/lang/pt.yml
@@ -383,6 +383,7 @@ label_start_to_start: start to start
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: Login
button_submit: Enviar
diff --git a/lang/zh.yml b/lang/zh.yml
index f9f2a75a7..894aa1f46 100644
--- a/lang/zh.yml
+++ b/lang/zh.yml
@@ -386,6 +386,7 @@ label_start_to_start: start to start
label_start_to_end: start to end
label_stay_logged_in: Stay logged in
label_disabled: disabled
+label_show_completed_versions: Show completed versions
button_login: 登录
button_submit: 提交
diff --git a/public/images/arrow_bw.png b/public/images/arrow_bw.png
index 52dfc96f0..2af9e2cd4 100644
--- a/public/images/arrow_bw.png
+++ b/public/images/arrow_bw.png
Binary files differ
diff --git a/public/images/arrow_from.png b/public/images/arrow_from.png
index 4d5eeb9ea..7d94ad185 100644
--- a/public/images/arrow_from.png
+++ b/public/images/arrow_from.png
Binary files differ
diff --git a/public/images/arrow_to.png b/public/images/arrow_to.png
index 4f969716f..f021e98c9 100644
--- a/public/images/arrow_to.png
+++ b/public/images/arrow_to.png
Binary files differ