Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
5a4342c3
Commit
5a4342c3
authored
Apr 13, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] Add pagination styles
parent
4e54f5ae
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
23 deletions
+21
-23
app/assets/stylesheets/framework/pagination.scss
app/assets/stylesheets/framework/pagination.scss
+4
-3
app/views/kaminari/gitlab/_first_page.html.haml
app/views/kaminari/gitlab/_first_page.html.haml
+1
-1
app/views/kaminari/gitlab/_gap.html.haml
app/views/kaminari/gitlab/_gap.html.haml
+2
-3
app/views/kaminari/gitlab/_last_page.html.haml
app/views/kaminari/gitlab/_last_page.html.haml
+1
-1
app/views/kaminari/gitlab/_next_page.html.haml
app/views/kaminari/gitlab/_next_page.html.haml
+5
-6
app/views/kaminari/gitlab/_page.html.haml
app/views/kaminari/gitlab/_page.html.haml
+2
-2
app/views/kaminari/gitlab/_paginator.html.haml
app/views/kaminari/gitlab/_paginator.html.haml
+1
-1
app/views/kaminari/gitlab/_prev_page.html.haml
app/views/kaminari/gitlab/_prev_page.html.haml
+5
-6
No files found.
app/assets/stylesheets/framework/pagination.scss
View file @
5a4342c3
...
...
@@ -6,6 +6,7 @@
.pagination
{
padding
:
0
;
margin
:
20px
0
;
a
{
cursor
:
pointer
;
...
...
@@ -44,7 +45,7 @@
display
:
none
;
}
.page
{
.page
-item
{
display
:
none
;
&
.active
{
...
...
@@ -63,7 +64,7 @@
padding
:
6px
10px
;
}
.page
{
.page
-item
{
display
:
none
;
&
.active
{
...
...
@@ -78,7 +79,7 @@
*/
@media
(
min-width
:
map-get
(
$grid-breakpoints
,
xs
))
and
(
max-width
:
map-get
(
$grid-breakpoints
,
sm
))
{
.gl-pagination
{
.page
{
.page
-item
{
display
:
none
;
&
.active
,
...
...
app/views/kaminari/gitlab/_first_page.html.haml
View file @
5a4342c3
...
...
@@ -5,5 +5,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li
.first
%li
.first
.page-item
=
link_to_unless
current_page
.
first?
,
raw
(
t
'views.pagination.first'
),
url
,
remote:
remote
app/views/kaminari/gitlab/_gap.html.haml
View file @
5a4342c3
...
...
@@ -4,6 +4,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li
%span
.gap
=
raw
(
t
'views.pagination.truncate'
)
%li
.page-item
=
link_to
raw
(
t
'views.pagination.truncate'
),
'#'
,
class:
'page-link'
app/views/kaminari/gitlab/_last_page.html.haml
View file @
5a4342c3
...
...
@@ -5,5 +5,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li
.last
%li
.last
.page-item
=
link_to_unless
current_page
.
last?
,
raw
(
t
'views.pagination.last'
),
url
,
{
remote:
remote
}
app/views/kaminari/gitlab/_next_page.html.haml
View file @
5a4342c3
...
...
@@ -5,9 +5,8 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
-
if
current_page
.
last?
%li
.next.disabled
%span
=
raw
(
t
'views.pagination.next'
)
-
else
%li
.next
=
link_to
raw
(
t
'views.pagination.next'
),
url
,
rel:
'next'
,
remote:
remote
-
page_url
=
current_page
.
last?
?
'#'
:
url
%li
.page-item
{
class:
(
'disabled'
if
current_page
.
last?
)
}
=
link_to
raw
(
t
'views.pagination.next'
),
page_url
,
rel:
'next'
,
remote:
remote
,
class:
'page-link'
app/views/kaminari/gitlab/_page.html.haml
View file @
5a4342c3
...
...
@@ -6,5 +6,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li
.page
{
class:
[
active_when
(
page
.
current?
),
(
'sibling'
if
page
.
next?
||
page
.
prev?
)]
}
=
link_to
page
,
url
,
{
remote:
remote
,
rel:
page
.
next?
?
'next'
:
page
.
prev?
?
'prev'
:
nil
}
%li
.page
-item
{
class:
[
active_when
(
page
.
current?
),
(
'sibling'
if
page
.
next?
||
page
.
prev?
)]
}
=
link_to
page
,
url
,
{
remote:
remote
,
rel:
page
.
next?
?
'next'
:
page
.
prev?
?
'prev'
:
nil
,
class:
'page-link'
}
app/views/kaminari/gitlab/_paginator.html.haml
View file @
5a4342c3
...
...
@@ -7,7 +7,7 @@
-# paginator: the paginator that renders the pagination tags inside
=
paginator
.
render
do
.gl-pagination
%ul
.pagination.
clearfix
%ul
.pagination.
justify-content-center
-
unless
current_page
.
first?
=
first_page_tag
unless
total_pages
<
5
# As kaminari will always show the first 5 pages
=
prev_page_tag
...
...
app/views/kaminari/gitlab/_prev_page.html.haml
View file @
5a4342c3
...
...
@@ -5,9 +5,8 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
-
if
current_page
.
first?
%li
.prev.disabled
%span
=
raw
(
t
'views.pagination.previous'
)
-
else
%li
.prev
=
link_to
raw
(
t
'views.pagination.previous'
),
url
,
rel:
'prev'
,
remote:
remote
-
page_url
=
current_page
.
first?
?
'#'
:
url
%li
.page-item
{
class:
(
'disabled'
if
current_page
.
first?
)
}
=
link_to
raw
(
t
'views.pagination.next'
),
page_url
,
rel:
'next'
,
remote:
remote
,
class:
'page-link'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment