From 80ee06d1b26ebda2528956ee1ccf89b808094f94 Mon Sep 17 00:00:00 2001 From: Helder Ribeiro Date: Tue, 23 Jul 2024 19:25:54 +0100 Subject: [PATCH] fmd-551: hide all tags Signed-off-by: Helder Ribeiro --- .idea/.gitignore | 8 ++++ .idea/codeStyles/Project.xml | 10 +++++ .idea/codeStyles/codeStyleConfig.xml | 5 +++ .idea/find-moj-data.iml | 37 +++++++++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 +++ .idea/misc.xml | 7 ++++ .idea/modules.xml | 8 ++++ .idea/poetry.xml | 10 +++++ .idea/vcs.xml | 6 +++ scripts/app-entrypoint.sh | 2 + templates/details_base.html | 18 +++++---- templates/partial/search_result.html | 23 +++++++----- 12 files changed, 122 insertions(+), 18 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/find-moj-data.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/poetry.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..13566b81b --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 000000000..cb52dbbe2 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 000000000..79ee123c2 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/find-moj-data.iml b/.idea/find-moj-data.iml new file mode 100644 index 000000000..69bd70e99 --- /dev/null +++ b/.idea/find-moj-data.iml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 000000000..105ce2da2 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000..bcfc70c92 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..d581e3902 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/poetry.xml b/.idea/poetry.xml new file mode 100644 index 000000000..790215d96 --- /dev/null +++ b/.idea/poetry.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/scripts/app-entrypoint.sh b/scripts/app-entrypoint.sh index d4ac4346d..8a379d5ad 100644 --- a/scripts/app-entrypoint.sh +++ b/scripts/app-entrypoint.sh @@ -12,5 +12,7 @@ fi python manage.py migrate python manage.py waffle_switch search-sort-radio-buttons off --create # create switch with default setting +RUN ./manage.py waffle_switch display-result-tags off --create # create display tags switch with default off + gunicorn --bind 0.0.0.0:8000 core.wsgi:application --workers 2 --threads 4 diff --git a/templates/details_base.html b/templates/details_base.html index f19276b48..8658f2a98 100644 --- a/templates/details_base.html +++ b/templates/details_base.html @@ -65,14 +65,16 @@

{{entity.domain.display_name}} {% endif %} - {% if entity.tags_to_display %} -
  • - Tags: - {% for tag in entity.tags_to_display %} - {{ tag }}{% if not forloop.last %}, {% endif %} - {% endfor %} -
  • - {% endif %} + {% switch 'display-result-tags' %} + {% if entity.tags_to_display %} +
  • + Tags: + {% for tag in entity.tags_to_display %} + {{ tag }}{% if not forloop.last %}, {% endif %} + {% endfor %} +
  • + {% endif %} + {% endswitch %} {% include "partial/esda_info.html" with is_esda=is_esda %} {% endblock metadata_list %} diff --git a/templates/partial/search_result.html b/templates/partial/search_result.html index 9637ca064..fb96678a1 100644 --- a/templates/partial/search_result.html +++ b/templates/partial/search_result.html @@ -43,16 +43,19 @@

    {{result.parent_entity.display_name}} {% endif %} -
  • - Tags: - - {% if result.tags_to_display %} - {% for tag in result.tags_to_display %} - {{ tag }}{% if not forloop.last %}, {% endif %} - {% endfor %} - {% endif %} - -
  • + {% switch 'display-result-tags' %} +
  • + Tags: + + {% if result.tags_to_display %} + {% for tag in result.tags_to_display %} + {{ tag }}{% if not forloop.last %}, {% endif %} + {% endfor %} + {% endif %} + +
  • + {% endswitch %} + {% if result.matches %}
  • Matched fields: