class Roda::WillPaginate::BootstrapPaginationRenderer
Protected Instance Methods
html_container(html)
click to toggle source
# File lib/roda/will_paginate/bootstrap_pagination_renderer.rb, line 30 def html_container(html) tag(:ul, html, container_attributes) end
page_number(page)
click to toggle source
# File lib/roda/will_paginate/bootstrap_pagination_renderer.rb, line 8 def page_number(page) unless page == current_page tag(:li, link(page, page, :rel => rel_value(page))) else tag(:li, link(page, '#'), :class => "active") end end
previous_or_next_page(page, text, classname)
click to toggle source
# File lib/roda/will_paginate/bootstrap_pagination_renderer.rb, line 16 def previous_or_next_page(page, text, classname) if classname == 'previous_page' classname = 'prev' elsif classname == 'next_page' classname = 'next' end if page tag(:li, link(text, page, :class => classname)) else tag(:li, link(text, '#', :class => classname + ' disabled')) end end