Skip to content

Commit

Permalink
ページネーション先頭の矢印(<<)表示を非リンク化で統一する
Browse files Browse the repository at this point in the history
企業個別ユーザーページだけ特別扱いせず、大元のkaminariのページネーションを変更した
- #7956 (comment)
- https://github.com/fjordllc/bootcamp/pull/7956/files#r1757220135
  • Loading branch information
Judeeeee committed Nov 12, 2024
1 parent dcc961f commit 8f3c4ce
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 47 deletions.
4 changes: 2 additions & 2 deletions app/views/companies/users/_user_list.html.slim
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- if users.present?
.user-list
= paginate users, theme: 'company_user', params: { controller: 'companies/users', action: 'index' }
= paginate users, params: { controller: 'companies/users', action: 'index' }
.row
= render partial: 'users/user', collection: users
= paginate users, theme: 'company_user', params: { controller: 'companies/users', action: 'index' }
= paginate users, params: { controller: 'companies/users', action: 'index' }
- else
= render 'users/no_match_user'
6 changes: 5 additions & 1 deletion app/views/kaminari/_first_page.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
- # rubocop:disable Rails/OutputSafety
li.pagination__item.is-first
= link_to_unless current_page.first?, raw('<i class="fas fa-angle-double-left"></i>'), url, remote:, class: 'pagination__item-link is-first'
- if current_page.first?
span.pagination__item-link.is-first.is-disabled
i.fas.fa-angle-double-left
- else
= link_to raw('<i class="fas fa-angle-double-left"></i>'), url, remote:, class: 'pagination__item-link is-first'
- # rubocop:enable Rails/OutputSafety
2 changes: 1 addition & 1 deletion app/views/kaminari/_paginator.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
nav.pagination
.container
ul.pagination__items
== first_page_tag unless current_page.first?
== first_page_tag
== prev_page_tag unless current_page.first?
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
Expand Down
8 changes: 0 additions & 8 deletions app/views/kaminari/company_user/_first_page.html.slim

This file was deleted.

4 changes: 0 additions & 4 deletions app/views/kaminari/company_user/_last_page.html.slim

This file was deleted.

4 changes: 0 additions & 4 deletions app/views/kaminari/company_user/_next_page.html.slim

This file was deleted.

12 changes: 0 additions & 12 deletions app/views/kaminari/company_user/_page.html.slim

This file was deleted.

11 changes: 0 additions & 11 deletions app/views/kaminari/company_user/_paginator.html.slim

This file was deleted.

4 changes: 0 additions & 4 deletions app/views/kaminari/company_user/_prev_page.html.slim

This file was deleted.

0 comments on commit 8f3c4ce

Please sign in to comment.