summaryrefslogtreecommitdiff
path: root/app/views/kaminari
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-06 22:32:23 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-06 22:32:23 +0300
commit9fddd5b440105376caf913e1c09756ec2aaf4431 (patch)
tree379737edf3ae01ccfcafadcc26feee7293f5e7c8 /app/views/kaminari
parent52ad34fd59273e1f65ab1726a97ead7f13095c84 (diff)
downloadgitlab-ce-9fddd5b440105376caf913e1c09756ec2aaf4431.tar.gz
Refactoring & restyle pagination:
- remove admin kaminari theme. Use gitlab theme everywhere - use bootstrap styled for gitlab admin themes - dont reload page when change issue filter
Diffstat (limited to 'app/views/kaminari')
-rw-r--r--app/views/kaminari/admin/_first_page.html.haml9
-rw-r--r--app/views/kaminari/admin/_gap.html.haml9
-rw-r--r--app/views/kaminari/admin/_last_page.html.haml9
-rw-r--r--app/views/kaminari/admin/_next_page.html.haml9
-rw-r--r--app/views/kaminari/admin/_page.html.haml10
-rw-r--r--app/views/kaminari/admin/_paginator.html.haml17
-rw-r--r--app/views/kaminari/admin/_prev_page.html.haml9
-rw-r--r--app/views/kaminari/gitlab/_gap.html.haml5
-rw-r--r--app/views/kaminari/gitlab/_next_page.html.haml2
-rw-r--r--app/views/kaminari/gitlab/_page.html.haml4
-rw-r--r--app/views/kaminari/gitlab/_paginator.html.haml17
-rw-r--r--app/views/kaminari/gitlab/_prev_page.html.haml2
12 files changed, 16 insertions, 86 deletions
diff --git a/app/views/kaminari/admin/_first_page.html.haml b/app/views/kaminari/admin/_first_page.html.haml
deleted file mode 100644
index 41c9c0b3af6..00000000000
--- a/app/views/kaminari/admin/_first_page.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
--# 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
diff --git a/app/views/kaminari/admin/_gap.html.haml b/app/views/kaminari/admin/_gap.html.haml
deleted file mode 100644
index 3ffd12f8587..00000000000
--- a/app/views/kaminari/admin/_gap.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
--# 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
-%li{class: "page"}
- %span.page.gap
- = raw(t 'views.pagination.truncate')
diff --git a/app/views/kaminari/admin/_last_page.html.haml b/app/views/kaminari/admin/_last_page.html.haml
deleted file mode 100644
index b03a206224c..00000000000
--- a/app/views/kaminari/admin/_last_page.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
--# 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}
diff --git a/app/views/kaminari/admin/_next_page.html.haml b/app/views/kaminari/admin/_next_page.html.haml
deleted file mode 100644
index 00c5f0b6f4e..00000000000
--- a/app/views/kaminari/admin/_next_page.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
--# Link to the "Next" page
--# available local variables
--# url: url to the next 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
-%li.next
- = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, rel: 'next', remote: remote
diff --git a/app/views/kaminari/admin/_page.html.haml b/app/views/kaminari/admin/_page.html.haml
deleted file mode 100644
index a52d883b9a8..00000000000
--- a/app/views/kaminari/admin/_page.html.haml
+++ /dev/null
@@ -1,10 +0,0 @@
--# 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
-%li{class: "page#{' active' if page.current?}"}
- = link_to page, url, {remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil}
diff --git a/app/views/kaminari/admin/_paginator.html.haml b/app/views/kaminari/admin/_paginator.html.haml
deleted file mode 100644
index 6f9fb332261..00000000000
--- a/app/views/kaminari/admin/_paginator.html.haml
+++ /dev/null
@@ -1,17 +0,0 @@
--# 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
- %div.pagination
- %ul
- = 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?
diff --git a/app/views/kaminari/admin/_prev_page.html.haml b/app/views/kaminari/admin/_prev_page.html.haml
deleted file mode 100644
index f673abdb3ae..00000000000
--- a/app/views/kaminari/admin/_prev_page.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
--# Link to the "Previous" page
--# available local variables
--# url: url to the previous 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
-%li{class: "prev" }
- = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, rel: 'prev', remote: remote
diff --git a/app/views/kaminari/gitlab/_gap.html.haml b/app/views/kaminari/gitlab/_gap.html.haml
index f82f185ac35..3ffd12f8587 100644
--- a/app/views/kaminari/gitlab/_gap.html.haml
+++ b/app/views/kaminari/gitlab/_gap.html.haml
@@ -4,5 +4,6 @@
-# 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')
+%li{class: "page"}
+ %span.page.gap
+ = raw(t 'views.pagination.truncate')
diff --git a/app/views/kaminari/gitlab/_next_page.html.haml b/app/views/kaminari/gitlab/_next_page.html.haml
index 296cceb080b..00c5f0b6f4e 100644
--- a/app/views/kaminari/gitlab/_next_page.html.haml
+++ b/app/views/kaminari/gitlab/_next_page.html.haml
@@ -5,5 +5,5 @@
-# num_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
-%span.next
+%li.next
= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, rel: 'next', remote: remote
diff --git a/app/views/kaminari/gitlab/_page.html.haml b/app/views/kaminari/gitlab/_page.html.haml
index 19456dcc058..a52d883b9a8 100644
--- a/app/views/kaminari/gitlab/_page.html.haml
+++ b/app/views/kaminari/gitlab/_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{class: "page#{' current' if page.current?}"}
- = link_to_unless page.current?, page, url, {remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil}
+%li{class: "page#{' active' if page.current?}"}
+ = link_to page, url, {remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil}
diff --git a/app/views/kaminari/gitlab/_paginator.html.haml b/app/views/kaminari/gitlab/_paginator.html.haml
index 6dd5a5782a2..6f9fb332261 100644
--- a/app/views/kaminari/gitlab/_paginator.html.haml
+++ b/app/views/kaminari/gitlab/_paginator.html.haml
@@ -6,11 +6,12 @@
-# remote: data-remote
-# paginator: the paginator that renders the pagination tags inside
= paginator.render do
- %nav.gitlab_pagination
- = prev_page_tag
- - 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
+ %div.pagination
+ %ul
+ = 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?
diff --git a/app/views/kaminari/gitlab/_prev_page.html.haml b/app/views/kaminari/gitlab/_prev_page.html.haml
index 5c2061690ac..f673abdb3ae 100644
--- a/app/views/kaminari/gitlab/_prev_page.html.haml
+++ b/app/views/kaminari/gitlab/_prev_page.html.haml
@@ -5,5 +5,5 @@
-# num_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
-%span.prev
+%li{class: "prev" }
= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, rel: 'prev', remote: remote