mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
拆分域管理与系统管理
This commit is contained in:
1 parent
385e46ae42
commit
faec4744d7
24 files changed
+249
-168
No files matched your search
@@ -0,0 +1,60 @@
|
||||
{% extends "domain_base.html" %}
|
||||
{% block domain_content %}
|
||||
<form method="post">
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('{0}: Permissions').format(domain.name) }}</h1>
|
||||
</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 }}">{{ role._id }}</span></th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
{% for family, perms in perm.PERMS_BY_FAMILY %}
|
||||
<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="{{ perm.key }}" type="checkbox"{% if role.perm.includes(perm.key) %} checked{% endif %}{% if role._id == 'admin' %} disabled{% endif %}>
|
||||
</label>
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="section__body">
|
||||
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
|
||||
<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 %}
|
||||
Reference in new issue
Block a user