- Portal bilingüe (Bootstrap), biblioteca FRM, consulta y perfiles con QR. - Integración REST penasquito.wotbi.com (Token, búsqueda por passport y polling). - Webhook de sincronización, esquema MariaDB y semillas FRM/NOM. - Documentación en docs/ y extracto DatosPdf.txt; ejemplo de config sin secretos locales. Co-authored-by: Cursor <cursoragent@cursor.com>
57 lines
2.3 KiB
PHP
57 lines
2.3 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use CertiMine\I18n;
|
|
use CertiMine\Util;
|
|
|
|
/** @var list<array<string,mixed>> $frms */
|
|
/** @var list<array<string,mixed>> $docs */
|
|
|
|
require __DIR__ . '/partials/header.php';
|
|
$isEs = I18n::lang() === 'es';
|
|
?>
|
|
<h1 class="h3 mb-3"><?= Util::h(I18n::t('frm_title')) ?></h1>
|
|
<p class="text-muted"><?= Util::h(I18n::t('frm_intro')) ?></p>
|
|
|
|
<?php if ($docs !== []): ?>
|
|
<h2 class="h5 mt-4"><?= $isEs ? 'Enlaces públicos' : 'Public links' ?></h2>
|
|
<ul class="list-group mb-4">
|
|
<?php foreach ($docs as $d): ?>
|
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
<span><?= Util::h($isEs ? (string) $d['title_es'] : (string) $d['title_en']) ?></span>
|
|
<a class="btn btn-sm btn-outline-primary" target="_blank" rel="noopener" href="<?= Util::h((string) $d['url']) ?>">URL</a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php endif; ?>
|
|
|
|
<div class="accordion" id="frmAcc">
|
|
<?php foreach ($frms as $i => $f): ?>
|
|
<?php
|
|
$name = $isEs ? (string) $f['name_es'] : (string) $f['name_en'];
|
|
$desc = $isEs ? (string) ($f['description_es'] ?? '') : (string) ($f['description_en'] ?? '');
|
|
?>
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header" id="h<?= (int) $i ?>">
|
|
<button class="accordion-button<?= $i ? ' collapsed' : '' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#c<?= (int) $i ?>">
|
|
<?= Util::h((string) $f['code']) ?> — <?= Util::h($name) ?>
|
|
</button>
|
|
</h2>
|
|
<div id="c<?= (int) $i ?>" class="accordion-collapse collapse<?= $i === 0 ? ' show' : '' ?>" data-bs-parent="#frmAcc">
|
|
<div class="accordion-body">
|
|
<?php if ($desc !== ''): ?><p><?= Util::h($desc) ?></p><?php endif; ?>
|
|
<?php if (!empty($f['noms']) && is_array($f['noms'])): ?>
|
|
<p class="fw-semibold mb-1"><?= Util::h(I18n::t('frm_nom_related')) ?></p>
|
|
<ul class="mb-0">
|
|
<?php foreach ($f['noms'] as $n): ?>
|
|
<li><strong><?= Util::h((string) $n['code']) ?></strong> — <?= Util::h($isEs ? (string) $n['name_es'] : (string) $n['name_en']) ?></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
|
|
<?php require __DIR__ . '/partials/footer.php'; ?>
|