Project

General

Profile

« Previous | Next » 

Revision 252572a7

Added by Marc Dequènes over 13 years ago

  • ID 252572a7aece016a792e64af529c64daecc5b809

[evol] added a simple search feature for artworks (with count)

View differences:

app/views/admin/artworks/index.rhtml
<% use_proto_menu -%>
<h2><%= _("List of Artworks") %></h2>
<h2><%= link_to_resource_index _("List of Artworks"), false %> <sub>(<%= @artworks.size %>)</sub></h2>
<p>
<%
# work around 'sortable-list' plugin not enforcing default sort
params[:sort] ||= "title ASC"
%>
<% @artworks = resource_model.paginate(:all, :include => [:artwork_set, :artwork_group], :order => params[:sort], :page => params[:page]) %>
<div class="right_inset">
<% form_tag(:action => 'search') do -%>
<%= text_field_tag 'search_pattern', params['search_pattern'], :size => 16, :maxlength => 32 %>
<%= submit_tag 'Search' %>
<% end -%>
</div>
<%= display_new_action %>
<%= will_paginate @artworks %>
<% unless @artworks.empty? -%>
<div style="clear: both;"><%= will_paginate @artworks %></div>
<% form_tag({ :action => 'artworks_selection' }, { :id => 'artworks_selection_form' }) do %>
<table id="artworks_selection_zone">
<tr>
......
<% end %>
<%= will_paginate @artworks %>
<%= display_new_action %>
<% end -%>
</p>

Also available in: Unified diff