Jonathan Druart
b563544200
The plan was to rewrite the whole history, but it failed (see https://tree.taiga.io/project/joubu-koha-erm/us/129) yarn run prettier --trailing-comma es5 --semi false --arrow-parens avoid --write **/*.vue TODO - Add a QA check + git pre-commit hook Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
42 lines
1.1 KiB
Vue
42 lines
1.1 KiB
Vue
<template>
|
|
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
|
|
<ol>
|
|
<li v-for="(item, counter) in breadCrumbs" v-bind:key="counter">
|
|
<router-link
|
|
v-if="!item.path && counter == breadCrumbs.length - 1"
|
|
:to="`${currentRoute}`"
|
|
>
|
|
{{ $__(item.text) }}</router-link
|
|
>
|
|
<router-link v-else-if="item.path" :to="item.path">
|
|
{{ $__(item.text) }}</router-link
|
|
>
|
|
<a v-else class="disabled"> {{ $__(item.text) }}</a>
|
|
</li>
|
|
</ol>
|
|
</nav>
|
|
</template>
|
|
|
|
<script>
|
|
import { useRouter } from "vue-router"
|
|
export default {
|
|
computed: {
|
|
breadCrumbs() {
|
|
if (this.$route.meta.breadcrumb) {
|
|
return this.$route.meta.breadcrumb()
|
|
}
|
|
},
|
|
currentRoute() {
|
|
return this.$route.path
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
a.disabled {
|
|
padding: 0.6em 0.3em;
|
|
text-decoration: none;
|
|
color: #000;
|
|
}
|
|
</style>
|