Sha256: c9132f24ad2e1848b6a803b5dd2a9ab76a46c2c72d67ac42d4ce163afce175df

Contents?: true

Size: 1.69 KB

Versions: 6

Compression:

Stored size: 1.69 KB

Contents

<%
controller ||= params[:controller]
url_params = {:controller => controller, :action => :select}

pagination_url_params = params.merge(:controller => controller, :action => :browse, :search => params[:search], :update => 1) if page.prev? || page.next?
-%>

<ol>
  <li class="found">
    <%= rs_("%d %s #{t("recordselect.found")}", page.pager.count, @count_label || record_select_config.model.to_s.pluralize.titleize.downcase) %>
  </li>
  <% if page.prev? -%>
  <%- prev_url = url_for(pagination_url_params.merge(:page => page.prev.number, :escape => false)) %>
  <li class="pagination previous">
    <%- previous_text = image_tag("record_select/previous.gif", :alt => rs_("#{t("recordselect.previous")}")) + " " + rs_("#{t("recordselect.previous")} %d", page.pager.per_page) %>
    <%- previous_text = "<div>#{previous_text}</div>" %>
    <%= link_to_function previous_text, {:href => prev_url} %>
  </li>
  <% end -%>
  <% page.items.each do |record| -%>
  <li class="record <%= cycle "odd", "even" %>" id="rs<%= record.id -%>">
    <% url = url_for(url_params.merge(:id => record.id, :escape => false)) -%>
    <%= link_to_function render_record_from_config(record), "jQuery(this).recordSelect_notify(); jQuery(this).toggleClass(\"selected\")" %>
  </li>
  <% end -%>
  <% if page.next? -%>
  <%- next_url = url_for(pagination_url_params.merge(:page => page.next.number, :escape => false)) %>
  <li class="pagination next">
    <%- next_text = rs_("#{t("recordselect.next")} %d", page.pager.per_page) + " " + image_tag("record_select/next.gif", :alt => rs_("#{t("recordselect.next")}")) %>
    <%- next_text = "<div>#{next_text}</div>" %>
    <%= link_to_function next_text, {:href => next_url} %>
  </li>
  <% end -%>
</ol>

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
record_select-0.0.2 lib/views/_list.rhtml
record_select-0.0.1 lib/views/_list.rhtml
record_select-0.0.4 lib/views/_list.rhtml
record_select-0.0.3 lib/views/_list.rhtml
recordselect_custom-0.0.2 lib/views/_list.rhtml
recordselect-custom-0.0.1 lib/views/_list.rhtml