<%= labelled_select(_('Sort by')+' ', :sorting, :first, :last, @sorting,
[['created_at asc', _('Date(newest first)')], ['created_at desc', _('Date(oldest first)')],
['client_name asc', _('Client name(A-Z)')], ['client_name desc', _('Client name(Z-A)')]],
:onchange => "jQuery('#bsc-plugin-contracts-form').submit()") %>
<% if @contracts.blank? %>
<%= content_tag('em', _('There are no contracts at all.'))%>
<% else %>
<% @contracts.each do |contract| %>
<%= link_to(content_tag('b', contract.client_name ), :action => 'view_contract', :contract_id => contract.id) %>
<%= content_tag('i', show_date(contract.created_at)) %>
|
<%= link_to(_('Edit'), :action => 'edit_contract', :contract_id => contract.id)%>
<%= link_to(_('Remove'), {:action => 'destroy_contract', :contract_id => contract.id}, :confirm => _('Are you sure?'))%>
|
<% end %>
<%= pagination_links @contracts %>
<% end %>
<% button_bar do %>
<%= button(:back, _('Go back'), :controller => 'profile_editor') %>
<%= button(:new, _('Create new contract'), :action => 'new_contract')%>
<% end %>
<% end %>