diff --git a/app/views/kaminari/_current_page.html.erb b/app/views/kaminari/_current_page.html.erb deleted file mode 100644 index 2ad52b1..0000000 --- a/app/views/kaminari/_current_page.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<%# 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 deleted file mode 100644 index ff94f26..0000000 --- a/app/views/kaminari/_current_page.html.haml +++ /dev/null @@ -1,9 +0,0 @@ --# 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 deleted file mode 100644 index 0314b8f..0000000 --- a/app/views/kaminari/_first_page_link.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%# 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, url, :remote => remote %> - diff --git a/app/views/kaminari/_first_page_link.html.haml b/app/views/kaminari/_first_page_link.html.haml deleted file mode 100644 index 418388a..0000000 --- a/app/views/kaminari/_first_page_link.html.haml +++ /dev/null @@ -1,10 +0,0 @@ --# 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, url, :remote => remote diff --git a/app/views/kaminari/_last_page_link.html.erb b/app/views/kaminari/_last_page_link.html.erb deleted file mode 100644 index c9800bf..0000000 --- a/app/views/kaminari/_last_page_link.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%# 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, url, :remote => remote %> - diff --git a/app/views/kaminari/_last_page_link.html.haml b/app/views/kaminari/_last_page_link.html.haml deleted file mode 100644 index 138a6d5..0000000 --- a/app/views/kaminari/_last_page_link.html.haml +++ /dev/null @@ -1,10 +0,0 @@ --# 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, url, :remote => remote diff --git a/app/views/kaminari/_page_link.html.erb b/app/views/kaminari/_page.html.erb similarity index 64% rename from app/views/kaminari/_page_link.html.erb rename to app/views/kaminari/_page.html.erb index a6deffb..6a00dae 100644 --- a/app/views/kaminari/_page_link.html.erb +++ b/app/views/kaminari/_page.html.erb @@ -7,6 +7,6 @@ per_page: number of items to fetch per page remote: data-remote -%> - - <%= link_to page, url, :remote => remote %> + + <%= link_to_unless page == current_page, page, url, :remote => remote %> diff --git a/app/views/kaminari/_page_link.html.haml b/app/views/kaminari/_page.html.haml similarity index 65% rename from app/views/kaminari/_page_link.html.haml rename to app/views/kaminari/_page.html.haml index f3dda88..2fda729 100644 --- a/app/views/kaminari/_page_link.html.haml +++ b/app/views/kaminari/_page.html.haml @@ -6,5 +6,5 @@ num_pages: total number of pages per_page: number of items to fetch per page remote: data-remote -%span.page - = link_to page, url, :remote => remote +%span{:class => "page#{' first' if page.first?}#{' last' if page.last?}#{' current' if page.current?}"} + = link_to_unless page == current_page, page, url, :remote => remote diff --git a/app/views/kaminari/_paginator.html.erb b/app/views/kaminari/_paginator.html.erb index 195fe5c..5b50206 100644 --- a/app/views/kaminari/_paginator.html.erb +++ b/app/views/kaminari/_paginator.html.erb @@ -10,16 +10,8 @@