From 52883f6f5d58dbe4adc9f47e0fdc969c62efb392 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 30 Jan 2018 17:14:07 +0100 Subject: UI: adapt shortcut menu --- ishtar_common/templates/base.html | 6 +- .../ishtar/blocks/advanced_shortcut_menu.html | 93 ++++++++++++---------- .../ishtar/blocks/base_shortcut_menu.html | 46 +++++++++++ .../templates/ishtar/blocks/shortcut_menu.html | 84 ++++++++++--------- ishtar_common/templates/navbar.html | 2 +- 5 files changed, 139 insertions(+), 92 deletions(-) create mode 100644 ishtar_common/templates/ishtar/blocks/base_shortcut_menu.html (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index c9dfde974..b2f0b055c 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -56,9 +56,9 @@ {% include "navbar.html" %} - {% if not reminders %} - {% else %} -
{% trans "Current items" %}
+ + {% if reminders %} +
{% trans "Current items" %}
{% for lbl, value in reminders %}

{{lbl}}{% trans ":"%} {{value}}

{% endfor %} diff --git a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html index cd7bf88f8..953b0ef40 100644 --- a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html @@ -1,49 +1,54 @@ +{% extends "ishtar/blocks/base_shortcut_menu.html" %} {% load i18n %} -{% if menu %} -
-
- - - - - - - - +{% block short_content %}
- - + +
-
-

-

- - -

-

- -

+
+ + + {% comment %} +

+ +

+ {% endcomment %}
- -{% for lbl, model_name, current, widget in menu %} - - - {% with 'show-'|add:model_name as model_url%} - - - {% endwith %} - -{% endfor %} -
- {{widget|safe}} - - -
-
-
- -{% endif %} +{% endblock %} diff --git a/ishtar_common/templates/ishtar/blocks/base_shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/base_shortcut_menu.html new file mode 100644 index 000000000..95e030b85 --- /dev/null +++ b/ishtar_common/templates/ishtar/blocks/base_shortcut_menu.html @@ -0,0 +1,46 @@ +{% load i18n %} +{% if current_menu or menu %} +{% comment %} + +{% endcomment %} + + + + +{% endif %} diff --git a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html index 5a811ddf0..10113aa59 100644 --- a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html @@ -1,47 +1,43 @@ +{% extends "ishtar/blocks/base_shortcut_menu.html" %} {% load i18n %} -{% if current_menu %} - - -{% endif %} +{% endblock %} + +{% block short_extrajs %} +var advanced_menu = false; +{% endblock %} diff --git a/ishtar_common/templates/navbar.html b/ishtar_common/templates/navbar.html index 0f6036a6c..a5c135a59 100644 --- a/ishtar_common/templates/navbar.html +++ b/ishtar_common/templates/navbar.html @@ -9,7 +9,7 @@