diff --git a/plinth/modules/shaarli/__init__.py b/plinth/modules/shaarli/__init__.py index ac2e07df1..2210da998 100644 --- a/plinth/modules/shaarli/__init__.py +++ b/plinth/modules/shaarli/__init__.py @@ -26,21 +26,39 @@ from plinth import cfg from plinth import service as service_module +version = 1 + depends = ['apps'] +title = _('Bookmarks (Shaarli)') + +description = [ + _('Shaarli allows you to save and share bookmarks.'), + + _('When enabled, Shaarli will be available from ' + '/shaarli path on the web server. Note that Shaarli only supports a ' + 'single user account, which you will need to setup on the initial ' + 'visit.'), +] + service = None def init(): """Initialize the module.""" menu = cfg.main_menu.get('apps:index') - menu.add_urlname(_('Bookmarks (Shaarli)'), 'glyphicon-bookmark', - 'shaarli:index', 350) + menu.add_urlname(title, 'glyphicon-bookmark', 'shaarli:index', 350) global service service = service_module.Service( - 'shaarli', _('Shaarli'), ['http', 'https'], - is_external=True, enabled=is_enabled()) + 'shaarli', title, ['http', 'https'], is_external=True, + enabled=is_enabled()) + + +def setup(helper, old_version=None): + """Install and configure the module.""" + helper.install(['shaarli']) + helper.call('post', service.notify_enabled, None, True) def is_enabled(): diff --git a/plinth/modules/shaarli/templates/shaarli.html b/plinth/modules/shaarli/templates/shaarli.html index 391c25466..9a6c55b0a 100644 --- a/plinth/modules/shaarli/templates/shaarli.html +++ b/plinth/modules/shaarli/templates/shaarli.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "app.html" %} {% comment %} # # This file is part of Plinth. @@ -21,21 +21,7 @@ {% load bootstrap %} {% load i18n %} -{% block content %} - -
{% trans "Shaarli allows you to save and share bookmarks." %}
- -- {% blocktrans trimmed %} - - When enabled, Shaarli will be available from /shaarli - path on the web server. Note that Shaarli only supports a single - user account, which you will need to setup on the initial visit. - - {% endblocktrans %} -
+{% block configuration %}