summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-23 15:56:56 +0200
committerSimon Rettberg2020-10-23 15:56:56 +0200
commit09ad25e241134aafb4b384f39bc2a848f0c28332 (patch)
tree7b7f0a5f257fe37ce95cddd580d3485b66916bef
parent[dozmod] expiredimages: Link to user's actionlog instead of sending mail (diff)
downloadslx-admin-09ad25e241134aafb4b384f39bc2a848f0c28332.tar.gz
slx-admin-09ad25e241134aafb4b384f39bc2a848f0c28332.tar.xz
slx-admin-09ad25e241134aafb4b384f39bc2a848f0c28332.zip
[serversetup-bwlp-ipxe] Add "Edit" link for bootentries in menu editor
Add link to the popup where you select a boot entry for a menu entry in a menu.
-rw-r--r--modules-available/serversetup-bwlp-ipxe/page.inc.php2
-rw-r--r--modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html8
2 files changed, 8 insertions, 2 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/page.inc.php b/modules-available/serversetup-bwlp-ipxe/page.inc.php
index 2f644412..cbfbc5f1 100644
--- a/modules-available/serversetup-bwlp-ipxe/page.inc.php
+++ b/modules-available/serversetup-bwlp-ipxe/page.inc.php
@@ -420,7 +420,7 @@ class Page_ServerSetup extends Page
$menu['entrylist'] = array_merge(
Database::queryAll("SELECT entryid, title, hotkey, module, data FROM serversetup_bootentry ORDER BY title ASC"),
// Add all menus, so we can link
- Database::queryAll("SELECT Concat('menu:', menuid) AS entryid, title FROM serversetup_menu ORDER BY title ASC")
+ Database::queryAll("SELECT Concat('menu:', menuid) AS entryid, title, 1 AS no_edit FROM serversetup_menu ORDER BY title ASC")
);
foreach ($menu['entrylist'] as &$bootentry) {
if (!isset($bootentry['data']) || !isset($bootentry['module']))
diff --git a/modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html b/modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html
index d637f0d1..b79e6bb3 100644
--- a/modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html
+++ b/modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html
@@ -84,7 +84,8 @@
</td>
<td>
- <select class="form-control key-list no-spacer" {{^entryid}}style="display: none;"{{/entryid}} name="entry[{{menuentryid}}][hotkey]" {{readonly}} data-default="{{hotkey}}">
+ <select class="form-control key-list no-spacer" {{^entryid}}style="display: none;"{{/entryid}}
+ name="entry[{{menuentryid}}][hotkey]" {{readonly}} data-default="{{hotkey}}">
</select>
</td>
@@ -206,6 +207,11 @@
{{/otherFields}}
</table>
{{/ishook}}
+ {{^no_edit}}
+ <div class="text-right">
+ <a href="?do=serversetup&amp;show=editbootentry&amp;id={{entryid}}">{{lang_edit}}</a>
+ </div>
+ {{/no_edit}}
</div>
{{/entrylist}}
</div>