Skip to content

Commit

Permalink
BC-5901: Revert "BC-5119-Prevent create new neXboard (Front) (#3313)" (
Browse files Browse the repository at this point in the history
…#3357)

The schulcloud-client PR from BC-5119 was merged before the other PRs from that ticket were ready. Therefore we want to revert that merge.

* reverts commit eee257a.
  • Loading branch information
NFriedo authored Nov 29, 2023
1 parent 2877264 commit 4148ced
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
15 changes: 12 additions & 3 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 @@ -363,14 +364,22 @@ class TopicBlockList extends React.Component {
onClick={this.addBlock.bind(this, TopicGeoGebra)}>
{`+ ${$t('topic.topicEdit.button.geoGebraWorksheet')}`}
</button>
<button
<button
type="button"
className="btn btn-secondary"
data-testid="topic-addcontent-material-btn"
aria-label={$t('global.button.add')}
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 All @@ -379,7 +388,7 @@ class TopicBlockList extends React.Component {
onClick={this.addBlock.bind(this, TopicEtherpad)}>
{`+ ${$t('topic.topicEdit.button.etherpad')}`}
</button>
<button
<button
type="button"
className="btn btn-secondary"
data-testid="topic-addcontent-task-btn"
Expand All @@ -394,7 +403,7 @@ class TopicBlockList extends React.Component {
aria-label={$t('global.button.add')}
onClick={this.addBlock.bind(this, TopicH5P)}>
{`+ ${$t('topic.topicEdit.button.h5p')}`}
</button> : ''
</button> : ''
}
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion views/topic/edit-topic.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@

<div class="form-group">
<label>{{$t "topic._topic.label.content" }}</label>

<!-- 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 4148ced

Please sign in to comment.