improve group management

This commit is contained in:
Ross
2023-11-20 11:55:49 +00:00
parent 93129fdc75
commit d414d3baa2
7 changed files with 261 additions and 7 deletions
@@ -0,0 +1,30 @@
{% extends 'generic/base.html' %}
{% block navigation %}
{{block.super}}
<br/>
Group: {{group.name}}->
{% if group_type == "cid" %}
{% if not group %}
<a href="{% url 'generic:cid_group_detail' cidusergroup.pk %}">Group</a> /
<a href="{% url 'generic:cid_group_update' cidusergroup.pk %}">Edit Users</a> /
<a href="{% url 'generic:cid_group_exams' cidusergroup.pk %}">Edit Exams</a> /
<a href="{% url 'generic:cid_group_delete' cidusergroup.pk %}">Delete</a>
{% else %}
<a href="{% url 'generic:cid_group_detail' group.pk %}">Group</a> /
<a href="{% url 'generic:cid_group_update' group.pk %}">Edit Users</a> /
<a href="{% url 'generic:cid_group_exams' group.pk %}">Edit Exams</a> /
<a href="{% url 'generic:cid_group_delete' group.pk %}">Delete</a>
{% endif %}
{% else %}
<a href="{% url 'generic:user_group_detail' group.pk %}">Group</a> /
<a href="{% url 'generic:user_group_update' group.pk %}">Edit Users</a> /
<a href="{% url 'generic:user_group_exams' group.pk %}">Edit Exams</a> /
<a href="{% url 'generic:user_group_delete' group.pk %}">Delete</a>
{% endif %}
{% endblock %}
@@ -1,4 +1,4 @@
{% extends 'generic/base.html' %}
{% extends 'generic/cid_group_base.html' %}
{% block content %}
<h2>Group: {{group.name}}</h2>
@@ -39,7 +39,12 @@
{% endif %}
{% endif %}
<h3>Exams</h3>
The group is currently associated with the following exams
The group is currently associated with the following exams.
{% if group_type == "cid" %}
Add more <a href='{% url "generic:cid_group_exams" group.pk %}'>here</a>.
{% else %}
Add more <a href='{% url "generic:user_group_exams" group.pk %}'>here</a>.
{% endif %}
{% with group.GetGroupExams as exam_map %}
{% for key, value in exam_map.items %}
<h4>{{key}}</h4>
+1 -1
View File
@@ -25,7 +25,7 @@
</form>
<h2>Exams</h2>
<p>The user is currently part of the following exams</p>
The group is currently associated with the following exams.
<p>
{% with object.get_cid_exams as exam_map %}
@@ -1,4 +1,4 @@
{% extends "generic/base.html" %}
{% extends 'generic/cid_group_base.html' %}
<!-- {% load static from static %} -->
{% block css %}