From f88e759acdcd05b7a4d838a2b3abdb93b4fe8c37 Mon Sep 17 00:00:00 2001 From: Elena Poelman Date: Tue, 26 Nov 2024 20:53:05 +0100 Subject: [PATCH] bugfix: enable snippet-list-select button in snippet-editor --- .changeset/pink-pianos-whisper.md | 5 +++++ .../snippet-management/edit/edit-snippet.js | 2 ++ .../snippet-management/edit/edit-snippet.hbs | 12 +++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .changeset/pink-pianos-whisper.md diff --git a/.changeset/pink-pianos-whisper.md b/.changeset/pink-pianos-whisper.md new file mode 100644 index 00000000..37f9e94a --- /dev/null +++ b/.changeset/pink-pianos-whisper.md @@ -0,0 +1,5 @@ +--- +"frontend-reglementaire-bijlage": patch +--- + +Enable `SnippetListSelect` button in snippet-editor to ensure snippet placeholder may be reconfigured diff --git a/app/controllers/snippet-management/edit/edit-snippet.js b/app/controllers/snippet-management/edit/edit-snippet.js index e77d2b12..abc0cd04 100644 --- a/app/controllers/snippet-management/edit/edit-snippet.js +++ b/app/controllers/snippet-management/edit/edit-snippet.js @@ -109,6 +109,7 @@ import { snippetPlaceholder, snippetPlaceholderView, } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin/nodes/snippet-placeholder'; +import SnippetListSelectRdfaComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/snippet-list-select-rdfa'; import { snippet, snippetView, @@ -129,6 +130,7 @@ export default class SnippetManagementEditSnippetController extends Controller { InsertArticle = InsertArticleComponent; StructureControlCard = StructureControlCardComponent; SnippetInsert = SnippetInsertRdfaComponent; + SnippetListSelect = SnippetListSelectRdfaComponent; @service store; @service router; diff --git a/app/templates/snippet-management/edit/edit-snippet.hbs b/app/templates/snippet-management/edit/edit-snippet.hbs index bfedc989..2c3802f8 100644 --- a/app/templates/snippet-management/edit/edit-snippet.hbs +++ b/app/templates/snippet-management/edit/edit-snippet.hbs @@ -6,7 +6,17 @@ @document={{this.editorDocument}} @save={{hash action=(perform this.save) isRunning=this.save.isRunning}} @dirty={{this.dirty}} -/> +> + <:leadingButtons> + {{#if this.activeNode}} + + {{/if}} + + {{#if this.editorDocument}}