Sha256: 96c77f0373423e3cdd0ed1d2036253358372330ef24305777b2e8c0f4d9980ad
Contents?: true
Size: 1.41 KB
Versions: 1
Compression:
Stored size: 1.41 KB
Contents
-# Requires locals: collection, name -# total_count is pagination method. Handle non-paginated collections, in case this is used to display count and time range - count ||= defined?(collection.total_count) ? collection.total_count : collection.count - skip_total ||= false - skip_pagination ||= false -# override added to convert Created to Imported - for clarity in payroll_times - humanized_time_range_column_override ||= nil .row.mt-4.mb-4 - unless skip_total .col-md-5 %p.pagination-number %strong= number_with_delimiter(count) Matching #{name.pluralize(count)} -# Almost all have time range... - if defined?(@time_range) && @period != "all" %em - if defined?(@time_range_column) %strong - if humanized_time_range_column_override.present? = humanized_time_range_column_override - else = humanized_time_range_column(@time_range_column) = humanized_time_range(@time_range) - unless skip_pagination .pagination-flex.justify-content-md-end{class: (skip_total ? "col-12" : "col-md-7")} = paginate collection - if count > @per_page.to_i - per_pages = [10, 25, 50, 100, @per_page.to_i].uniq.sort = select_tag :per_page_select, options_for_select(per_pages.map { |i| ["#{i} / page", i] }, selected: @per_page), { class: "form-control per-page-select" }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tranzito_utils-1.1.10 | app/views/tranzito_utils/_pagination.html.haml |