OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/cost_reports/_list.rhtml

24 lines
1.2 KiB

<table class="cost_entries">
<thead><tr>
<%= sort_header_tag("issue_id", :caption => l(:caption_issue), :default_order => 'desc') %>
<th><%= l(:caption_cost_unit_plural) %></th>
<th><%= l(:caption_cost_type) %></th>
<th><%= l(:caption_activity) %></th>
<%= sort_header_tag("spent_on", :caption => l(:caption_spent_on), :default_order => 'desc') %>
<th><%= l(:caption_user) %></th>
<th><%= l(:caption_costs) %></th>
</tr></thead>
<tbody>
<% @entries.each do |entry| %>
<tr class="<%= cycle('odd', 'even') %>">
<td class="subject"><%= link_to_issue entry.issue %>: <%= h(truncate(entry.issue.subject, 50)) -%></td>
<td><%= (link_to pluralize(entry.units, entry.cost_type.unit, entry.cost_type.unit_plural), {:controller => "costlog", :action => "details", :cost_type_id => entry.cost_type, :issue_id => entry.issue}) if entry.is_a?(CostEntry) %></td>
<td><%= entry.cost_type if entry.is_a?(CostEntry)%></td>
<td><%= entry.activity if entry.is_a?(TimeEntry)%></td>
<td><%= format_date entry.spent_on %></td>
<td><%= link_to_user entry.user %></td>
<td class="currency"><%= number_to_currency(entry.real_costs) %></td>
</tr>
<% end %>
</tbody>
</table>