##// END OF EJS Templates
Additional "Log time" link on project overview (#11181)....
Jean-Philippe Lang -
r9714:6c9401b6242a
parent child
Show More
@@ -1,95 +1,99
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), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %>
3 <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :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 <ul>
26 <ul>
27 <% unless @project.homepage.blank? %>
27 <% unless @project.homepage.blank? %>
28 <li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li>
28 <li><%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %></li>
29 <% end %>
29 <% end %>
30 <% if @subprojects.any? %>
30 <% if @subprojects.any? %>
31 <li><%=l(:label_subproject_plural)%>:
31 <li><%=l(:label_subproject_plural)%>:
32 <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ").html_safe %></li>
32 <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ").html_safe %></li>
33 <% end %>
33 <% end %>
34 <% @project.visible_custom_field_values.each do |custom_value| %>
34 <% @project.visible_custom_field_values.each do |custom_value| %>
35 <% if !custom_value.value.blank? %>
35 <% if !custom_value.value.blank? %>
36 <li><%=h custom_value.custom_field.name %>: <%=h show_value(custom_value) %></li>
36 <li><%=h custom_value.custom_field.name %>: <%=h show_value(custom_value) %></li>
37 <% end %>
37 <% end %>
38 <% end %>
38 <% end %>
39 </ul>
39 </ul>
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 <ul>
44 <ul>
45 <% for tracker in @trackers %>
45 <% for tracker in @trackers %>
46 <li><%= link_to h(tracker.name), :controller => 'issues', :action => 'index', :project_id => @project,
46 <li><%= link_to h(tracker.name), :controller => 'issues', :action => 'index', :project_id => @project,
47 :set_filter => 1,
47 :set_filter => 1,
48 "tracker_id" => tracker.id %>:
48 "tracker_id" => tracker.id %>:
49 <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
49 <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i,
50 :total => @total_issues_by_tracker[tracker].to_i) %>
50 :total => @total_issues_by_tracker[tracker].to_i) %>
51 </li>
51 </li>
52 <% end %>
52 <% end %>
53 </ul>
53 </ul>
54 <p>
54 <p>
55 <%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %>
55 <%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %>
56 <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
56 <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
57 | <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) %>
57 | <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) %>
58 <% end %>
58 <% end %>
59 <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
59 <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
60 | <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %>
60 | <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %>
61 <% end %>
61 <% end %>
62 </p>
62 </p>
63 </div>
63 </div>
64 <% end %>
64 <% end %>
65 <%= call_hook(:view_projects_show_left, :project => @project) %>
65 <%= call_hook(:view_projects_show_left, :project => @project) %>
66 </div>
66 </div>
67
67
68 <div class="splitcontentright">
68 <div class="splitcontentright">
69 <%= render :partial => 'members_box' %>
69 <%= render :partial => 'members_box' %>
70
70
71 <% if @news.any? && authorize_for('news', 'index') %>
71 <% if @news.any? && authorize_for('news', 'index') %>
72 <div class="news box">
72 <div class="news box">
73 <h3><%=l(:label_news_latest)%></h3>
73 <h3><%=l(:label_news_latest)%></h3>
74 <%= render :partial => 'news/news', :collection => @news %>
74 <%= render :partial => 'news/news', :collection => @news %>
75 <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
75 <p><%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %></p>
76 </div>
76 </div>
77 <% end %>
77 <% end %>
78 <%= call_hook(:view_projects_show_right, :project => @project) %>
78 <%= call_hook(:view_projects_show_right, :project => @project) %>
79 </div>
79 </div>
80
80
81 <% content_for :sidebar do %>
81 <% content_for :sidebar do %>
82 <% if @total_hours.present? %>
82 <% if @total_hours.present? %>
83 <h3><%= l(:label_spent_time) %></h3>
83 <h3><%= l(:label_spent_time) %></h3>
84 <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
84 <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
85 <p><%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
85 <p>
86 <% if User.current.allowed_to?(:log_time, @project) %>
87 <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
88 <% end %>
89 <%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
86 <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %></p>
90 <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %></p>
87 <% end %>
91 <% end %>
88 <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
92 <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
89 <% end %>
93 <% end %>
90
94
91 <% content_for :header_tags do %>
95 <% content_for :header_tags do %>
92 <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
96 <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
93 <% end %>
97 <% end %>
94
98
95 <% html_title(l(:label_overview)) -%>
99 <% html_title(l(:label_overview)) -%>
General Comments 0
You need to be logged in to leave comments. Login now