feat(backoffice): DataTables cliente-only nas 11 listagens com CSV

Fecha o item 6.9 da auditoria (sem server-side/AJAX — todas as tabelas
estão bem abaixo de 60 linhas): ordenação, pesquisa, paginação, pt-PT
e Responsive (colapso em ecrãs estreitos), reaproveitando o botão
"Exportar CSV" já existente.

DataTables 2.3.4 + Responsive 3.0.6 vendorizados em
assets/vendor/datatables-2.3.4/ (mesma versão/decisão do hub.andmore.pt),
nunca de CDN. Tradução pt-PT oficial inline em assets/js/datatables-init.js,
que expõe initDataTable(selector, opts) — cada página dá um id estável à
tabela e marca a coluna de Ações como orderable:false/searchable:false.
Os vendor scripts só carregam nas 10 páginas que os usam (injeção dinâmica
depois do DOMContentLoaded, como o loader do Summernote), não no
header/footer partilhado.

views/admin/trials/index.php ficou de fora de propósito: cada linha tem
um <select> de estado e um <textarea> de notas editados in-line antes de
"Guardar" — um redraw da DataTable a meio dessa edição (ordenar, paginar)
arrisca perder ou baralhar o que ainda não foi submetido.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
andreandClaude Sonnet 5 committed 2026-09-26 10:34:09 +01:00
1 parent 4222b8f2e0
commit b1e88781b8
18 files changed
+342 -12

No files matched your search

+59
View File
@@ -0,0 +1,59 @@
// DataTables (classic jQuery plugin) init, partilhado pelas listagens do
// backoffice que já tinham exportação CSV (audit 6.9). Cliente-only — todas
// as tabelas aqui são pequenas (bem abaixo de 60 linhas), por isso sem
// server-side processing nem AJAX.
//
// Tradução pt-PT oficial da DataTables (i18n/pt-PT.json), inline: não se
// carrega de CDN nenhum, pela mesma razão que o Roboto e o FontAwesome
// passaram a ser servidos daqui (RGPD — sem pedidos a terceiros antes do
// consentimento).
var DATATABLES_PT_PT = {
decimal: ',',
emptyTable: 'Não existem dados disponíveis na tabela',
info: 'A mostrar registos de _START_ até _END_ de um total de _TOTAL_ registos',
infoEmpty: 'A mostrar registos de 0 até 0 de um total de 0 registos',
infoFiltered: '(filtrados de um total de _MAX_ registos)',
infoPostFix: '',
thousands: '.',
lengthMenu: 'Mostrar _MENU_ registos',
loadingRecords: 'A carregar...',
processing: 'A processar...',
search: 'Pesquisar:',
zeroRecords: 'Não foram encontrados resultados',
paginate: {
first: 'Primeiro',
last: 'Último',
next: 'Seguinte',
previous: 'Anterior'
},
aria: {
sortAscending: ': ativar para ordenar a coluna de forma ascendente',
sortDescending: ': ativar para ordenar a coluna de forma descendente'
},
select: {
rows: {
_: 'Selecionadas %d linhas',
0: 'Nenhuma linha selecionada',
1: 'Selecionada 1 linha'
}
}
};
// opts pode trazer columnDefs (p.ex. marcar a coluna de Ações como
// orderable:false/searchable:false) e qualquer outra opção da DataTable —
// é feito merge profundo por cima destes valores por omissão.
function initDataTable(selector, opts) {
if (!window.jQuery || !jQuery.fn || !jQuery.fn.DataTable) return null;
var $table = jQuery(selector);
if (!$table.length) return null;
return $table.DataTable(jQuery.extend(true, {
language: DATATABLES_PT_PT,
pageLength: 25,
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, 'Todos']],
responsive: true,
// Sem ordenação inicial: a ordem que a página já desenha (mais
// recente primeiro, ordem manual, etc.) é a que faz sentido por
// omissão — impor uma coluna aqui só a desfazia sem avisar.
order: []
}, opts || {}));
}
+27
View File
@@ -0,0 +1,27 @@
# DataTables 2.3.4 + Responsive 3.0.6
Descarregado de `https://cdn.datatables.net/2.3.4/` e
`https://cdn.datatables.net/responsive/3.0.6/` a 2026-09-26 e **commitado**.
Servido daqui, nunca do CDN (RGPD — sem pedidos a terceiros antes do
consentimento, mesma razão do Roboto e do FontAwesome vendorizados).
Mesma escolha que o `hub.andmore.pt` já tinha feito
(`public/assets/vendor/datatables-2.3.4/`) — sem esse pacote no packagist
mais recente que a 1.10.21, vendorizar à mão é a alternativa a ficar preso a
essa versão antiga (usa `$.isArray`/`$.trim`, removidos na jQuery 4).
A tradução pt-PT não vem de ficheiro nenhum daqui — está inline em
`assets/js/datatables-init.js`, pela mesma razão de não ir buscar nada a um
CDN.
## Como atualizar
curl -O https://cdn.datatables.net/<versão>/js/dataTables.min.js
curl -O https://cdn.datatables.net/<versão>/js/dataTables.bootstrap5.min.js
curl -O https://cdn.datatables.net/<versão>/css/dataTables.bootstrap5.min.css
curl -O https://cdn.datatables.net/responsive/<versão>/js/dataTables.responsive.min.js
curl -O https://cdn.datatables.net/responsive/<versão>/js/responsive.bootstrap5.min.js
curl -O https://cdn.datatables.net/responsive/<versão>/css/responsive.bootstrap5.min.css
numa pasta nova `datatables-<versão>`, apontar as 11 páginas de listagem
(`assets/js/datatables-init.js` fica na mesma) e apagar a antiga.
@@ -0,0 +1,5 @@
:root{--dt-row-selected: 13, 110, 253;--dt-row-selected-text: 255, 255, 255;--dt-row-selected-link: 228, 228, 228;--dt-row-stripe: 0, 0, 0;--dt-row-hover: 0, 0, 0;--dt-column-ordering: 0, 0, 0;--dt-header-align-items: center;--dt-header-vertical-align: middle;--dt-html-background: white}:root.dark{--dt-html-background: rgb(33, 37, 41)}table.dataTable tbody td.dt-control{text-align:center;cursor:pointer}table.dataTable tbody td.dt-control:before{display:inline-block;box-sizing:border-box;content:"";border-top:5px solid transparent;border-left:10px solid rgba(0, 0, 0, 0.5);border-bottom:5px solid transparent;border-right:0px solid transparent}table.dataTable tbody tr.dt-hasChild td.dt-control:before{border-top:10px solid rgba(0, 0, 0, 0.5);border-left:5px solid transparent;border-bottom:0px solid transparent;border-right:5px solid transparent}table.dataTable tfoot:empty{display:none}html.dark table.dataTable td.dt-control:before,:root[data-bs-theme=dark] table.dataTable td.dt-control:before,:root[data-theme=dark] table.dataTable td.dt-control:before{border-left-color:rgba(255, 255, 255, 0.5)}html.dark table.dataTable tr.dt-hasChild td.dt-control:before,:root[data-bs-theme=dark] table.dataTable tr.dt-hasChild td.dt-control:before,:root[data-theme=dark] table.dataTable tr.dt-hasChild td.dt-control:before{border-top-color:rgba(255, 255, 255, 0.5);border-left-color:transparent}div.dt-scroll{width:100%}div.dt-scroll-body thead tr,div.dt-scroll-body tfoot tr{height:0}div.dt-scroll-body thead tr th,div.dt-scroll-body thead tr td,div.dt-scroll-body tfoot tr th,div.dt-scroll-body tfoot tr td{height:0 !important;padding-top:0px !important;padding-bottom:0px !important;border-top-width:0px !important;border-bottom-width:0px !important}div.dt-scroll-body thead tr th div.dt-scroll-sizing,div.dt-scroll-body thead tr td div.dt-scroll-sizing,div.dt-scroll-body tfoot tr th div.dt-scroll-sizing,div.dt-scroll-body tfoot tr td div.dt-scroll-sizing{height:0 !important;overflow:hidden !important}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead>tr>th.dt-orderable-asc span.dt-column-order:before,table.dataTable thead>tr>th.dt-ordering-asc span.dt-column-order:before,table.dataTable thead>tr>td.dt-orderable-asc span.dt-column-order:before,table.dataTable thead>tr>td.dt-ordering-asc span.dt-column-order:before{position:absolute;display:block;bottom:50%;content:"▲";content:"▲"/""}table.dataTable thead>tr>th.dt-orderable-desc span.dt-column-order:after,table.dataTable thead>tr>th.dt-ordering-desc span.dt-column-order:after,table.dataTable thead>tr>td.dt-orderable-desc span.dt-column-order:after,table.dataTable thead>tr>td.dt-ordering-desc span.dt-column-order:after{position:absolute;display:block;top:50%;content:"▼";content:"▼"/""}table.dataTable thead>tr>th.dt-orderable-asc span.dt-column-order,table.dataTable thead>tr>th.dt-orderable-desc span.dt-column-order,table.dataTable thead>tr>th.dt-ordering-asc span.dt-column-order,table.dataTable thead>tr>th.dt-ordering-desc span.dt-column-order,table.dataTable thead>tr>td.dt-orderable-asc span.dt-column-order,table.dataTable thead>tr>td.dt-orderable-desc span.dt-column-order,table.dataTable thead>tr>td.dt-ordering-asc span.dt-column-order,table.dataTable thead>tr>td.dt-ordering-desc span.dt-column-order{position:relative;width:12px;height:24px}table.dataTable thead>tr>th.dt-orderable-asc span.dt-column-order:before,table.dataTable thead>tr>th.dt-orderable-asc span.dt-column-order:after,table.dataTable thead>tr>th.dt-orderable-desc span.dt-column-order:before,table.dataTable thead>tr>th.dt-orderable-desc span.dt-column-order:after,table.dataTable thead>tr>th.dt-ordering-asc span.dt-column-order:before,table.dataTable thead>tr>th.dt-ordering-asc span.dt-column-order:after,table.dataTable thead>tr>th.dt-ordering-desc span.dt-column-order:before,table.dataTable thead>tr>th.dt-ordering-desc span.dt-column-order:after,table.dataTable thead>tr>td.dt-orderable-asc span.dt-column-order:before,table.dataTable thead>tr>td.dt-orderable-asc span.dt-column-order:after,table.dataTable thead>tr>td.dt-orderable-desc span.dt-column-order:before,table.dataTable thead>tr>td.dt-orderable-desc span.dt-column-order:after,table.dataTable thead>tr>td.dt-ordering-asc span.dt-column-order:before,table.dataTable thead>tr>td.dt-ordering-asc span.dt-column-order:after,table.dataTable thead>tr>td.dt-ordering-desc span.dt-column-order:before,table.dataTable thead>tr>td.dt-ordering-desc span.dt-column-order:after{left:0;opacity:.125;line-height:9px;font-size:.8em}table.dataTable thead>tr>th.dt-orderable-asc,table.dataTable thead>tr>th.dt-orderable-desc,table.dataTable thead>tr>td.dt-orderable-asc,table.dataTable thead>tr>td.dt-orderable-desc{cursor:pointer}table.dataTable thead>tr>th.dt-orderable-asc:hover,table.dataTable thead>tr>th.dt-orderable-desc:hover,table.dataTable thead>tr>td.dt-orderable-asc:hover,table.dataTable thead>tr>td.dt-orderable-desc:hover{oLine truncated
*
* ©2020 SpryMedia Ltd, all rights reserved.
* License: MIT datatables.net/license/mit
*/table.table.dataTable{clear:both;margin-bottom:0;max-width:none;border-spacing:0}table.table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1)>*{box-shadow:none}table.table.dataTable>:not(caption)>*>*{background-color:var(--bs-table-bg)}table.table.dataTable>tbody>tr{background-color:transparent}table.table.dataTable>tbody>tr.selected>*{box-shadow:inset 0 0 0 9999px rgb(13, 110, 253);box-shadow:inset 0 0 0 9999px rgb(var(--dt-row-selected));color:rgb(255, 255, 255);color:rgb(var(--dt-row-selected-text))}table.table.dataTable>tbody>tr.selected a{color:rgb(228, 228, 228);color:rgb(var(--dt-row-selected-link))}table.table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1)>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-stripe), 0.05)}table.table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1).selected>*{box-shadow:inset 0 0 0 9999px rgba(13, 110, 253, 0.95);box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.95)}table.table.dataTable.table-hover>tbody>tr:hover>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.075)}table.table.dataTable.table-hover>tbody>tr.selected:hover>*{box-shadow:inset 0 0 0 9999px rgba(13, 110, 253, 0.975);box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.975)}div.dt-container div.dt-layout-start>*:not(:last-child){margin-right:1em}div.dt-container div.dt-layout-end>*:not(:first-child){margin-left:1em}div.dt-container div.dt-layout-full{width:100%}div.dt-container div.dt-layout-full>*:only-child{margin-left:auto;margin-right:auto}div.dt-container div.dt-layout-table>div{display:block !important}@media screen and (max-width: 767px){div.dt-container div.dt-layout-start>*:not(:last-child){margin-right:0}div.dt-container div.dt-layout-end>*:not(:first-child){margin-left:0}}div.dt-container{position:relative}div.dt-container div.dt-length label{font-weight:normal;text-align:left;white-space:nowrap}div.dt-container div.dt-length select{width:auto;display:inline-block;margin-right:.5em}div.dt-container div.dt-search{text-align:right}div.dt-container div.dt-search label{font-weight:normal;white-space:nowrap;text-align:left}div.dt-container div.dt-search input{margin-left:.5em;display:inline-block;width:auto}div.dt-container div.dt-paging{margin:0}div.dt-container div.dt-paging ul.pagination{margin:2px 0;flex-wrap:wrap}div.dt-container div.dt-row{position:relative}div.dt-scroll-head table.dataTable{margin-bottom:0 !important}div.dt-scroll-body{border-bottom-color:var(--bs-border-color);border-bottom-width:var(--bs-border-width);border-bottom-style:solid}div.dt-scroll-body>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dt-scroll-body>table>tbody>tr:first-child{border-top-width:0}div.dt-scroll-body>table>thead>tr{border-width:0 !important}div.dt-scroll-body>table>tbody>tr:last-child>*{border-bottom:none}div.dt-scroll-foot>.dt-scroll-footInner{box-sizing:content-box}div.dt-scroll-foot>.dt-scroll-footInner>table{margin-top:0 !important;border-top:none}div.dt-scroll-foot>.dt-scroll-footInner>table>tfoot>tr:first-child{border-top-width:0 !important}@media screen and (max-width: 767px){div.dt-container div.dt-length,div.dt-container div.dt-search,div.dt-container div.dt-info,div.dt-container div.dt-paging{text-align:center}div.dt-container .row{--bs-gutter-y: 0.5rem}div.dt-container div.dt-paging ul.pagination{justify-content:center !important}}table.dataTable.table-sm>thead>tr th.dt-orderable-asc,table.dataTable.table-sm>thead>tr th.dt-orderable-desc,table.dataTable.table-sm>thead>tr th.dt-ordering-asc,table.dataTable.table-sm>thead>tr th.dt-ordering-desc,table.dataTable.table-sm>thead>tr td.dt-orderable-asc,table.dataTable.table-sm>thead>tr td.dt-orderable-desc,table.dataTable.table-sm>thead>tr td.dt-ordering-asc,table.dataTable.table-sm>thead>tr td.dt-ordering-desc{padding-right:.25rem}table.dataTable.table-sm>thead>tr th.dt-orderable-asc span.dt-column-order,table.dataTable.table-sm>thead>tr th.dt-orderable-desc span.dt-column-order,table.dataTable.table-sm>thead>tr th.dt-ordering-asc span.dt-column-order,table.dataTable.table-sm>thead>tr th.dt-ordering-desc span.dt-column-order,table.dataTable.table-sm>thead>tr td.dt-orderable-asc span.dt-column-order,table.dataTable.table-sm>thead>tr td.dt-orderable-desc span.dt-column-order,table.dataTable.table-sm>thead>tr td.dt-ordering-asc span.dt-column-order,table.dataTable.table-sm>thead>tr td.dt-ordering-desc span.dt-column-order{right:.25rem}table.dataTable.table-sm>thead>tr th.dt-type-date span.dt-column-order,table.dataTable.table-sm>thead>tr th.dt-type-numeric span.dt-column-order,table.dataTable.table-sm>thead>tr td.dt-type-date span.dt-column-order,table.dataTable.table-sm>thead>tr td.dt-type-numeric span.dt-column-order{left:.25rem}div.dt-scroll-head table.table-bordered{border-bottom-width:0}div.table-responsive>div.dt-container>div.row{margin:0}div.table-responsive>div.dt-container>div.row>div[class^=col-]:first-child{padding-left:0}div.table-responsive>div.dt-container>div.row>dLine truncated
@@ -0,0 +1,4 @@
/*! DataTables Bootstrap 5 integration
* © SpryMedia Ltd - datatables.net/license
*/
!function(n){var o,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return n(t,window,document)}):"object"==typeof exports?(o=require("jquery"),r=function(t,e){e.fn.dataTable||require("datatables.net")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||o(t),r(t,e),n(e,0,t.document)}:(r(window,o),module.exports=n(o,window,window.document))):n(jQuery,window,document)}(function(d,t,e){"use strict";var n=d.fn.dataTable;return d.extend(!0,n.defaults,{renderer:"bootstrap"}),d.extend(!0,n.ext.classes,{container:"dt-container dt-bootstrap5",search:{input:"form-control form-control-sm"},length:{select:"form-select form-select-sm"},processing:{container:"dt-processing card"},layout:{row:"row mt-2 justify-content-between",cell:"d-md-flex justify-content-between align-items-center",tableCell:"col-12",start:"dt-layout-start col-md-auto me-auto",end:"dt-layout-end col-md-auto ms-auto",full:"dt-layout-full col-md"}}),n.ext.renderer.pagingButton.bootstrap=function(t,e,n,o,r){var a=["dt-paging-button","page-item"],o=(o&&a.push("active"),r&&a.push("disabled"),d("<li>").addClass(a.join(" ")));return{display:o,clicker:d("<button>",{class:"page-link",role:"link",type:"button"}).html(n).appendTo(o)}},n.ext.renderer.pagingContainer.bootstrap=function(t,e){return d("<ul/>").addClass("pagination").append(e)},n});
+4
View File
@@ -0,0 +1,4 @@
/*! DataTables 2.3.4
* © SpryMedia Ltd - datatables.net/license
*/
!function(n){"use strict";var r;"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e,window,document)}):"object"==typeof exports?(r=require("jquery"),"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||r(e),n(t,e,e.document)}:module.exports=n(r,window,window.document)):window.DataTable=n(jQuery,window,document)}(function(H,W,S){"use strict";function f(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null}function c(e,t,n,r){var a=typeof e,o="string"==a;return"number"==a||"bigint"==a||!(!r||!_(e))||(t&&o&&(e=E(e,t)),n&&o&&(e=e.replace(P,"")),!isNaN(parseFloat(e))&&isFinite(e))}function n(e,t,n,r){var a;return!(!r||!_(e))||("string"!=typeof e||!e.match(/<(input|select)/i))&&(_(a=e)||"string"==typeof a)&&!!c(w(e),t,n,r)||null}function v(e,t,n,r){var a=[],o=0,i=t.length;if(void 0!==r)for(;o<i;o++)e[t[o]]&&e[t[o]][n]&&a.push(e[t[o]][n][r]);else for(;o<i;o++)e[t[o]]&&a.push(e[t[o]][n]);return a}function h(e,t){var n,r=[];void 0===t?(t=0,n=e):(n=t,t=e);for(var a=t;a<n;a++)r.push(a);return r}function A(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]);return t}var T,X,r,e,V=function(e,P){var E,k,M;return V.factory(e,P)?V:this instanceof V?H(e).DataTable(P):(k=void 0===(P=e),M=(E=this).length,k&&(P={}),this.api=function(){return new X(this)},this.each(function(){var t=1<M?tt({},P,!0):P,e=0,n=this.getAttribute("id"),r=V.defaults,a=H(this);if("table"!=this.nodeName.toLowerCase())z(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{t.on&&t.on.options&&lt(a,"options",t.on.options),a.trigger("options.dt",t),Q(r),K(r.column),B(r,r,!0),B(r.column,r.column,!0),B(r,H.extend(t,st(a.data())),!0);var o=V.settings;for(e=0,j=o.length;e<j;e++){var i=o[e];if(i.nTable==this||i.nTHead&&i.nTHead.parentNode==this||i.nTFoot&&i.nTFoot.parentNode==this){var l=(void 0!==t.bRetrieve?t:r).bRetrieve,s=(void 0!==t.bDestroy?t:r).bDestroy;if(k||l)return i.oInstance;if(s){new V.Api(i).destroy();break}return void z(i,0,"Cannot reinitialise DataTable",3)}if(i.sTableId==this.id){o.splice(e,1);break}}null!==n&&""!==n||(n="DataTables_Table_"+V.ext._unique++,this.id=n),a.children("colgroup").remove();var u,c=H.extend(!0,{},V.models.oSettings,{sDestroyWidth:a[0].style.width,sInstance:n,sTableId:n,colgroup:H("<colgroup>").prependTo(this),fastData:function(e,t,n){return q(c,e,t,n)}}),n=(c.nTable=this,c.oInit=t,o.push(c),c.api=new X(c),c.oInstance=1===E.length?E:a.dataTable(),Q(t),t.aLengthMenu&&!t.iDisplayLength&&(t.iDisplayLength=Array.isArray(t.aLengthMenu[0])?t.aLengthMenu[0][0]:H.isPlainObject(t.aLengthMenu[0])?t.aLengthMenu[0].value:t.aLengthMenu[0]),t=tt(H.extend(!0,{},r),t),$(c.oFeatures,t,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),$(c,t,["ajax","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","iStateDuration","bSortCellsTop","iTabIndex","sDom","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId","caption","layout","orderDescReverse","orderIndicators","orderHandler","titleRow","typeDetect",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),$(c.oScroll,t,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),$(c.oLanguage,t,"fnInfoCallback"),Y(c,"aoDrawCallback",t.fnDrawCallback),Y(c,"aoStateSaveParams",t.fnStateSaveParams),Y(c,"aoStateLoadParams",t.fnStateLoadParams),Y(c,"aoStateLoaded",t.fnStateLoaded),Y(c,"aoRowCallback",t.fnRowCallback),Y(c,"aoRowCreatedCallback",t.fnCreatedRow),Y(c,"aoHeaderCallback",t.fnHeaderCallback),Y(c,"aoFooterCallback",t.fnFooterCallback),Y(c,"aoInitComplete",t.fnInitComplete),Y(c,"aoPreDrawCallback",t.fnPreDrawCallback),c.rowIdFn=U(t.rowId),t.on&&Object.keys(t.on).forEach(function(e){lt(a,e,t.on[e])}),c),d=(V.__browser||(f={},V.__browser=f,p=H("<div/>").css({position:"fixed",top:0,left:-1*W.pageXOffset,height:1,width:1,overflow:"hidden"}).append(H("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(H("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=p.children(),u=d.children(),f.barWidth=d[0].offsetWidth-d[0].clientWidth,f.bScrollbarLeft=1!==Math.round(u.offset().left),p.remove()),H.extend(n.oBrowser,V.__browser),n.oScroll.iBarWidth=V.__browser.barWidth,c.oClasses),f=(H.extend(d,V.ext.classes,t.oClasses),a.addClass(d.table),c.oFeatures.bPaginate||(t.iDisplayStart=0),void 0===c.iInitDisplayStart&&(c.iInitDisplayStart=t.iDisplayStart,c._iDisplayStart=t.iDisplayStart),t.iDeferLoading),h=(null!==f&&(c.deferLoading=!0,u=Array.isArray(f),c._iRecordsDisplay=u?f[0]:f,c._iRecordsTotal=u?f[1]:f),[]),p=this.getElementsByTagName("thead"),n=Ne(c,p[0]);if(t.aoColumns)h=t.aoColumns;else if(n.length)for(j=n[e=0].length;e<j;e++)h.push(null);for(e=0,j=h.length;e<j;e++)ee(c);var g,m,v,b,y,D,x,S=c,w=t.aoColumnDefs,T=hLine truncated
@@ -0,0 +1,4 @@
/*! Responsive 3.0.6
* © SpryMedia Ltd - datatables.net/license
*/
!function(n){var i,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return n(e,window,document)}):"object"==typeof exports?(i=require("jquery"),r=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||i(e),r(e,t),n(t,e,e.document)}:(r(window,i),module.exports=n(i,window,window.document))):n(jQuery,window,document)}(function(b,y,d){"use strict";function a(e,t){if(!i.versionCheck||!i.versionCheck("2"))throw"DataTables Responsive requires DataTables 2 or newer";this.s={childNodeStore:{},columns:[],current:[],dt:new i.Api(e)},this.s.dt.settings()[0].responsive||(t&&"string"==typeof t.details?t.details={type:t.details}:t&&!1===t.details?t.details={type:!1}:t&&!0===t.details&&(t.details={type:"inline"}),this.c=b.extend(!0,{},a.defaults,i.defaults.responsive,t),(e.responsive=this)._constructor())}var i=b.fn.dataTable,e=(b.extend(a.prototype,{_constructor:function(){var o=this,r=this.s.dt,t=b(y).innerWidth(),e=(r.settings()[0]._responsive=this,b(y).on("orientationchange.dtr",i.util.throttle(function(){var e=b(y).innerWidth();e!==t&&(o._resize(),t=e)})),r.on("row-created.dtr",function(e,t,n,i){-1!==b.inArray(!1,o.s.current)&&b(">td, >th",t).each(function(e){e=r.column.index("toData",e);!1===o.s.current[e]&&b(this).css("display","none").addClass("dtr-hidden")})}),r.on("destroy.dtr",function(){r.off(".dtr"),b(r.table().body()).off(".dtr"),b(y).off("resize.dtr orientationchange.dtr"),r.cells(".dtr-control").nodes().to$().removeClass("dtr-control"),b(r.table().node()).removeClass("dtr-inline collapsed"),b.each(o.s.current,function(e,t){!1===t&&o._setColumnVis(e,!0)})}),this.c.breakpoints.sort(function(e,t){return e.width<t.width?1:e.width>t.width?-1:0}),this._classLogic(),this.c.details);!1!==e.type&&(o._detailsInit(),r.on("column-visibility.dtr",function(){o._timer&&clearTimeout(o._timer),o._timer=setTimeout(function(){o._timer=null,o._classLogic(),o._resizeAuto(),o._resize(!0),o._redrawChildren()},100)}),r.on("draw.dtr",function(){o._redrawChildren()}),b(r.table().node()).addClass("dtr-"+e.type)),r.on("column-calc.dt",function(e,t){for(var n=o.s.current,i=0;i<n.length;i++){var r=t.visible.indexOf(i);!1===n[i]&&0<=r&&t.visible.splice(r,1)}}),r.on("preXhr.dtr",function(){var e=[];r.rows().every(function(){this.child.isShown()&&e.push(this.id(!0))}),r.one("draw.dtr",function(){o._resizeAuto(),o._resize(),r.rows(e).every(function(){o._detailsDisplay(this,!1)})})}),r.on("draw.dtr",function(){r.page.info().serverSide&&(o.s.childNodeStore={}),o._controlClass()}).ready(function(){o._resizeAuto(),o._resize(),r.on("column-sizing.dtr",function(){o._resizeAuto(),o._resize()})}),r.on("column-reorder.dtr",function(e,t,n){o._classLogic(),o._resizeAuto(),o._resize(!0)})},_colGroupAttach:function(e,t,n){var i=null;if(t[n].get(0).parentNode!==e[0]){for(var r=n+1;r<t.length;r++)if(e[0]===t[r].get(0).parentNode){i=r;break}null!==i?t[n].insertBefore(t[i][0]):e.append(t[n])}},_childNodes:function(e,t,n){var i=t+"-"+n;if(this.s.childNodeStore[i])return this.s.childNodeStore[i];for(var r=[],o=e.cell(t,n).node().childNodes,s=0,d=o.length;s<d;s++)r.push(o[s]);return this.s.childNodeStore[i]=r},_childNodesRestore:function(e,t,n){var i=t+"-"+n;if(this.s.childNodeStore[i]){var r=e.cell(t,n).node(),e=this.s.childNodeStore[i];if(0<e.length){for(var o=e[0].parentNode.childNodes,s=[],d=0,a=o.length;d<a;d++)s.push(o[d]);for(var l=0,c=s.length;l<c;l++)r.appendChild(s[l]),console.log("restore",i,r,s[l])}this.s.childNodeStore[i]=void 0}},_columnsVisibility:function(n){for(var i=this.s.dt,e=this.s.columns,t=e.map(function(e,t){return{columnIdx:t,priority:e.priority}}).sort(function(e,t){return e.priority!==t.priority?e.priority-t.priority:e.columnIdx-t.columnIdx}),r=b.map(e,function(e,t){return!1===i.column(t).visible()?"not-visible":(!e.auto||null!==e.minWidth)&&(!0===e.auto?"-":-1!==b.inArray(n,e.includeIn))}),o=0,s=0,d=r.length;s<d;s++)!0===r[s]&&(o+=e[s].minWidth);var a=i.settings()[0].oScroll,a=a.sY||a.sX?a.iBarWidth:0,l=i.table().container().offsetWidth-a-o;for(s=0,d=r.length;s<d;s++)e[s].control&&(l-=e[s].minWidth);var c=!1;for(s=0,d=t.length;s<d;s++){var u=t[s].columnIdx;"-"===r[u]&&!e[u].control&&e[u].minWidth&&(c||l-e[u].minWidth<0?r[u]=!(c=!0):r[u]=!0,l-=e[u].minWidth)}var h=!1;for(s=0,d=e.length;s<d;s++)if(!e[s].control&&!e[s].never&&!1===r[s]){h=!0;break}for(s=0,d=e.length;s<d;s++)e[s].control&&(r[s]=h),"not-visible"===r[s]&&(r[s]=!1);return-1===b.inArray(!0,r)&&(r[0]=!0),r},_classLogic:function(){function d(e,t,n,i){var r,o,s;if(n){if("max-"===n)for(r=a._find(t).width,o=0,s=l.length;o<s;o++)l[o].width<=r&&u(e,l[o].name);else if("min-"===n)for(r=a._find(t).width,o=0,s=l.length;o<s;o++)l[o].width>=r&&u(e,l[o].name);else if("not-"===n)for(o=0,s=l.length;o<s;o++)-1===l[o].name.indexOf(i)&&u(e,l[o].name)}else c[e].includeIn.push(t)}var a=this,l=this.c.breakpoints,c=this.s.dt.columns().eq(0).map(function(e){var e=this.columLine truncated
@@ -0,0 +1 @@
table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control{cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control:before{margin-right:.5em;display:inline-block;box-sizing:border-box;content:"";border-top:5px solid transparent;border-left:10px solid rgba(0, 0, 0, 0.5);border-bottom:5px solid transparent;border-right:0px solid transparent}table.dataTable.dtr-inline.collapsed>tbody>tr>td.dtr-control.arrow-right::before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.dtr-control.arrow-right::before{border-top:5px solid transparent;border-left:0px solid transparent;border-bottom:5px solid transparent;border-right:10px solid rgba(0, 0, 0, 0.5)}table.dataTable.dtr-inline.collapsed>tbody>tr.dtr-expanded>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr.dtr-expanded>th.dtr-control:before{border-top:10px solid rgba(0, 0, 0, 0.5);border-left:5px solid transparent;border-bottom:0px solid transparent;border-right:5px solid transparent}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control{padding-left:.333em}table.dataTable.dtr-column>tbody>tr>td.dtr-control,table.dataTable.dtr-column>tbody>tr>th.dtr-control,table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.dtr-control:before,table.dataTable.dtr-column>tbody>tr>th.dtr-control:before,table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{display:inline-block;box-sizing:border-box;content:"";border-top:5px solid transparent;border-left:10px solid rgba(0, 0, 0, 0.5);border-bottom:5px solid transparent;border-right:0px solid transparent}table.dataTable.dtr-column>tbody>tr>td.dtr-control.arrow-right::before,table.dataTable.dtr-column>tbody>tr>th.dtr-control.arrow-right::before,table.dataTable.dtr-column>tbody>tr>td.control.arrow-right::before,table.dataTable.dtr-column>tbody>tr>th.control.arrow-right::before{border-top:5px solid transparent;border-left:0px solid transparent;border-bottom:5px solid transparent;border-right:10px solid rgba(0, 0, 0, 0.5)}table.dataTable.dtr-column>tbody>tr.dtr-expanded td.dtr-control:before,table.dataTable.dtr-column>tbody>tr.dtr-expanded th.dtr-control:before,table.dataTable.dtr-column>tbody>tr.dtr-expanded td.control:before,table.dataTable.dtr-column>tbody>tr.dtr-expanded th.control:before{border-top:10px solid rgba(0, 0, 0, 0.5);border-left:5px solid transparent;border-bottom:0px solid transparent;border-right:5px solid transparent}table.dataTable>tbody>tr.child{padding:.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul.dtr-details>li{border-bottom:1px solid #efefef;padding:.5em 0}table.dataTable>tbody>tr.child ul.dtr-details>li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul.dtr-details>li:last-child{padding-bottom:0;border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:fit-content;max-height:75%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:.5em;box-shadow:0 12px 30px rgba(0, 0, 0, 0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:2.5em}div.dtr-modal div.dtr-modal-content h2{margin-top:0}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0, 0, 0, 0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}html.dark table.dataTable>tbody>tr>td.dtr-control:before,html[data-bs-theme=dark] table.dataTable>tbody>tr>td.dtr-control:before{border-left-color:rgba(255, 255, 255, 0.5) !important}html.dark table.dataTable>tbody>tr>td.dtr-control.arrow-right::before,html[data-bs-theme=dark] table.dataTable>tbody>tr>td.dtr-control.arrow-right::before{border-rightLine truncated
@@ -0,0 +1,4 @@
/*! Bootstrap 5 integration for DataTables' Responsive
* © SpryMedia Ltd - datatables.net/license
*/
!function(t){var o,n;"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs5","datatables.net-responsive"],function(e){return t(e,window,document)}):"object"==typeof exports?(o=require("jquery"),n=function(e,d){d.fn.dataTable||require("datatables.net-bs5")(e,d),d.fn.dataTable.Responsive||require("datatables.net-responsive")(e,d)},"undefined"==typeof window?module.exports=function(e,d){return e=e||window,d=d||o(e),n(e,d),t(d,e,e.document)}:(n(window,o),module.exports=t(o,window,window.document))):t(jQuery,window,document)}(function(s,e,l){"use strict";var u,d=s.fn.dataTable,t=d.Responsive.display,f=t.modal,p=s('<div class="modal fade dtr-bs-modal" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body"/></div></div></div>'),o=e.bootstrap;return d.Responsive.bootstrap=function(e){o=e},t.modal=function(r){var e;return!u&&o.Modal&&(e=function(){var e=d.use("bootstrap");if(e)return e;if(o)return o;throw new Error("No Bootstrap library. Set it with `DataTable.use(bootstrap);`")}(),u=new e.Modal(p[0])),function(e,d,t,o){if(u){var n,a,i=t();if(!1===i)return!1;if(d){if(!s.contains(l,p[0])||e.index()!==p.data("dtr-row-idx"))return null;p.find("div.modal-body").empty().append(i)}else r&&r.header&&(a=(n=p.find("div.modal-header")).find("button").detach(),n.empty().append('<h4 class="modal-title">'+r.header(e)+"</h4>").append(a)),p.find("div.modal-body").empty().append(i),p.data("dtr-row-idx",e.index()).one("hidden.bs.modal",o).appendTo("body"),u.show();return!0}return f(e,d,t,o)}},d});
+23 -1
View File
@@ -35,6 +35,8 @@ $badge = [
$page_title = 'Eventos'; $page_title = 'Eventos';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?> ?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<div class="container"> <div class="container">
<div class="d-flex justify-content-between align-items-center mb-4"> <div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h3 mb-0">Eventos</h1> <h1 class="h3 mb-0">Eventos</h1>
@@ -46,7 +48,7 @@ include __DIR__ . '/../../../includes/header.php';
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="eventsTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th>Evento</th><th>Estado</th><th>Janela de publicação</th><th class="text-center">Leads</th><th style="width:160px">Ações</th> <th>Evento</th><th>Estado</th><th>Janela de publicação</th><th class="text-center">Leads</th><th style="width:160px">Ações</th>
</tr></thead> </tr></thead>
@@ -93,4 +95,24 @@ include __DIR__ . '/../../../includes/header.php';
</div> </div>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#eventsTable', { columnDefs: [{ targets: 4, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';
+23 -1
View File
@@ -38,6 +38,8 @@ if (isset($_GET['csv'])) {
$page_title = 'Galerias'; $page_title = 'Galerias';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?> ?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<div class="container"> <div class="container">
<div class="d-flex justify-content-between align-items-center mb-4"> <div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h3 mb-0">Galerias</h1> <h1 class="h3 mb-0">Galerias</h1>
@@ -57,7 +59,7 @@ include __DIR__ . '/../../../includes/header.php';
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="galeriasTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th>Nome</th><th style="width:120px">Ações</th> <th>Nome</th><th style="width:120px">Ações</th>
</tr></thead> </tr></thead>
@@ -79,4 +81,24 @@ include __DIR__ . '/../../../includes/header.php';
</div> </div>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#galeriasTable', { columnDefs: [{ targets: 1, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';
+23 -1
View File
@@ -30,6 +30,8 @@ $editing = admin_gym_id();
$page_title = 'Ginásios'; $page_title = 'Ginásios';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?> ?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<div class="container"> <div class="container">
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3"> <div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3">
<h1 class="h3 mb-0">Ginásios</h1> <h1 class="h3 mb-0">Ginásios</h1>
@@ -43,7 +45,7 @@ include __DIR__ . '/../../../includes/header.php';
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<form method="POST" class="mb-0"><?= csrf_field() ?> <form method="POST" class="mb-0"><?= csrf_field() ?>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="gymsTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th>Ginásio</th><th>Endereço</th><th>Estado</th><th>Secções</th><th style="width:150px">Ações</th> <th>Ginásio</th><th>Endereço</th><th>Estado</th><th>Secções</th><th style="width:150px">Ações</th>
</tr></thead> </tr></thead>
@@ -80,4 +82,24 @@ include __DIR__ . '/../../../includes/header.php';
</form> </form>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#gymsTable', { columnDefs: [{ targets: 4, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';
+25 -2
View File
@@ -25,7 +25,10 @@ if (isset($_GET['csv'])) {
$page_title = 'Horário de Aulas'; $page_title = 'Horário de Aulas';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<?php
$dias = ['segunda'=>'Segunda','terça'=>'Terça','quarta'=>'Quarta','quinta'=>'Quinta','sexta'=>'Sexta','sábado'=>'Sábado','domingo'=>'Domingo']; $dias = ['segunda'=>'Segunda','terça'=>'Terça','quarta'=>'Quarta','quinta'=>'Quinta','sexta'=>'Sexta','sábado'=>'Sábado','domingo'=>'Domingo'];
?> ?>
<div class="container"> <div class="container">
@@ -41,7 +44,7 @@ $dias = ['segunda'=>'Segunda','terça'=>'Terça','quarta'=>'Quarta','quinta'=>'Q
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="horarioTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th>Modalidade</th><th>Dia</th><th>Início</th><th>Fim</th><th>Sala</th><th style="width:120px">Ações</th> <th>Modalidade</th><th>Dia</th><th>Início</th><th>Fim</th><th>Sala</th><th style="width:120px">Ações</th>
</tr></thead> </tr></thead>
@@ -70,4 +73,24 @@ $dias = ['segunda'=>'Segunda','terça'=>'Terça','quarta'=>'Quarta','quinta'=>'Q
</div> </div>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#horarioTable', { columnDefs: [{ targets: 5, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';
+23 -1
View File
@@ -31,6 +31,8 @@ $new_leads = db_membership_leads_count_new($pdo);
$page_title = 'Mensalidades'; $page_title = 'Mensalidades';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?> ?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<div class="container"> <div class="container">
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-4"> <div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-4">
<h1 class="h3 mb-0">Mensalidades</h1> <h1 class="h3 mb-0">Mensalidades</h1>
@@ -46,7 +48,7 @@ include __DIR__ . '/../../../includes/header.php';
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<form method="POST" class="mb-0"><?= csrf_field() ?> <form method="POST" class="mb-0"><?= csrf_field() ?>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="membershipsTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th>Nome</th><th>Preço</th><th>Estado</th><th>Ordem</th><th style="width:120px">Ações</th> <th>Nome</th><th>Preço</th><th>Estado</th><th>Ordem</th><th style="width:120px">Ações</th>
</tr></thead> </tr></thead>
@@ -79,4 +81,24 @@ include __DIR__ . '/../../../includes/header.php';
</form> </form>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#membershipsTable', { columnDefs: [{ targets: 4, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';
+23 -1
View File
@@ -37,6 +37,8 @@ if (isset($_GET['csv'])) {
$page_title = 'Modalidades'; $page_title = 'Modalidades';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?> ?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<div class="container"> <div class="container">
<div class="d-flex justify-content-between align-items-center mb-4"> <div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h3 mb-0">Modalidades</h1> <h1 class="h3 mb-0">Modalidades</h1>
@@ -56,7 +58,7 @@ include __DIR__ . '/../../../includes/header.php';
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="modalidadesTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th>Ícone</th><th>Nome</th><th>Cor</th><th>Ordem</th><th style="width:120px">Ações</th> <th>Ícone</th><th>Nome</th><th>Cor</th><th>Ordem</th><th style="width:120px">Ações</th>
</tr></thead> </tr></thead>
@@ -85,4 +87,24 @@ include __DIR__ . '/../../../includes/header.php';
</div> </div>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#modalidadesTable', { columnDefs: [{ targets: 4, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';
+23 -1
View File
@@ -45,6 +45,8 @@ $requests = db_rgpd_requests_list($pdo);
$page_title = 'Pedidos RGPD'; $page_title = 'Pedidos RGPD';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?> ?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<div class="container"> <div class="container">
<div class="d-flex justify-content-between align-items-center mb-3"> <div class="d-flex justify-content-between align-items-center mb-3">
<h1 class="h3 mb-0">Pedidos RGPD</h1> <h1 class="h3 mb-0">Pedidos RGPD</h1>
@@ -53,7 +55,7 @@ include __DIR__ . '/../../../includes/header.php';
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="rgpdTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th>Data</th><th>E-mail</th><th>Pedido</th><th>Mensagem</th><th>Estado</th><th style="width:230px">Ações</th> <th>Data</th><th>E-mail</th><th>Pedido</th><th>Mensagem</th><th>Estado</th><th style="width:230px">Ações</th>
</tr></thead> </tr></thead>
@@ -84,4 +86,24 @@ include __DIR__ . '/../../../includes/header.php';
</div> </div>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#rgpdTable', { columnDefs: [{ targets: 5, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';
+23 -1
View File
@@ -35,6 +35,8 @@ if (isset($_GET['csv'])) {
$page_title = 'Equipa'; $page_title = 'Equipa';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?> ?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<div class="container"> <div class="container">
<div class="d-flex justify-content-between align-items-center mb-4"> <div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h3 mb-0">Equipa</h1> <h1 class="h3 mb-0">Equipa</h1>
@@ -54,7 +56,7 @@ include __DIR__ . '/../../../includes/header.php';
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="teamTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th style="width:60px">Foto</th><th>Nome</th><th>Área</th><th>Estado</th><th style="width:120px">Ações</th> <th style="width:60px">Foto</th><th>Nome</th><th>Área</th><th>Estado</th><th style="width:120px">Ações</th>
</tr></thead> </tr></thead>
@@ -84,4 +86,24 @@ include __DIR__ . '/../../../includes/header.php';
</div> </div>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#teamTable', { columnDefs: [{ targets: 4, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';
+23 -1
View File
@@ -41,6 +41,8 @@ if (isset($_GET['csv'])) {
$page_title = 'Lixeira'; $page_title = 'Lixeira';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?> ?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<div class="container"> <div class="container">
<div class="d-flex justify-content-between align-items-center mb-2"> <div class="d-flex justify-content-between align-items-center mb-2">
<h1 class="h3 mb-0">Lixeira</h1> <h1 class="h3 mb-0">Lixeira</h1>
@@ -56,7 +58,7 @@ include __DIR__ . '/../../../includes/header.php';
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="trashTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th>Tipo</th><th>Registo</th><th>Apagado em</th><th>Por</th><th class="text-end">Ações</th> <th>Tipo</th><th>Registo</th><th>Apagado em</th><th>Por</th><th class="text-end">Ações</th>
</tr></thead> </tr></thead>
@@ -100,4 +102,24 @@ include __DIR__ . '/../../../includes/header.php';
</div> </div>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#trashTable', { columnDefs: [{ targets: 4, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';
+25 -2
View File
@@ -25,7 +25,10 @@ if (isset($_GET['csv'])) {
$page_title = 'Horário de Funcionamento'; $page_title = 'Horário de Funcionamento';
include __DIR__ . '/../../../includes/header.php'; include __DIR__ . '/../../../includes/header.php';
?>
<?= link_tag('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.css') ?>
<?= link_tag('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.css') ?>
<?php
$dias = ['segunda'=>'Segunda','terça'=>'Terça','quarta'=>'Quarta','quinta'=>'Quinta','sexta'=>'Sexta','sabado'=>'Sábado','domingo'=>'Domingo','feriados'=>'Feriados']; $dias = ['segunda'=>'Segunda','terça'=>'Terça','quarta'=>'Quarta','quinta'=>'Quinta','sexta'=>'Sexta','sabado'=>'Sábado','domingo'=>'Domingo','feriados'=>'Feriados'];
?> ?>
<div class="container"> <div class="container">
@@ -39,7 +42,7 @@ $dias = ['segunda'=>'Segunda','terça'=>'Terça','quarta'=>'Quarta','quinta'=>'Q
<div class="card shadow-sm"><div class="card-body p-0"> <div class="card shadow-sm"><div class="card-body p-0">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover align-middle mb-0"> <table class="table table-hover align-middle mb-0" id="workHoursTable">
<thead class="table-light"><tr> <thead class="table-light"><tr>
<th>Dia</th><th>Abertura</th><th>Fecho</th><th style="width:120px">Ações</th> <th>Dia</th><th>Abertura</th><th>Fecho</th><th style="width:120px">Ações</th>
</tr></thead> </tr></thead>
@@ -63,4 +66,24 @@ $dias = ['segunda'=>'Segunda','terça'=>'Terça','quarta'=>'Quarta','quinta'=>'Q
</div> </div>
</div></div> </div></div>
</div> </div>
<script>
window.DT_SRC = [
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/dataTables.responsive.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/vendor/datatables-2.3.4/responsive.bootstrap5.min.js')) ?>,
<?= json_encode(_asset_versioned('assets/js/datatables-init.js')) ?>
];
document.addEventListener('DOMContentLoaded', function () {
(function next(i) {
if (i >= window.DT_SRC.length) {
return initDataTable('#workHoursTable', { columnDefs: [{ targets: 3, orderable: false, searchable: false }] });
}
var s = document.createElement('script');
s.src = window.DT_SRC[i];
s.onload = function () { next(i + 1); };
document.body.appendChild(s);
})(0);
});
</script>
<?php include __DIR__ . '/../../../includes/footer.php'; <?php include __DIR__ . '/../../../includes/footer.php';