This commit implements STUD-1490, allowing creation of components on the container page. It also enables the delete and duplicate buttons now that new content can be created that would benefit. Note that it also creates shared functionality for adding components, and refactors the unit page to use it too.
40 lines
1.4 KiB
HTML
40 lines
1.4 KiB
HTML
<%!
|
|
from django.utils.translation import ugettext as _
|
|
from contentstore.views.helpers import xblock_studio_url
|
|
%>
|
|
<%namespace name='static' file='static_content.html'/>
|
|
|
|
% if is_reorderable:
|
|
<li class="studio-xblock-wrapper is-draggable" data-locator="${locator}">
|
|
% else:
|
|
<div class="studio-xblock-wrapper">
|
|
% endif
|
|
<section class="wrapper-xblock xblock-type-container level-element" data-locator="${locator}">
|
|
<header class="xblock-header">
|
|
<div class="header-details">
|
|
${xblock.display_name_with_default}
|
|
</div>
|
|
<div class="header-actions">
|
|
<ul class="actions-list">
|
|
<li class="action-item action-view">
|
|
<a href="${xblock_studio_url(xblock)}" class="action-button">
|
|
## Translators: this is a verb describing the action of viewing more details
|
|
<span class="action-button-text">${_('View')}</span>
|
|
<i class="icon-arrow-right"></i>
|
|
</a>
|
|
</li>
|
|
% if not xblock_context['read_only'] and is_reorderable:
|
|
<li class="action-item action-drag">
|
|
<span data-tooltip="${_('Drag to reorder')}" class="drag-handle action"></span>
|
|
</li>
|
|
% endif
|
|
</ul>
|
|
</div>
|
|
</header>
|
|
</section>
|
|
% if is_reorderable:
|
|
</li>
|
|
% else:
|
|
</div>
|
|
% endif
|