diff --git a/client/src/components/content-forms/ChooserElement.vue b/client/src/components/content-forms/ChooserElement.vue
new file mode 100644
index 00000000..5a8672d9
--- /dev/null
+++ b/client/src/components/content-forms/ChooserElement.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
diff --git a/client/src/components/content-forms/ContentBlockElementChooserWidget.vue b/client/src/components/content-forms/ContentBlockElementChooserWidget.vue
index 3df6777b..196d20df 100644
--- a/client/src/components/content-forms/ContentBlockElementChooserWidget.vue
+++ b/client/src/components/content-forms/ContentBlockElementChooserWidget.vue
@@ -28,77 +28,14 @@
:class="{'content-block-element-chooser-widget--no-assignment': hideAssignment}"
class="content-block-element-chooser-widget"
>
-
-
-
-
-
-
-
-
- Aufgabe & Ergebnis
-
-
-
+
@@ -107,8 +44,8 @@
import Checkbox from '@/components/ui/Checkbox';
import formElementIcons from '@/components/ui/form-element-icons';
- import TitleIcon from '@/components/icons/TitleIcon';
import CrossIcon from '@/components/icons/CrossIcon';
+ import ChooserElement from '@/components/content-forms/ChooserElement';
export default {
props: {
@@ -125,15 +62,63 @@
},
components: {
+ ChooserElement,
CrossIcon,
- TitleIcon,
Checkbox,
...formElementIcons,
},
- data: () => ({
- convertToList: false,
- }),
+ data() {
+ return {
+ convertToList: false,
+ chooserTypes: [
+ {
+ type: 'subtitle',
+ block: 'subtitle',
+ title: 'Untertitel',
+ icon: 'title-icon',
+ },
+ {
+ type: 'link',
+ block: 'link_block',
+ title: 'Link',
+ icon: 'link-icon',
+ },
+ {
+ type: 'video',
+ block: 'video_block',
+ },
+ {
+ type: 'image',
+ block: 'image_url_block',
+ title: 'Bild',
+ },
+ {
+ type: 'text',
+ block: 'text_block',
+ },
+ {
+ type: 'assignment',
+ block: 'assignment',
+ icon: 'speech-bubble-icon',
+ title: 'Aufgabe & Ergebnis',
+ },
+ {
+ type: 'document',
+ block: 'document_block',
+ title: 'Dokument',
+ },
+
+
+ ],
+ };
+ },
+
+ computed: {
+ filteredChooserTypes() {
+ return this.chooserTypes.filter(type => !("show" in type) || type.show ); // display element if `show` is not set or if `show` evaluates to true
+ },
+ },
methods: {
changeType(type) {
@@ -144,7 +129,7 @@
},
remove() {
this.$emit('remove');
- }
+ },
},
};
@@ -222,29 +207,6 @@
grid-row: 1;
}
- &__link {
- cursor: pointer;
- border: 1px solid $color-silver;
- border-radius: 4px;
- height: 105px;
- width: 105px;
- box-sizing: border-box;
- display: grid;
- grid-template-rows: 1fr 45px;
- justify-content: center;
- justify-items: center;
- align-items: center;
- }
- &__link-icon {
- width: 40px;
- height: 40px;
- align-self: end;
- }
-
- &__link-text {
- font-size: toRem(13px);
- align-self: start;
- }
}