Sha256: bdd30d3f3f6c7e91f4dd7fe09c55ae9a95489bd4d66095ac52755a98f58ffdc2

Contents?: true

Size: 1.97 KB

Versions: 24

Compression:

Stored size: 1.97 KB

Contents

<div class="flex flex-col sm:flex-row items-center justify-between aborder-t aborder-slate-200 rounded-2xl 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">
            <%= content_tag :label, name: t('avo.per_page').downcase do %>
              <%= 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 %>
            <% end %>
          </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 pagy-gem-version-<%= pagy_major_version %>">
      <% 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, anchor_string: "data-turbo-frame=\"#{@turbo_frame}\"" %>
      <% end %>
    </div>
  </div>
</div>

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
avo-3.15.1 app/components/avo/paginator_component.html.erb
avo-3.15.0 app/components/avo/paginator_component.html.erb
avo-3.14.5 app/components/avo/paginator_component.html.erb
avo-3.14.4 app/components/avo/paginator_component.html.erb
avo-3.14.3 app/components/avo/paginator_component.html.erb
avo-3.14.2 app/components/avo/paginator_component.html.erb
avo-3.14.1 app/components/avo/paginator_component.html.erb
avo-3.14.0 app/components/avo/paginator_component.html.erb
avo-3.13.7 app/components/avo/paginator_component.html.erb
avo-3.13.6 app/components/avo/paginator_component.html.erb
avo-3.13.5 app/components/avo/paginator_component.html.erb
avo-3.13.4 app/components/avo/paginator_component.html.erb
avo-3.13.3 app/components/avo/paginator_component.html.erb
avo-3.13.2 app/components/avo/paginator_component.html.erb
avo-3.13.1 app/components/avo/paginator_component.html.erb
avo-3.13.0 app/components/avo/paginator_component.html.erb
avo-3.12.0 app/components/avo/paginator_component.html.erb
avo-3.11.10 app/components/avo/paginator_component.html.erb
avo-3.11.9 app/components/avo/paginator_component.html.erb
avo-3.11.8 app/components/avo/paginator_component.html.erb