misuzu/templates/manage/users/roles.twig

81 lines
3.8 KiB
Twig
Raw Normal View History

2018-08-15 01:12:58 +00:00
{% extends 'manage/users/master.twig' %}
2019-02-04 11:15:40 +00:00
{% from 'macros.twig' import pagination, container_title %}
2018-03-31 22:28:32 +00:00
2019-02-04 11:15:40 +00:00
{% set roles_pagination = pagination(manage_roles_pagination, '/manage/users.php', null, {'v': 'roles'}) %}
2018-03-31 22:28:32 +00:00
2019-02-04 11:15:40 +00:00
{% block manage_content %}
<div class="container manage__role-items">
2019-02-04 11:15:40 +00:00
{{ container_title('<i class="fas fa-user-check fa-fw"></i> Roles') }}
2018-09-23 16:31:47 +00:00
2019-02-04 11:15:40 +00:00
{% if roles_pagination|trim|length > 0 %}
<div class="manage__role-items__pagination">
2019-02-04 11:15:40 +00:00
{{ roles_pagination }}
</div>
{% endif %}
2018-08-15 20:29:18 +00:00
<div class="manage__role-items__collection">
2019-02-04 11:15:40 +00:00
{% if can_manage_roles %}
<div class="manage__role-item manage__role-item--create">
<a href="{{ url('manage-role-create') }}" 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">
2019-02-04 11:15:40 +00:00
<i class="fas fa-plus-circle fa-fw"></i>
2018-08-15 20:29:18 +00:00
</div>
2019-02-04 11:15:40 +00:00
</div>
<div class="manage__role-item__info">
<div class="manage__role-item__name">
2019-02-04 11:15:40 +00:00
Create a new role
</div>
</div>
</div>
</div>
{% endif %}
2018-08-15 20:29:18 +00:00
2019-02-04 11:15:40 +00:00
{% for role in manage_roles %}
<div class="manage__role-item" style="{{ role.role_colour|html_colour('--accent-colour') }}">
<a href="{{ url('manage-role-edit', {'role': role.role_id}) }}" class="manage__role-item__background"></a>
2018-09-23 16:31:47 +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">
2019-02-04 11:15:40 +00:00
<i class="fas fa-toilet-paper fa-fw"></i>
</div>
</div>
<div class="manage__role-item__info">
<div class="manage__role-item__name">
2019-02-04 11:15:40 +00:00
{{ role.role_name }}
</div>
<div class="manage__role-item__details">
2019-02-04 11:15:40 +00:00
{% if role.users > 0 %}
<div class="manage__role-item__users">
2019-02-04 11:15:40 +00:00
<i class="fas fa-users fa-fw"></i> {{ role.users|number_format }}
</div>
{% endif %}
{% if role.role_title|default('')|length > 0 %}
<div class="manage__role-item__title">
2018-09-23 16:31:47 +00:00
{{ role.role_title }}
2019-02-04 11:15:40 +00:00
</div>
{% endif %}
2018-08-15 20:29:18 +00:00
</div>
</div>
<div class="manage__role-item__actions">
<a href="{{ url('members-role', {'role': role.role_id}) }}" class="manage__role-item__action" title="Members">
2019-02-04 11:15:40 +00:00
<i class="fas fa-users fa-fw"></i>
2018-09-23 16:31:47 +00:00
</a>
</div>
2018-08-15 20:29:18 +00:00
</div>
2018-03-31 22:28:32 +00:00
</div>
2019-02-04 11:15:40 +00:00
{% endfor %}
</div>
2018-09-23 16:31:47 +00:00
2019-02-04 11:15:40 +00:00
{% if roles_pagination|trim|length > 0 %}
<div class="manage__role-items__pagination">
2019-02-04 11:15:40 +00:00
{{ roles_pagination }}
2018-08-15 20:29:18 +00:00
</div>
2019-02-04 11:15:40 +00:00
{% endif %}
2018-03-31 22:28:32 +00:00
</div>
{% endblock %}