From dd7103d25ac7d6c78c8bd77d9238f0ec8dc31eb7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 18 Oct 2018 14:58:09 +0200 Subject: Manage QA on sheet - QA basket on find sheet --- ishtar_common/models.py | 5 ++-- ishtar_common/static/js/ishtar.js | 7 ++++++ .../templates/ishtar/blocks/window_nav.html | 29 +++++++++++++++------- 3 files changed, 30 insertions(+), 11 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index f7fac53e7..a1bae96c2 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1372,7 +1372,7 @@ class DocumentItem(object): """ For sheet template: return "Add document / image" action """ - # url, base_text, icon, extra_text, extra css class + # url, base_text, icon, extra_text, extra css class, is a quick action actions = [] if not hasattr(self, 'SLUG'): @@ -1392,7 +1392,8 @@ class DocumentItem(object): _(u"Add document/image"), "fa fa-plus", _(u"doc./image"), - "" + "", + False ) ] return actions diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index f3797408c..9846b4f1a 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -804,6 +804,13 @@ function toggle_window_menu(){ return false; } +var register_qa_on_sheet = function(){ + $(".btn-qa").click(function(){ + var target = $(this).attr('data-target'); + dt_qa_open(target); + }); +}; + function register_advanced_search(){ $(".advanced-search-reset").click( diff --git a/ishtar_common/templates/ishtar/blocks/window_nav.html b/ishtar_common/templates/ishtar/blocks/window_nav.html index 764797ce2..6cd4bff40 100644 --- a/ishtar_common/templates/ishtar/blocks/window_nav.html +++ b/ishtar_common/templates/ishtar/blocks/window_nav.html @@ -31,26 +31,32 @@ {% else %}
{% endif %} -
- {% if pin_action and item.SLUG %} - + - + - {% endif %} +
+ {% endif %} +
{% block extra_actions %}{% endblock %} {% if modify_url %} - {% endif %} - {% for url, base_text, icon, extra_text, css_class in extra_actions %} - + {% for url, base_text, icon, extra_text, css_class, is_qa in extra_actions %} + {{extra_text}} {% endfor %} +
+ {% endif %} + \ No newline at end of file -- cgit v1.2.3