Added an option to see all versions in the roadmap view (including completed ones).
On calendar and gantt, versions are now clickable and link to the corresponding entry in the roadmap. Since calendar and gantt are now cached, don't forget to empty your cache before restarting the application. git-svn-id: http://redmine.rubyforge.org/svn/trunk@516 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b748455d96
commit
8e24c6458d
|
@ -448,10 +448,11 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
def roadmap
|
def roadmap
|
||||||
@trackers = Tracker.find(:all, :conditions => ["is_in_roadmap=?", true], :order => 'position')
|
@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,
|
@versions = @project.versions.find(:all,
|
||||||
:conditions => [ "#{Version.table_name}.effective_date>?", Date.today],
|
:conditions => conditions,
|
||||||
:order => "#{Version.table_name}.effective_date ASC"
|
:order => "#{Version.table_name}.effective_date ASC"
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,4 +16,13 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
module ProjectsHelper
|
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
|
end
|
||||||
|
|
|
@ -33,6 +33,10 @@ class Version < ActiveRecord::Base
|
||||||
effective_date
|
effective_date
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def completed?
|
||||||
|
effective_date && effective_date <= Date.today
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def check_integrity
|
def check_integrity
|
||||||
raise "Can't delete version" if self.fixed_issues.find(:first)
|
raise "Can't delete version" if self.fixed_issues.find(:first)
|
||||||
|
|
|
@ -74,7 +74,7 @@ while day <= @date_to
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= image_tag('milestone.png') %> <small><%= "#{l(:label_version)}: #{i.name}" %></small>
|
<small><%= link_to_version i, :class => "icon icon-package" %></small>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
<h2><%=l(:label_change_log)%></h2>
|
<h2><%=l(:label_change_log)%></h2>
|
||||||
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<div class="rightbox" style="width:140px;">
|
<div class="rightbox" style="width:140px;">
|
||||||
<% form_tag do %>
|
<% form_tag do %>
|
||||||
<p><strong><%=l(:label_tracker_plural)%></strong></p>
|
<p><strong><%=l(:label_tracker_plural)%></strong><br />
|
||||||
<% @trackers.each do |tracker| %>
|
<% @trackers.each do |tracker| %>
|
||||||
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
|
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
|
||||||
<%= tracker.name %><br />
|
<%= tracker.name %><br />
|
||||||
<% end %>
|
<% end %></p>
|
||||||
<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p>
|
<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,4 +25,3 @@
|
||||||
end %>
|
end %>
|
||||||
<li><%= link_to_issue issue %>: <%=h issue.subject %></li>
|
<li><%= link_to_issue issue %>: <%=h issue.subject %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
|
@ -90,7 +90,7 @@ top = headers_height + 8
|
||||||
<%= link_to_issue i %><%= " (#{i.project.name})" unless @project && @project == i.project %>:
|
<%= link_to_issue i %><%= " (#{i.project.name})" unless @project && @project == i.project %>:
|
||||||
<%=h i.subject %>
|
<%=h i.subject %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<strong><%= "#{l(:label_version)}: #{i.name}" %></strong>
|
<%= link_to_version i, :class => "icon icon-package" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</small></div>
|
</small></div>
|
||||||
<% top = top + 20
|
<% top = top + 20
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
<h2><%=l(:label_roadmap)%></h2>
|
<h2><%=l(:label_roadmap)%></h2>
|
||||||
|
|
||||||
<div>
|
<div class="rightbox">
|
||||||
|
|
||||||
<div class="rightbox" style="width:140px;">
|
|
||||||
<% form_tag do %>
|
<% form_tag do %>
|
||||||
<p><strong><%=l(:label_tracker_plural)%></strong></p>
|
<p><strong><%=l(:label_tracker_plural)%></strong><br />
|
||||||
<% @trackers.each do |tracker| %>
|
<% @trackers.each do |tracker| %>
|
||||||
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
|
<%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %>
|
||||||
<%= tracker.name %><br />
|
<%= 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>
|
<p><center><%= submit_tag l(:button_apply), :class => 'button-small' %></center></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,13 +15,17 @@
|
||||||
<% if @versions.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
|
<% if @versions.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
|
||||||
|
|
||||||
<% @versions.each do |version| %>
|
<% @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><%=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,
|
<% issues = version.fixed_issues.find(:all,
|
||||||
:include => :status,
|
:include => [:status, :tracker],
|
||||||
:conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
|
:conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"],
|
||||||
:order => "position")
|
:order => "#{Tracker.table_name}.position")
|
||||||
|
|
||||||
total = issues.size
|
total = issues.size
|
||||||
complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c }
|
complete = issues.inject(0) {|c,i| i.status.is_closed? ? c + 1 : c }
|
||||||
|
@ -56,4 +59,3 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
|
|
|
@ -383,6 +383,7 @@ label_start_to_start: start to start
|
||||||
label_start_to_end: start to end
|
label_start_to_end: start to end
|
||||||
label_stay_logged_in: Stay logged in
|
label_stay_logged_in: Stay logged in
|
||||||
label_disabled: disabled
|
label_disabled: disabled
|
||||||
|
label_show_completed_versions: Show completed versions
|
||||||
|
|
||||||
button_login: Вход
|
button_login: Вход
|
||||||
button_submit: Изпращане
|
button_submit: Изпращане
|
||||||
|
|
|
@ -383,6 +383,7 @@ label_start_to_start: start to start
|
||||||
label_start_to_end: start to end
|
label_start_to_end: start to end
|
||||||
label_stay_logged_in: Stay logged in
|
label_stay_logged_in: Stay logged in
|
||||||
label_disabled: disabled
|
label_disabled: disabled
|
||||||
|
label_show_completed_versions: Show completed versions
|
||||||
|
|
||||||
button_login: Einloggen
|
button_login: Einloggen
|
||||||
button_submit: OK
|
button_submit: OK
|
||||||
|
|
|
@ -383,6 +383,7 @@ label_start_to_start: start to start
|
||||||
label_start_to_end: start to end
|
label_start_to_end: start to end
|
||||||
label_stay_logged_in: Stay logged in
|
label_stay_logged_in: Stay logged in
|
||||||
label_disabled: disabled
|
label_disabled: disabled
|
||||||
|
label_show_completed_versions: Show completed versions
|
||||||
|
|
||||||
button_login: Login
|
button_login: Login
|
||||||
button_submit: Submit
|
button_submit: Submit
|
||||||
|
|
|
@ -383,6 +383,7 @@ label_start_to_start: start to start
|
||||||
label_start_to_end: start to end
|
label_start_to_end: start to end
|
||||||
label_stay_logged_in: Stay logged in
|
label_stay_logged_in: Stay logged in
|
||||||
label_disabled: disabled
|
label_disabled: disabled
|
||||||
|
label_show_completed_versions: Show completed versions
|
||||||
|
|
||||||
button_login: Conexión
|
button_login: Conexión
|
||||||
button_submit: Someter
|
button_submit: Someter
|
||||||
|
|
|
@ -383,6 +383,7 @@ label_start_to_start: début à début
|
||||||
label_start_to_end: début à fin
|
label_start_to_end: début à fin
|
||||||
label_stay_logged_in: Rester connecté
|
label_stay_logged_in: Rester connecté
|
||||||
label_disabled: désactivé
|
label_disabled: désactivé
|
||||||
|
label_show_completed_versions: Voire les versions passées
|
||||||
|
|
||||||
button_login: Connexion
|
button_login: Connexion
|
||||||
button_submit: Soumettre
|
button_submit: Soumettre
|
||||||
|
|
|
@ -383,6 +383,7 @@ label_start_to_start: start to start
|
||||||
label_start_to_end: start to end
|
label_start_to_end: start to end
|
||||||
label_stay_logged_in: Stay logged in
|
label_stay_logged_in: Stay logged in
|
||||||
label_disabled: disabled
|
label_disabled: disabled
|
||||||
|
label_show_completed_versions: Show completed versions
|
||||||
|
|
||||||
button_login: Login
|
button_login: Login
|
||||||
button_submit: Invia
|
button_submit: Invia
|
||||||
|
|
|
@ -384,6 +384,7 @@ label_start_to_start: start to start
|
||||||
label_start_to_end: start to end
|
label_start_to_end: start to end
|
||||||
label_stay_logged_in: Stay logged in
|
label_stay_logged_in: Stay logged in
|
||||||
label_disabled: disabled
|
label_disabled: disabled
|
||||||
|
label_show_completed_versions: Show completed versions
|
||||||
|
|
||||||
button_login: ログイン
|
button_login: ログイン
|
||||||
button_submit: 変更
|
button_submit: 変更
|
||||||
|
|
|
@ -383,6 +383,7 @@ label_start_to_start: start to start
|
||||||
label_start_to_end: start to end
|
label_start_to_end: start to end
|
||||||
label_stay_logged_in: Stay logged in
|
label_stay_logged_in: Stay logged in
|
||||||
label_disabled: disabled
|
label_disabled: disabled
|
||||||
|
label_show_completed_versions: Show completed versions
|
||||||
|
|
||||||
button_login: Login
|
button_login: Login
|
||||||
button_submit: Enviar
|
button_submit: Enviar
|
||||||
|
|
|
@ -386,6 +386,7 @@ label_start_to_start: start to start
|
||||||
label_start_to_end: start to end
|
label_start_to_end: start to end
|
||||||
label_stay_logged_in: Stay logged in
|
label_stay_logged_in: Stay logged in
|
||||||
label_disabled: disabled
|
label_disabled: disabled
|
||||||
|
label_show_completed_versions: Show completed versions
|
||||||
|
|
||||||
button_login: 登录
|
button_login: 登录
|
||||||
button_submit: 提交
|
button_submit: 提交
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 997 B After Width: | Height: | Size: 998 B |
Binary file not shown.
Before Width: | Height: | Size: 994 B After Width: | Height: | Size: 995 B |
Binary file not shown.
Before Width: | Height: | Size: 991 B After Width: | Height: | Size: 997 B |
Loading…
Reference in New Issue