Skip to content

Commit

Permalink
Projects: increase visibility of pagination buttons
Browse files Browse the repository at this point in the history
References #352
  • Loading branch information
ybakos committed Apr 5, 2024
1 parent f8a86fe commit 8b994f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def index
@organizations = Organization.all.order(:name)
respond_to do |format|
format.html do
@pagy, @projects = pagy(@projects, params: {query: params[:query], organization_id: params[:organization_id]})
@pagy, @projects = pagy(@projects, items: 2, params: {query: params[:query], organization_id: params[:organization_id]})
end
format.csv { send_data @projects.reorder(:id).to_csv, filename: 'projects.csv' }
format.json
Expand Down
8 changes: 4 additions & 4 deletions app/views/projects/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
.projects
= render @projects
.row.mb-5
.col
- if @pagy.prev
= link_to '‹ Previous page'.html_safe, @pagy.params.merge(page: @pagy.prev), class: 'btn btn-sm btn-outline-secondary', 'aria-label': 'previous'
.col.text-right
- if @pagy.prev
= link_to '‹ Previous page'.html_safe, @pagy.params.merge(page: @pagy.prev), class: 'btn btn-outline-primary', 'aria-label': 'previous'
.col
- if @pagy.next
= link_to 'Next page ›'.html_safe, @pagy.params.merge(page: @pagy.next), class: 'btn btn-sm btn-outline-secondary', 'aria-label': 'next'
= link_to 'Next page ›'.html_safe, @pagy.params.merge(page: @pagy.next), class: 'btn btn-outline-primary', 'aria-label': 'next'
:javascript
$('.select2').select2({
placeholder: "Select organization...",
Expand Down

0 comments on commit 8b994f4

Please sign in to comment.