diff --git a/client/src/components/content-blocks/ContentComponent.vue b/client/src/components/content-blocks/ContentComponent.vue index 9f40af6e..1ab9f46f 100644 --- a/client/src/components/content-blocks/ContentComponent.vue +++ b/client/src/components/content-blocks/ContentComponent.vue @@ -38,6 +38,7 @@ import Assignment from '@/components/content-blocks/assignment/Assignment'; import Survey from '@/components/content-blocks/SurveyBlock'; import Solution from '@/components/content-blocks/Solution'; + import Instruction from '@/components/content-blocks/Instruction'; import BookmarkActions from '@/components/notes/BookmarkActions'; import {constructContentComponentBookmarkMutation} from '@/helpers/update-content-bookmark-mutation'; @@ -63,6 +64,7 @@ 'thinglink_block': ThinglinkBlock, Survey, Solution, + Instruction, Assignment, BookmarkActions }, diff --git a/client/src/components/content-blocks/Instruction.vue b/client/src/components/content-blocks/Instruction.vue new file mode 100644 index 00000000..b37f41f8 --- /dev/null +++ b/client/src/components/content-blocks/Instruction.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/server/books/blocks.py b/server/books/blocks.py index dd9a118e..fa852ea8 100644 --- a/server/books/blocks.py +++ b/server/books/blocks.py @@ -110,6 +110,14 @@ class ModuleRoomSlugBlock(blocks.StructBlock): title = blocks.TextBlock() + +class InstructionBlock(blocks.StructBlock): + class Meta: + icon = 'help' + + url = blocks.URLBlock() + text = blocks.TextBlock(required=False) + # 'text_block' 'task' 'basic_knowledge' 'student_entry' 'image_block' # # url = blocks.URLBlock() diff --git a/server/books/models/contentblock.py b/server/books/models/contentblock.py index de630e30..d9974a4f 100644 --- a/server/books/models/contentblock.py +++ b/server/books/models/contentblock.py @@ -8,7 +8,7 @@ from wagtail.images.blocks import ImageChooserBlock from books.blocks import TextBlock, BasicKnowledgeBlock, LinkBlock, VideoBlock, DocumentBlock, \ ImageUrlBlock, AssignmentBlock, InfogramBlock, GeniallyBlock, SubtitleBlock, SurveyBlock, ModuleRoomSlugBlock, \ - ThinglinkBlock + ThinglinkBlock, InstructionBlock from books.utils import get_type_and_value from core.wagtail_utils import StrictHierarchyPage from notes.models import ContentBlockBookmark @@ -60,6 +60,7 @@ class ContentBlock(StrictHierarchyPage): ('genially_block', GeniallyBlock()), ('thinglink_block', ThinglinkBlock()), ('subtitle', SubtitleBlock()), + ('instruction', InstructionBlock()), ('module_room_slug', ModuleRoomSlugBlock()) ]