-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#47: Port the term visibility management actions.
- Loading branch information
1 parent
550ad5e
commit 378d297
Showing
3 changed files
with
137 additions
and
111 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block body %} | ||
<h1>Manage Term Visibility</h1> | ||
<div><a href="{{ url('admin_index') }}">« Back to Administration</a></div> | ||
|
||
<form action="{{ url('admin_terms_list') }}" method="GET"> | ||
<select name='catalog' onchange="this.form.submit();"> | ||
{% for catalog in catalogs %} | ||
<option value="{{ catalog }}" {{ catalog == selectedCatalog ? 'selected="selected"' }}>{{ catalog }}</option>"; | ||
{% endfor %} | ||
</select> | ||
</form> | ||
|
||
<p>Please Note: Any changes made here will take effect during the next synchronization with Banner</p> | ||
|
||
<table class='section_admin'> | ||
<thead> | ||
<tr> | ||
<th>Term Code</th> | ||
<th>Description</th> | ||
<th>Sections</th> | ||
<th>Manual Override</th> | ||
<th>Active?</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
||
{% for term in terms %} | ||
<tr {{ term.active ? 'class="active"' }}> | ||
<td class='code'>{{ term.STVTERM_CODE }}</td> | ||
<td class='desc'>{{ term.STVTERM_DESC }}</td> | ||
<td class='num_sections'>{{ term.num_sections }}</td> | ||
|
||
<td class='disable'> | ||
<form action='{{ url('admin_terms_update') }}' method='post'> | ||
<input type='hidden' name='catalog' value='{{ selectedCatalog }}' /> | ||
<input type='hidden' name='term' value='{{ term.STVTERM_CODE }}' /> | ||
<input type='hidden' name='change_visibility' value='true' /> | ||
<input type='hidden' name='csrf_key' value='{{ csrf_token('admin-terms-update') }}' /> | ||
<input type='checkbox' name='disabled' value='true' | ||
{{ term.manually_disabled ? ' checked="checked"' }} onchange='if (confirm("{{ term.manually_disabled ? 'Enable':'Disable' }} {{ term.STVTERM_CODE }}?")) {this.form.submit();}' | ||
id="disable-{{ term.STVTERM_CODE }}" | ||
/> | ||
<label for="disable-{{ term.STVTERM_CODE }}">Disabled?</label> | ||
</form> | ||
</td> | ||
|
||
<td class='is_active'> | ||
{% if term.active %} | ||
Yes | ||
{% else %} | ||
No: | ||
{{ term.manually_disabled ? 'Manually disabled. ' }} | ||
{{ term.num_sections is empty ? 'Zero sections. ' }} | ||
{% endif %} | ||
</td> | ||
</tr> | ||
|
||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endblock %} |