mirror of
https://github.com/unraid/webgui.git
synced 2026-01-14 13:39:58 -06:00
52 lines
1.4 KiB
Plaintext
52 lines
1.4 KiB
Plaintext
Menu="WebGui"
|
|
Title="Page Map"
|
|
---
|
|
<?PHP
|
|
/* Copyright 2015, Lime Technology
|
|
* Copyright 2015, Bergware International.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
?>
|
|
<?if ($display['resize']):?>
|
|
<script>
|
|
function resize() {
|
|
$('div.up').height(Math.max(window.innerHeight-280,370)).show();
|
|
}
|
|
$(function() {
|
|
resize();
|
|
$(window).bind('resize',function(){resize();});
|
|
});
|
|
</script>
|
|
<?endif;?>
|
|
<?
|
|
function show_map($menu, $level) {
|
|
$pages = find_pages( $menu);
|
|
if (empty($pages))
|
|
return;
|
|
echo "<ul>";
|
|
foreach ($pages as $page) {
|
|
$link="<a href='/{$page['name']}'>{$page['name']}</a>";
|
|
if ($page['Type'] == "menu") {
|
|
echo "{$level} ({$link}) - {$page['Title']}<br>";
|
|
} else if ($page['Type'] == "xmenu") {
|
|
echo "{$level} [{$link}] - {$page['Title']}<br>";
|
|
} else {
|
|
echo "{$level} {$link} - {$page['Title']}<br>";
|
|
}
|
|
show_map($page['name'], $level+1);
|
|
}
|
|
echo "</ul>";
|
|
}
|
|
echo $display['resize'] ? "<div class='up' style='display:none'>" : "<div class='up'>";
|
|
show_map("Tasks", 1);
|
|
show_map("Buttons", 1);
|
|
echo "</div>";
|
|
?>
|
|
<input type="button" value="Done" onclick="done()">
|