Skip to content

Commit

Permalink
refactor: use different icon for subsections in studio
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Jan 11, 2024
1 parent f5d0886 commit 664d959
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions cms/templates/js/course-outline.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ var addStatusMessage = function (statusType, message) {
statusIconClass = 'fa-warning';
} else if (statusType === 'staff-only' || statusType === 'gated') {
statusIconClass = 'fa-lock';
} else if(statusType === 'hide-from-toc') {
} else if(statusType === 'hide-from-toc-chapter') {
statusIconClass = 'fa-eye-slash';
}
else if(statusType === 'hide-from-toc-sequence') {
statusIconClass = 'fa-ban';
}
else if (statusType === 'partition-groups') {
statusIconClass = 'fa-eye';
}
Expand Down Expand Up @@ -54,10 +57,11 @@ if (staffOnlyMessage) {
} else if (hideFromTOCMessage && !xblockInfo.isVertical()){
if (xblockInfo.isChapter()) {
messageText = gettext('Hidden in the course outline, but sections are accessible for your learners through their separate link.');
messageType = 'hide-from-toc-chapter';
} else {
messageText = gettext('Subsections are not navigable between each other, they can only be accessed through their link.');
messageType = 'hide-from-toc-sequence';
}
messageType = 'hide-from-toc';
addStatusMessage(messageType, messageText);
} else {
if (visibilityState === 'needs_attention' && xblockInfo.isVertical()) {
Expand Down
2 changes: 1 addition & 1 deletion cms/templates/js/staff-lock-editor.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<input type="checkbox" id="hide_from_toc" name="hide_from_toc" class="input input-checkbox" />
<%- gettext('Hide in Course Outline, accessible via Link') %>
<p class="tip tip-inline">
<%- gettext('It is intentionally hidden from standard navigation, ensuring that only individuals witht he link can view its contents.') %>
<%- gettext('It is intentionally hidden from standard navigation, ensuring that only individuals with the link can view its contents.') %>
</p>
</label>
<% } %>
Expand Down

0 comments on commit 664d959

Please sign in to comment.