|
|
|
@ -12,6 +12,7 @@ |
|
|
|
|
<%= sort_header_tag("entry__spent_on", :caption => l(:caption_spent), :default_order => 'desc') %> |
|
|
|
|
<%= sort_header_tag("entry__user_id", :caption => l(:label_user), :default_order => 'asc') %> |
|
|
|
|
<%= sort_header_tag("entry__costs", :caption => l(:caption_costs), :default_order => 'asc') %> |
|
|
|
|
<th></th> |
|
|
|
|
</tr></thead> |
|
|
|
|
<tbody> |
|
|
|
|
<% @entries.each do |entry| %> |
|
|
|
@ -30,6 +31,27 @@ |
|
|
|
|
<td><%= format_date entry.spent_on %></td> |
|
|
|
|
<td><%= link_to_user entry.user %></td> |
|
|
|
|
<td class="currency"><%= number_to_currency(entry.real_costs) %></td> |
|
|
|
|
<td style="width: 40px"> |
|
|
|
|
<% if entry.is_a? TimeEntry %> |
|
|
|
|
<% if entry.editable_by?(User.current) -%> |
|
|
|
|
<%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry, :project_id => nil}, |
|
|
|
|
:title => l(:button_edit) %> |
|
|
|
|
<%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry, :project_id => nil}, |
|
|
|
|
:confirm => l(:text_are_you_sure), |
|
|
|
|
:method => :post, |
|
|
|
|
:title => l(:button_delete) %> |
|
|
|
|
<% end -%> |
|
|
|
|
<% else %> |
|
|
|
|
<% if entry.editable_by?(User.current) -%> |
|
|
|
|
<%= link_to image_tag('edit.png'), {:controller => 'costlog', :action => 'edit', :id => entry, :project_id => nil}, |
|
|
|
|
:title => l(:button_edit) %> |
|
|
|
|
<%= link_to image_tag('delete.png'), {:controller => 'costlog', :action => 'destroy', :id => entry, :project_id => nil}, |
|
|
|
|
:confirm => l(:text_are_you_sure), |
|
|
|
|
:method => :post, |
|
|
|
|
:title => l(:button_delete) %> |
|
|
|
|
<% end -%> |
|
|
|
|
<% end %> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<% end %> |
|
|
|
|
</tbody> |
|
|
|
|