Implement new UI for pagination
This commit is contained in:
parent
1f9153b9a6
commit
8367e4abeb
|
@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date.
|
||||||
v 8.5.0 (unreleased)
|
v 8.5.0 (unreleased)
|
||||||
- Add "visibility" flag to GET /projects api endpoint
|
- Add "visibility" flag to GET /projects api endpoint
|
||||||
- Upgrade gitlab_git to 7.2.23 to fix commit message mentions in first branch push
|
- Upgrade gitlab_git to 7.2.23 to fix commit message mentions in first branch push
|
||||||
|
- New UI for pagination
|
||||||
|
|
||||||
v 8.4.0 (unreleased)
|
v 8.4.0 (unreleased)
|
||||||
- Allow LDAP users to change their email if it was not set by the LDAP server
|
- Allow LDAP users to change their email if it was not set by the LDAP server
|
||||||
|
|
|
@ -1,35 +1,12 @@
|
||||||
.gl-pagination {
|
.gl-pagination {
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
border-top: 1px solid $border-color;
|
border-top: 1px solid $border-color;
|
||||||
background-color: $background-color;
|
margin: 0;
|
||||||
margin: -$gl-padding;
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|
||||||
.pagination {
|
.pagination {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
li.first,
|
|
||||||
li.last,
|
|
||||||
li.next,
|
|
||||||
li.prev {
|
|
||||||
> a {
|
|
||||||
color: $link-color;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
li > a,
|
|
||||||
li > span {
|
|
||||||
border: none;
|
|
||||||
margin: 0;
|
|
||||||
@include border-radius(0 !important);
|
|
||||||
padding: 13px 19px;
|
|
||||||
border-right: 1px solid $border-color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,20 +66,20 @@ $legend-color: $text-color;
|
||||||
//##
|
//##
|
||||||
|
|
||||||
$pagination-color: $gl-gray;
|
$pagination-color: $gl-gray;
|
||||||
$pagination-bg: $background-color;
|
$pagination-bg: #fff;
|
||||||
$pagination-border: transparent;
|
$pagination-border: $border-color;
|
||||||
|
|
||||||
$pagination-hover-color: #fff;
|
$pagination-hover-color: $gl-gray;
|
||||||
$pagination-hover-bg: $brand-info;
|
$pagination-hover-bg: $hover;
|
||||||
$pagination-hover-border: transparent;
|
$pagination-hover-border: $border-color;
|
||||||
|
|
||||||
$pagination-active-color: #fff;
|
$pagination-active-color: $blue-dark;
|
||||||
$pagination-active-bg: $brand-info;
|
$pagination-active-bg: #fff;
|
||||||
$pagination-active-border: transparent;
|
$pagination-active-border: $border-color;
|
||||||
|
|
||||||
$pagination-disabled-color: #fff;
|
$pagination-disabled-color: #cdcdcd;
|
||||||
$pagination-disabled-bg: lighten($brand-info, 15%);
|
$pagination-disabled-bg: $background-color;
|
||||||
$pagination-disabled-border: transparent;
|
$pagination-disabled-border: $border-color;
|
||||||
|
|
||||||
|
|
||||||
//== Form states and alerts
|
//== Form states and alerts
|
||||||
|
|
|
@ -5,5 +5,9 @@
|
||||||
-# num_pages: total number of pages
|
-# num_pages: total number of pages
|
||||||
-# per_page: number of items to fetch per page
|
-# per_page: number of items to fetch per page
|
||||||
-# remote: data-remote
|
-# remote: data-remote
|
||||||
%li.next
|
- if current_page.last?
|
||||||
= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, rel: 'next', remote: remote
|
%li{ class: "next disabled" }
|
||||||
|
%span= raw(t 'views.pagination.next')
|
||||||
|
- else
|
||||||
|
%li{ class: "next" }
|
||||||
|
= link_to raw(t 'views.pagination.next'), url, rel: 'next', remote: remote
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
= page_tag page
|
= page_tag page
|
||||||
- elsif !page.was_truncated?
|
- elsif !page.was_truncated?
|
||||||
= gap_tag
|
= gap_tag
|
||||||
- unless current_page.last?
|
|
||||||
= next_page_tag
|
= next_page_tag
|
||||||
|
- unless current_page.last?
|
||||||
= last_page_tag unless num_pages < 5
|
= last_page_tag unless num_pages < 5
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,9 @@
|
||||||
-# num_pages: total number of pages
|
-# num_pages: total number of pages
|
||||||
-# per_page: number of items to fetch per page
|
-# per_page: number of items to fetch per page
|
||||||
-# remote: data-remote
|
-# remote: data-remote
|
||||||
|
- if current_page.first?
|
||||||
|
%li{ class: "prev disabled" }
|
||||||
|
%span= raw(t 'views.pagination.previous')
|
||||||
|
- else
|
||||||
%li{ class: "prev" }
|
%li{ class: "prev" }
|
||||||
= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, rel: 'prev', remote: remote
|
= link_to raw(t 'views.pagination.previous'), url, rel: 'prev', remote: remote
|
||||||
|
|
|
@ -5,9 +5,4 @@
|
||||||
.nothing-here-block No issues to show
|
.nothing-here-block No issues to show
|
||||||
|
|
||||||
- if @issues.present?
|
- if @issues.present?
|
||||||
.issuable-filter-count
|
|
||||||
%span.pull-right
|
|
||||||
= number_with_delimiter(@issues.total_count)
|
|
||||||
issues for this filter
|
|
||||||
|
|
||||||
= paginate @issues, theme: "gitlab"
|
= paginate @issues, theme: "gitlab"
|
||||||
|
|
|
@ -5,10 +5,5 @@
|
||||||
.nothing-here-block No merge requests to show
|
.nothing-here-block No merge requests to show
|
||||||
|
|
||||||
- if @merge_requests.present?
|
- if @merge_requests.present?
|
||||||
.issuable-filter-count
|
|
||||||
%span.pull-right
|
|
||||||
= number_with_delimiter(@merge_requests.total_count)
|
|
||||||
merge requests for this filter
|
|
||||||
|
|
||||||
= paginate @merge_requests, theme: "gitlab"
|
= paginate @merge_requests, theme: "gitlab"
|
||||||
|
|
||||||
|
|
|
@ -8,3 +8,7 @@ en:
|
||||||
wrong_size: "is the wrong size (should be %{file_size})"
|
wrong_size: "is the wrong size (should be %{file_size})"
|
||||||
size_too_small: "is too small (should be at least %{file_size})"
|
size_too_small: "is too small (should be at least %{file_size})"
|
||||||
size_too_big: "is too big (should be at most %{file_size})"
|
size_too_big: "is too big (should be at most %{file_size})"
|
||||||
|
views:
|
||||||
|
pagination:
|
||||||
|
previous: "Prev"
|
||||||
|
next: "Next"
|
||||||
|
|
Loading…
Reference in New Issue