Update website

This commit is contained in:
Guilhem Lavaux 2024-11-23 20:45:29 +01:00
parent 41ce1aa076
commit ea0eb1c6e0
4222 changed files with 721797 additions and 14 deletions

View file

@ -0,0 +1,23 @@
{% if user_group == null %}
<h2>{% trans 'Add user group' %}</h2>
{% else %}
<h2>{{ 'Edit user group: \'%s\''|trans|format(edit_user_group_special_chars) }}</h2>
{% endif %}
<form name="userGroupForm" id="userGroupForm" action="{{ user_group_url|raw }}" method="post">
{{ hidden_inputs|raw }}
<fieldset class="pma-fieldset" id="fieldset_user_group_rights">
<legend>{% trans 'User group menu assignments' %} &nbsp;&nbsp;&nbsp;
<input type="checkbox" id="addUsersForm_checkall" class="checkall_box" title="Check all">
<label for="addUsersForm_checkall">{% trans 'Check all' %}</label>
</legend>
{% if user_group == null %}
<label for="userGroup">{% trans 'Group name:' %}</label>
<input type="text" name="userGroup" maxlength="64" autocomplete="off" required="required">
<div class="clearfloat"></div>
{% endif %}
{{ tab_list|raw }}
</fieldset>
<fieldset id="fieldset_user_group_rights_footer" class="pma-fieldset tblFooters">
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
</fieldset>
</form>

View file

@ -0,0 +1,13 @@
<fieldset class="pma-fieldset">
<legend>
{{ title }}
</legend>
{% for tab_detail in tab_details %}
<div class="item">
<input type="checkbox" class="checkall"{{ tab_detail.in_array|raw }} name="{{ level }}_{{ tab_detail.tab }}" value="Y">
<label for="{{ level }}_{{ tab_detail.tab }}">
<code>{{ tab_detail.tab_name }}</code>
</label>
</div>
{% endfor %}
</fieldset>

View file

@ -0,0 +1,66 @@
<div class="row"><h2>{% trans 'User groups' %}</h2></div>
{% if has_rows %}
<form name="userGroupsForm" id="userGroupsForm" action="{{ action|raw }}" method="post">
{{ hidden_inputs|raw }}
<table class="table table-striped table-hover">
<thead>
<tr class="text-nowrap">
<th scope="col">
{% trans 'User groups' %}
</th>
<th scope="col">
{% trans 'Server level tabs' %}
</th>
<th scope="col">
{% trans 'Database level tabs' %}
</th>
<th scope="col">
{% trans 'Table level tabs' %}
</th>
<th scope="col">
{% trans 'Action' %}
</th>
</tr>
</thead>
<tbody>
{% for groupName in user_groups_values %}
<tr>
<td>{{ groupName.name }}</td>
<td>{{ groupName.serverTab }}</td>
<td>{{ groupName.dbTab }}</td>
<td>{{ groupName.tableTab }}</td>
<td class="text-nowrap">
<a class="" href="{{ groupName.userGroupUrl|raw }}" data-post="{{ groupName.viewUsersUrl|raw }}">{{ groupName.viewUsersIcon|raw }}</a>
&nbsp;&nbsp;
<a class="" href="{{ groupName.userGroupUrl|raw }}" data-post="{{ groupName.editUsersUrl|raw }}">{{ groupName.editUsersIcon|raw }}</a>
<button type="button" class="btn btn-link" data-bs-toggle="modal" data-bs-target="#deleteUserGroupModal" data-user-group="{{ groupName.name }}">
{{ get_icon('b_drop', 'Delete'|trans) }}
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
<div class="modal fade" id="deleteUserGroupModal" tabindex="-1" aria-labelledby="deleteUserGroupModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteUserGroupModalLabel">{% trans 'Delete user group' %}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Close' %}"></button>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans 'Close' %}</button>
<button type="button" class="btn btn-danger" id="deleteUserGroupConfirm">{% trans 'Delete' %}</button>
</div>
</div>
</div>
</div>
{% endif %}
<div class="row">
<fieldset class="pma-fieldset" id="fieldset_add_user_group">
<a href="{{ add_user_url|raw }}">{{ add_user_icon|raw }}{% trans 'Add user group' %}</a>
</fieldset>
</div>

View file

@ -0,0 +1,22 @@
<h2>{{ 'Users of \'%s\' user group'|trans|format(user_group_special_chars) }}</h2>
{% if num_rows == 0 %}
<p>{% trans 'No users were found belonging to this user group.' %}</p>
{% else %}
<table class="table table-striped w-auto">
<thead>
<tr>
<th>#</th>
<th>{% trans 'User' %}</th>
</tr>
</thead>
<tbody>
{% for obj in users %}
<tr>
<td>{{ obj.count }}</td>
<td>{{ obj.user }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}