Sha256: 33c5fef97efb04a25715cbb5c34257b5842813da515bbd231b1bd06e2c9a3a3c

Contents?: true

Size: 539 Bytes

Versions: 14

Compression:

Stored size: 539 Bytes

Contents

# frozen_string_literal: true

require_relative './current_page_for_helper'
require_relative './path_for_helper'

module Pagination
  module FirstPageLinkForHelper
    include Pagination::CurrentPageForHelper
    include Pagination::PathForHelper

    def pagination_first_page_link_for(set)
      if pagination_current_page_for(set) > 1
        link_to('« First', pagination_path_for(1), class: 'page-link page-first')
      else
        content_tag(:span, '« First', class: 'page-link page-first disabled')
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
actionset-0.11.0 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.10.0 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.9.2 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.9.1 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.8.2 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.8.1 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.8.0 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.7.0 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.6.0 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.5.4 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.5.3 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.5.2 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.5.1 lib/action_set/helpers/pagination/first_page_link_for_helper.rb
actionset-0.5.0 lib/action_set/helpers/pagination/first_page_link_for_helper.rb