mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
help, system: Stop using submenu.sorted_items
- This fixes a regression in showing menu items on the help:index page. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
d605907bbe
commit
079b4324f6
@ -16,7 +16,7 @@ from django.urls import reverse
|
||||
from django.utils.translation import get_language_from_request
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from plinth import __version__, cfg
|
||||
from plinth import __version__, cfg, menu
|
||||
from plinth.modules.upgrades import views as upgrades_views
|
||||
|
||||
from . import privileged
|
||||
@ -24,8 +24,11 @@ from . import privileged
|
||||
|
||||
def index(request):
|
||||
"""Serve the index page"""
|
||||
return TemplateResponse(request, 'help_index.html',
|
||||
{'title': _('Documentation and FAQ')})
|
||||
menu_items = menu.main_menu.active_item(request).sorted_items()
|
||||
return TemplateResponse(request, 'help_index.html', {
|
||||
'title': _('Documentation and FAQ'),
|
||||
'menu_items': menu_items
|
||||
})
|
||||
|
||||
|
||||
def contribute(request):
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{% extends 'cards.html' %}
|
||||
{% extends 'base.html' %}
|
||||
{% comment %}
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
|
||||
<div class="container card-container">
|
||||
{% for section_item in submenu.sorted_items %}
|
||||
{% for section_item in menu_items %}
|
||||
<div class="system-section-title">{{ section_item.name }}</div>
|
||||
<div class="row">
|
||||
<div class="card-list card-list-primary">
|
||||
|
||||
@ -181,8 +181,11 @@ class AppsIndexView(TemplateView):
|
||||
|
||||
def system_index(request):
|
||||
"""Serve the system index page."""
|
||||
return TemplateResponse(request, 'system.html',
|
||||
{'advanced_mode': get_advanced_mode()})
|
||||
menu_items = menu.main_menu.active_item(request).sorted_items()
|
||||
return TemplateResponse(request, 'system.html', {
|
||||
'advanced_mode': get_advanced_mode(),
|
||||
'menu_items': menu_items
|
||||
})
|
||||
|
||||
|
||||
class LanguageSelectionView(FormView):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user