From a41947e951fa1e8d36e7c0e2fe18d891a968c5ba Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Mon, 15 Jul 2019 11:28:54 +0200 Subject: [PATCH] Add content list block component --- client/src/components/ContentBlock.vue | 13 +++- .../content-blocks/ContentListBlock.vue | 75 +++++++++++++++++++ 2 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 client/src/components/content-blocks/ContentListBlock.vue diff --git a/client/src/components/ContentBlock.vue b/client/src/components/ContentBlock.vue index 5c541820..345b6afb 100644 --- a/client/src/components/ContentBlock.vue +++ b/client/src/components/ContentBlock.vue @@ -3,11 +3,12 @@
@@ -23,7 +24,7 @@
- + @@ -41,6 +42,7 @@ import InfogramBlock from '@/components/content-blocks/InfogramBlock'; import GeniallyBlock from '@/components/content-blocks/GeniallyBlock'; import SubtitleBlock from '@/components/content-blocks/SubtitleBlock'; + import ContentListBlock from '@/components/content-blocks/ContentListBlock'; import Assignment from '@/components/content-blocks/assignment/Assignment'; import Solution from '@/components/content-blocks/Solution'; import AddContentBlockButton from '@/components/AddContentBlockButton'; @@ -59,6 +61,7 @@ export default { props: ['contentBlock', 'parent'], + name: 'content-block', components: { 'text_block': TextBlock, @@ -72,6 +75,7 @@ 'infogram_block': InfogramBlock, 'genially_block': GeniallyBlock, 'subtitle': SubtitleBlock, + 'content_list': ContentListBlock, Solution, Assignment, Task, @@ -93,6 +97,9 @@ } return `Instrument - ${instruments[contentType]}` + }, + canEditContentBlock() { + return this.contentBlock.mine && !this.contentBlock.indent; } }, diff --git a/client/src/components/content-blocks/ContentListBlock.vue b/client/src/components/content-blocks/ContentListBlock.vue new file mode 100644 index 00000000..74e0dace --- /dev/null +++ b/client/src/components/content-blocks/ContentListBlock.vue @@ -0,0 +1,75 @@ + + + + +