Sha256: d982c7ec92027d26c01b14d052b48c10dc49757706d843761979c77e2ba7de0e
Contents?: true
Size: 952 Bytes
Versions: 67
Compression:
Stored size: 952 Bytes
Contents
module Udongo module WillPaginate class Options include ActionView::Helpers::TagHelper def initialize(options = {}) @options = options || {} end def defaults { class: 'pagination', inner_window: 1, outer_window: 0, renderer: Udongo::WillPaginate::Renderer, previous_label: previous_label, next_label: next_label } end def next_label nav_label('→', 'next_label') end def previous_label nav_label('←', 'previous_label') end def nav_label(default_value, sr_only_value) string = content_tag(:span, default_value.html_safe, aria: { hidden: true }) string += content_tag(:span, I18n.t("will_paginate.#{sr_only_value}"), class: 'sr-only') string.html_safe end def values @options.reverse_merge!(defaults) end end end end
Version data entries
67 entries across 67 versions & 1 rubygems