Loading src/components/JamaBreadcrumb.vue +40 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,38 @@ {{shortTitle(this.path[this.path.length-1].title)}} </a> <v-tooltip bottom color="secondary"> <template v-slot:activator="{ on, attrs }"> <v-icon color="primary" v-bind="attrs" v-on="on" > mdi-information </v-icon> </template> <div> <v-list-item twoo-line dark> <v-list-item-content> <v-list-item-title>À ce niveau</v-list-item-title> <v-list-item-subtitle > {{nbCollections}} {{$tc('collection',nbCollections)}} <template v-if="path.length > 0">/ {{ nbResources }} {{$tc('resource',nbResources)}}</template> </v-list-item-subtitle> </v-list-item-content> </v-list-item> <v-list-item twoo-line dark> <v-list-item-content> <v-list-item-title>Total</v-list-item-title> <v-list-item-subtitle> {{ nbTotalCollections }} {{$tc('collection',nbTotalCollections)}} / {{ nbTotalResources }} {{$tc('resource',nbTotalResources)}} </v-list-item-subtitle> </v-list-item-content> </v-list-item> </div> </v-tooltip> </v-container> </template> Loading @@ -37,6 +69,8 @@ export default { collections: Array, nbResources: Number, nbCollections: Number, nbTotalResources : Number, nbTotalCollections : Number, path: Array }, Loading Loading @@ -94,10 +128,14 @@ export default { <i18n> { "en": { "back_collection": "Back to parent collection" "back_collection": "Back to parent collection", "collection" : "collection | collection | collections", "resource": "resource | resource | resources" }, "fr": { "back_collection": "Collection du niveau supérieur" "back_collection": "Collection du niveau supérieur", "collection" : "collection | collection | collections", "resource": "ressource | ressource | ressources" } } </i18n> No newline at end of file src/components/VueJama.vue +20 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ :collections="collections" :nb-resources="nbResources" :nb-collections="nbCollections" :nb-total-collections="nbSubCollections" :nb-total-resources="nbSubResources" :path="path" @collection-clicked="showCollection" @reload-clicked="reloadCurrentCollection()" Loading @@ -54,7 +56,7 @@ <v-container class="d-flex flex-column flex-grow-1 pt-0"> <div class="d-flex justify-space-between"> <v-col cols="3" class="d-flex justify-start ml-0 pl-1"> <v-btn-toggle v-model="viewMode" class="ml-2"> <v-btn-toggle mandatory v-model="viewMode" class="ml-2"> <v-btn small class="ma-0" :title="$t('mosaic_view')"> <v-icon>mdi-view-grid</v-icon> </v-btn> Loading Loading @@ -332,8 +334,24 @@ export default { return c.title.toLowerCase().indexOf(this.filter.toLowerCase()) > -1 }) } } }, nbSubCollections() { let total = 0; this.collections.forEach((c) => total += c.descendants_count); return total; }, nbSubResources() { let total = 0; this.collections.forEach((c) => total += c.descendants_resources_count); return total; }, }, watch: { viewMode(){ console.log(this.viewMode); } }, data() { Loading Loading
src/components/JamaBreadcrumb.vue +40 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,38 @@ {{shortTitle(this.path[this.path.length-1].title)}} </a> <v-tooltip bottom color="secondary"> <template v-slot:activator="{ on, attrs }"> <v-icon color="primary" v-bind="attrs" v-on="on" > mdi-information </v-icon> </template> <div> <v-list-item twoo-line dark> <v-list-item-content> <v-list-item-title>À ce niveau</v-list-item-title> <v-list-item-subtitle > {{nbCollections}} {{$tc('collection',nbCollections)}} <template v-if="path.length > 0">/ {{ nbResources }} {{$tc('resource',nbResources)}}</template> </v-list-item-subtitle> </v-list-item-content> </v-list-item> <v-list-item twoo-line dark> <v-list-item-content> <v-list-item-title>Total</v-list-item-title> <v-list-item-subtitle> {{ nbTotalCollections }} {{$tc('collection',nbTotalCollections)}} / {{ nbTotalResources }} {{$tc('resource',nbTotalResources)}} </v-list-item-subtitle> </v-list-item-content> </v-list-item> </div> </v-tooltip> </v-container> </template> Loading @@ -37,6 +69,8 @@ export default { collections: Array, nbResources: Number, nbCollections: Number, nbTotalResources : Number, nbTotalCollections : Number, path: Array }, Loading Loading @@ -94,10 +128,14 @@ export default { <i18n> { "en": { "back_collection": "Back to parent collection" "back_collection": "Back to parent collection", "collection" : "collection | collection | collections", "resource": "resource | resource | resources" }, "fr": { "back_collection": "Collection du niveau supérieur" "back_collection": "Collection du niveau supérieur", "collection" : "collection | collection | collections", "resource": "ressource | ressource | ressources" } } </i18n> No newline at end of file
src/components/VueJama.vue +20 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ :collections="collections" :nb-resources="nbResources" :nb-collections="nbCollections" :nb-total-collections="nbSubCollections" :nb-total-resources="nbSubResources" :path="path" @collection-clicked="showCollection" @reload-clicked="reloadCurrentCollection()" Loading @@ -54,7 +56,7 @@ <v-container class="d-flex flex-column flex-grow-1 pt-0"> <div class="d-flex justify-space-between"> <v-col cols="3" class="d-flex justify-start ml-0 pl-1"> <v-btn-toggle v-model="viewMode" class="ml-2"> <v-btn-toggle mandatory v-model="viewMode" class="ml-2"> <v-btn small class="ma-0" :title="$t('mosaic_view')"> <v-icon>mdi-view-grid</v-icon> </v-btn> Loading Loading @@ -332,8 +334,24 @@ export default { return c.title.toLowerCase().indexOf(this.filter.toLowerCase()) > -1 }) } } }, nbSubCollections() { let total = 0; this.collections.forEach((c) => total += c.descendants_count); return total; }, nbSubResources() { let total = 0; this.collections.forEach((c) => total += c.descendants_resources_count); return total; }, }, watch: { viewMode(){ console.log(this.viewMode); } }, data() { Loading