mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-08 11:40:25 +00:00
diaspora: Update menu use to match other modules
- Remove extra global line to avoid warning. - Fix comment and indentation.
This commit is contained in:
parent
3a6dc03ee9
commit
2f13946517
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -29,20 +29,20 @@
|
||||
{% for shortcut in shortcuts %}
|
||||
{% if not shortcut.hidden %}
|
||||
{% if user.is_authenticated or not shortcut.login_required %}
|
||||
<div class="col-sm-3">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
{% if selected_id == shortcut.id %}
|
||||
<div class="col-sm-3">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
{% if selected_id == shortcut.id %}
|
||||
<li class="active">
|
||||
<a href="{{ shortcut.url }}" class="active">
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="{{ shortcut.url }}">
|
||||
{% endif %}
|
||||
<center>
|
||||
<img src="{% static 'theme/icons/' %}{{ shortcut.icon }}.png" style="max-width: 100px; height: 100px" />
|
||||
<br>
|
||||
{{ shortcut.label|linebreaks }}
|
||||
</center>
|
||||
<center>
|
||||
<img src="{% static 'theme/icons/' %}{{ shortcut.icon }}.png" style="max-width: 100px; height: 100px" />
|
||||
<br>
|
||||
{{ shortcut.label|linebreaks }}
|
||||
</center>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user