Skip to content
Snippets Groups Projects
Verified Commit c0bd4c8c authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Remove "All" tab in preferences page

parent 66fa1b79
No related branches found
No related tags found
1 merge request!420Resolve "Deactivate "All" view in preferences"
Pipeline #5084 passed
{% load i18n %}
<ul class="tabs">
<li class="tab ">
<a href="{% url registry_url %}"
class="{% if not active_section %}active{% endif %}"
target="_self">
{% trans "All" %}
</a>
{% for section in registry.section_objects.values %}
<li class="tab">
<a class="{% if active_section == section.name %}active{% endif %}"
......
......@@ -538,6 +538,10 @@ def preferences(
# Invalid registry name passed from URL
return HttpResponseNotFound()
if not section and len(registry.sections()) > 0:
default_section = list(registry.sections())[0]
return redirect(f"preferences_{registry_name}", default_section)
# Build final form from dynamic-preferences
form_class = preference_form_builder(form_class, instance=instance, section=section)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment