Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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: 1 addition & 1 deletion cms/static/js/spec/views/pages/course_outline_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('CourseOutlinePage', function() {
group_access: {},
user_partition_info: {},
hide_from_toc: false,
enable_hide_from_toc_ui: true
enable_hide_from_toc_ui: true,
}, options, {child_info: {children: children}});
};

Expand Down
3 changes: 2 additions & 1 deletion cms/static/js/views/modals/course_outline_modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,8 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
AbstractVisibilityEditor.prototype.getContext.call(this),
{
hide_after_due: this.modelVisibility() === 'hide_after_due',
self_paced: course.get('self_paced') === true
self_paced: course.get('self_paced') === true,
enable_hide_from_toc_ui: this.model.get('enable_hide_from_toc_ui'),
}
);
}
Expand Down
27 changes: 27 additions & 0 deletions cms/static/sass/elements/_modal-window.scss
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,33 @@
min-height: 95px;
}

.enable-hide-from-toc-container {
Comment thread
BryanttV marked this conversation as resolved.
Outdated
background: #E5F1F8;
padding: 20px 32px;
margin: 16px 0px;
border-radius: 10px;
display: flex;
flex-direction: row;
justify-content: space-between;

.icon-message {
color: white;
background: #0075B4;
padding: 8px;
border-radius: 50%;
transform: rotate(90deg);
font-size: 16px;
height: 18px;
width: 20px;
}

.text-message {
padding: 0px 10px;
word-wrap: break-word;
font-weight: 500;
}
}

.list-fields,
.list-actions {
display: inline-block;
Expand Down
6 changes: 6 additions & 0 deletions cms/templates/js/content-visibility-editor.underscore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<form>
<h3 class="modal-section-title" id="content_visibility_label"><%- gettext('Subsection Visibility') %></h3>
<div class="modal-section-content staff-lock">
<% if (enable_hide_from_toc_ui) { %>
<div class="enable-hide-from-toc-container">
<span class="icon fa fa-solid fa-link icon-message"></span>
<p class="text-message"><%- gettext('To hide the subsections and keep them accesible through links, you must adjust it from the section that contains them.') %></p>
</div>
<% } %>
<div class="list-fields list-input content-visibility" role="group" aria-labelledby="content_visibility_label">
<label class="label">
<input class="input input-radio" name="content-visibility" type="radio" value="visible" aria-describedby="visible_description">
Expand Down