Skip to content
Snippets Groups Projects
Verified Commit bf56787f authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Add print button to timetable view

parent ef7b2083
No related branches found
No related tags found
No related merge requests found
Pipeline #181681 failed
This commit is part of merge request !36. Comments created here will be created in the context of that merge request.
......@@ -87,6 +87,28 @@ export default {
</v-card-text>
</v-card>
</template>
<template #additionalButton="{ selected, mobile }">
<div :class="{ 'full-width': mobile, 'd-flex': true }" v-if="selected">
<v-btn
outlined
color="secondary"
small
:class="{ 'mx-3 flex-grow-1': true, 'mb-3': mobile }"
:to="{
name: 'lesrooster.timetablePrint',
params: {
timeGrid: timeGrid.id,
type: selected.type.toLowerCase(),
id: selected.objId,
},
}"
target="_blank"
>
<v-icon left>mdi-printer-outline</v-icon>
{{ $t("lesrooster.timetable.print") }}
</v-btn>
</div>
</template>
<template #default="{ selected }">
<group-time-table
v-if="$route.params.type === 'group'"
......
......@@ -43,7 +43,14 @@ export default {
},
],
},
{
path: "timetable/:timeGrid(\\d+)/:type(\\w+)/:id(\\d+)/print/",
component: () => import("aleksis.core/components/LegacyBaseTemplate.vue"),
name: "lesrooster.timetablePrint",
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
},
},
{
path: "validity_ranges/",
component: () => import("./components/validity_range/ValidityRange.vue"),
......
......@@ -122,7 +122,8 @@
}
},
"timetable": {
"menu_title": "Timetables"
"menu_title": "Timetables",
"print": "Print"
},
"supervision": {
"menu_title": "Supervisions",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment