BLD-1110: Create, edit, delete groups.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<%block name="bodyclass">is-signedin course view-group-configurations</%block>
|
||||
|
||||
<%block name="header_extras">
|
||||
% for template_name in ["group-configuration-details", "group-configuration-edit", "no-group-configurations", "basic-modal", "modal-button"]:
|
||||
% for template_name in ["group-configuration-details", "group-configuration-edit", "no-group-configurations", "group-edit", "basic-modal", "modal-button"]:
|
||||
<script type="text/template" id="${template_name}-tpl">
|
||||
<%static:include path="js/${template_name}.underscore" />
|
||||
</script>
|
||||
@@ -23,7 +23,7 @@
|
||||
require(["domReady!", "js/collections/group_configuration", "js/views/pages/group_configurations"],
|
||||
function(doc, GroupConfigurationCollection, GroupConfigurationsPage) {
|
||||
% if configurations is not None:
|
||||
var collection = new GroupConfigurationCollection(${json.dumps(configurations)});
|
||||
var collection = new GroupConfigurationCollection(${json.dumps(configurations)}, { parse: true });
|
||||
|
||||
collection.url = "${group_configuration_url}";
|
||||
new GroupConfigurationsPage({
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
<span class="tip tip-stacked"><%= gettext("Optional long description") %></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="groups-fields">
|
||||
<legend class="sr"><%= gettext("Group information") %></legend>
|
||||
<label class="groups-fields-label required"><%= gettext("Groups") %></label>
|
||||
<span class="tip tip-stacked"><%= gettext("Name of the groups that students will be assigned to, for example, Control, Video, Problems. You must have two or more groups.") %></span>
|
||||
<ol class="groups list-input enum"></ol>
|
||||
<button class="action action-add-group"><i class="icon-plus"></i> <%= gettext("Add another group") %></button>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button class="action action-primary" type="submit"><% if (isNew) { print(gettext("Create")) } else { print(gettext("Save")) } %></button>
|
||||
|
||||
4
cms/templates/js/group-edit.underscore
Normal file
4
cms/templates/js/group-edit.underscore
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="input-wrap field long text required field-add-group-name group-<%= index %>-name
|
||||
<% if (error && error.attributes && error.attributes.name) { print('error'); } %>"><input name="group-<%= index %>-name" class="group-name long" value="<%= name %>" type="text">
|
||||
</div><div class="group-allocation"><%= allocation %>%</div>
|
||||
<a href="" class="action action-close"><i class="icon-remove-sign"></i> <span class="sr"><%= gettext("delete group") %></span></a>
|
||||
Reference in New Issue
Block a user