Skip to content

Commit

Permalink
fmd-551: hide all tags
Browse files Browse the repository at this point in the history
Signed-off-by: Helder Ribeiro <[email protected]>
  • Loading branch information
hjribeiro-moj committed Jul 24, 2024
1 parent 04cd687 commit 80ee06d
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 18 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .idea/find-moj-data.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/poetry.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions scripts/app-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 10 additions & 8 deletions templates/details_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,16 @@ <h3 class="govuk-heading-s govuk-!-margin-top-3">
{{entity.domain.display_name}}
</li>
{% endif %}
{% if entity.tags_to_display %}
<li>
<span class="govuk-!-font-weight-bold">Tags:</span>
{% for tag in entity.tags_to_display %}
<a aria-label="link to search results for all entities tagged {{ tag }}" href="{% url 'home:search' %}{% query_string clear_label=None clear_filter=None new=None tags=tag%}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
</li>
{% endif %}
{% switch 'display-result-tags' %}
{% if entity.tags_to_display %}
<li>
<span class="govuk-!-font-weight-bold">Tags:</span>
{% for tag in entity.tags_to_display %}
<a aria-label="link to search results for all entities tagged {{ tag }}" href="{% url 'home:search' %}{% query_string clear_label=None clear_filter=None new=None tags=tag%}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
</li>
{% endif %}
{% endswitch %}
</ul>
{% include "partial/esda_info.html" with is_esda=is_esda %}
{% endblock metadata_list %}
Expand Down
23 changes: 13 additions & 10 deletions templates/partial/search_result.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,19 @@ <h3 class="govuk-heading-m govuk-!-margin-bottom-2">
<span>{{result.parent_entity.display_name}}</span>
</li>
{% endif %}
<li>
<span class="govuk-!-font-weight-bold">Tags:</span>
<span>
{% if result.tags_to_display %}
{% for tag in result.tags_to_display %}
<a aria-label="link to search results for all entities tagged {{ tag }}" href="{% url 'home:search' %}{% query_string clear_label=None clear_filter=None new=None tags=tag %}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
{% endif %}
</span>
</li>
{% switch 'display-result-tags' %}
<li>
<span class="govuk-!-font-weight-bold">Tags:</span>
<span>
{% if result.tags_to_display %}
{% for tag in result.tags_to_display %}
<a aria-label="link to search results for all entities tagged {{ tag }}" href="{% url 'home:search' %}{% query_string clear_label=None clear_filter=None new=None tags=tag %}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
{% endif %}
</span>
</li>
{% endswitch %}

{% if result.matches %}
<li>
<span class="govuk-!-font-weight-bold">Matched fields:</span>
Expand Down

0 comments on commit 80ee06d

Please sign in to comment.