From 2b9489fb49b8a66e16ece5470cacb9ae314556c3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 28 Feb 2017 19:39:41 +0100 Subject: UI: explicitly remind the current pinned search above the result table (refs #3485) --- ishtar_common/templates/blocks/JQueryJqGrid.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/blocks/JQueryJqGrid.html b/ishtar_common/templates/blocks/JQueryJqGrid.html index 607f81f7d..258082877 100644 --- a/ishtar_common/templates/blocks/JQueryJqGrid.html +++ b/ishtar_common/templates/blocks/JQueryJqGrid.html @@ -8,6 +8,12 @@

{% trans "Search and select an item" %}

+
+   + {% trans "Pinned search:" %} + +
+
@@ -97,6 +103,19 @@ jQuery(document).ready(function(){ jsonReader : {repeatitems: false}, loadError: function (jqXHR, textStatus, errorThrown) { alert("{% trans "An error as occured during search. Check your query fields." %}"); + }, + beforeProcessing: function(data, status, xhr){ + $('#pinned_search_content_{{name}}').html(''); + for (idx in data){ + if (idx == 'pinned-search' && data[idx] != ''){ + $('#pinned_search_content_{{name}}').html(data[idx]); + } + } + if ($('#pinned_search_content_{{name}}').html()){ + $('#pinned_search_{{name}}').show(); + } else { + $('#pinned_search_{{name}}').hide(); + } } }); {% if multiple %} -- cgit v1.2.3 From 86bedd965dccb04698cf88474c7de6a7406a6322 Mon Sep 17 00:00:00 2001 From: Valérie-Emma Leroux Date: Fri, 3 Mar 2017 17:59:38 +0100 Subject: Update labels --- ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html | 2 +- ishtar_common/templates/ishtar/blocks/shortcut_menu.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html index 2cf80da06..1758bcf54 100644 --- a/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/advanced_shortcut_menu.html @@ -13,7 +13,7 @@
- +

diff --git a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html index 05aaed6d8..5973eba3f 100644 --- a/ishtar_common/templates/ishtar/blocks/shortcut_menu.html +++ b/ishtar_common/templates/ishtar/blocks/shortcut_menu.html @@ -13,7 +13,7 @@
- +
-- cgit v1.2.3 From 7e88bd5c33805259ffc3aacaeeb825f5279e29e3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 6 Mar 2017 10:58:00 +0100 Subject: "Validate and end" button is not displayed if the end panel is not available (refs #3353) --- ishtar_common/templates/ishtar/wizard/validation_bar.html | 8 +++++--- ishtar_common/wizards.py | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/ishtar/wizard/validation_bar.html b/ishtar_common/templates/ishtar/wizard/validation_bar.html index 09907af67..a1590858f 100644 --- a/ishtar_common/templates/ishtar/wizard/validation_bar.html +++ b/ishtar_common/templates/ishtar/wizard/validation_bar.html @@ -1,7 +1,9 @@ {% load i18n %} {% load url from future %}
- - {% if next_steps %}{% endif %} - {% trans "Cancel" %} + + {% if last_step_is_available and next_steps %} + + {% endif %} + {% trans "Cancel" %}
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 210ea749a..874b68eae 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -243,6 +243,7 @@ class Wizard(NamedUrlWizardView): current_step_passed, no_next = False, False # force rechecking of conditions self.get_form_list() + last_step_is_available = True while next_step: # check if the form is initialized otherwise initialize it if self.modification and not storage.get_step_data(next_step): @@ -297,8 +298,10 @@ class Wizard(NamedUrlWizardView): next_step = self.get_next_step(next_step) if no_next: + last_step_is_available = False break - context.update({'next_steps': next_steps}) + context.update({'next_steps': next_steps, + 'last_step_is_available': last_step_is_available}) # not last step: validation if current_step != self.steps.last: return context -- cgit v1.2.3