Skip to content

Commit

Permalink
Revert "BC-5119 - Prevent creating new nexboards (#3361)" (#3378)
Browse files Browse the repository at this point in the history
This reverts commit aeea923.
  • Loading branch information
virgilchiriac committed Dec 28, 2023
1 parent 2e61a69 commit 000e5b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const {
FEATURE_JWT_EXTENDED_TIMEOUT_ENABLED,
FEATURE_CONTACT_FORM_ATTACHMENTS_ENABLED,
FEATURE_MINT_PAGES_ENABLED,
FEATURE_NEXBOARD_ENABLED,
SC_DEMO_USER_PASSWORD = 'Schulcloud1!',
SC_DEMO_USER_NAME = 'schueler@schul-cloud.org',
SC_SUPERHERO_USER_PASSWORD = 'Schulcloud1!',
Expand Down Expand Up @@ -72,6 +73,7 @@ const exp = {
FEATURE_JWT_EXTENDED_TIMEOUT_ENABLED,
FEATURE_CONTACT_FORM_ATTACHMENTS_ENABLED,
FEATURE_MINT_PAGES_ENABLED,
FEATURE_NEXBOARD_ENABLED,
SC_DEMO_USER_PASSWORD,
SC_DEMO_USER_NAME,
SC_SUPERHERO_USER_PASSWORD,
Expand Down
9 changes: 9 additions & 0 deletions static/scripts/topicEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ class TopicBlockList extends React.Component {
* Render the list items.
*/
render() {
const neXboardEnabled = ($contentBlocksContainer.data('nexboardenabled') === true);
const h5pEditorEnabled = ($contentBlocksContainer.data('h5peditorenabled') === true);
return (
<div>
Expand Down Expand Up @@ -371,6 +372,14 @@ class TopicBlockList extends React.Component {
onClick={this.addBlock.bind(this, TopicResources)}>
{`+ ${$t('topic.topicEdit.button.material')}`}
</button>
{neXboardEnabled ? <button
type="button"
className="btn btn-secondary"
data-testid="topic-addcontent-nexboard-btn"
aria-label={$t('global.button.add')}
onClick={this.addBlock.bind(this, TopicNexboard)}>
{`+ ${$t('topic.topicEdit.button.neXboard')}`}
</button> : '' }
<button
type="button"
className="btn btn-secondary"
Expand Down
2 changes: 1 addition & 1 deletion views/topic/edit-topic.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<!-- React Magic -->
<div id="content-blocks" data-value="{{lesson.contents}}" data-parent-id="{{lesson._id}}" data-school-id="{{schoolId}}" data-parent-type="lessons" data-etherpadbaseurl="{{etherpadBaseUrl}}"
data-iscoursegroup="{{courseGroupId}}" data-h5peditorenabled="{{#ifConfig "FEATURE_H5P_EDITOR_ENABLED" true}}true{{/ifConfig}}"></div>
data-iscoursegroup="{{courseGroupId}}" data-nexboardenabled="{{#ifEnv "FEATURE_NEXBOARD_ENABLED" "true"}}true{{/ifEnv}}" data-h5peditorenabled="{{#ifConfig "FEATURE_H5P_EDITOR_ENABLED" true}}true{{/ifConfig}}"></div>
</div>
{{#ifneq 0 (arrayLength @root.lessonFilesStorageData.files)}}
<label>{{$t "topic._topic.label.embeddedFiles" }}</label>
Expand Down

0 comments on commit 000e5b7

Please sign in to comment.