Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using kaminari for paging trough notices
- Loading branch information
Showing
12 changed files
with
60 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
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,9 @@ | ||
-# Link to the "First" page | ||
-# available local variables | ||
-# url: url to the first page | ||
-# current_page: a page object for the currently displayed page | ||
-# num_pages: total number of pages | ||
-# per_page: number of items to fetch per page | ||
-# remote: data-remote | ||
%span.first | ||
= link_to_unless current_page.first?, raw(t 'views.pagination.first'), 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,8 @@ | ||
-# Non-link tag that stands for skipped pages... | ||
-# available local variables | ||
-# current_page: a page object for the currently displayed page | ||
-# num_pages: total number of pages | ||
-# per_page: number of items to fetch per page | ||
-# remote: data-remote | ||
%span.page.gap | ||
= raw(t 'views.pagination.truncate') |
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 @@ | ||
-# Link to the "Last" page | ||
-# available local variables | ||
-# url: url to the last page | ||
-# current_page: a page object for the currently displayed page | ||
-# num_pages: total number of pages | ||
-# per_page: number of items to fetch per page | ||
-# remote: data-remote | ||
%span.last | ||
= link_to_unless current_page.last?, raw(t 'views.pagination.last'), 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,2 @@ | ||
~ link_to_unless current_page.last?, raw('Next →'), url, :class => "next_page", :rel => "next", :remote => remote do |name| | ||
~ content_tag :span, name, :class => 'next_page disabled' |
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 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 | ||
-# num_pages: total number of pages | ||
-# per_page: number of items to fetch per page | ||
-# remote: data-remote | ||
%span{:class => "page#{' current' if page.current?}"} | ||
= link_to_unless page.current?, 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,13 @@ | ||
-# The container tag | ||
-# available local variables | ||
-# current_page: a page object for the currently displayed page | ||
-# num_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 | ||
.notice-pagination< | ||
= prev_page_tag | ||
= next_page_tag | ||
.notice-pagination-loader= image_tag 'loader.gif' | ||
viewing occurrence #{current_page} of #{num_pages} |
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,2 @@ | ||
~ link_to_unless current_page.first?, raw('← Previous'), url, :class => "previous_page", :rel => "prev", :remote => remote do |name| | ||
~ content_tag :span, name, :class => 'previous_page disabled' |
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