Module: RedmineKaminari::Kaminari::ActionViewExtensionPatch

Extended by:
ActiveSupport::Concern
Defined in:
lib/redmine_kaminari/kaminari/action_view_extension_patch.rb

Instance Method Summary collapse

Instance Method Details

#page_entries_info_with_redmine_patch(scope, options = {}) ⇒ Object



47
48
49
50
51
# File 'lib/redmine_kaminari/kaminari/action_view_extension_patch.rb', line 47

def page_entries_info_with_redmine_patch(scope, options = {})
  first = scope.offset_value + 1
  last = scope.last_page? ? scope.total_count : scope.offset_value + scope.limit_value
  "(#{first}-#{last}/#{scope.total_count})".html_safe
end

#paginate_with_redmine_patch(scope, options = {}, &block) ⇒ Object



53
54
55
56
57
58
59
60
61
# File 'lib/redmine_kaminari/kaminari/action_view_extension_patch.rb', line 53

def paginate_with_redmine_patch(scope, options = {}, &block)
  paginate_without_redmine_patch(scope, options, &block) +
      ('span', class: 'items') do
        page_entries_info(scope, options)
      end + ' '.html_safe +
      ('span', class: 'per-page') do
        per_page_tag(scope, options)
      end
end