Add new pages for managing tags, tasks, transitions, users, user groups, and their respective JavaScript functionalities

- Implemented tag management page with filtering, data table, and AJAX functionality.
- Created task management page with task listing, filtering, and AJAX data loading.
- Developed transition management page with a data table for transitions.
- Added user management page with comprehensive user details, filtering options, and AJAX support.
- Introduced user group management page with filtering and data table for user groups.
- Enhanced JavaScript for data tables, including state saving, filtering, and AJAX data fetching for all new pages.
This commit is contained in:
matt
2026-02-06 23:54:21 -05:00
parent 122d098be4
commit 87a444b8de
34 changed files with 4579 additions and 688 deletions

View File

@@ -0,0 +1,121 @@
{#
/*
* OTS Signs Theme - Module Page
* Based on Xibo CMS module-page.twig with OTS styling
*/
#}
{% extends "authed.twig" %}
{% import "inline.twig" as inline %}
{% block title %}{{ "Modules"|trans }} | {% endblock %}
{% block actionMenu %}{% endblock %}
{% block pageContent %}
<div class="ots-displays-page">
<div class="page-header ots-page-header">
<h1>{% trans "Modules" %}</h1>
<p class="text-muted">{% trans "Manage installed modules." %}</p>
</div>
<div class="widget dashboard-card ots-displays-card">
<div class="widget-body ots-displays-body">
<div class="XiboGrid" id="{{ random() }}">
<div class="XiboFilter card mb-3 bg-light dashboard-card ots-filter-card">
<div class="ots-filter-header">
<h3 class="ots-filter-title">{% trans "Filter Modules" %}</h3>
<button type="button" class="ots-filter-toggle" id="ots-filter-collapse-btn" title="{% trans 'Toggle filter panel' %}">
<i class="fa fa-chevron-down"></i>
</button>
</div>
<div class="ots-filter-content collapsed" id="ots-filter-content">
<div class="FilterDiv card-body" id="Filter">
<form class="form-inline">
{% set title %}{% trans "Name" %}{% endset %}
{{ inline.input('name', title) }}
</form>
</div>
</div>
</div>
<div class="XiboData card pt-3 dashboard-card ots-table-card">
<div class="ots-table-toolbar">
<button class="btn btn-sm btn-primary" id="refreshGrid" title="{% trans "Refresh the Table" %}" href="#"><i class="fa fa-refresh" aria-hidden="true"></i></button>
</div>
<table id="modules" class="table table-striped" data-state-preference-name="moduleGrid">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Description" %}</th>
<th>{% trans "Library Media" %}</th>
<th>{% trans "Default Duration" %}</th>
<th>{% trans "Preview Enabled" %}</th>
<th title="{% trans "Can this module be assigned to a Layout?" %}">{% trans "Assignable" %}</th>
<th>{% trans "Enabled" %}</th>
<th>{% trans "Errors" %}</th>
<th class="rowMenu"></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block javaScript %}
<script type="text/javascript" nonce="{{ cspNonce }}">
var table = $('#modules').DataTable({
language: dataTablesLanguage,
dom: dataTablesTemplate,
serverSide: false,
stateSave: true,
stateDuration: 0,
responsive: true,
stateLoadCallback: dataTableStateLoadCallback,
stateSaveCallback: dataTableStateSaveCallback,
filter: false,
searchDelay: 3000,
order: [[ 0, 'asc']],
ajax: {
url: '{{ url_for("module.search") }}',
data: function (d) {
$.extend(d, $('#modules').closest(".XiboGrid").find(".FilterDiv form").serializeObject());
}
},
columns: [
{ "data": "name" , responsivePriority: 2},
{ "data": "description" },
{ "data": "regionSpecific", "render": dataTableTickCrossInverseColumn },
{ "data": "defaultDuration" },
{ "data": "previewEnabled", "render": dataTableTickCrossColumn },
{ "data": "assignable", "render": dataTableTickCrossColumn },
{ "data": "enabled", "render": dataTableTickCrossColumn },
{ "data": "errors", "render": dataTableTickCrossColumn },
{
"orderable": false,
responsivePriority: 1,
"data": dataTableButtonsColumn
}
]
});
table.on('draw', dataTableDraw);
table.on('processing.dt', dataTableProcessing);
dataTableAddButtons(table, $('#modules_wrapper').find('.dataTables_buttons'));
$("#refreshGrid").click(function () {
table.ajax.reload();
});
function moduleEditFormOpen(dialog) {
var moduleSettings = $(dialog).data('extra')['settings'];
var $targetContainer = $(dialog).find('.form-module-configure-fields')
forms.createFields(moduleSettings, $targetContainer);
}
</script>
{% endblock %}