.
This commit is contained in:
@@ -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
@@ -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 %}
|
||||
@@ -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",
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user