<%= t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
<%= t('activerecord.attributes.reserve.created_at') %>:
<%= t('reserve.reserved_from') %>: <%= text_field_tag 'reserved_from', @reserved_from, {:class => 'date_field', :placeholder => "#{t('page.example')}: 2012-04-12"} -%>
<%= t('reserve.reserved_to') %>: <%= text_field_tag 'reserved_to', @reserved_to, {:class => 'date_field', :placeholder => "#{t('page.example')}: 2012-05-11"} -%>
<%= submit_tag t('page.search') -%>
<%= t('page.sort_by') -%>: <%- if @sort_by == :created_at -%> <%= t('activerecord.attributes.reserve.created_at') -%> <%- else -%> <%= link_to t('activerecord.attributes.reserve.created_at'), url_for(params.merge(:sort_by => nil, :only_path => true)) -%> <% end %> <%- if @sort_by == :title -%> <%= t('page.title') -%> <%- else -%> <%= link_to t('page.title'), url_for(params.merge(:sort_by => 'title', :only_path => true)) -%> <%- end -%>
ID | <%= t('activerecord.models.manifestation') -%> | <%= t('activerecord.attributes.reserve.state') -%> | <%- if can? :update, @reserves.first -%><% end %> |
---|---|---|---|
<%= link_to reserve.id, reserve -%> |
<%= render 'title', :reserve => reserve -%>
<%= t('activerecord.models.user') -%>: <%= link_to reserve.user.username, reserve.user -%> <%= t('activerecord.attributes.reserve.created_at') %>: <%= l(reserve.created_at, :format => :short) -%> <%= t('activerecord.attributes.reserve.expired_at') %>: <%= l(reserve.expired_at, :format => :short) -%> |
<%= i18n_state(reserve.state) -%>
<% if reserve.item %>
(<%= link_to reserve.item.item_identifier, reserve.item %>) <% end %> |
<%- if can? :destroy, reserve -%>
<%= link_to t('page.edit'), edit_reserve_path(reserve) -%>
<%- if reserve.user.reserves.waiting.include?(reserve) -%>
<%= link_to t('page.cancel'), reserve_path(reserve, :mode => 'cancel'), :data => {:confirm => t('page.are_you_sure')}, :method => :put -%> <%- else -%> <%= link_to t('page.destroy'), reserve, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%> <%- end -%> |
<%- end -%>