Optimizing admin interface for user domain, completing security views
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{% extends 'base.html' %}
|
||||
{% from "macros.html" import render_selectable_table %}
|
||||
{% from "macros.html" import render_selectable_table, render_pagination %}
|
||||
|
||||
{% block title %}View Users{% endblock %}
|
||||
|
||||
@@ -8,42 +8,49 @@
|
||||
|
||||
{% block content %}
|
||||
<form action="{{ url_for('user_bp.handle_user_action') }}" method="POST">
|
||||
{{ render_selectable_table(headers=["User ID", "User Name", "Email"], rows=users, selectable=True, id="usersTable") }}
|
||||
{{ render_selectable_table(headers=["User ID", "User Name", "Email"], rows=rows, selectable=True, id="usersTable") }}
|
||||
<div class="form-group mt-3">
|
||||
<button type="submit" name="action" value="edit_user" class="btn btn-primary">Edit Selected User</button>
|
||||
<button type="submit" name="action" value="resend_confirmation_email" class="btn btn-secondary">Resend Confirmation Email</button>
|
||||
<button type="submit" name="action" value="reset_uniquifier" class="btn btn-secondary">Reset Uniquifier</button>
|
||||
<!-- Additional buttons can be added here for other actions -->
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block content_footer %}
|
||||
{{ render_pagination(pagination, 'user_bp.select_tenant') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#usersTable').DataTable({
|
||||
'columnDefs': [
|
||||
{
|
||||
'targets': 0,
|
||||
'searchable': false,
|
||||
'orderable': false,
|
||||
'className': 'dt-body-center',
|
||||
'render': function (data, type, full, meta) {
|
||||
return '<input type="radio" name="user_id" value="' + $('<div/>').text(data).html() + '">';
|
||||
}
|
||||
},
|
||||
{
|
||||
'targets': 1,
|
||||
'orderable': true,
|
||||
},
|
||||
{
|
||||
'targets': 2,
|
||||
'orderable': true,
|
||||
},
|
||||
{
|
||||
'targets': 3,
|
||||
'orderable': true,
|
||||
}
|
||||
],
|
||||
'order': [[1, 'asc']]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{#<script>#}
|
||||
{#$(document).ready(function() {#}
|
||||
{# $('#usersTable').DataTable({#}
|
||||
{# 'columnDefs': [#}
|
||||
{# {#}
|
||||
{# 'targets': 0,#}
|
||||
{# 'searchable': false,#}
|
||||
{# 'orderable': false,#}
|
||||
{# 'className': 'dt-body-center',#}
|
||||
{# 'render': function (data, type, full, meta) {#}
|
||||
{# return '<input type="radio" name="user_id" value="' + $('<div/>').text(data).html() + '">';#}
|
||||
{# }#}
|
||||
{# },#}
|
||||
{# {#}
|
||||
{# 'targets': 1,#}
|
||||
{# 'orderable': true,#}
|
||||
{# },#}
|
||||
{# {#}
|
||||
{# 'targets': 2,#}
|
||||
{# 'orderable': true,#}
|
||||
{# },#}
|
||||
{# {#}
|
||||
{# 'targets': 3,#}
|
||||
{# 'orderable': true,#}
|
||||
{# }#}
|
||||
{# ],#}
|
||||
{# 'order': [[1, 'asc']]#}
|
||||
{# });#}
|
||||
{#});#}
|
||||
{#</script>#}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user