From da88729c9e30e87ac000b06a8f2b152e98a31e5e Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 11 Feb 2011 16:53:41 +0900 Subject: [PATCH] update views according to new convention --- app/views/kaminari/_current_page.html.erb | 14 +++++++------- app/views/kaminari/_current_page.html.haml | 14 +++++++------- app/views/kaminari/_first_page_link.html.erb | 17 +++++++++-------- app/views/kaminari/_first_page_link.html.haml | 17 +++++++++-------- app/views/kaminari/_last_page_link.html.erb | 17 +++++++++-------- app/views/kaminari/_last_page_link.html.haml | 17 +++++++++-------- app/views/kaminari/_next_link.html.erb | 15 ++++++++------- app/views/kaminari/_next_link.html.haml | 15 ++++++++------- app/views/kaminari/_next_span.html.erb | 11 ++++++----- app/views/kaminari/_next_span.html.haml | 11 ++++++----- app/views/kaminari/_page_link.html.erb | 17 +++++++++-------- app/views/kaminari/_page_link.html.haml | 17 +++++++++-------- app/views/kaminari/_paginator.html.erb | 11 ++++++----- app/views/kaminari/_paginator.html.haml | 11 ++++++----- app/views/kaminari/_prev_link.html.erb | 15 ++++++++------- app/views/kaminari/_prev_link.html.haml | 15 ++++++++------- app/views/kaminari/_prev_span.html.erb | 11 ++++++----- app/views/kaminari/_prev_span.html.haml | 11 ++++++----- app/views/kaminari/_truncated_span.html.erb | 11 ++++++----- app/views/kaminari/_truncated_span.html.haml | 11 ++++++----- 20 files changed, 148 insertions(+), 130 deletions(-) diff --git a/app/views/kaminari/_current_page.html.erb b/app/views/kaminari/_current_page.html.erb index 704d6eb..2ad52b1 100644 --- a/app/views/kaminari/_current_page.html.erb +++ b/app/views/kaminari/_current_page.html.erb @@ -1,9 +1,9 @@ -<%# available local variables: - page: the page number of this page - page_url: url to this page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +<%# The current page + - available local variables + page: the page number of this page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote -%> <%= page %> diff --git a/app/views/kaminari/_current_page.html.haml b/app/views/kaminari/_current_page.html.haml index 2eb3a4e..ff94f26 100644 --- a/app/views/kaminari/_current_page.html.haml +++ b/app/views/kaminari/_current_page.html.haml @@ -1,9 +1,9 @@ --# available local variables: - page: the page number of this page - page_url: url to this page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +-# The current page + - available local variables + page: the page number of this page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote %span.page.current = page diff --git a/app/views/kaminari/_first_page_link.html.erb b/app/views/kaminari/_first_page_link.html.erb index f630e35..0314b8f 100644 --- a/app/views/kaminari/_first_page_link.html.erb +++ b/app/views/kaminari/_first_page_link.html.erb @@ -1,11 +1,12 @@ -<%# available local variables: - page: the page number of this page - page_url: url to this page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +<%# Link with page number that appears at the leftmost + - available local variables + page: the page number of this page + url: url to this page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote -%> - <%= link_to page, page_url, :remote => remote %> + <%= link_to page, url, :remote => remote %> diff --git a/app/views/kaminari/_first_page_link.html.haml b/app/views/kaminari/_first_page_link.html.haml index 2252ded..418388a 100644 --- a/app/views/kaminari/_first_page_link.html.haml +++ b/app/views/kaminari/_first_page_link.html.haml @@ -1,9 +1,10 @@ --# available local variables: - page: the page number of this page - page_url: url to this page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +-# Link with page number that appears at the leftmost + - available local variables + page: the page number of this page + url: url to this page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote %span.page.first - = link_to page, page_url, :remote => remote + = link_to page, url, :remote => remote diff --git a/app/views/kaminari/_last_page_link.html.erb b/app/views/kaminari/_last_page_link.html.erb index 5f9fa15..c9800bf 100644 --- a/app/views/kaminari/_last_page_link.html.erb +++ b/app/views/kaminari/_last_page_link.html.erb @@ -1,11 +1,12 @@ -<%# available local variables: - page: the page number of this page - page_url: url to this page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +<%# Link with page number that appears at the rightmost + - available local variables + page: the page number of this page + url: url to this page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote -%> - <%= link_to page, page_url, :remote => remote %> + <%= link_to page, url, :remote => remote %> diff --git a/app/views/kaminari/_last_page_link.html.haml b/app/views/kaminari/_last_page_link.html.haml index af039db..138a6d5 100644 --- a/app/views/kaminari/_last_page_link.html.haml +++ b/app/views/kaminari/_last_page_link.html.haml @@ -1,9 +1,10 @@ --# available local variables: - page: the page number of this page - page_url: url to this page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +-# Link with page number that appears at the rightmost + - available local variables + page: the page number of this page + url: url to this page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote %span.page.last - = link_to page, page_url, :remote => remote + = link_to page, url, :remote => remote diff --git a/app/views/kaminari/_next_link.html.erb b/app/views/kaminari/_next_link.html.erb index 978b6ab..ebf8ae3 100644 --- a/app/views/kaminari/_next_link.html.erb +++ b/app/views/kaminari/_next_link.html.erb @@ -1,10 +1,11 @@ -<%# available local variables: - next_url: url to the next page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +<%# "Next" with link + - available local variables + url: url to the next page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote -%> - <%= link_to raw('Next »'), next_url, :class => 'next', :rel => 'next', :remote => remote %> + <%= link_to raw('Next »'), url, :class => 'next', :rel => 'next', :remote => remote %> diff --git a/app/views/kaminari/_next_link.html.haml b/app/views/kaminari/_next_link.html.haml index 955e4bf..0d32a12 100644 --- a/app/views/kaminari/_next_link.html.haml +++ b/app/views/kaminari/_next_link.html.haml @@ -1,8 +1,9 @@ --# available local variables: - next_url: url to the next page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +-# "Next" with link + - available local variables + url: url to the next page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote %span.next - = link_to raw('Next »'), next_url, :class => 'next', :rel => 'next', :remote => remote + = link_to raw('Next »'), url, :class => 'next', :rel => 'next', :remote => remote diff --git a/app/views/kaminari/_next_span.html.erb b/app/views/kaminari/_next_span.html.erb index 0dbf106..97c1b1d 100644 --- a/app/views/kaminari/_next_span.html.erb +++ b/app/views/kaminari/_next_span.html.erb @@ -1,7 +1,8 @@ -<%# available local variables: - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +<%# "Next" without link + - available local variables + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote -%> diff --git a/app/views/kaminari/_next_span.html.haml b/app/views/kaminari/_next_span.html.haml index 0a1f004..e4ebab0 100644 --- a/app/views/kaminari/_next_span.html.haml +++ b/app/views/kaminari/_next_span.html.haml @@ -1,6 +1,7 @@ --# available local variables: - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +-# "Next" without link + - available local variables + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote %span.next diff --git a/app/views/kaminari/_page_link.html.erb b/app/views/kaminari/_page_link.html.erb index 8e1329b..a6deffb 100644 --- a/app/views/kaminari/_page_link.html.erb +++ b/app/views/kaminari/_page_link.html.erb @@ -1,11 +1,12 @@ -<%# available local variables: - page: the page number of this page - page_url: url to this page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +<%# Link showing page number + - available local variables + page: the page number of this page + url: url to this page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote -%> - <%= link_to page, page_url, :remote => remote %> + <%= link_to page, url, :remote => remote %> diff --git a/app/views/kaminari/_page_link.html.haml b/app/views/kaminari/_page_link.html.haml index 800709b..f3dda88 100644 --- a/app/views/kaminari/_page_link.html.haml +++ b/app/views/kaminari/_page_link.html.haml @@ -1,9 +1,10 @@ --# available local variables: - page: the page number of this page - page_url: url to this page - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +-# Link showing page number + - available local variables + page: the page number of this page + url: url to this page + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote %span.page - = link_to page, page_url, :remote => remote + = link_to page, url, :remote => remote diff --git a/app/views/kaminari/_paginator.html.erb b/app/views/kaminari/_paginator.html.erb index b989fd8..f8cafba 100644 --- a/app/views/kaminari/_paginator.html.erb +++ b/app/views/kaminari/_paginator.html.erb @@ -1,8 +1,9 @@ -<%# available local variables: - current_page: the page number of currently displayed page - num_pages: total number of pages - per_page: number of items to fetch per page - remote: data-remote +<%# The container tag + - available local variables + current_page: the page number of currently displayed page + num_pages: total number of pages + per_page: number of items to fetch per page + remote: data-remote -%>