-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
<% field.value(record).each do |object| %> | ||
<% pagy, records = field.paginated_value(record, params) %> | ||
<% records.each do |object| %> | ||
<div> | ||
<%= link_to Madmin.resource_for(object).display_name(object), Madmin.resource_for(object).show_path(object), class: "text-blue-500 underline" %> | ||
</div> | ||
<% end %> | ||
|
||
<div class="pagination"> | ||
<%== pagy_nav pagy if pagy.pages > 1 %> | ||
<span>Showing <%= tag.strong pagy.in %> of <%= tag.strong pagy.count %></span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
<% field.value(record).each do |object| %> | ||
<% pagy, records = field.paginated_value(record, params) %> | ||
<% records.each do |object| %> | ||
<div> | ||
<%= link_to Madmin.resource_for(object).display_name(object), Madmin.resource_for(object).show_path(object), class: "text-blue-500 underline" %> | ||
</div> | ||
<% end %> | ||
|
||
<div class="pagination"> | ||
<%== pagy_nav pagy if pagy.pages > 1 %> | ||
<span>Showing <%= tag.strong pagy.in %> of <%= tag.strong pagy.count %></span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,5 +53,9 @@ def required? | |
def searchable? | ||
false | ||
end | ||
|
||
def paginateable? | ||
false | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
100.times do | ||
User.create!( | ||
user = User.create!( | ||
first_name: FFaker::Name.first_name, | ||
last_name: FFaker::Name.last_name, | ||
birthday: Date.today, | ||
password: "password" | ||
) | ||
end | ||
|
||
# For pagination testing | ||
100.times do | ||
Post.create!( | ||
title: FFaker::Lorem.sentence, | ||
user:, | ||
) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters