Files
pomysloweprezenty.pl/admin/templates/pages/subpages-browse-list.php
Jacek Pyziak 3ecbe628dc Add view classes for articles, banners, languages, menu, newsletter, containers, shop categories, clients, payment methods, products, and search
- Created Articles.php for rendering article views including full articles, miniature lists, and news sections.
- Added Banners.php for handling banner displays.
- Introduced Languages.php for rendering language options.
- Implemented Menu.php for dynamic menu rendering.
- Developed Newsletter.php for newsletter view rendering.
- Created Scontainers.php for rendering specific containers.
- Added ShopCategory.php for category descriptions and product listings.
- Introduced ShopClient.php for managing client-related views such as address editing and order history.
- Implemented ShopPaymentMethod.php for displaying payment methods in the basket.
- Created ShopProduct.php for generating product URLs.
- Added ShopSearch.php for rendering a simple search form.
- Added .htaccess file to enhance security by restricting access to sensitive files and directories.
2026-02-21 23:00:15 +01:00

61 lines
2.4 KiB
PHP

<?php
$pages = is_array($this->pages ?? null) ? $this->pages : [];
$step = (int)($this->step ?? 1);
if (empty($pages)) {
return;
}
?>
<ol>
<?php foreach ($pages as $page): ?>
<?php
$pageId = (int)($page['id'] ?? 0);
$menuId = (int)($page['menu_id'] ?? 0);
$title = (string)($page['title'] ?? '');
$status = (int)($page['status'] ?? 0);
$start = (int)($page['start'] ?? 0);
$languages = is_array($page['languages'] ?? null) ? $page['languages'] : [];
$previewUrls = is_array($page['preview_urls'] ?? null) ? $page['preview_urls'] : [];
?>
<li id="list_<?= $pageId; ?>" class="list_<?= $pageId; ?>" menu="<?= $menuId; ?>">
<div class="content">
<span class="disclose"><span></span></span>
<?php if ($status !== 1): ?><i class="fa fa-ban fa-lg text-danger" title="Strona nieaktywna"></i><?php endif; ?>
<?php if ($start === 1): ?><i class="fa fa-star fa-lg text-system" title="Strona startowa"></i><?php endif; ?>
<?= htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); ?>
<?php if (!empty($languages)): ?>
<div class="btn-group flags" style="display: inline-block;">
<?php foreach ($languages as $language): ?>
<?php $langId = (string)($language['lang_id'] ?? ''); ?>
<?php if ($langId !== ''): ?>
<img src="/admin/layout/lang-<?= htmlspecialchars($langId, ENT_QUOTES, 'UTF-8'); ?>.jpg" />
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php foreach ($languages as $language): ?>
<?php
$langId = (string)($language['lang_id'] ?? '');
if ($langId === '') {
continue;
}
$url = (string)($previewUrls[$langId] ?? '#');
?>
<div class="btn-group ml20 pull-right">
<a href="#" title="Wybierz stronę" class="btn btn-sm btn-system button url-select" url="<?= htmlspecialchars($url, ENT_QUOTES, 'UTF-8'); ?>">
<i class="fa fa-check"></i> <span class="hidden-xs"><?= strtoupper(htmlspecialchars($langId, ENT_QUOTES, 'UTF-8')); ?></span>
</a>
</div>
<?php endforeach; ?>
</div>
<?= \Shared\Tpl\Tpl::view('pages/subpages-browse-list', [
'pages' => $page['subpages'] ?? [],
'step' => $step + 1,
]); ?>
</li>
<?php endforeach; ?>
</ol>