IdHub/idhub/templates/idhub/admin/user_edit.html

99 lines
3.9 KiB
HTML
Raw Normal View History

2023-10-13 11:37:26 +00:00
{% extends "idhub/base_admin.html" %}
{% load i18n %}
{% block content %}
<h3>
<i class="{{ icon }}"></i>
{{ subtitle }}
</h3>
{% load django_bootstrap5 %}
<form role="form" method="post">
{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger alert-icon alert-icon-border alert-dismissible" role="alert">
<div class="icon"><span class="mdi mdi-close-circle-o"></span></div>
<div class="message">
<button class="close" type="button" data-dismiss="alert" aria-label="Close">
<span class="mdi mdi-close" aria-hidden="true"></span>
</button>
{% for field, error in form.errors.items %}
{{ error }}
{% endfor %}
</div>
</div>
{% endif %}
{% bootstrap_form form %}
<div class="form-actions-no-box">
2023-10-13 19:04:44 +00:00
<a class="btn btn-grey" href="{% url 'idhub:admin_people' object.id %}">{% translate "Cancel" %}</a>
<input class="btn btn-green-admin" type="submit" name="submit" value="{% translate 'Save' %}" />
2023-10-13 11:37:26 +00:00
</div>
</form>
2023-10-17 08:53:03 +00:00
2023-10-17 15:42:48 +00:00
<hr />
2023-10-17 08:53:03 +00:00
<div class="row mt-5">
<div class="col">
<div class="table-responsive">
<table class="table table-striped table-sm">
<thead>
<tr>
<th scope="col"><button type="button" class="btn btn-grey border border-dark">{% trans 'Membership' %}</button></th>
<th scope="col"><button type="button" class="btn btn-grey border border-dark">{% trans 'From' %}</button></th>
<th scope="col"><button type="button" class="btn btn-grey border border-dark">{% trans 'To' %}</button></th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{% for membership in object.memberships.all %}
<tr>
<td>{{ membership.get_type }}</td>
<td>{{ membership.start_date|default:'' }}</td>
<td>{{ membership.end_date|default:'' }}</td>
<td><a href="{% url 'idhub:admin_people_membership_edit' membership.id %}" title="{% trans 'Edit' %}"><i class="bi bi-pencil-square"></i></a></td>
2023-12-14 16:15:22 +00:00
<td><a class="text-danger" href="{% url 'idhub:admin_people_membership_del' membership.id %}" title="{% trans 'Delete' %}"><i class="bi bi-trash"></i></a></td>
2023-10-17 08:53:03 +00:00
</tr>
{% endfor %}
</tbody>
</table>
<div class="form-actions-no-box">
<a class="btn btn-green-admin" href="{% url 'idhub:admin_people_membership_new' object.id %}">{% translate "Add membership" %} <i class="bi bi-plus"></i></a>
</div>
</div>
</div>
</div>
2023-10-17 15:42:48 +00:00
<div class="row mt-5 mb-3">
<div class="col">
<div class="table-responsive">
<table class="table table-striped table-sm">
<thead>
<tr>
2023-11-13 09:15:52 +00:00
<th scope="col"><button type="button" class="btn btn-grey border border-dark">{% trans 'Role' %}</button></th>
2023-10-17 15:42:48 +00:00
<th scope="col"><button type="button" class="btn btn-grey border border-dark">{% trans 'Description' %}</button></th>
<th scope="col"><button type="button" class="btn btn-grey border border-dark">{% trans 'Service' %}</button></th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{% for rol in object.roles.all %}
<tr>
2023-10-19 13:20:06 +00:00
<td>{{ rol.service.get_roles }}</td>
2023-10-17 15:42:48 +00:00
<td>{{ rol.service.description }}</td>
<td>{{ rol.service.domain }}</td>
<td><a href="{% url 'idhub:admin_people_rol_edit' rol.id %}" title="{% trans 'Edit' %}"><i class="bi bi-pencil-square"></i></a></td>
2023-12-14 16:15:22 +00:00
<td><a class="text-danger" href="{% url 'idhub:admin_people_rol_del' rol.id %}" title="{% trans 'Delete' %}"><i class="bi bi-trash"></i></a></td>
2023-10-17 15:42:48 +00:00
</tr>
{% endfor %}
</tbody>
</table>
<div class="form-actions-no-box">
2023-11-13 09:15:52 +00:00
<a class="btn btn-green-admin" href="{% url 'idhub:admin_people_rol_new' object.id %}">{% translate "Add Role" %} <i class="bi bi-plus"></i></a>
2023-10-17 15:42:48 +00:00
</div>
</div>
</div>
</div>
2023-10-13 11:37:26 +00:00
{% endblock %}