From 2f1394651740b1f6f0e5fb8f49d87cdf988d711d Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sat, 6 May 2017 07:21:33 -0400 Subject: [PATCH] diaspora: Update menu use to match other modules - Remove extra global line to avoid warning. - Fix comment and indentation. --- plinth/modules/diaspora/__init__.py | 6 +++--- plinth/modules/diaspora/views.py | 2 +- plinth/templates/index.html | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plinth/modules/diaspora/__init__.py b/plinth/modules/diaspora/__init__.py index 0a15d929d..cb175a9a5 100644 --- a/plinth/modules/diaspora/__init__.py +++ b/plinth/modules/diaspora/__init__.py @@ -20,9 +20,10 @@ from django.utils.translation import ugettext_lazy as _ from plinth.modules import names from plinth.utils import format_lazy -from plinth import actions, action_utils, cfg, frontpage, \ +from plinth import actions, action_utils, frontpage, \ service as service_module from plinth.errors import DomainNotRegisteredError +from plinth.menu import main_menu domain_name_file = "/etc/diaspora/domain_name" lazy_domain_name = None # To avoid repeatedly reading from file @@ -41,7 +42,6 @@ def get_configured_domain_name(): raise DomainNotRegisteredError() with open(domain_name_file) as dnf: - global lazy_domain_name lazy_domain_name = dnf.read().rstrip() return lazy_domain_name @@ -74,7 +74,7 @@ description = [ def init(): """Initialize the Diaspora module.""" - menu = cfg.main_menu.get('apps:index') + menu = main_menu.get('apps') menu.add_urlname(title, 'glyphicon-thumbs-up', 'diaspora:index') global service diff --git a/plinth/modules/diaspora/views.py b/plinth/modules/diaspora/views.py index 092798fb5..edd61f7d7 100644 --- a/plinth/modules/diaspora/views.py +++ b/plinth/modules/diaspora/views.py @@ -16,7 +16,7 @@ # """ -Views for the Matrix Synapse module +Views for the diaspora module """ from django.shortcuts import redirect from django.urls import reverse_lazy diff --git a/plinth/templates/index.html b/plinth/templates/index.html index e46fd3fd0..77672dcdf 100644 --- a/plinth/templates/index.html +++ b/plinth/templates/index.html @@ -29,20 +29,20 @@ {% for shortcut in shortcuts %} {% if not shortcut.hidden %} {% if user.is_authenticated or not shortcut.login_required %} -
-