Commit 9f85c0f0 by Jonathan Piacenti Committed by E. Kolpakov

Added explanation to container view of Library Block.

parent d4e82424
......@@ -251,7 +251,7 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule):
fragment.add_frag_resources(rendered_child)
contents.append({
'id': displayable.location.to_deprecated_string(),
'content': rendered_child.content
'content': rendered_child.content,
})
fragment.add_content(self.system.render_template('vert_module.html', {
......@@ -273,6 +273,11 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule):
if is_root:
# User has clicked the "View" link. Show a preview of all possible children:
if self.children: # pylint: disable=no-member
fragment.add_content(self.system.render_template("library-block-author-preview-header.html", {
'max_count': self.max_count,
'display_name': self.display_name or self.url_name,
'mode': self.mode,
}))
self.render_children(context, fragment, can_reorder=False, can_add=False)
else:
fragment.add_content(u'<p>{}</p>'.format(
......
<%! from django.utils.translation import ugettext as _ %>
<div class="wrapper-xblock-message">
<div class="xblock-message information">
<p>
<span class="message-text">
${_('Showing all matching content eligible to be added into {display_name}. Each student will be assigned {mode} {max_count} components from this list.').format(max_count=max_count, display_name=display_name, mode=mode)}
</span>
</p>
</div>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment