]> source.dussan.org Git - redmine.git/commitdiff
Moves project sidebar content to a partial (#17380).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 13 Sep 2014 10:53:13 +0000 (10:53 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 13 Sep 2014 10:53:13 +0000 (10:53 +0000)
Patch by Jérôme BATAILLE.

git-svn-id: http://svn.redmine.org/redmine/trunk@13393 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/_sidebar.html.erb [new file with mode: 0644]
app/views/projects/show.html.erb

diff --git a/app/views/projects/_sidebar.html.erb b/app/views/projects/_sidebar.html.erb
new file mode 100644 (file)
index 0000000..0f5c241
--- /dev/null
@@ -0,0 +1,12 @@
+<% if @total_hours.present? %>
+  <h3><%= l(:label_spent_time) %></h3>
+  <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
+  <p>
+  <% if User.current.allowed_to?(:log_time, @project) %>
+    <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
+  <% end %>
+  <%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
+  <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %>
+  </p>
+<% end %>
+<%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
index 8452a02d2079d319c35e409d1d3df00cc5ed0167..716df016f969e6b22824876ee10f207f68aa0813 100644 (file)
 </div>
 
 <% content_for :sidebar do %>
-    <% if @total_hours.present? %>
-    <h3><%= l(:label_spent_time) %></h3>
-    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
-    <p>
-    <% if User.current.allowed_to?(:log_time, @project) %>
-      <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
-    <% end %>
-    <%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
-    <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %></p>
-    <% end %>
-    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
+  <%= render :partial => 'projects/sidebar' %>
 <% end %>
 
 <% content_for :header_tags do %>