diff --git a/admin/pages/menus.php b/admin/pages/menus.php index 358ccc64..a4ddb1ad 100644 --- a/admin/pages/menus.php +++ b/admin/pages/menus.php @@ -108,44 +108,18 @@ if (isset($_POST['template'])) { $title = 'Menus - ' . $template; - $canChangeColor = isset($config['menu_default_color']); + $canResetColors = isset($config['menu_default_color']); foreach ($config['menu_categories'] as $id => $options) { if (isset($options['default_links_color'])) { - $canChangeColor = true; + $canResetColors = true; } } + + $twig->display('admin.menus.header.html.twig', [ + 'template' => $template, + 'canResetColors' => $canResetColors + ]); ?> -
-

You are editing:

- Hint: You can drag menu items.
- Hint: Add links to external sites using: http:// or https:// prefix.
- Not all templates support blank and colorful links. -

-
-
-
-
- -
- - - -
-
- - -
- - - -
-
- -
-
-
-
-
select('name', 'link', 'blank', 'color', 'category', 'ordering') diff --git a/system/templates/admin.menus.header.html.twig b/system/templates/admin.menus.header.html.twig new file mode 100644 index 00000000..97038840 --- /dev/null +++ b/system/templates/admin.menus.header.html.twig @@ -0,0 +1,31 @@ +
+

You are editing: {{ template }}

+ Hint: You can drag menu items.
+ Hint: Add links to external sites using: http:// or https:// prefix.
+ Not all templates support blank and colorful links. +

+
+
+
+
+ {% if config('menus') is not null %} +
+ {{ csrf() }} + + +
+
+ {% endif %} + {% if canResetColors %} +
+ {{ csrf() }} + + +
+
+ {% endif %} +
+
+
+
+