2022-09-13 13:14:49 +00:00
|
|
|
{% extends 'manage/users/master.twig' %}
|
|
|
|
{% from 'macros.twig' import pagination, container_title %}
|
|
|
|
|
|
|
|
{% set roles_pagination = pagination(manage_roles_pagination, url('manage-roles')) %}
|
|
|
|
|
|
|
|
{% block manage_content %}
|
|
|
|
<div class="container manage__roles">
|
|
|
|
{{ container_title('<i class="fas fa-user-check fa-fw"></i> Roles') }}
|
|
|
|
|
|
|
|
{% if roles_pagination|trim|length > 0 %}
|
|
|
|
<div class="manage__roles__pagination">
|
|
|
|
{{ roles_pagination }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<div class="manage__roles__collection">
|
|
|
|
<div class="manage__role-item manage__role-item--create">
|
|
|
|
<a href="{{ url('manage-role') }}" class="manage__role-item__background"></a>
|
|
|
|
<div class="manage__role-item__container">
|
|
|
|
<div class="manage__role-item__icon">
|
|
|
|
<div class="manage__role-item__icon__background"></div>
|
|
|
|
<div class="manage__role-item__icon__content">
|
|
|
|
<i class="fas fa-plus-circle fa-fw"></i>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="manage__role-item__info">
|
|
|
|
<div class="manage__role-item__name">
|
|
|
|
Create a new role
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% for role in manage_roles %}
|
2023-07-27 23:26:05 +00:00
|
|
|
<div class="manage__role-item" style="--accent-colour: {{ role.info.colour }}">
|
|
|
|
<a href="{{ url('manage-role', {'role': role.info.id}) }}" class="manage__role-item__background"></a>
|
2022-09-13 13:14:49 +00:00
|
|
|
|
|
|
|
<div class="manage__role-item__container">
|
|
|
|
<div class="manage__role-item__icon">
|
|
|
|
<div class="manage__role-item__icon__background"></div>
|
|
|
|
<div class="manage__role-item__icon__content">
|
|
|
|
<i class="fas fa-toilet-paper fa-fw"></i>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="manage__role-item__info">
|
|
|
|
<div class="manage__role-item__name">
|
2023-07-27 23:26:05 +00:00
|
|
|
{{ role.info.name }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
<div class="manage__role-item__details">
|
2023-07-27 23:26:05 +00:00
|
|
|
{% if role.members > 0 %}
|
2022-09-13 13:14:49 +00:00
|
|
|
<div class="manage__role-item__users">
|
2023-07-27 23:26:05 +00:00
|
|
|
<i class="fas fa-users fa-fw"></i> {{ role.members|number_format }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-07-27 23:26:05 +00:00
|
|
|
{% if role.info.title is not empty %}
|
2022-09-13 13:14:49 +00:00
|
|
|
<div class="manage__role-item__title">
|
2023-07-27 23:26:05 +00:00
|
|
|
{{ role.info.title }}
|
2022-09-13 13:14:49 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="manage__role-item__actions">
|
2023-07-27 23:26:05 +00:00
|
|
|
<a href="{{ url('user-list', {'role': role.info.id}) }}" class="manage__role-item__action" title="Members">
|
2022-09-13 13:14:49 +00:00
|
|
|
<i class="fas fa-users fa-fw"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if roles_pagination|trim|length > 0 %}
|
|
|
|
<div class="manage__roles__pagination">
|
|
|
|
{{ roles_pagination }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|