Class: FlowPagination::LinkRenderer
- Inherits:
-
WillPaginate::ViewHelpers::LinkRenderer
- Object
- WillPaginate::ViewHelpers::LinkRenderer
- FlowPagination::LinkRenderer
- Defined in:
- lib/flow_pagination.rb
Overview
FlowPagination renderer for (Mislav) WillPaginate Plugin
Instance Method Summary collapse
- #ajax_options ⇒ Object
-
#to_html ⇒ Object
Render flow navigation.
Instance Method Details
#ajax_options ⇒ Object
27 28 29 30 |
# File 'lib/flow_pagination.rb', line 27 def return @ajax_options if @ajax_options @ajax_options = Hash[@options.select{ |k,v| [:loading, :loaded, :interactive, :success, :failure, :complete, :confirm, :condition, :before, :after, :submit, :with, :update, :position].include? k }] end |
#to_html ⇒ Object
Render flow navigation
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/flow_pagination.rb', line 7 def to_html flow_pagination = '' if self.current_page < self.last_page if @options[:noajax] flow_pagination = @template.link_to( @template.t('flow_pagination.link', :default => 'more'), url_for(self.next_page)) else flow_pagination = @template.link_to_remote( @template.t('flow_pagination.link', :default => 'more'), {:url => url_for(self.next_page), :method => @template.request.request_method}. merge() ) end end @template.content_tag(:div, flow_pagination, :id => 'flow_pagination') end |