mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-13 06:06:06 +00:00
Group management enhacement
This commit is contained in:
1 parent
a6f76f5279
commit
f6553a8f52
4 files changed
+47
-7
No files matched your search
@@ -0,0 +1,18 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Group detail{% endtrans %}
|
||||
{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<p><a href="{{ url('core:group_list') }}">{% trans %}Back to list{% endtrans %}</a></p>
|
||||
{% if not object.users.exists() %}
|
||||
<p>{% trans %}No user in this group{% endtrans %}</p>
|
||||
{% else %}
|
||||
<ul>
|
||||
{% for user in object.users.all() %}
|
||||
<li><a href="{{ url('core:user_profile', user.id) }}">{{ user }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
@@ -7,11 +7,21 @@
|
||||
{% block content %}
|
||||
<h3>{% trans %}Group list{% endtrans %}</h3>
|
||||
<p><a href="{{ url('core:group_new') }}">{% trans %}New group{% endtrans %}</a></p>
|
||||
<ul>
|
||||
{% for g in realgroup_list %}
|
||||
<li><a href="{{ url('core:group_edit', group_id=g.id) }}">{{ g.name }}</a> - {{ g.description }} -
|
||||
<a href="{{ url('core:group_delete', group_id=g.id) }}">{% trans %}Delete{% endtrans %}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans %}ID{% endtrans %}</th>
|
||||
<th>{% trans %}Group{% endtrans %}</th>
|
||||
<th>{% trans %}Description{% endtrans %}</th>
|
||||
</tr>
|
||||
{% for group in object_list %}
|
||||
<tr>
|
||||
<td>{{ group.id }}</td>
|
||||
<td><a href="{{ url('core:group_detail', group.id) }}">{{ group }}</a></td>
|
||||
<td>{{ group.description }}</td>
|
||||
<td><a href="{{ url('core:group_edit', group.id) }}">{% trans %}Edit{% endtrans %}</a></td>
|
||||
<td><a href="{{ url('core:group_delete', group.id) }}">{% trans %}Delete{% endtrans %}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
Reference in new issue
Block a user