File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 :style =" { minHeight: 0 }"
1818 >
1919 <ContainerSidePanel
20- :home-route =" homeRoute "
2120 :is-navigation-overview-route =" isNavigationOverviewRoute "
2221 :links =" mainNavigationLinks "
2322 :navigation-overview-route =" navigationOverviewRoute "
Original file line number Diff line number Diff line change 1515 data-testid =" layout-navOverview-toggle"
1616 :icon =" isNavigationOverviewRoute ? 'mdi-close' : 'mdi-menu'"
1717 size =" large"
18- :to ="
19- isNavigationOverviewRoute ? homeRoute : navigationOverviewRoute
20- "
18+ :to =" navigationOverviewRoute"
2119 :variant =" isNavigationOverviewRoute ? 'flat' : 'text'"
2220 />
2321
@@ -57,7 +55,6 @@ defineProps<{
5755 links: BaseNavigationLink [];
5856 isNavigationOverviewRoute: boolean ;
5957 navigationOverviewRoute: RouteLocationAsRelative ;
60- homeRoute: RouteLocationAsRelative ;
6158 ability: AbilityLike ;
6259}>();
6360
Original file line number Diff line number Diff line change @@ -17,14 +17,6 @@ export function buildBaseNavigationLinks(
1717 i18n : I18nLike ,
1818) : BaseNavigationLink [ ] {
1919 const result : BaseNavigationLink [ ] = [ ] ;
20- if ( ability . canView ( GUIComponent . Home ) ) {
21- result . push ( {
22- title : i18n . t ( "titles.home" ) ,
23- route : typedTo ( { name : "/(app)/" } ) ,
24- icon : "mdi-home" ,
25- testId : "layout-home-button" ,
26- } ) ;
27- }
2820
2921 if ( ability . canView ( GUIComponent . Exams ) ) {
3022 result . push ( {
Original file line number Diff line number Diff line change 99 @click =" handleClick"
1010 >
1111 <div class =" d-flex align-center ga-2 pr-4 pl-2" >
12- <v-icon size =" 25" >mdi-plus </v-icon >
12+ <v-icon size =" 25" >{{ icon }} </v-icon >
1313
1414 <span class =" text-title-medium" style =" letter-spacing : normal " >
15- {{ $t("general.addButton") }}
15+ {{ label ?? $t("general.addButton") }}
1616 </span >
1717 </div >
1818 </v-btn >
@@ -24,10 +24,20 @@ import { useRouter } from "vue-router";
2424import type { RouteLocationAsRelative } from " vue-router" ;
2525
2626const router = useRouter ();
27- const props = defineProps <{
28- route? : RouteLocationAsRelative ;
29- dataTestId? : string ;
30- }>();
27+ const props = withDefaults (
28+ defineProps <{
29+ route? : RouteLocationAsRelative ;
30+ dataTestId? : string ;
31+ label? : string ;
32+ icon? : string ;
33+ }>(),
34+ {
35+ route: undefined ,
36+ dataTestId: undefined ,
37+ label: undefined ,
38+ icon: " mdi-plus" ,
39+ },
40+ );
3141
3242const emit = defineEmits <{
3343 (e : " click" , event : MouseEvent ): void ;
Original file line number Diff line number Diff line change 33 aria-label =" Breadcrumb"
44 class =" d-flex align-center flex-wrap ga-2 pl-5 text-body-medium"
55 >
6- <v-hover v-slot =" { isHovering, props: hoverProps }" >
7- <RouterLink
8- v-bind =" hoverProps "
9- :to =" { name: ' /(app)/' } "
10- :aria-label =" $t (' titles.home' )"
11- class="d-inline-flex align-center text-decoration-none"
12- :class =" isHovering ? ' text-primary' : ' text-medium-emphasis' "
13- >
14- <v-icon icon =" mdi-home-outline" size =" 20" />
15- </RouterLink >
16- </v-hover >
17-
186 <template
197 v-for =" (item , index ) in items "
208 :key =" ` ${item .label }-${index } ` "
219 >
22- <span aria-hidden =" true" class =" text-disabled" >›</span >
10+ <span v-if =" index > 0" aria-hidden =" true" class =" text-disabled" >
11+ ›
12+ </span >
2313
2414 <v-hover
2515 v-if =" item.link"
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change 4242 "general" : {
4343 "loadingText" : " Loading... Please wait" ,
4444 "addButton" : " Add" ,
45+ "prepareButton" : " Prepare" ,
4546 "cancelButton" : " Cancel" ,
4647 "backButton" : " Back" ,
4748 "nextButton" : " Next" ,
20632064 }
20642065 },
20652066 "titles" : {
2066- "home" : " Home" ,
20672067 "navigationOverview" : " Navigation Overview" ,
20682068 "exams" : " Exams" ,
20692069 "examsOverview" : " Exams Overview" ,
Original file line number Diff line number Diff line change 99 :data-test-id =" dataTestId "
1010 :panel-left-collapsed =" ! filtersOpen "
1111 >
12+ <template #ActionButton >
13+ <AddButton
14+ :route =" { name: ' /(app)/exam-template/create/' } "
15+ :data-test-id =" dataTestId "
16+ />
17+ </template >
18+
1219 <template #PanelLeft >
1320 <SearchBar
1421 v-model =" list .searchInputValue "
7380
7481<script setup lang="ts">
7582import BasicPage from " @/components/layout/pages/BasicPage.vue" ;
83+ import AddButton from " @/components/widgets/AddButton.vue" ;
7684import SearchBar from " @/components/widgets/searches/SearchBar.vue" ;
7785import EntityTable from " @/components/widgets/entity-table/EntityTable.vue" ;
7886import FilterControlsRow from " @/components/widgets/filters/FilterControlsRow.vue" ;
Original file line number Diff line number Diff line change 55 :data-test-id =" dataTestId "
66 :panel-left-collapsed =" ! filtersOpen "
77 >
8+ <template #ActionButton >
9+ <AddButton
10+ :route =" { name: ' /(app)/exam/create/' } "
11+ :label =" $t (' general.prepareButton' )"
12+ icon="mdi-clipboard-edit-outline"
13+ :data-test-id =" dataTestId "
14+ />
15+ </template >
16+
817 <template #PanelLeft >
918 <SearchBar
1019 v-model =" list .searchInputValue "
6574
6675<script setup lang="ts">
6776import BasicPage from " @/components/layout/pages/BasicPage.vue" ;
77+ import AddButton from " @/components/widgets/AddButton.vue" ;
6878import SearchBar from " @/components/widgets/searches/SearchBar.vue" ;
6979import EntityTable from " @/components/widgets/entity-table/EntityTable.vue" ;
7080import EnumChip from " @/components/widgets/EnumChip.vue" ;
You can’t perform that action at this time.
0 commit comments