denny/ShinyCMS-ruby

View on GitHub
plugins/ShinyCMS/app/views/shinycms/admin/includes/_pager.html.erb

Summary

Maintainability
Test Coverage
<%
  name ||= 'Item'
  i18n_key = name.underscore.tr '/', '_'

  if I18n.exists? "shinycms.models.names.#{i18n_key}"
    items = t( "shinycms.models.names.#{i18n_key}" ).pluralize
  elsif I18n.exists? 'shinycms.models.names.item'
    items = t( 'shinycms.models.names.item' ).pluralize
  else
    items = 'items'
  end
%>

<%== pagy_bootstrap_nav pagy %>

<p class="pager-info">
  <%== pagy_info pagy, item_name: items %>

  <%# TODO: FIXME: Oh look, the JavaScript isn't working. How terribly unusual. %#>
  <br>
  <%== pagy_items_selector_js pagy %>
</p>