This commit is contained in:
Ross
2022-08-04 18:27:23 +01:00
parent 2930ff5ec1
commit 5d2ae84990
6 changed files with 124 additions and 27 deletions
@@ -6,7 +6,7 @@
<a href="{% url 'generic:cid_group_create' %}">Create new group</a>
</p>
{% for group in groups %}
<p>{{group.name}}
<p><a href="{% url 'generic:cid_group_detail' group.pk %}">{{group.name}}</a>
<button class="small-url-button" data-url="{% url 'generic:group_email' pk=group.pk %}
">Email candidate details</button>
<button class="small-url-button" data-url="{% url 'generic:group_email_resend' pk=group.pk %}
+28
View File
@@ -0,0 +1,28 @@
{% extends 'generic/base.html' %}
{% block content %}
<h2>Group: {{group.name}}</h2>
<ul>
{% for user in users %}
<li>{{user.email}} / CID: {{user.cid}} / Passcode: {{user.passcode}}</li>
{% endfor %}
</ul>
<table>
<thead>
<tr><th>Email</th><th>CID</th><th>Passcode</th></tr>
</thead>
{% for user in users %}
<tr><td>{{user.email}}</td><td>{{user.cid}}</td><td>{{user.passcode}}</td></tr>
{% endfor %}
</table>
{% endblock %}
{% block js %}
<style>
td, th { padding-left: 10px }
</style>
{% endblock %}
+1
View File
@@ -43,6 +43,7 @@ urlpatterns = [
path("cids/manage/exams", views.CidUserExamView.as_view(), name="manage_cid_exams"),
path("cids/group/", views.cid_group_view, name="cid_group_view"),
path("cids/group/all", views.cid_group_view_all, name="cid_group_view_all"),
path("cids/group/<int:group_id>/", views.cid_group_view_detail, name="cid_group_detail"),
path("cids/group/<int:pk>/email", views.group_email, name="group_email"),
path(
"cids/group/<int:pk>/email_results",
+11
View File
@@ -2086,6 +2086,17 @@ def cid_group_view(request):
{"groups": groups},
)
@user_is_cid_user_manager
def cid_group_view_detail(request, group_id):
group = get_object_or_404(CidUserGroup, pk=group_id)
users = group.ciduser_set.filter(active=True)
return render(
request,
"generic/cid_group_view_detail.html",
{"group": group, "users": users},
)
@user_is_cid_user_manager
def cid_group_view_all(request):