From e5c73218986ff94fdd7cbfff47facebcb553a683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 7 Apr 2015 17:59:23 +0200 Subject: [PATCH] Extract tab_headers and tab_thesaurus from prod/index --- templates/web/prod/index.html.twig | 89 +--------------------- templates/web/prod/tab_headers.html.twig | 24 ++++++ templates/web/prod/tab_thesaurus.html.twig | 74 ++++++++++++++++++ 3 files changed, 100 insertions(+), 87 deletions(-) create mode 100644 templates/web/prod/tab_headers.html.twig create mode 100644 templates/web/prod/tab_thesaurus.html.twig diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 209288f67a..6f7a9eae38 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -186,26 +186,7 @@
- + {% include 'prod/tab_headers.html.twig' %}
{% import 'prod/WorkZone/Macros.html.twig' as WorkZoneMacros %} {{WorkZoneMacros.make_bloc(app, WorkZone)}} @@ -215,73 +196,7 @@ ondblclick="return(thesau_dblclickThesaurus(event));" onclick="return(thesau_clickThesaurus(event));">
-
-
- -
-
-
-
- -
- - -
-
- - - - -
-
-
-
-
-
    - {% for base in search_datas['bases'] %} - {% if base['thesaurus'] %} -
  • -
    - {{base['sbas_id']|sbas_labels(app)}} -
      {{ 'chargement' | trans }}
    -
  • - {% endif %} - {% endfor %} -
-
-
-
- {% if app['acl'].get(app['authentication'].getUser()).has_access_to_module('thesaurus') %} -
-
-
-
    - {% for base in search_datas['bases'] %} - {% if base['cterms'] %} -
  • -
    - {{base['sbas_id']|sbas_labels(app)}} -
      {{ 'chargement' | trans }}
    -
  • - {% endif %} - {% endfor %} -
-
-
-
- {% endif %} -
-
-
+ {% include 'prod/tab_thesaurus.html.twig' with {has_access_to_module: app['acl'].get(app['authentication'].getUser()).has_access_to_module('thesaurus')} %} {% endif %}
diff --git a/templates/web/prod/tab_headers.html.twig b/templates/web/prod/tab_headers.html.twig new file mode 100644 index 0000000000..7988a27a60 --- /dev/null +++ b/templates/web/prod/tab_headers.html.twig @@ -0,0 +1,24 @@ +{% block tab_headers %} + +{% endblock %} diff --git a/templates/web/prod/tab_thesaurus.html.twig b/templates/web/prod/tab_thesaurus.html.twig new file mode 100644 index 0000000000..cc3c49be08 --- /dev/null +++ b/templates/web/prod/tab_thesaurus.html.twig @@ -0,0 +1,74 @@ +{% block tab_thesaurus %} +
+
+ +
+
+
+
+ +
+ + +
+
+ + + + +
+
+
+
+
+
    + {% for base in search_datas['bases'] %} + {% if base['thesaurus'] %} +
  • +
    + {{ base['sbas_id']|sbas_labels(app) }} +
      {{ 'chargement' | trans }}
    +
  • + {% endif %} + {% endfor %} +
+
+
+
+ {% if has_access_to_module %} +
+
+
+
    + {% for base in search_datas['bases'] %} + {% if base['cterms'] %} +
  • +
    + {{ base['sbas_id']|sbas_labels(app) }} +
      {{ 'chargement' | trans }}
    +
  • + {% endif %} + {% endfor %} +
+
+
+
+ {% endif %} +
+
+
+{% endblock %}