Skip to content

Commit

Permalink
Enhancement as suggested in #1859: Add pagination to journal (#1862)
Browse files Browse the repository at this point in the history
closes #1859

* Enhancement as suggested in #1859: Add pagination to journal

* Use v-model

* Bump to 2.5.5-SNAPSHOT

Co-authored-by: Ulrich Schulte <ulrich.schulte@codecentric.de>
  • Loading branch information
SteKoe and ulischulte committed Nov 26, 2021
1 parent 2076c6a commit 0670a25
Show file tree
Hide file tree
Showing 7 changed files with 264 additions and 118 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -26,7 +26,7 @@
<description>Spring Boot Admin</description>
<url>https://github.com/codecentric/spring-boot-admin/</url>
<properties>
<revision>2.5.3-SNAPSHOT</revision>
<revision>2.5.5-SNAPSHOT</revision>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
Expand Down
Expand Up @@ -48,12 +48,14 @@ import {faStopCircle as farStopCircle} from '@fortawesome/free-regular-svg-icons
import {faUserCircle} from '@fortawesome/free-solid-svg-icons/faUserCircle';
import {faWrench} from '@fortawesome/free-solid-svg-icons/faWrench';
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
import {faAngleDoubleLeft} from '@fortawesome/free-solid-svg-icons';

export default FontAwesomeIcon;

library.add(
//solid
faAngleDoubleRight,
faAngleDoubleLeft,
faBan,
faBell,
faBellSlash,
Expand Down
@@ -0,0 +1,57 @@
<!--
- Copyright 2014-2019 the original author or authors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-->

<template>
<div class="field has-addons has-addons-centered">
<p class="control">
<button class="button" @click="$emit('change', current-1)" :disabled="current <= 1">
<span class="icon is-small">
<font-awesome-icon :icon="['fas','angle-double-left']" />
</span>
</button>
</p>
<p class="control" v-for="page in pageCount" :key="'page' + page">
<button class="button" :class="{'is-active': page === current}" @click="$emit('change', page)">
<span>{{ page }}</span>
</button>
</p>
<p class="control">
<button class="button" @click="$emit('change', current+1)" :disabled="current >= pageCount">
<span class="icon is-small">
<font-awesome-icon :icon="['fas','angle-double-right']" />
</span>
</button>
</p>
</div>
</template>

<script>
export default {
name: 'SbaPaginationNav',
model: {
prop: 'current',
event: 'change'
},
props: {
current: {type: Number, default: 1},
pageCount: {type: Number, required: true}
}
}
</script>

<style scoped>
</style>
@@ -1,6 +1,10 @@
{
"journal": {
"title": "Ereignis-Journal",
"label": "Journal"
"label": "Journal",
"per_page": {
"per_page": "Pro Seite:",
"all": "Alle"
}
}
}
@@ -1,6 +1,10 @@
{
"journal": {
"title": "Event Journal",
"label": "Journal"
"label": "Journal",
"per_page": {
"per_page": "Per page:",
"all": "All"
}
}
}
@@ -1,6 +1,10 @@
{
"journal": {
"title": "Journal d'évènements",
"label": "Journal"
"label": "Journal",
"per_page": {
"per_page": "Par page:",
"all": "Tous"
}
}
}

0 comments on commit 0670a25

Please sign in to comment.