restore: Fix minor styling issues

- Missing comment added and comment styling.

- Expanded the description.

- Change the title and menu item capitalization for consistency.
This commit is contained in:
Sunil Mohan Adapa 2015-11-17 10:15:45 +05:30
parent cc181c79c3
commit f8f7a979f2
4 changed files with 15 additions and 10 deletions

View File

@ -16,7 +16,7 @@
#
"""
Plinth module to configure reStore
Plinth module to configure reStore.
"""
from django.utils.translation import ugettext_lazy as _
@ -31,14 +31,14 @@ depends = ['plinth.modules.apps']
def init():
"""Initialize the reStore module"""
"""Initialize the reStore module."""
menu = cfg.main_menu.get('apps:index')
menu.add_urlname(_('Unhosted storage (reStore)'), 'glyphicon-hdd',
menu.add_urlname(_('Unhosted Storage (reStore)'), 'glyphicon-hdd',
'restore:index', 750)
global service
service = service_module.Service(
'node-restore', _('reStore'),
'node-restore', _('reStore'), ['http', 'https'],
is_external=False, enabled=is_enabled())

View File

@ -23,14 +23,16 @@
{% block content %}
<h2>{% trans "reStore" %}</h2>
<h2>{% trans "Unhosted Storage (reStore)" %}</h2>
<p>
{% blocktrans trimmed %}
reStore is a server for <a href='https://unhosted.org/'>unhosted</a>
web applications. The idea is to uncouple web applications from
the data, and thus the data can be stored on any unhosted
storage server.
data. No matter where a web application is served from, the
data can be stored on an unhosted storage server of user's
choice. With reStore, your {{ cfg.box_name }} becomes your
unhosted storage server.
{% endblocktrans %}
</p>

View File

@ -16,7 +16,7 @@
#
"""
URLs for the reStore module
URLs for the reStore module.
"""
from django.conf.urls import patterns, url

View File

@ -15,6 +15,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Plinth module for configuring reStore.
"""
from django.contrib import messages
from django.template.response import TemplateResponse
from django.utils.translation import ugettext as _
@ -27,7 +31,6 @@ from plinth.modules import restore
@package.required(['node-restore'])
def index(request):
"""Serve configuration page."""
status = get_status()
if request.method == 'POST':
@ -40,7 +43,7 @@ def index(request):
form = ReStoreForm(initial=status, prefix='restore')
return TemplateResponse(request, 'restore_index.html',
{'title': _('Unhosted storage (reStore)'),
{'title': _('Unhosted Storage (reStore)'),
'status': status,
'form': form})