add some more detials to user management
This commit is contained in:
@@ -1,30 +1,38 @@
|
|||||||
|
|
||||||
<h3>Users</h3>
|
<h3>Users</h3>
|
||||||
{% if groups %}
|
{% if groups %}
|
||||||
Users from the following groups are available: {% for group in groups %}<a href='{{group.get_absolute_url}}'>{{group}}</a>, {% endfor %} .
|
Users from the following groups are available: {% for group in groups %}<a href='{{group.get_absolute_url}}'>{{group}}</a>, {% endfor %} .
|
||||||
{% else %}
|
{% else %}
|
||||||
This exam is not associated with any user groups. <a href="{% url exam.app_name|add:':exam_update' exam.pk %}">Edit and add a group</a> to enable user management.
|
This exam is not associated with any user groups. <a href="{% url exam.app_name|add:':exam_update' exam.pk %}">Edit and add a group</a> to enable user management.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<ol>
|
<ol>
|
||||||
{% for user in current_user_users %}
|
{% for user in current_user_users %}
|
||||||
|
|
||||||
<li class="current">{{user.username}} /
|
<li class="current">{{user.username}} /
|
||||||
Email: {{user.email}} <button class="toggle-btn" data-pk="{{user.pk}}" data-user="{{user.username}}">Toggle</button>
|
Email: {{user.email}}
|
||||||
|
{% if user.userprofile.grade %}
|
||||||
|
[{{user.userprofile.grade}}]
|
||||||
|
{% endif %}
|
||||||
|
<button class="toggle-btn" data-pk="{{user.pk}}" data-user="{{user.username}}">Toggle</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for user in available_user_users %}
|
{% for user in available_user_users %}
|
||||||
|
|
||||||
<li>{{user.username}} /
|
<li>{{user.username}} /
|
||||||
Email: {{user.email}} <button class="toggle-btn" data-pk="{{user.pk}}" data-user="{{user.username}}">Toggle</button>
|
Email: {{user.email}}
|
||||||
|
{% if user.userprofile.grade %}
|
||||||
|
[{{user.userprofile.grade}}]
|
||||||
|
{% endif %}
|
||||||
|
<button class="toggle-btn" data-pk="{{user.pk}}" data-user="{{user.username}}">Toggle</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<p><button class="toggle-all-btn">Toggle all</button></p>
|
<p><button class="toggle-all-btn">Toggle all</button></p>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
$(".toggle-all-btn").click((el) => {
|
$(".toggle-all-btn").click((el) => {
|
||||||
$(".toggle-btn").click();
|
$(".toggle-btn").click();
|
||||||
@@ -62,8 +70,8 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.current {
|
.current {
|
||||||
color: lightgray;
|
color: lightgray;
|
||||||
}
|
}
|
||||||
@@ -74,4 +82,4 @@
|
|||||||
button {
|
button {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user