##// END OF EJS Templates
Adds CSS class for closed subprojects on project overview (#23152)....
Jean-Philippe Lang -
r15203:b6982e755b52
parent child
Show More
@@ -1,113 +1,113
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? || @project.visible_custom_field_values.any?(&:present?) %>
26 <% if @project.homepage.present? || @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_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li>
29 <li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li>
30 <% end %>
30 <% end %>
31 <% render_custom_field_values(@project) do |custom_field, formatted| %>
31 <% render_custom_field_values(@project) do |custom_field, formatted| %>
32 <li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
32 <li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
33 <% end %>
33 <% end %>
34 </ul>
34 </ul>
35 <% end %>
35 <% end %>
36
36
37 <% if User.current.allowed_to?(:view_issues, @project) %>
37 <% if User.current.allowed_to?(:view_issues, @project) %>
38 <div class="issues box">
38 <div class="issues box">
39 <h3><%=l(:label_issue_tracking)%></h3>
39 <h3><%=l(:label_issue_tracking)%></h3>
40 <% if @trackers.present? %>
40 <% if @trackers.present? %>
41 <table class="list issue-report">
41 <table class="list issue-report">
42 <thead>
42 <thead>
43 <tr>
43 <tr>
44 <th></th>
44 <th></th>
45 <th><%=l(:label_open_issues_plural)%></th>
45 <th><%=l(:label_open_issues_plural)%></th>
46 <th><%=l(:label_closed_issues_plural)%></th>
46 <th><%=l(:label_closed_issues_plural)%></th>
47 <th><%=l(:label_total)%></th>
47 <th><%=l(:label_total)%></th>
48 </tr>
48 </tr>
49 </thead>
49 </thead>
50 <tbody>
50 <tbody>
51 <% @trackers.each do |tracker| %>
51 <% @trackers.each do |tracker| %>
52 <tr class="<%= cycle("odd", "even") %>">
52 <tr class="<%= cycle("odd", "even") %>">
53 <td class="name">
53 <td class="name">
54 <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
54 <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
55 </td>
55 </td>
56 <td>
56 <td>
57 <%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
57 <%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
58 </td>
58 </td>
59 <td>
59 <td>
60 <%= 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') %>
60 <%= 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') %>
61 </td>
61 </td>
62 <td>
62 <td>
63 <%= link_to @total_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => '*') %>
63 <%= link_to @total_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => '*') %>
64 </td>
64 </td>
65 </tr>
65 </tr>
66 <% end %>
66 <% end %>
67 </tbody>
67 </tbody>
68 </table>
68 </table>
69 <% end %>
69 <% end %>
70 <p>
70 <p>
71 <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %>
71 <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %>
72 <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
72 <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
73 | <%= link_to l(:label_calendar), project_calendar_path(@project) %>
73 | <%= link_to l(:label_calendar), project_calendar_path(@project) %>
74 <% end %>
74 <% end %>
75 <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
75 <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
76 | <%= link_to l(:label_gantt), project_gantt_path(@project) %>
76 | <%= link_to l(:label_gantt), project_gantt_path(@project) %>
77 <% end %>
77 <% end %>
78 </p>
78 </p>
79 </div>
79 </div>
80 <% end %>
80 <% end %>
81 <%= call_hook(:view_projects_show_left, :project => @project) %>
81 <%= call_hook(:view_projects_show_left, :project => @project) %>
82 </div>
82 </div>
83
83
84 <div class="splitcontentright">
84 <div class="splitcontentright">
85 <%= render :partial => 'members_box' %>
85 <%= render :partial => 'members_box' %>
86
86
87 <% if @news.any? && authorize_for('news', 'index') %>
87 <% if @news.any? && authorize_for('news', 'index') %>
88 <div class="news box">
88 <div class="news box">
89 <h3><%=l(:label_news_latest)%></h3>
89 <h3><%=l(:label_news_latest)%></h3>
90 <%= render :partial => 'news/news', :collection => @news %>
90 <%= render :partial => 'news/news', :collection => @news %>
91 <p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p>
91 <p><%= link_to l(:label_news_view_all), project_news_index_path(@project) %></p>
92 </div>
92 </div>
93 <% end %>
93 <% end %>
94
94
95 <% if @subprojects.any? %>
95 <% if @subprojects.any? %>
96 <div class="projects box">
96 <div class="projects box">
97 <h3><%=l(:label_subproject_plural)%></h3>
97 <h3><%=l(:label_subproject_plural)%></h3>
98 <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %>
98 <%= @subprojects.collect{|p| link_to p, project_path(p), :class => p.css_classes}.join(", ").html_safe %>
99 </div>
99 </div>
100 <% end %>
100 <% end %>
101
101
102 <%= call_hook(:view_projects_show_right, :project => @project) %>
102 <%= call_hook(:view_projects_show_right, :project => @project) %>
103 </div>
103 </div>
104
104
105 <% content_for :sidebar do %>
105 <% content_for :sidebar do %>
106 <%= render :partial => 'projects/sidebar' %>
106 <%= render :partial => 'projects/sidebar' %>
107 <% end %>
107 <% end %>
108
108
109 <% content_for :header_tags do %>
109 <% content_for :header_tags do %>
110 <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
110 <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
111 <% end %>
111 <% end %>
112
112
113 <% html_title(l(:label_overview)) -%>
113 <% html_title(l(:label_overview)) -%>
General Comments 0
You need to be logged in to leave comments. Login now