diff --git a/plinth/modules/power/__init__.py b/plinth/modules/power/__init__.py index 32cd2af14..9cf5d0aef 100644 --- a/plinth/modules/power/__init__.py +++ b/plinth/modules/power/__init__.py @@ -23,11 +23,20 @@ from django.utils.translation import ugettext_lazy as _ from plinth import cfg +version = 1 + +is_essential = True + depends = ['system'] +title = _('Power') + +description = [ + _('Restart or shut down the system.') +] + def init(): """Initialize the power module.""" menu = cfg.main_menu.get('system:index') - menu.add_urlname(_('Power'), 'glyphicon-off', - 'power:index', 1000) + menu.add_urlname(title, 'glyphicon-off', 'power:index', 1000) diff --git a/plinth/modules/power/templates/power.html b/plinth/modules/power/templates/power.html index 642aea911..89553d389 100644 --- a/plinth/modules/power/templates/power.html +++ b/plinth/modules/power/templates/power.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "app.html" %} {% comment %} # # This file is part of Plinth. @@ -21,13 +21,7 @@ {% load bootstrap %} {% load i18n %} -{% block content %} - -

{{ title }}

- -

- {% blocktrans trimmed %}Restart or shut down the system.{% endblocktrans %} -

+{% block configuration %}

diff --git a/plinth/modules/power/views.py b/plinth/modules/power/views.py index e1d835f6a..ae18d4506 100644 --- a/plinth/modules/power/views.py +++ b/plinth/modules/power/views.py @@ -26,11 +26,14 @@ from django.template.response import TemplateResponse from django.utils.translation import ugettext as _ from plinth import actions +from plinth.modules import power def index(request): """Serve power controls page.""" - return TemplateResponse(request, 'power.html', {'title': _('Power')}) + return TemplateResponse(request, 'power.html', + {'title': power.title, + 'description': power.description}) def restart(request):