mirror of
https://github.com/unraid/webgui.git
synced 2026-05-09 05:41:17 -05:00
ad9f54618c
- Added `generatePanel` and `generatePanels` functions to encapsulate panel creation logic for menu items. - Updated `MainContentNotab.php` and `MainContentTabbed.php` to utilize the new functions, improving code reusability and readability. - Introduced `generateContent` function to handle content generation based on Markdown flag.
25 lines
740 B
PHP
25 lines
740 B
PHP
<?php
|
|
/**
|
|
* Non-tabbed content template for the Unraid web interface.
|
|
* Renders all pages in sequence without tabs, using original per-page logic.
|
|
*/
|
|
?>
|
|
<div id="displaybox">
|
|
<div class="content">
|
|
<? foreach ($pages as $page): ?>
|
|
<? annotate($page['file']); ?>
|
|
<? includePageStylesheets($page); ?>
|
|
|
|
<? if (isset($page['Title'])): ?>
|
|
<div class="title">
|
|
<?= tab_title($page['Title'], $page['root'], _var($page, 'Tag', false)) ?>
|
|
</div>
|
|
<? endif; ?>
|
|
|
|
<?= generatePanels($page, $path, $defaultIcon, $docroot, true) ?>
|
|
|
|
<? eval('?>'.generateContent($page)); ?>
|
|
<? endforeach; ?>
|
|
</div>
|
|
</div>
|