Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed May 2, 2024
1 parent d666a0b commit f56579c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lacommunaute/forum_conversation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def get_context_data(self, **kwargs):
context["active_filter_name"] = (
getattr(Filters, self.get_filter(), Filters.ALL).label if self.get_filter() else Filters.ALL.label
)
context["active_tag"] = self.get_tags()
context["display_filter_dropdown"] = False if self.request.GET.get("page") else True

context["loadmoretopic_suffix"] = "topics"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<button id="filtertopics-button"
hx-target="#topicsarea"
hx-swap="outerHTML"
hx-get="{% url 'forum_conversation_extension:topics' %}?filter={{ filter.0 }}"
hx-get="{% url 'forum_conversation_extension:topics' %}?filter={{ filter.0 }}{% if active_tag %}&tag={{ active_tag }}{% endif %}"
class="dropdown-item matomo-event"
data-matomo-category="engagement"
data-matomo-action="filter"
Expand Down
2 changes: 1 addition & 1 deletion lacommunaute/templates/forum_conversation/topic_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% get_permission 'can_download_files' forum request.user as user_can_download_files %}
{% endif %}
<div id="topicsarea">
{% include "forum_conversation/partials/topic_filter.html" %}
{% include "forum_conversation/partials/topic_filter.html" with active_tag=active_tag %}
{% if topics or not hide_if_empty %}
{% for topic in topics %}
<div class="row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2 class="mt-3">
<div class="s-section__col col-12">
<div class="c-box">
{% with topics=topics %}
{% include "forum_conversation/topic_list.html" %}
{% include "forum_conversation/topic_list.html" with active_tag=active_tag %}
{% endwith %}
</div>
</div>
Expand Down

0 comments on commit f56579c

Please sign in to comment.