refactor: extract global elements from DefaultPageLayout.php into MiscElements.php for improved organization and maintainability

This commit is contained in:
Zack Spear
2025-04-08 10:07:13 -07:00
parent 469b499db1
commit 293e1e1e12
2 changed files with 28 additions and 10 deletions

View File

@@ -157,13 +157,9 @@ if (isset($myPage['Load'])) {
</head>
<body>
<div id="displaybox">
<div class="upgrade_notice" style="display:none"></div>
<? include "$docroot/webGui/include/DefaultPageLayout/Header.php"; ?>
<a href="#" class="move_to_end" title="<?=_('Move To End')?>"><i class="fa fa-arrow-circle-down"></i></a>
<a href="#" class="back_to_top" title="<?=_('Back To Top')?>"><i class="fa fa-arrow-circle-up"></i></a>
<? include "$docroot/webGui/include/DefaultPageLayout/Navigation/Main.php"; ?>
<?
@@ -227,11 +223,9 @@ foreach ($pages as $page) {
unset($pages,$page,$pgs,$pg,$icon,$nchan,$running,$start,$stop,$row,$script,$opt,$nchan_run);
?>
</div></div>
<div class="spinner fixed"></div>
<form name="rebootNow" method="POST" action="/webGui/include/Boot.php"><input type="hidden" name="cmd" value="reboot"></form>
<iframe id="progressFrame" name="progressFrame" frameborder="0"></iframe>
<? require_once "$docroot/webGui/include/DefaultPageLayout/Footer.php"; ?>
<? require_once "$docroot/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php"; ?>
<? require_once "$docroot/webGui/include/DefaultPageLayout/Footer.php"; ?>
<? require_once "$docroot/plugins/dynamix/include/DefaultPageLayout/MiscElements.php"; ?>
<? require_once "$docroot/plugins/dynamix/include/DefaultPageLayout/BodyInlineJS.php"; ?>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<?
/**
* Global elements are elements that are used on all pages.
* Describe the purpose of each element here.
*
* - upgrade_notice: Display a notice to the user that they need to upgrade their browser.
* - move_to_end: Move to the end of the page.
* - back_to_top: Move to the top of the page.
* - spinner: Display the Unraid loader icon.
* - rebootNow: Global form to POST to /webGui/include/Boot.php?cmd=reboot to trigger a system reboot.
* - progressFrame: Display a frame to show the progress of the reboot.
*/
?>
<div class="upgrade_notice" style="display:none"></div>
<a href="#" class="move_to_end" title="<?=_('Move To End')?>"><i class="fa fa-arrow-circle-down"></i></a>
<a href="#" class="back_to_top" title="<?=_('Back To Top')?>"><i class="fa fa-arrow-circle-up"></i></a>
<div class="spinner fixed"></div>
<form name="rebootNow" method="POST" action="/webGui/include/Boot.php"><input type="hidden" name="cmd" value="reboot"></form>
<iframe id="progressFrame" name="progressFrame" frameborder="0"></iframe>