mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +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 get_language_from_request
|
||||||
from django.utils.translation import gettext as _
|
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 plinth.modules.upgrades import views as upgrades_views
|
||||||
|
|
||||||
from . import privileged
|
from . import privileged
|
||||||
@ -24,8 +24,11 @@ from . import privileged
|
|||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
"""Serve the index page"""
|
"""Serve the index page"""
|
||||||
return TemplateResponse(request, 'help_index.html',
|
menu_items = menu.main_menu.active_item(request).sorted_items()
|
||||||
{'title': _('Documentation and FAQ')})
|
return TemplateResponse(request, 'help_index.html', {
|
||||||
|
'title': _('Documentation and FAQ'),
|
||||||
|
'menu_items': menu_items
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
def contribute(request):
|
def contribute(request):
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends 'cards.html' %}
|
{% extends 'base.html' %}
|
||||||
{% comment %}
|
{% comment %}
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container card-container">
|
<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="system-section-title">{{ section_item.name }}</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="card-list card-list-primary">
|
<div class="card-list card-list-primary">
|
||||||
|
|||||||
@ -181,8 +181,11 @@ class AppsIndexView(TemplateView):
|
|||||||
|
|
||||||
def system_index(request):
|
def system_index(request):
|
||||||
"""Serve the system index page."""
|
"""Serve the system index page."""
|
||||||
return TemplateResponse(request, 'system.html',
|
menu_items = menu.main_menu.active_item(request).sorted_items()
|
||||||
{'advanced_mode': get_advanced_mode()})
|
return TemplateResponse(request, 'system.html', {
|
||||||
|
'advanced_mode': get_advanced_mode(),
|
||||||
|
'menu_items': menu_items
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
class LanguageSelectionView(FormView):
|
class LanguageSelectionView(FormView):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user