RM_17380_project_show_add_a_sidebar_partial_RM_V2.5.diff

Jérôme BATAILLE, 2014-07-04 10:48

Download (1.74 KB)

View differences:

app/views/projects/show.html.erb (copie de travail)
77 77
</div>
78 78

  
79 79
<% content_for :sidebar do %>
80
    <% if @total_hours.present? %>
81
    <h3><%= l(:label_spent_time) %></h3>
82
    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
83
    <p>
84
    <% if User.current.allowed_to?(:log_time, @project) %>
85
      <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
86
    <% end %>
87
    <%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
88
    <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %></p>
89
    <% end %>
90
    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>
80
  <%= render :partial => 'projects/sidebar' %>
91 81
<% end %>
92 82

  
93 83
<% content_for :header_tags do %>
app/views/projects/_sidebar.html.erb (copie de travail)
1
    <% if @total_hours.present? %>
2
    <h3><%= l(:label_spent_time) %></h3>
3
    <p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>
4
    <p>
5
    <% if User.current.allowed_to?(:log_time, @project) %>
6
      <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> |
7
    <% end %>
8
    <%= link_to(l(:label_details), project_time_entries_path(@project)) %> |
9
    <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %></p>
10
    <% end %>
11
    <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %>