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
df5b4c00
Commit
df5b4c00
authored
Jun 05, 2018
by
Sam Beckham
Committed by
Clement Ho
Jun 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "BS4: Pagination is pipeline's page has no styling"
parent
27fcc4d2
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
25 additions
and
102 deletions
+25
-102
app/assets/javascripts/vue_shared/components/table_pagination.vue
...ts/javascripts/vue_shared/components/table_pagination.vue
+12
-4
app/assets/stylesheets/framework/pagination.scss
app/assets/stylesheets/framework/pagination.scss
+3
-88
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
+1
-1
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
+1
-1
app/views/kaminari/gitlab/_page.html.haml
app/views/kaminari/gitlab/_page.html.haml
+1
-1
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
+1
-1
app/views/kaminari/gitlab/_without_count.html.haml
app/views/kaminari/gitlab/_without_count.html.haml
+2
-2
spec/javascripts/vue_shared/components/table_pagination_spec.js
...avascripts/vue_shared/components/table_pagination_spec.js
+1
-1
No files found.
app/assets/javascripts/vue_shared/components/table_pagination.vue
View file @
df5b4c00
...
...
@@ -124,15 +124,18 @@
break
;
}
},
hideOnSmallScreen
(
item
)
{
return
!
item
.
first
&&
!
item
.
last
&&
!
item
.
next
&&
!
item
.
prev
&&
!
item
.
active
;
},
},
};
</
script
>
<
template
>
<div
v-if=
"showPagination"
class=
"gl-pagination"
class=
"gl-pagination
prepend-top-default
"
>
<ul
class=
"pagination
clearfix
"
>
<ul
class=
"pagination
justify-content-center
"
>
<li
v-for=
"(item, index) in getItems"
:key=
"index"
...
...
@@ -142,12 +145,17 @@
'js-next-button': item.next,
'js-last-button': item.last,
'js-first-button': item.first,
'd-none d-md-block': hideOnSmallScreen(item),
separator: item.separator,
active: item.active,
disabled: item.disabled
disabled: item.disabled
|| item.separator
}"
class="page-item"
>
<a
@
click.prevent=
"changePage(item.title, item.disabled)"
>
<a
@
click.prevent=
"changePage(item.title, item.disabled)"
class=
"page-link"
>
{{
item
.
title
}}
</a>
</li>
...
...
app/assets/stylesheets/framework/pagination.scss
View file @
df5b4c00
.gl-pagination
{
text-align
:
center
;
border-top
:
1px
solid
$border-color
;
margin
:
0
;
margin-top
:
0
;
.pagination
{
padding
:
0
;
margin
:
20px
0
;
a
{
cursor
:
pointer
;
}
.separator
,
.separator
:hover
{
a
{
cursor
:
default
;
background-color
:
$gray-light
;
padding
:
$gl-vert-padding
;
}
}
}
.gap
,
.gap
:hover
{
background-color
:
$gray-light
;
padding
:
$gl-vert-padding
;
cursor
:
default
;
}
}
.card
>
.gl-pagination
{
margin
:
0
;
}
/**
* Extra-small screen pagination.
*/
@media
(
max-width
:
320px
)
{
.gl-pagination
{
.first
,
.last
{
display
:
none
;
}
.page-item
{
display
:
none
;
&
.active
{
display
:
inline
;
}
}
}
}
/**
* Small screen pagination
*/
@include
media-breakpoint-down
(
xs
)
{
.gl-pagination
{
.pagination
li
a
{
padding
:
6px
10px
;
}
.page-item
{
display
:
none
;
&
.active
{
display
:
inline
;
}
}
}
}
/**
* Medium screen pagination
*/
@media
(
min-width
:
map-get
(
$grid-breakpoints
,
xs
))
and
(
max-width
:
map-get
(
$grid-breakpoints
,
sm
))
{
.gl-pagination
{
.page-item
{
display
:
none
;
&
.active
,
&
.sibling
{
display
:
inline
;
}
}
a
{
color
:
inherit
;
text-decoration
:
none
;
}
}
app/views/kaminari/gitlab/_first_page.html.haml
View file @
df5b4c00
...
...
@@ -5,5 +5,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li
.
first.page-item
%li
.
page-item.js-first-button
=
link_to_unless
current_page
.
first?
,
raw
(
t
'views.pagination.first'
),
url
,
remote:
remote
,
class:
'page-link'
app/views/kaminari/gitlab/_gap.html.haml
View file @
df5b4c00
...
...
@@ -4,5 +4,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li
.page-item.disabled
%li
.page-item.disabled
.d-none.d-md-block
=
link_to
raw
(
t
'views.pagination.truncate'
),
'#'
,
class:
'page-link'
app/views/kaminari/gitlab/_last_page.html.haml
View file @
df5b4c00
...
...
@@ -5,5 +5,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li
.
last.page-item
%li
.
page-item.js-last-button
=
link_to_unless
current_page
.
last?
,
raw
(
t
'views.pagination.last'
),
url
,
{
remote:
remote
,
class:
'page-link'
}
app/views/kaminari/gitlab/_next_page.html.haml
View file @
df5b4c00
...
...
@@ -8,5 +8,5 @@
-
page_url
=
current_page
.
last?
?
'#'
:
url
%li
.page-item
{
class:
(
'disabled'
if
current_page
.
last?
)
}
%li
.page-item
.js-next-button
{
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 @
df5b4c00
...
...
@@ -6,5 +6,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li
.page-item.js-pagination-page
{
class:
[
active_when
(
page
.
current?
),
(
'sibling'
if
page
.
next?
||
page
.
prev?
)]
}
%li
.page-item.js-pagination-page
{
class:
[
active_when
(
page
.
current?
),
(
'sibling'
if
page
.
next?
||
page
.
prev?
)
,
(
'd-none d-md-block'
if
!
page
.
current?
)
]
}
=
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 @
df5b4c00
...
...
@@ -6,7 +6,7 @@
-# remote: data-remote
-# paginator: the paginator that renders the pagination tags inside
=
paginator
.
render
do
.gl-pagination
.gl-pagination
.prepend-top-default
%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
...
...
app/views/kaminari/gitlab/_prev_page.html.haml
View file @
df5b4c00
...
...
@@ -8,5 +8,5 @@
-
page_url
=
current_page
.
first?
?
'#'
:
url
%li
.page-item
{
class:
(
'disabled'
if
current_page
.
first?
)
}
%li
.page-item
.js-previous-button
{
class:
(
'disabled'
if
current_page
.
first?
)
}
=
link_to
raw
(
t
'views.pagination.previous'
),
page_url
,
rel:
'prev'
,
remote:
remote
,
class:
'page-link'
app/views/kaminari/gitlab/_without_count.html.haml
View file @
df5b4c00
.gl-pagination
%ul
.pagination.
clearfix
.gl-pagination
.prepend-top-default
%ul
.pagination.
justify-content-center
-
if
previous_path
%li
.page-item.prev
=
link_to
(
t
(
'views.pagination.previous'
),
previous_path
,
rel:
'prev'
,
class:
'page-link'
)
...
...
spec/javascripts/vue_shared/components/table_pagination_spec.js
View file @
df5b4c00
...
...
@@ -51,7 +51,7 @@ describe('Pagination component', () => {
expect
(
component
.
$el
.
querySelector
(
'
.js-previous-button
'
).
classList
.
contains
(
'
disabled
'
),
).
toEqual
(
true
);
).
toEqual
(
true
);
component
.
$el
.
querySelector
(
'
.js-previous-button a
'
).
click
();
...
...
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