mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
system: Use new setup mechanism
This commit is contained in:
parent
4066a2f8d6
commit
ecad252653
@ -19,8 +19,29 @@
|
||||
Plinth module for system section page
|
||||
"""
|
||||
|
||||
from . import system
|
||||
from .system import init
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from plinth import cfg
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
|
||||
__all__ = ['system', 'init']
|
||||
version = 1
|
||||
|
||||
is_essential = 1
|
||||
|
||||
title = _('System Configuration')
|
||||
|
||||
description = [
|
||||
format_lazy(
|
||||
_('Here you can administrate the underlying system of your '
|
||||
'{box_name}.'), box_name=_(cfg.box_name)),
|
||||
|
||||
format_lazy(
|
||||
_('The options affect the {box_name} at its most general level, '
|
||||
'so be careful!'), box_name=_(cfg.box_name))
|
||||
]
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the system module"""
|
||||
cfg.main_menu.add_urlname(title, 'glyphicon-cog', 'system:index', 100)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'app.html' %}
|
||||
{% comment %}
|
||||
#
|
||||
# This file is part of Plinth.
|
||||
@ -17,25 +17,3 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
{% endcomment %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>{% trans "System Configuration" %}</h2>
|
||||
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
Here you can administrate the underlying system of your
|
||||
{{ box_name }}.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
The options affect the {{ box_name }} at its most general level,
|
||||
so be careful!
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@ -21,7 +21,7 @@ URLs for the System module
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from . import system as views
|
||||
from . import views
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
@ -16,18 +16,12 @@
|
||||
#
|
||||
|
||||
from django.template.response import TemplateResponse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from plinth import cfg
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the system module"""
|
||||
cfg.main_menu.add_urlname(_('System'), 'glyphicon-cog', 'system:index',
|
||||
100)
|
||||
from plinth.modules import system
|
||||
|
||||
|
||||
def index(request):
|
||||
"""Serve the index page"""
|
||||
return TemplateResponse(request, 'system.html',
|
||||
{'title': _('System Configuration')})
|
||||
{'title': system.title,
|
||||
'description': system.description})
|
||||
Loading…
x
Reference in New Issue
Block a user