Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Beckham <sbeckham@gitlab.com>2018-06-05 19:38:22 +0300
committerClement Ho <clemmakesapps@gmail.com>2018-06-05 19:38:22 +0300
commitdf5b4c0038c31385c3e4452115becd9f8fc335e4 (patch)
tree5f6b2bebb27c06185e7a4fe2cf036f2d1076c5a5 /app/assets/javascripts/vue_shared
parent27fcc4d246b62d99f9fc1fddbc15b328d44c2a1e (diff)
Resolve "BS4: Pagination is pipeline's page has no styling"
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r--app/assets/javascripts/vue_shared/components/table_pagination.vue16
1 files changed, 12 insertions, 4 deletions
diff --git a/app/assets/javascripts/vue_shared/components/table_pagination.vue b/app/assets/javascripts/vue_shared/components/table_pagination.vue
index 22fc5757447..6f231619f26 100644
--- a/app/assets/javascripts/vue_shared/components/table_pagination.vue
+++ b/app/assets/javascripts/vue_shared/components/table_pagination.vue
@@ -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>