diff options
author | Paul Gascou-Vaillancourt <pgascouvaillancourt@gitlab.com> | 2019-06-14 13:59:00 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-06-14 13:59:00 +0000 |
commit | 04cc3deaab0780f3b5b6e15dc9158a432e49b684 (patch) | |
tree | 16331296f0515bb31cb5eb60206f26256b6c29af /app/assets/javascripts/vue_shared/components/pagination_links.vue | |
parent | 6663ca0f9479fb3768ee83f138072c4065d658c5 (diff) | |
download | gitlab-ce-04cc3deaab0780f3b5b6e15dc9158a432e49b684.tar.gz |
Upgrade gitlab-ui and migrate gl-pagination
- Upgraded gitlab-ui to v4.0.0
- Migrated pagination_links to reflect breaking changes introduced
in gitlab-ui v4.0.0
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/pagination_links.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/pagination_links.vue | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/app/assets/javascripts/vue_shared/components/pagination_links.vue b/app/assets/javascripts/vue_shared/components/pagination_links.vue index 0b44f8578cb..06097913e91 100644 --- a/app/assets/javascripts/vue_shared/components/pagination_links.vue +++ b/app/assets/javascripts/vue_shared/components/pagination_links.vue @@ -1,6 +1,13 @@ <script> import { GlPagination } from '@gitlab/ui'; -import { s__ } from '../../locale'; +import { + PREV, + NEXT, + LABEL_FIRST_PAGE, + LABEL_PREV_PAGE, + LABEL_NEXT_PAGE, + LABEL_LAST_PAGE, +} from '~/vue_shared/components/pagination/constants'; export default { components: { @@ -16,23 +23,27 @@ export default { required: true, }, }, - firstText: s__('Pagination|« First'), - prevText: s__('Pagination|Prev'), - nextText: s__('Pagination|Next'), - lastText: s__('Pagination|Last »'), + prevText: PREV, + nextText: NEXT, + labelFirstPage: LABEL_FIRST_PAGE, + labelPrevPage: LABEL_PREV_PAGE, + labelNextPage: LABEL_NEXT_PAGE, + labelLastPage: LABEL_LAST_PAGE, }; </script> <template> <gl-pagination v-bind="$attrs" - :change="change" - :page="pageInfo.page" + :value="pageInfo.page" :per-page="pageInfo.perPage" :total-items="pageInfo.total" - :first-text="$options.firstText" :prev-text="$options.prevText" :next-text="$options.nextText" - :last-text="$options.lastText" + :label-first-page="$options.labelFirstPage" + :label-prev-page="$options.labelPrevPage" + :label-next-page="$options.labelNextPage" + :label-last-page="$options.labelLastPage" + @input="change" /> </template> |