Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all topics filtering #6099

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions kitsune/questions/jinja2/questions/question_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ <h1 class="sumo-page-heading {% if not logo %}no-logo{% endif %}">
</section>
{% endblock %}





{% block content %}
{% if tags %}
<div id="tagged" class="tag-notification">
Expand Down Expand Up @@ -314,7 +310,7 @@ <h3 class="sidebar-subheading">{{ _('Filter by') }}</h3>
<li class="sidebar-subheading sidebar-nav--heading-item">{{ _('Topic') }}</li>
<li>
<select id="products-topics-dropdown">
<option value="{{ url('questions.list_by_topic', topic_slug=topic_slug) }}" {% if selected_topic is none %}selected{% endif %}>
<option value="{{ url('questions.list', product_slug='all') }}" {% if selected_topic is none %}selected{% endif %}>
All Topics
</option>
{% for topic in topic_list %}
Expand Down
2 changes: 0 additions & 2 deletions kitsune/questions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ def question_list(request, product_slug=None, topic_slug=None):
)
return HttpResponseRedirect("/")

products = None

# Get all topics
topics = []
topic_navigation = False
Expand Down
2 changes: 1 addition & 1 deletion kitsune/sumo/static/sumo/js/topics.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
document.addEventListener('DOMContentLoaded', function () {
var dropdown = document.getElementById('products-topics-dropdown');
dropdown.addEventListener('change', function () {
var selectedUrl = this.value;
let selectedUrl = this.value;
if (selectedUrl) {
window.location.href = selectedUrl;
}
Expand Down