43 lines
1.7 KiB
ERB
43 lines
1.7 KiB
ERB
<table class="list">
|
|
<thead>
|
|
<%= rate_sort_header_tag("date_in_effect",
|
|
:caption => l(:label_date),
|
|
:default_order => 'desc',
|
|
:style => "width: 15%",
|
|
:method => :get,
|
|
:update => "rate_history",
|
|
:user_id => @user.id) %>
|
|
<%= rate_sort_header_tag("project_id",
|
|
:caption => l(:label_project),
|
|
:default_order => 'asc',
|
|
:method => :get,
|
|
:update => "rate_history",
|
|
:user_id => @user.id) %>
|
|
<th style="width:15%"><%= l(:rate_label_rate) %></th>
|
|
<th style="width:5%"></th>
|
|
</thead>
|
|
<tbody>
|
|
<% @rates.each do |rate| %>
|
|
<tr class="<%= cycle 'odd', 'even' %>">
|
|
<td><%= h format_date(rate.date_in_effect) %></td>
|
|
<td>
|
|
<% if rate.project %>
|
|
<%= link_to(h(rate.project), :controller => 'projects', :action => 'show', :id => rate.project) %>
|
|
<% else %>
|
|
<em><%= l(:rate_label_default) %></em>
|
|
<% end %>
|
|
</td>
|
|
<td align="right"><%= h rate.amount %></td>
|
|
<td align="center">
|
|
<% if rate.unlocked? %>
|
|
<%= link_to image_tag('edit.png'), edit_rate_path(rate, :back_url => @back_url) %>
|
|
<%= link_to image_tag('delete.png'), rate_path(rate, :back_url => @back_url), :method => :delete, :confirm => l(:text_are_you_sure) %>
|
|
<% else %>
|
|
<%= image_tag('locked.png') %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
<% end; reset_cycle %>
|
|
</table>
|