##// END OF EJS Templates
Use exists? instead of count (#24839)....
Jean-Philippe Lang -
r15828:62c7d1142721
parent child
Show More
@@ -1,57 +1,57
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
2 <%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
3 <%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
3 <%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
4 <%= delete_link version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)) if User.current.allowed_to?(:manage_versions, @version.project) %>
4 <%= delete_link version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)) if User.current.allowed_to?(:manage_versions, @version.project) %>
5 <%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
5 <%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
6 </div>
6 </div>
7
7
8 <h2><%= @version.name %></h2>
8 <h2><%= @version.name %></h2>
9
9
10 <div id="roadmap" class="<%= @version.css_classes %>">
10 <div id="roadmap" class="<%= @version.css_classes %>">
11 <%= render :partial => 'versions/overview', :locals => {:version => @version} %>
11 <%= render :partial => 'versions/overview', :locals => {:version => @version} %>
12 <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
12 <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
13
13
14 <div id="version-summary">
14 <div id="version-summary">
15 <% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
15 <% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
16 <fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
16 <fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
17 <table>
17 <table>
18 <tr>
18 <tr>
19 <th><%= l(:field_estimated_hours) %></th>
19 <th><%= l(:field_estimated_hours) %></th>
20 <td class="total-hours"><%= link_to html_hours(l_hours(@version.estimated_hours)),
20 <td class="total-hours"><%= link_to html_hours(l_hours(@version.estimated_hours)),
21 project_issues_path(@version.project, :set_filter => 1, :status_id => '*', :fixed_version_id => @version.id, :c => [:tracker, :status, :subject, :estimated_hours], :t => [:estimated_hours]) %></td>
21 project_issues_path(@version.project, :set_filter => 1, :status_id => '*', :fixed_version_id => @version.id, :c => [:tracker, :status, :subject, :estimated_hours], :t => [:estimated_hours]) %></td>
22 </tr>
22 </tr>
23 <% if User.current.allowed_to_view_all_time_entries?(@project) %>
23 <% if User.current.allowed_to_view_all_time_entries?(@project) %>
24 <tr>
24 <tr>
25 <th><%= l(:label_spent_time) %></th>
25 <th><%= l(:label_spent_time) %></th>
26 <td class="total-hours"><%= link_to html_hours(l_hours(@version.spent_hours)),
26 <td class="total-hours"><%= link_to html_hours(l_hours(@version.spent_hours)),
27 project_time_entries_path(@version.project, :set_filter => 1, :"issue.fixed_version_id" => @version.id) %></td>
27 project_time_entries_path(@version.project, :set_filter => 1, :"issue.fixed_version_id" => @version.id) %></td>
28 </tr>
28 </tr>
29 <% end %>
29 <% end %>
30 </table>
30 </table>
31 </fieldset>
31 </fieldset>
32 <% end %>
32 <% end %>
33
33
34 <div id="status_by">
34 <div id="status_by">
35 <%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
35 <%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.exists? %>
36 </div>
36 </div>
37 </div>
37 </div>
38
38
39 <% if @issues.present? %>
39 <% if @issues.present? %>
40 <%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
40 <%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
41 <table class="list related-issues">
41 <table class="list related-issues">
42 <caption><%= l(:label_related_issues) %></caption>
42 <caption><%= l(:label_related_issues) %></caption>
43 <%- @issues.each do |issue| -%>
43 <%- @issues.each do |issue| -%>
44 <tr class="issue hascontextmenu">
44 <tr class="issue hascontextmenu">
45 <td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
45 <td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
46 <td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
46 <td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
47 </tr>
47 </tr>
48 <% end %>
48 <% end %>
49 </table>
49 </table>
50 <% end %>
50 <% end %>
51 <%= context_menu %>
51 <%= context_menu %>
52 <% end %>
52 <% end %>
53 </div>
53 </div>
54
54
55 <%= call_hook :view_versions_show_bottom, :version => @version %>
55 <%= call_hook :view_versions_show_bottom, :version => @version %>
56
56
57 <% html_title @version.name %>
57 <% html_title @version.name %>
General Comments 0
You need to be logged in to leave comments. Login now