mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-02 17:59:14 +02:00
35 add template dialog component + info button
This commit is contained in:
49
frontend/src/components/ModuleTemplateDialog.vue
Normal file
49
frontend/src/components/ModuleTemplateDialog.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<script setup lang="ts">
|
||||
import { Ref, ref } from "vue";
|
||||
|
||||
const helpVisible: Ref<boolean> = ref(false);
|
||||
|
||||
const placeholders = ref([
|
||||
{ placeholder: "%t", description: "Event Type", examples: "V = Vorlesung, S = Seminar, P = Praktikum/Prüfung" },
|
||||
{ placeholder: "%p", description: "Mandatory", examples: "w = optional, p = mandatory" },
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Button
|
||||
icon="pi pi-info"
|
||||
class="m-2 small-button"
|
||||
severity="help"
|
||||
rounded
|
||||
outlined
|
||||
size="large"
|
||||
aria-label="Help"
|
||||
@click="helpVisible = true" />
|
||||
<Dialog
|
||||
v-model:visible="helpVisible"
|
||||
header="Module placeholders"
|
||||
>
|
||||
<p>
|
||||
Here you can rename your modules to your liking. This will be the name
|
||||
of the event in your calendar.
|
||||
</p>
|
||||
<p>
|
||||
You can use the following placeholders in your module names:
|
||||
</p>
|
||||
<DataTable
|
||||
:value="placeholders"
|
||||
>
|
||||
<Column field="placeholder" header="Placeholder"></Column>
|
||||
<Column field="description" header="Description"></Column>
|
||||
<Column field="examples" header="Examples"></Column>
|
||||
</DataTable>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.small-button.p-button {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user