mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 15:10:27 +00:00
Completed first-found updates for the users list view.
This commit is contained in:
parent
0e67366c5f
commit
9ac81363e3
@ -1,27 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% set active_page = "admin_users" %}
|
||||
|
||||
{% block title %}
|
||||
<title>
|
||||
User Management - {{ SITE_NAME }}
|
||||
</title>
|
||||
{% endblock %}
|
||||
{% block title %}<title>Users - {{ SITE_NAME }}</title>{% endblock %}
|
||||
|
||||
{% block dashboard_stat %}
|
||||
<div class="content-header">
|
||||
<div class="container-fluid">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-6">
|
||||
<h1 class="m-0 text-dark">
|
||||
User
|
||||
<small>Manage user privileges</small>
|
||||
</h1>
|
||||
<h1 class="m-0 text-dark">Users</h1>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<ol class="breadcrumb float-sm-right">
|
||||
<li class="breadcrumb-item"><a href="{{ url_for('dashboard.dashboard') }}">Home</a></li>
|
||||
<li class="breadcrumb-item active">User</li>
|
||||
<li class="breadcrumb-item active">Users</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
@ -34,17 +25,22 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card card-outline card-primary shadow">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">User Management</h3>
|
||||
<h3 class="card-title">Users</h3>
|
||||
<div class="card-tools">
|
||||
<a href="{{ url_for('admin.edit_user') }}">
|
||||
<button type="button" class="btn btn-primary float-right button_add_user">
|
||||
<i class="fa-solid fa-plus"></i> Add User
|
||||
<button type="button" class="btn btn-primary button_add_user" title="Create User">
|
||||
<i class="fa-solid fa-plus"></i> Create User
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="tbl_users" class="table table-bordered table-striped">
|
||||
<!-- /.card-tools -->
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body table-responsive">
|
||||
<table id="tbl_users"
|
||||
class="table table-bordered table-striped table-hover table-sm records">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
@ -74,30 +70,35 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td width="6%">
|
||||
<td>
|
||||
<button type="button" class="btn btn-warning button_revoke"
|
||||
title="Revoke Privileges"
|
||||
id="{{ user.username }}"
|
||||
{% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}>
|
||||
<i class="fa-solid fa-link-slash"></i> Revoke
|
||||
<i class="fa-solid fa-link-slash"></i>
|
||||
</button>
|
||||
</td>
|
||||
<td width="15%">
|
||||
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
|
||||
<button class="btn btn-primary dropdown-toggle" type="button"
|
||||
id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
{% if current_user.role.name=='Operator' and user.role.name=='Administrator' %}disabled{% endif %}>
|
||||
<i class="fa-solid fa-bars"></i> Actions
|
||||
<i class="fa-solid fa-bars"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenu">
|
||||
<button type="button" class="dropdown-item btn-warning" onclick="window.location.href='{{ url_for('admin.edit_user', user_username=user.username) }}'">
|
||||
<button type="button" class="dropdown-item btn-warning"
|
||||
onclick="window.location.href='{{ url_for('admin.edit_user', user_username=user.username) }}'">
|
||||
<i class="fa-solid fa-edit"></i> Edit User
|
||||
</button>
|
||||
{% if not user.username==current_user.username or (current_user.role.name=='Operator' and user.role.name=='Administrator') %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<button type="button"class="dropdown-item btn-secondary button_delete" id="{{ user.username }}">
|
||||
<font color="red">
|
||||
<button type="button"
|
||||
class="dropdown-item btn-secondary button_delete"
|
||||
id="{{ user.username }}">
|
||||
<span style="color: red;">
|
||||
<i class="fa-solid fa-trash"></i> Delete User
|
||||
</font>
|
||||
</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
@ -108,10 +109,15 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user