diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-06 22:32:23 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-06 22:32:23 +0300 |
commit | 9fddd5b440105376caf913e1c09756ec2aaf4431 (patch) | |
tree | 379737edf3ae01ccfcafadcc26feee7293f5e7c8 /app/views/kaminari/gitlab | |
parent | 52ad34fd59273e1f65ab1726a97ead7f13095c84 (diff) | |
download | gitlab-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/gitlab')
-rw-r--r-- | app/views/kaminari/gitlab/_gap.html.haml | 5 | ||||
-rw-r--r-- | app/views/kaminari/gitlab/_next_page.html.haml | 2 | ||||
-rw-r--r-- | app/views/kaminari/gitlab/_page.html.haml | 4 | ||||
-rw-r--r-- | app/views/kaminari/gitlab/_paginator.html.haml | 17 | ||||
-rw-r--r-- | app/views/kaminari/gitlab/_prev_page.html.haml | 2 |
5 files changed, 16 insertions, 14 deletions
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 |