You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hydro/templates/domain_permission.html

61 lines
1.9 KiB
HTML

{% extends "domain_base.html" %}
{% block domain_content %}
5 years ago
<form method="post">
<div class="section">
<div class="section__header">
<h1 class="section__title">{{ _('{0}: Permissions').format(domain.name) }}</h1>
5 years ago
</div>
<div class="section__body no-padding domain-users">
<table class="data-table">
<colgroup>
<col class="col--description">
{% for role in roles %}
<col class="col--p">
{% endfor %}
</colgroup>
<thead>
<tr>
<th class="col--description">{{ _('Permissions') }}</th>
{% for role in roles %}
<th class="col--p"><span data-tooltip="{{ role._id }}">{{ role._id }}</span></th>
5 years ago
{% endfor %}
</tr>
</thead>
{% for family, perms in PERMS_BY_FAMILY %}
5 years ago
<tbody>
<tr>
<td class="col--family" colspan="{{ (roles|length)+1 }}">
{{ _(family) }}
</td>
</tr>
{% for perm in perms %}
<tr>
<td class="col--description">
{{ _(perm.desc) }}
</td>
{% for role in roles %}
<td class="col--p">
<label class="compact checkbox">
<input name="{{ role._id }}" data-checkbox-group="{{ role._id }}" data-checkbox-range value="{{ log2(perm.key) }}" type="checkbox"{% if role.perm|bitand(perm.key) %} checked{% endif %}{% if role._id == 'admin' %} disabled{% endif %}>
5 years ago
</label>
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
{% endfor %}
</table>
</div>
<div class="section__body">
5 years ago
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
5 years ago
<button class="rounded primary button" role="submit">
{{ _('Update Permission') }}
</button>
<button type="button" class="rounded button" onclick="window.history.go(-1)">
{{ _('Cancel') }}
</button>
</div>
</div>
</form>
{% endblock %}