74 lines
3.3 KiB
Plaintext
74 lines
3.3 KiB
Plaintext
<div class="collection-details wrapper-group-configuration">
|
|
<header class="collection-header">
|
|
<h3 class="title">
|
|
<a href="#" class="toggle group-toggle <% if (showContentGroupUsages){ print('hide'); } else { print('show'); } %>-groups">
|
|
<span class="ui-toggle-expansion icon fa fa-caret-<% if (showContentGroupUsages){ print('down'); } else { print('right'); } %>" aria-hidden="true"></span>
|
|
<%- name %>
|
|
</a>
|
|
</h3>
|
|
</header>
|
|
|
|
<ol class="collection-info group-configuration-info group-configuration-info-<% if(showContentGroupUsages){ print('block'); } else { print('inline'); } %>">
|
|
<% if (!_.isUndefined(id)) { %>
|
|
<li class="group-configuration-id"
|
|
><span class="group-configuration-label"><%- gettext('ID') %>: </span
|
|
><span class="group-configuration-value"><%- id %></span
|
|
></li>
|
|
<% } %>
|
|
<% if (!showContentGroupUsages) { %>
|
|
<li class="group-configuration-usage-count">
|
|
<%- usageCountMessage %>
|
|
</li>
|
|
<% } %>
|
|
</ol>
|
|
|
|
<ul class="actions group-configuration-actions">
|
|
<% if (!restrictEditing) { %>
|
|
<li class="action action-edit">
|
|
<button class="edit"><span class="icon fa fa-pencil" aria-hidden="true"></span> <%- gettext("Edit") %></button>
|
|
</li>
|
|
<% if (_.isEmpty(usage)) { %>
|
|
<li class="action action-delete wrapper-delete-button" data-tooltip="<%- gettext('Delete') %>">
|
|
<button class="delete action-icon" title="<%- gettext('Delete') %>"><span class="icon fa fa-trash-o" aria-hidden="true"></span></button>
|
|
</li>
|
|
<% } else { %>
|
|
<li class="action action-delete wrapper-delete-button" data-tooltip="<%- gettext('Cannot delete when in use by a unit') %>">
|
|
<button class="delete action-icon is-disabled" disabled="disabled" title="<%- gettext('Delete') %>"><span class="icon fa fa-trash-o" aria-hidden="true"></span></button>
|
|
</li>
|
|
<% } %>
|
|
<% } %>
|
|
</ul>
|
|
</div>
|
|
|
|
<% if (showContentGroupUsages) { %>
|
|
<div class="collection-references wrapper-group-configuration-usages">
|
|
<% if (!_.isEmpty(usage)) { %>
|
|
<h4 class="intro group-configuration-usage-text">
|
|
<%- gettext('This group controls access to:') %>
|
|
</h4>
|
|
<ol class="usage group-configuration-usage">
|
|
<% _.each(usage, function(unit) { %>
|
|
<li class="usage-unit group-configuration-usage-unit">
|
|
<p><a href=<%- unit.url %> ><%- unit.label %></a></p>
|
|
</li>
|
|
<% }) %>
|
|
</ol>
|
|
<% } else { %>
|
|
<p class="group-configuration-usage-text">
|
|
<%= HtmlUtils.interpolateHtml(
|
|
gettext("In the {linkStart}Course Outline{linkEnd}, use this group to control access to a component."),
|
|
{
|
|
linkStart: HtmlUtils.interpolateHtml(
|
|
HtmlUtils.HTML('<a href="{courseOutlineUrl}" title="{courseOutlineTitle}">'),
|
|
{courseOutlineUrl: courseOutlineUrl, courseOutlineTitle: gettext('Course Outline')}
|
|
),
|
|
linkEnd: HtmlUtils.HTML('</a>')
|
|
}
|
|
)
|
|
%>
|
|
|
|
</p>
|
|
<% } %>
|
|
</div>
|
|
<% } %>
|