Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-5119-Prevent create new neXboard (Front) #3313

Merged
merged 18 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const {
FEATURE_CONTACT_FORM_ATTACHMENTS_ENABLED,
FEATURE_MINT_PAGES_ENABLED,
FEATURE_NEXBOARD_ENABLED,
FEATURE_NEXBOARD_BUTTON_ENABLE,
SC_DEMO_USER_PASSWORD = 'Schulcloud1!',
SC_DEMO_USER_NAME = '[email protected]',
SC_SUPERHERO_USER_PASSWORD = 'Schulcloud1!',
Expand Down Expand Up @@ -73,6 +74,7 @@ const exp = {
FEATURE_CONTACT_FORM_ATTACHMENTS_ENABLED,
FEATURE_MINT_PAGES_ENABLED,
FEATURE_NEXBOARD_ENABLED,
FEATURE_NEXBOARD_BUTTON_ENABLE,
SC_DEMO_USER_PASSWORD,
SC_DEMO_USER_NAME,
SC_SUPERHERO_USER_PASSWORD,
Expand Down
4 changes: 2 additions & 2 deletions static/scripts/topicEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class TopicBlockList extends React.Component {
* Render the list items.
*/
render() {
const neXboardEnabled = ($contentBlocksContainer.data('nexboardenabled') === true);
const neXboardButtonEnabled = ($contentBlocksContainer.data('neXboardButtonEnabled') === false);
return (
<div>
<SortableList
Expand Down Expand Up @@ -371,7 +371,7 @@ class TopicBlockList extends React.Component {
onClick={this.addBlock.bind(this, TopicResources)}>
{`+ ${$t('topic.topicEdit.button.material')}`}
</button>
{neXboardEnabled ? <button
{neXboardButtonEnabled ? <button
type="button"
className="btn btn-secondary"
data-testid="topic-addcontent-nexboard-btn"
Expand Down
5 changes: 2 additions & 3 deletions views/topic/edit-topic.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@

<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-nexboardenabled="{{#ifEnv "FEATURE_NEXBOARD_ENABLED" "true"}}true{{/ifEnv}}"></div>
<div id="content-blocks" data-testid="nexboardButton" data-value="{{lesson.contents}}" data-parent-id="{{lesson._id}}" data-school-id="{{schoolId}}" data-parent-type="lessons" data-etherpadbaseurl="{{etherpadBaseUrl}}"
data-iscoursegroup="{{courseGroupId}}" data-neXboardButtonEnabled="{{#ifEnv "FEATURE_NEXBOARD_BUTTON_ENABLED" "false"}}true{{/ifEnv}}"></div>
</div>
{{#ifneq 0 (arrayLength @root.lessonFilesStorageData.files)}}
<label>{{$t "topic._topic.label.embeddedFiles" }}</label>
Expand Down