diff --git a/css/admin.css b/css/admin.css index ea60c8f..03793b0 100644 --- a/css/admin.css +++ b/css/admin.css @@ -41,4 +41,13 @@ border-radius: 3px; } +.side-menu-display { + padding: 10px; + border: 2px solid transparent; + max-width: 100%; + cursor: pointer; +} +.side-menu-display.is-active { + border: 2px solid #91cb7f; +} diff --git a/img/admin/layout-always-displayed.svg b/img/admin/layout-always-displayed.svg new file mode 100644 index 0000000..b4f9140 --- /dev/null +++ b/img/admin/layout-always-displayed.svg @@ -0,0 +1,347 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/admin/layout-big-menu.svg b/img/admin/layout-big-menu.svg new file mode 100644 index 0000000..85e540b --- /dev/null +++ b/img/admin/layout-big-menu.svg @@ -0,0 +1,307 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/admin/layout-default.svg b/img/admin/layout-default.svg new file mode 100644 index 0000000..d4b11d6 --- /dev/null +++ b/img/admin/layout-default.svg @@ -0,0 +1,283 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/admin.js b/src/admin.js index a82da02..ca87be0 100644 --- a/src/admin.js +++ b/src/admin.js @@ -90,4 +90,12 @@ $(document).ready(() => { saveSettings(0) }); + + $('.side-menu-display').on('click', (event) => { + $('.side-menu-display').removeClass('is-active') + $(event.target).addClass('is-active') + + $('#side-menu-always-displayed').val($(event.target).attr('data-alwaysdiplayed')) + $('#side-menu-big-menu').val($(event.target).attr('data-bigmenu')) + }) }); diff --git a/src/l10n/fixtures/de.yaml b/src/l10n/fixtures/de.yaml index f1fb2b5..25fade4 100644 --- a/src/l10n/fixtures/de.yaml +++ b/src/l10n/fixtures/de.yaml @@ -40,7 +40,7 @@ "Panel": "Panel" "Open the menu when the mouse is hover the opener (automatically disabled on touch screens)": "Öffnen Sie das Menü, wenn Sie die Maus über den Öffner bewegen (auf Touchscreens automatisch deaktiviert)." "Display the big menu": "Großes Menü anzeigen" -"The big menu is not compatible with AppOrder.": "Le menu large n'est pas compatible avec l'application AppOrder" +"The big menu is not compatible with AppOrder.": "Das große Menü ist nicht mit AppOrder kompatibel." "Display the logo": "Logo anzeigen" "This feature is not compatible with the big menu display.": "Diese Funktion ist nicht mit der großen Menüanzeige kompatibel." "Icons and texts": "Symbole und Texte" @@ -50,3 +50,4 @@ "The logo will be hidden when the menu is always displayed.": "Das Logo wird ausgeblendet, wenn das Menü immer angezeigt wird." "This is the automatic behavior when the menu is always displayed.": "Dies ist das automatische Verhalten, wenn das Menü immer angezeigt wird." "Not compatible with touch screens.": "Nicht kompatibel mit Touchscreens." +"Big menu": "Große Speisekarte" diff --git a/src/l10n/fixtures/fr.yaml b/src/l10n/fixtures/fr.yaml index 285b294..21bbcfa 100644 --- a/src/l10n/fixtures/fr.yaml +++ b/src/l10n/fixtures/fr.yaml @@ -50,3 +50,4 @@ "The logo will be hidden when the menu is always displayed.": "Le logo sera masque si le menu est toujours affiché." "This is the automatic behavior when the menu is always displayed.": "C'est le comportement automatique lorsque le menu est toujours affiché." "Not compatible with touch screens.": "Incompatible avec les écrans tactiles." +"Big menu": "Menu large" diff --git a/templates/settings/admin-form.php b/templates/settings/admin-form.php index e26d233..d69d698 100644 --- a/templates/settings/admin-form.php +++ b/templates/settings/admin-form.php @@ -239,6 +239,68 @@ $choicesSizes = [ t('Panel')); ?> +
+ +
+ + !$_['always-displayed'] && !$_['big-menu'], + 'always-displayed' => $_['always-displayed'] && !$_['big-menu'], + 'big-menu' => $_['big-menu'], + ]; + ?> + +

+ <?php p($l->t('Default')); ?> +

+ +
+ +
+ +

t('The big menu is not compatible with AppOrder.')); ?>

+ +

+ <?php p($l->t('Big menu')); ?> +

+ +
+ +
+ +
+ +

t('Not compatible with touch screens.')); ?>

+ +

+ <?php p($l->t('Always displayed')); ?> +

+ + + + +
+
-
- -
- -

t('This feature is not compatible with the big menu display.'); ?>

-

t('Not compatible with touch screens.')); ?>

- -
- -
- -
- -
- -

t('The big menu is not compatible with AppOrder.')); ?>

- -
- -
-