fix: use Layout::open/close in aiLogs() — page() does not exist
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
9852a749e6
commit
54d778783e
@@ -5769,7 +5769,9 @@ HTML;
|
||||
$pager .= "<a href=\"{$url}\"{$active} class=\"btn-sm\">{$i}</a> ";
|
||||
}
|
||||
|
||||
echo Layout::page('IA Logs', 'ai-logs', '
|
||||
$user = SessionAuth::user();
|
||||
echo Layout::open('IA Logs', 'ai-logs', $user['name'] ?? 'Admin');
|
||||
?>
|
||||
<style>
|
||||
.filter-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
|
||||
.filter-bar select{padding:5px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:13px}
|
||||
@@ -5781,11 +5783,11 @@ HTML;
|
||||
</style>
|
||||
<div class="card" style="padding:20px">
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px">
|
||||
<h2 style="margin:0">🤖 IA Logs <span style="font-size:14px;color:#9ca3af;font-weight:400">(' . number_format($total) . ' registros)</span></h2>
|
||||
<h2 style="margin:0">🤖 IA Logs <span style="font-size:14px;color:#9ca3af;font-weight:400">(<?= number_format($total) ?> registros)</span></h2>
|
||||
</div>
|
||||
<form class="filter-bar" method="get">
|
||||
<select name="provider" onchange="this.form.submit()">' . $providerOptions . '</select>
|
||||
<select name="company" onchange="this.form.submit()">' . $companyOptions . '</select>
|
||||
<select name="provider" onchange="this.form.submit()"><?= $providerOptions ?></select>
|
||||
<select name="company" onchange="this.form.submit()"><?= $companyOptions ?></select>
|
||||
</form>
|
||||
<div style="overflow-x:auto">
|
||||
<table class="log-table">
|
||||
@@ -5793,11 +5795,12 @@ HTML;
|
||||
<th>Fecha</th><th>Empresa</th><th>Teléfono</th><th>Proveedor</th><th>Modelo</th>
|
||||
<th>Tipo</th><th>Entrada</th><th>Salida</th><th>Tokens</th><th>Duración</th>
|
||||
</tr></thead>
|
||||
<tbody>' . ($rows_html ?: '<tr><td colspan="10" style="text-align:center;color:#9ca3af;padding:30px">Sin registros</td></tr>') . '</tbody>
|
||||
<tbody><?= $rows_html ?: '<tr><td colspan="10" style="text-align:center;color:#9ca3af;padding:30px">Sin registros</td></tr>' ?></tbody>
|
||||
</table>
|
||||
</div>
|
||||
' . ($pages > 1 ? '<div style="margin-top:12px">' . $pager . '</div>' : '') . '
|
||||
<?php if ($pages > 1): ?><div style="margin-top:12px"><?= $pager ?></div><?php endif; ?>
|
||||
</div>
|
||||
');
|
||||
<?php
|
||||
echo Layout::close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user