This repository has been archived by the owner on May 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add paging to places list and travels list
- Loading branch information
Showing
21 changed files
with
127 additions
and
6 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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/ Link to the "First" page | ||
- available local variables | ||
url : url to the first page | ||
current_page : a page object for the currently displayed page | ||
total_pages : total number of pages | ||
per_page : number of items to fetch per page | ||
remote : data-remote | ||
li | ||
== link_to_unless current_page.first?, t('views.pagination.first').html_safe, url, :remote => remote | ||
' |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/ Non-link tag that stands for skipped pages... | ||
- available local variables | ||
current_page : a page object for the currently displayed page | ||
total_pages : total number of pages | ||
per_page : number of items to fetch per page | ||
remote : data-remote | ||
span.page.gap | ||
== t('views.pagination.truncate').html_safe | ||
' |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/ Link to the "Last" page | ||
- available local variables | ||
url : url to the last page | ||
current_page : a page object for the currently displayed page | ||
total_pages : total number of pages | ||
per_page : number of items to fetch per page | ||
remote : data-remote | ||
li | ||
== link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, :remote => remote | ||
' |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/ Link showing page number | ||
- available local variables | ||
page : a page object for "this" page | ||
url : url to this page | ||
current_page : a page object for the currently displayed page | ||
total_pages : total number of pages | ||
per_page : number of items to fetch per page | ||
remote : data-remote | ||
li class="#{'active' if page.current?}" | ||
== link_to page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} | ||
' |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/ The container tag | ||
- available local variables | ||
current_page : a page object for the currently displayed page | ||
total_pages : total number of pages | ||
per_page : number of items to fetch per page | ||
remote : data-remote | ||
paginator : the paginator that renders the pagination tags inside | ||
== paginator.render do | ||
ul.pagination | ||
== first_page_tag unless current_page.first? | ||
== prev_page_tag unless current_page.first? | ||
- each_page do |page| | ||
- if page.left_outer? || page.right_outer? || page.inside_window? | ||
== page_tag page | ||
- elsif !page.was_truncated? | ||
== gap_tag | ||
== next_page_tag unless current_page.last? | ||
== last_page_tag unless current_page.last? |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Kaminari.configure do |config| | ||
config.default_per_page = 10 | ||
# config.max_per_page = nil | ||
config.window = 3 | ||
# config.outer_window = 0 | ||
# config.left = 0 | ||
# config.right = 0 | ||
# config.page_method_name = :page | ||
# config.param_name = :page | ||
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
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