Sha256: 980b4949e682a50cbedd4975e9347763b7f8151d7816baec44787723ae8f2fd5

Contents?: true

Size: 1.36 KB

Versions: 3

Compression:

Stored size: 1.36 KB

Contents

<%
controller ||= params[:controller]

pagination_url_params = params.merge(:controller => controller, :action => :browse, :search => params[:search], :update => 1)
prev_url = url_for(pagination_url_params.merge(:page => page.prev.number)) if page.prev?
next_url = url_for(pagination_url_params.merge(:page => page.next.number)) if page.next?
-%>
<ol>
  <li class="found"><%= rs_(:records_found, :count => page.pager.count,
:model => record_select_config.model.model_name.human(:count => page.pager.count).downcase) %></li>
  <% if page.prev? -%>
  <li class="pagination previous">
    <%= link_to image_tag('record_select/previous.gif', :alt => rs_(:previous)) + " " + rs_(:previous_items,
:count => page.pager.per_page),
                      {:url => prev_url},
                      {:href => prev_url, :method => :get, :remote => true} %>
  </li>
  <% end -%>
  <% page.items.each do |record| -%>
  <li class="record <%= cycle 'odd', 'even' %>" id="rs<%= record.id -%>">
    <%= render_record_in_list(record, controller) %>
  </li>
  <% end -%>
  <% if page.next? -%>
  <li class="pagination next">
  <%= link_to (rs_(:next_items, :count => page.pager.per_page) + " " + image_tag('record_select/next.gif', :alt => rs_(:next))).html_safe,
                        {:url => next_url},
                        {:href => next_url, :method => :get, :remote => true} %>
  </li>
  <% end -%>
</ol>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
recordselect-3.3.2 app/views/record_select/_list.html.erb
recordselect-3.3.1 app/views/record_select/_list.html.erb
recordselect-3.3.0 app/views/record_select/_list.html.erb