Sha256: fcba8d4e5e8fd1febbb4261ec8e7961d29b3f42bed0b3b19f1e867b674982bdb

Contents?: true

Size: 672 Bytes

Versions: 5

Compression:

Stored size: 672 Bytes

Contents

require 'will_paginate/view_helpers/action_view'

module Udongo
  module WillPaginate
    class Renderer < ::WillPaginate::ActionView::LinkRenderer

      protected

      def page_number(page)
        tag :li, link(page, page, rel: rel_value(page)), class: ('current' if page == current_page)
      end

      def previous_or_next_page(page, text, classname)
        tag :li, link(text, page || '#'), class: [classname[0..3], classname, ('unavailable' unless page)].join(' ')
      end

      def html_container(html)
        tag :ul, html, container_attributes
      end

      def gap
        tag :li, link(super, '#'), class: 'unavailable'
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
udongo-1.0.3 lib/udongo/will_paginate/renderer.rb
udongo-1.0.2 lib/udongo/will_paginate/renderer.rb
udongo-1.0.1 lib/udongo/will_paginate/renderer.rb
udongo-1.0.0 lib/udongo/will_paginate/renderer.rb
udongo-0.1.0 lib/udongo/will_paginate/renderer.rb