99 lines
3.5 KiB
PHP
Executable File
99 lines
3.5 KiB
PHP
Executable File
<?php
|
|
/* Smarty version 5.3.1, created on 2025-02-02 11:45:13
|
|
from 'file:datatable.tpl' */
|
|
|
|
/* @var \Smarty\Template $_smarty_tpl */
|
|
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
|
'version' => '5.3.1',
|
|
'unifunc' => 'content_679eea49aae357_62952311',
|
|
'has_nocache_code' => false,
|
|
'file_dependency' =>
|
|
array (
|
|
'2fd295002a8427cd349142bc43e26ff0f3bfe9ab' =>
|
|
array (
|
|
0 => 'datatable.tpl',
|
|
1 => 1712762115,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'includes' =>
|
|
array (
|
|
),
|
|
))) {
|
|
function content_679eea49aae357_62952311 (\Smarty\Template $_smarty_tpl) {
|
|
$_smarty_current_dir = '/www/wwwroot/fuuu.cloud/resources/views/tabler';
|
|
?><link href="//cdn.datatables.net/v/bs5/dt-2.0.3/datatables.min.css" rel="stylesheet"/>
|
|
<?php echo '<script'; ?>
|
|
src="//cdn.datatables.net/v/bs5/dt-2.0.3/datatables.min.js"><?php echo '</script'; ?>
|
|
>
|
|
|
|
<?php echo '<script'; ?>
|
|
>
|
|
let tableConfig = {
|
|
autoWidth: false,
|
|
iDisplayLength: 10,
|
|
scrollX: true,
|
|
columns: [
|
|
<?php
|
|
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('details')['field'], 'value', false, 'key');
|
|
$foreach4DoElse = true;
|
|
foreach ($_from ?? [] as $_smarty_tpl->getVariable('key')->value => $_smarty_tpl->getVariable('value')->value) {
|
|
$foreach4DoElse = false;
|
|
?>
|
|
{
|
|
data: '<?php echo $_smarty_tpl->getValue('key');?>
|
|
'
|
|
},
|
|
<?php
|
|
}
|
|
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
|
|
],
|
|
initComplete: function () {
|
|
let tableHeader = $('div.dt-length').parent().parent()
|
|
let tableBody = $('div.dt-scroll').parent().parent()
|
|
let tableFooter = $('div.dt-info').parent().parent()
|
|
let length = $('div.dt-length').parent()
|
|
let search = $('div.dt-search').parent()
|
|
let info = $('div.dt-info').parent()
|
|
let paging = $('div.dt-paging').parent()
|
|
|
|
tableHeader.removeClass('mt-2').addClass('row px-3 py-3')
|
|
tableBody.removeClass('mt-2')
|
|
tableFooter.removeClass('mt-2').addClass('row card-footer')
|
|
length.removeClass('col-md-auto me-auto').addClass('col-auto')
|
|
search.removeClass('col-md-auto me-auto ms-auto').addClass('col-auto')
|
|
info.removeClass('col-md-auto me-auto').addClass('col')
|
|
paging.removeClass('col-md-auto me-auto ms-auto').addClass('col-auto')
|
|
|
|
$('div.dt-scroll-body').css('border-bottom-style', 'none')
|
|
},
|
|
language: {
|
|
"sProcessing": "处理中...",
|
|
"sLengthMenu": "显示 _MENU_ 条",
|
|
"sZeroRecords": "没有匹配结果",
|
|
"sInfo": "第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
|
|
"sInfoEmpty": "第 0 至 0 项结果,共 0 项",
|
|
"sInfoFiltered": "(在 _MAX_ 项中查找)",
|
|
"sInfoPostFix": "",
|
|
"sSearch": "<i class=\"ti ti-search\"></i> ",
|
|
"sUrl": "",
|
|
"sEmptyTable": "表中数据为空",
|
|
"sLoadingRecords": "载入中...",
|
|
"sInfoThousands": ",",
|
|
"oPaginate": {
|
|
"sFirst": "首页",
|
|
"sPrevious": "<i class=\"ti ti-arrow-left\"></i>",
|
|
"sNext": "<i class=\"ti ti-arrow-right\"></i>",
|
|
"sLast": "末页"
|
|
},
|
|
"oAria": {
|
|
"sSortAscending": ": 以升序排列此列",
|
|
"sSortDescending": ": 以降序排列此列"
|
|
}
|
|
}
|
|
};
|
|
<?php echo '</script'; ?>
|
|
>
|
|
<?php }
|
|
}
|