Class: Oversee::Dashboard::Pagination

Inherits:
Base
  • Object
show all
Includes:
Pagy::Frontend, Phlex::Rails::Helpers::Request
Defined in:
app/components/oversee/dashboard/pagination.rb

Instance Method Summary collapse

Constructor Details

#initialize(pagy:, params:) ⇒ Pagination

Returns a new instance of Pagination.



6
7
8
9
# File 'app/components/oversee/dashboard/pagination.rb', line 6

def initialize(pagy:, params:)
  @pagy = pagy
  @params = params
end

Instance Method Details

#view_templateObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/components/oversee/dashboard/pagination.rb', line 11

def view_template
  div(class:"mt-4 flex items-center justify-between") do

    div(class: "font-regular text-xs") do
      raw pagy_info(@pagy).html_safe
    end

    div(class: "flex items-center gap-4") do
      raw pagy_nav(@pagy).html_safe
    end
  end
end