Commit 5bafc7d8 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch '23053-ci-tables-pagination' into 'master'

Resolve "Tables pagination is not responsive"

## What does this MR do?
Makes table pagination responsive.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?
Table pagination was not responsive and was broken in smaller screens

## Screenshots (if relevant)
### Small screen
![small](/uploads/912c6813596ef9f992b3bf5a9ba141f1/small.png)
![small_big_numbers](/uploads/5add4c2ead1bd3fbf9f15f66e2dad178/small_big_numbers.png)

### Medium screen
![medium](/uploads/77774be45d83ad9bba127d0e020e2d48/medium.png)

### Large screen
![big](/uploads/ea30d115e7e2b915626faafa425687f6/big.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
Closes #23053

See merge request !7157
parents 0ed0ad5d b59c6f26
Pipeline #4836437 failed with stages
in 2501 minutes and 26 seconds
......@@ -49,6 +49,7 @@ Please view this file on the master branch, on stable branches it's out of date.
- Shortened merge request modal to let clipboard button not overlap
- In all filterable drop downs, put input field in focus only after load is complete (Ido @leibo)
- Improve search query parameter naming in /admin/users !7115 (YarNayar)
- Fix table pagination to be responsive
- Allow to search for user by secondary email address in the admin interface(/admin/users) !7115 (YarNayar)
## 8.13.3
......
......@@ -7,8 +7,70 @@
.pagination {
padding: 0;
}
.gap,
.gap:hover {
background-color: $gray-light;
padding: $gl-vert-padding;
cursor: default;
}
}
.panel > .gl-pagination {
margin: 0;
}
/**
* Extra-small screen pagination.
*/
@media (max-width: 320px) {
.gl-pagination {
.first,
.last {
display: none;
}
.page {
display: none;
&.active {
display: inline;
}
}
}
}
/**
* Small screen pagination
*/
@media (max-width: $screen-xs) {
.gl-pagination {
.pagination li a {
padding: 6px 10px;
}
.page {
display: none;
&.active {
display: inline;
}
}
}
}
/**
* Medium screen pagination
*/
@media (min-width: $screen-xs) and (max-width: $screen-md-max) {
.gl-pagination {
.page {
display: none;
&.active,
&.sibling {
display: inline;
}
}
}
}
......@@ -4,6 +4,6 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li{class: "page"}
%span.page.gap
%li
%span.gap
= raw(t 'views.pagination.truncate')
......@@ -6,5 +6,5 @@
-# total_pages: total number of pages
-# per_page: number of items to fetch per page
-# remote: data-remote
%li{class: "page#{' active' if page.current?}"}
%li{class: "page#{' active' if page.current?}#{' sibling' if page.next? || page.prev?}"}
= link_to page, url, {remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment