##// END OF EJS Templates
Don't display table headers if there's no trackers (#20413)....
Jean-Philippe Lang -
r14416:269ba694b586
parent child
Show More
@@ -1,107 +1,109
1 <div class="contextual">
1 <div class="contextual">
2 <% if User.current.allowed_to?(:add_subprojects, @project) %>
2 <% if User.current.allowed_to?(:add_subprojects, @project) %>
3 <%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
3 <%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
4 <% end %>
4 <% end %>
5 <% if User.current.allowed_to?(:close_project, @project) %>
5 <% if User.current.allowed_to?(:close_project, @project) %>
6 <% if @project.active? %>
6 <% if @project.active? %>
7 <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %>
7 <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %>
8 <% else %>
8 <% else %>
9 <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %>
9 <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %>
10 <% end %>
10 <% end %>
11 <% end %>
11 <% end %>
12 </div>
12 </div>
13
13
14 <h2><%=l(:label_overview)%></h2>
14 <h2><%=l(:label_overview)%></h2>
15
15
16 <% unless @project.active? %>
16 <% unless @project.active? %>
17 <p class="warning"><span class="icon icon-lock"><%= l(:text_project_closed) %></span></p>
17 <p class="warning"><span class="icon icon-lock"><%= l(:text_project_closed) %></span></p>
18 <% end %>
18 <% end %>
19
19
20 <div class="splitcontentleft">
20 <div class="splitcontentleft">
21 <% if @project.description.present? %>
21 <% if @project.description.present? %>
22 <div class="wiki">
22 <div class="wiki">
23 <%= textilizable @project.description %>
23 <%= textilizable @project.description %>
24 </div>
24 </div>
25 <% end %>
25 <% end %>
26 <% if @project.homepage.present? || @subprojects.any? || @project.visible_custom_field_values.any?(&:present?) %>
26 <% if @project.homepage.present? || @subprojects.any? || @project.visible_custom_field_values.any?(&:present?) %>
27 <ul>
27 <ul>
28 <% unless @project.homepage.blank? %>
28 <% unless @project.homepage.blank? %>
29 <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to @project.homepage, @project.homepage %></li>
29 <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to @project.homepage, @project.homepage %></li>
30 <% end %>
30 <% end %>
31 <% if @subprojects.any? %>
31 <% if @subprojects.any? %>
32 <li><span class="label"><%=l(:label_subproject_plural)%>:</span>
32 <li><span class="label"><%=l(:label_subproject_plural)%>:</span>
33 <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %></li>
33 <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %></li>
34 <% end %>
34 <% end %>
35 <% render_custom_field_values(@project) do |custom_field, formatted| %>
35 <% render_custom_field_values(@project) do |custom_field, formatted| %>
36 <li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
36 <li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
37 <% end %>
37 <% end %>
38 </ul>
38 </ul>
39 <% end %>
39 <% end %>
40
40
41 <% if User.current.allowed_to?(:view_issues, @project) %>
41 <% if User.current.allowed_to?(:view_issues, @project) %>
42 <div class="issues box">
42 <div class="issues box">
43 <h3><%=l(:label_issue_tracking)%></h3>
43 <h3><%=l(:label_issue_tracking)%></h3>
44 <% if @trackers.present? %>
44 <table class="list issue-report">
45 <table class="list issue-report">
45 <thead>
46 <thead>
46 <tr>
47 <tr>
47 <th></th>
48 <th></th>
48 <th><%=l(:label_open_issues_plural)%></th>
49 <th><%=l(:label_open_issues_plural)%></th>
49 <th><%=l(:label_closed_issues_plural)%></th>
50 <th><%=l(:label_closed_issues_plural)%></th>
50 <th><%=l(:label_total)%></th>
51 <th><%=l(:label_total)%></th>
51 </tr>
52 </tr>
52 </thead>
53 </thead>
53 <tbody>
54 <tbody>
54 <% @trackers.each do |tracker| %>
55 <% @trackers.each do |tracker| %>
55 <tr class="<%= cycle("odd", "even") %>">
56 <tr class="<%= cycle("odd", "even") %>">
56 <td class="name">
57 <td class="name">
57 <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
58 <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
58 </td>
59 </td>
59 <td>
60 <td>
60 <%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
61 <%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
61 </td>
62 </td>
62 <td>
63 <td>
63 <%= link_to (@total_issues_by_tracker[tracker].to_i - @open_issues_by_tracker[tracker].to_i), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => 'c') %>
64 <%= link_to (@total_issues_by_tracker[tracker].to_i - @open_issues_by_tracker[tracker].to_i), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => 'c') %>
64 </td>
65 </td>
65 <td>
66 <td>
66 <%= link_to @total_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => '*') %>
67 <%= link_to @total_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => '*') %>
67 </td>
68 </td>
68 </tr>
69 </tr>
69 <% end %>
70 <% end %>
70 </tbody>
71 </tbody>
71 </table>
72 </table>
73 <% end %>
72 <p>
74 <p>
73 <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %>
75 <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %>
74 <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
76 <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
75 | <%= link_to l(:label_calendar), project_calendar_path(@project) %>
77 | <%= link_to l(:label_calendar), project_calendar_path(@project) %>
76 <% end %>
78 <% end %>
77 <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
79 <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
78 | <%= link_to l(:label_gantt), project_gantt_path(@project) %>
80 | <%= link_to l(:label_gantt), project_gantt_path(@project) %>
79 <% end %>
81 <% end %>
80 </p>
82 </p>
81 </div>
83 </div>
82 <% end %>
84 <% end %>
83 <%= call_hook(:view_projects_show_left, :project => @project) %>
85 <%= call_hook(:view_projects_show_left, :project => @project) %>
84 </div>
86 </div>
85
87
86 <div class="splitcontentright">
88 <div class="splitcontentright">
87 <%= render :partial => 'members_box' %>
89 <%= render :partial => 'members_box' %>
88
90
89 <% if @news.any? && authorize_for('news', 'index') %>
91 <% if @news.any? && authorize_for('news', 'index') %>
90 <div class="news box">
92 <div class="news box">
91 <h3><%=l(:label_news_latest)%></h3>
93 <h3><%=l(:label_news_latest)%></h3>
92 <%= render :partial => 'news/news', :collection => @news %>
94 <%= render :partial => 'news/news', :collection => @news %>
93 <p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p>
95 <p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p>
94 </div>
96 </div>
95 <% end %>
97 <% end %>
96 <%= call_hook(:view_projects_show_right, :project => @project) %>
98 <%= call_hook(:view_projects_show_right, :project => @project) %>
97 </div>
99 </div>
98
100
99 <% content_for :sidebar do %>
101 <% content_for :sidebar do %>
100 <%= render :partial => 'projects/sidebar' %>
102 <%= render :partial => 'projects/sidebar' %>
101 <% end %>
103 <% end %>
102
104
103 <% content_for :header_tags do %>
105 <% content_for :header_tags do %>
104 <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
106 <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
105 <% end %>
107 <% end %>
106
108
107 <% html_title(l(:label_overview)) -%>
109 <% html_title(l(:label_overview)) -%>
General Comments 0
You need to be logged in to leave comments. Login now