kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
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.
93 lines
3.5 KiB
93 lines
3.5 KiB
<%#-- copyright
|
|
OpenProject Costs Plugin
|
|
|
|
Copyright (C) 2009 - 2014 the OpenProject Foundation (OPF)
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
version 3.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
++#%>
|
|
|
|
<div class="generic-table--container">
|
|
<div class="generic-table--results-container">
|
|
<table class="generic-table cost_entries">
|
|
<colgroup>
|
|
<col highlight-col>
|
|
<col highlight-col>
|
|
<col highlight-col>
|
|
<col highlight-col>
|
|
<col highlight-col>
|
|
<col highlight-col>
|
|
<col highlight-col>
|
|
<col>
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<%= sort_header_tag('spent_on', :caption => t(:label_date), :default_order => 'desc') %>
|
|
<%= sort_header_tag('user', :caption => Member.model_name.human) %>
|
|
<%= sort_header_tag('project', :caption => Project.model_name.human )%>
|
|
<%= sort_header_tag('work_package', :caption => WorkPackage.model_name.human, :default_order => 'desc') %>
|
|
<th>
|
|
<div class="generic-table--sort-header-outer">
|
|
<div class="generic-table--sort-header">
|
|
<span>
|
|
<%= CostEntry.human_attribute_name(:comment) %>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</th>
|
|
<%= sort_header_tag('units', :caption => t(:label_units)) %>
|
|
<%= sort_header_tag('costs', :caption => t(:label_overall_costs)) %>
|
|
<th><div class="generic-table--empty-header"></div></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% entries.each do |entry| -%>
|
|
<tr class="cost_entry">
|
|
<td class="spent_on"><%= format_date(entry.spent_on) %></td>
|
|
<td class="user"><%=h entry.user %></td>
|
|
<td class="project"><%=h entry.project %></td>
|
|
<td class="subject">
|
|
<% if entry.work_package -%>
|
|
<%= link_to_work_package entry.work_package -%>
|
|
<% end -%>
|
|
</td>
|
|
|
|
<td class="comments"><%=h entry.comments %></td>
|
|
<td class="units"><%= pluralize(entry.units, entry.cost_type.unit, entry.cost_type.unit_plural) %></td>
|
|
<td class="currency">
|
|
<% if entry.costs_visible_by?(User.current) -%>
|
|
<%= number_to_currency entry.real_costs %>
|
|
<%- else -%>-<% end -%>
|
|
</td>
|
|
<td class="buttons">
|
|
<% if entry.editable_by?(User.current) -%>
|
|
<%= link_to icon_wrapper('icon-context icon-edit', ''),
|
|
{:controller => '/costlog', :action => 'edit', :id => entry, :project_id => nil},
|
|
:class => 'no-decoration-on-hover',
|
|
:title => t(:button_edit) %>
|
|
<%= link_to icon_wrapper('icon-context icon-delete', ''),
|
|
{:controller => '/costlog', :action => 'destroy', :id => entry, :project_id => nil},
|
|
:confirm => t(:text_are_you_sure),
|
|
:method => :delete,
|
|
:class => 'no-decoration-on-hover',
|
|
:title => t(:button_delete) %>
|
|
<% end -%>
|
|
</td>
|
|
</tr>
|
|
<% end -%>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|