Sha256: 6a0de0f2478d9c432f3753792220711940e5e24d3d79e14d36780a32a8cdc32e

Contents?: true

Size: 1.76 KB

Versions: 46

Compression:

Stored size: 1.76 KB

Contents

<div class="flex flex-col sm:flex-row items-center justify-between aborder-t aborder-slate-200 rounded-xl space-y-2 sm:space-y-0">
  <div class="flex-2 sm:flex sm:items-center sm:justify-between">
    <div>
      <div class="text-sm leading-5 text-slate-600 flex items-center">
        <div data-controller="per-page">
          <div class="flex items-center">
            <%= select_tag 'per_page',
              options_for_select(per_page_options, index_params[:per_page]),
              class: 'appearance-none inline-flex bg-white-100 disabled:bg-white-400 disabled:cursor-not-allowed focus:bg-white text-slate-700 disabled:text-slate-600 rounded-md py-1 px-2 leading-tight border border-slate-300 outline-none focus:border-slate-400 outline w-16 mr-1 text-sm',
              data: {
                'turbo-frame': turbo_frame,
                'per-page-target': 'selector',
                action: 'change->per-page#reload'
              }
            %> <%= t('avo.per_page').downcase %>
          </div>
          <% per_page_options.each do |option| %>
            <%= link_to "Change to #{option} items per page", change_items_per_page_url(option), class: 'hidden', 'data-per-page-option': option, 'data-turbo-frame': turbo_frame %>
          <% end %>
        </div>
      </div>
    </div>
  </div>
  <div class="flex">
    <div class="flex-2 sm:flex sm:items-center sm:justify-between space-y-2 sm:space-y-0 text-center sm:text-left">
      <% if @resource.pagination_type.default? %>
        <div class="text-sm text-slate-600 mr-4"><%== helpers.pagy_info @pagy %></div>
      <% end %>

      <% if @pagy.pages > 1 %>
        <%# @todo: add first & last page. make the first and last buttons rounded %>
        <%== helpers.pagy_nav @pagy %>
      <% end %>
    </div>
  </div>
</div>

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
avo-3.6.4 app/components/avo/paginator_component.html.erb
avo-3.6.3 app/components/avo/paginator_component.html.erb
avo-3.6.2 app/components/avo/paginator_component.html.erb
avo-3.6.1 app/components/avo/paginator_component.html.erb
avo-3.6.0 app/components/avo/paginator_component.html.erb
avo-3.5.8 app/components/avo/paginator_component.html.erb
avo-3.5.7 app/components/avo/paginator_component.html.erb
avo-3.5.6 app/components/avo/paginator_component.html.erb
avo-3.5.6.beta1 app/components/avo/paginator_component.html.erb
avo-3.5.5 app/components/avo/paginator_component.html.erb
avo-3.5.4 app/components/avo/paginator_component.html.erb
avo-3.5.3 app/components/avo/paginator_component.html.erb
avo-3.5.2 app/components/avo/paginator_component.html.erb
avo-3.5.1 app/components/avo/paginator_component.html.erb
avo-3.5.0 app/components/avo/paginator_component.html.erb
avo-3.4.4 app/components/avo/paginator_component.html.erb
avo-3.4.3 app/components/avo/paginator_component.html.erb
avo-3.4.2 app/components/avo/paginator_component.html.erb
avo-3.4.1 app/components/avo/paginator_component.html.erb
avo-3.4.0 app/components/avo/paginator_component.html.erb