mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
removed unused 'title' from subsubmenus
This commit is contained in:
1 parent
61fefcff01
commit
ae83566653
6 files changed
+25
-46
No files matched your search
@@ -34,11 +34,10 @@ from plinth import cfg
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
subsubmenu = {'title': _('PageKite'),
|
||||
'items': [{'url': reverse_lazy('pagekite:index'),
|
||||
'text': _('About PageKite')},
|
||||
{'url': reverse_lazy('pagekite:configure'),
|
||||
'text': _('Configure PageKite')}]}
|
||||
subsubmenu = [{'url': reverse_lazy('pagekite:index'),
|
||||
'text': _('About PageKite')},
|
||||
{'url': reverse_lazy('pagekite:configure'),
|
||||
'text': _('Configure PageKite')}]
|
||||
|
||||
|
||||
def init():
|
||||
@@ -194,7 +193,7 @@ def _apply_changes(request, old_status, new_status):
|
||||
|
||||
|
||||
def _run(arguments, superuser=True):
|
||||
"""Run an given command and raise exception if there was an error"""
|
||||
"""Run a given command and raise exception if there was an error"""
|
||||
command = 'pagekite-configure'
|
||||
|
||||
if superuser:
|
||||
|
||||
@@ -28,18 +28,14 @@ from django.views.generic import ListView
|
||||
from gettext import gettext as _
|
||||
|
||||
|
||||
# TODO: we do not use the title anymore, and 'items' is also a python keyword.
|
||||
# For all subsubmenus: let's remove title and just use the items list directly.
|
||||
# Make sure to update the tests too.
|
||||
subsubmenu = {'title': _('Users and Groups'),
|
||||
'items': [{'url': reverse_lazy('users:index'),
|
||||
'text': _('Users')},
|
||||
{'url': reverse_lazy('users:create'),
|
||||
'text': _('Create User')}]}
|
||||
subsubmenu = [{'url': reverse_lazy('users:index'),
|
||||
'text': _('Users')},
|
||||
{'url': reverse_lazy('users:create'),
|
||||
'text': _('Create User')}]
|
||||
|
||||
|
||||
class ContextMixin(object):
|
||||
"""View to add 'subsubmenu' and 'title' to the context."""
|
||||
"""Mixin to add 'subsubmenu' and 'title' to the context."""
|
||||
def get_context_data(self, **kwargs):
|
||||
"""Use self.title and the module-level subsubmenu"""
|
||||
context = super(ContextMixin, self).get_context_data(**kwargs)
|
||||
|
||||
@@ -30,23 +30,12 @@ from plinth import service
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
subsubmenu = {
|
||||
'title': _('XMPP'),
|
||||
'items': [
|
||||
{
|
||||
'url': reverse_lazy('xmpp:index'),
|
||||
'text': _('About'),
|
||||
},
|
||||
{
|
||||
'url': reverse_lazy('xmpp:configure'),
|
||||
'text': _('Configure XMPP Server'),
|
||||
},
|
||||
{
|
||||
'url': reverse_lazy('xmpp:register'),
|
||||
'text': _('Register XMPP Account'),
|
||||
}
|
||||
]
|
||||
}
|
||||
subsubmenu = [{'url': reverse_lazy('xmpp:index'),
|
||||
'text': _('About')},
|
||||
{'url': reverse_lazy('xmpp:configure'),
|
||||
'text': _('Configure XMPP Server')},
|
||||
{'url': reverse_lazy('xmpp:register'),
|
||||
'text': _('Register XMPP Account')}]
|
||||
|
||||
|
||||
def init():
|
||||
|
||||
Reference in new issue
Block a user