##// END OF EJS Templates
Roadmap: sort issues by project and prepend project name if different (#4373)....
Jean-Philippe Lang -
r3049:d58762a52dd7
parent child
Show More
@@ -319,9 +319,9 class ProjectsController < ApplicationController
319 conditions.merge!(:project_id => project_ids)
319 conditions.merge!(:project_id => project_ids)
320 end
320 end
321 issues = version.fixed_issues.visible.find(:all,
321 issues = version.fixed_issues.visible.find(:all,
322 :include => [:status, :tracker, :priority],
322 :include => [:project, :status, :tracker, :priority],
323 :conditions => conditions,
323 :conditions => conditions,
324 :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id")
324 :order => "#{Project.table_name}.lft, #{Tracker.table_name}.position, #{Issue.table_name}.id")
325 @issues_by_version[version] = issues
325 @issues_by_version[version] = issues
326 end
326 end
327 end
327 end
@@ -64,6 +64,7 module ApplicationHelper
64 # link_to_issue(issue) # => Defect #6: This is the subject
64 # link_to_issue(issue) # => Defect #6: This is the subject
65 # link_to_issue(issue, :truncate => 6) # => Defect #6: This i...
65 # link_to_issue(issue, :truncate => 6) # => Defect #6: This i...
66 # link_to_issue(issue, :subject => false) # => Defect #6
66 # link_to_issue(issue, :subject => false) # => Defect #6
67 # link_to_issue(issue, :project => true) # => Foo - Defect #6
67 #
68 #
68 def link_to_issue(issue, options={})
69 def link_to_issue(issue, options={})
69 title = nil
70 title = nil
@@ -80,6 +81,7 module ApplicationHelper
80 :class => issue.css_classes,
81 :class => issue.css_classes,
81 :title => title
82 :title => title
82 s << ": #{h subject}" if subject
83 s << ": #{h subject}" if subject
84 s = "#{h issue.project} - " + s if options[:project]
83 s
85 s
84 end
86 end
85
87
@@ -14,7 +14,7
14 <fieldset class="related-issues"><legend><%= l(:label_related_issues) %></legend>
14 <fieldset class="related-issues"><legend><%= l(:label_related_issues) %></legend>
15 <ul>
15 <ul>
16 <%- issues.each do |issue| -%>
16 <%- issues.each do |issue| -%>
17 <li><%= link_to_issue(issue) %></li>
17 <li><%= link_to_issue(issue, :project => (@project != issue.project)) %></li>
18 <%- end -%>
18 <%- end -%>
19 </ul>
19 </ul>
20 </fieldset>
20 </fieldset>
@@ -29,7 +29,7
29 <h3><%= l(:label_roadmap) %></h3>
29 <h3><%= l(:label_roadmap) %></h3>
30 <% @trackers.each do |tracker| %>
30 <% @trackers.each do |tracker| %>
31 <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s), :id => nil %>
31 <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s), :id => nil %>
32 <%= tracker.name %></label><br />
32 <%=h tracker.name %></label><br />
33 <% end %>
33 <% end %>
34 <br />
34 <br />
35 <label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>
35 <label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>
General Comments 0
You need to be logged in to leave comments. Login now