-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tags): show tags user can filter on (tests in progress)
- Loading branch information
1 parent
dd2cd0e
commit 021b4f0
Showing
4 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
lacommunaute/templates/forum/forum_documentation_category.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% load url_add_query %} | ||
<div class="container-fluid d-flex justify-content-center c-box"> | ||
Filtrez par sous-catégorie : | ||
{% for tag in tags %} | ||
<a href="{% url_add_query request.path forum_tags=tag.slug %}"> | ||
{% if tag.slug == active_forum_tag_slug %} | ||
{% include "partials/tag.html" with tag=tag highlight=1 only %} | ||
{% else %} | ||
{% include "partials/tag.html" with tag=tag only %} | ||
{% endif %} | ||
</a> | ||
{% if forloop.last and active_forum_tag_slug %} | ||
<a href="{{ request.path }}"><span class="tag bg-light text-muted"><i class="ri-close-circle-fill"></i> supprimer le filtre</span></a> | ||
{% endif %} | ||
{% endfor %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% if url %} | ||
<a href="{{ url }}" class="tag bg-info-lighter text-info">{{ tag.name }}</a> | ||
<a href="{{ url }}" class="tag {% if highlight %} bg-info text-white{% else %} bg-info-lighter text-info{% endif %}">{{ tag.name }}</a> | ||
{% else %} | ||
<span class="tag bg-info-lighter text-info">{{ tag.name }}</span> | ||
{% endif %} |