diff --git a/plinth/modules/privoxy/__init__.py b/plinth/modules/privoxy/__init__.py index 4c3e07627..eaf0d20d1 100644 --- a/plinth/modules/privoxy/__init__.py +++ b/plinth/modules/privoxy/__init__.py @@ -25,23 +25,50 @@ from plinth import actions from plinth import action_utils from plinth import cfg from plinth import service as service_module +from plinth.utils import format_lazy +version = 1 + +is_essential = False + depends = ['apps'] +title = _('Web Proxy (Privoxy)') + +description = [ + _('Privoxy is a non-caching web proxy with advanced filtering ' + 'capabilities for enhancing privacy, modifying web page data and ' + 'HTTP headers, controlling access, and removing ads and other ' + 'obnoxious Internet junk. '), + + format_lazy( + _('You can use Privoxy by modifying your browser proxy settings to ' + 'your {box_name} hostname (or IP address) with port 8118. ' + 'While using Privoxy, you can see its configuration details and ' + 'documentation at ' + 'http://config.privoxy.org/ ' + 'or http://p.p.'), box_name=_(cfg.box_name)) +] + service = None def init(): """Intialize the module.""" menu = cfg.main_menu.get('apps:index') - menu.add_urlname(_('Web Proxy (Privoxy)'), 'glyphicon-cloud-upload', - 'privoxy:index', 1000) + menu.add_urlname(title, 'glyphicon-cloud-upload', 'privoxy:index', 1000) global service service = service_module.Service( - 'privoxy', _('Privoxy Web Proxy'), - is_external=False, enabled=is_enabled()) + 'privoxy', title, is_external=False, enabled=is_enabled()) + + +def setup(helper, old_version=None): + """Install and configure the module.""" + helper.install(['privoxy']) + helper.call('post', actions.superuser_run, 'privoxy', ['setup']) + helper.call('post', service.notify_enabled, None, True) def is_enabled(): diff --git a/plinth/modules/privoxy/templates/privoxy.html b/plinth/modules/privoxy/templates/privoxy.html index 4a4f82c00..d80099eb4 100644 --- a/plinth/modules/privoxy/templates/privoxy.html +++ b/plinth/modules/privoxy/templates/privoxy.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "app.html" %} {% comment %} # # This file is part of Plinth. @@ -21,29 +21,7 @@ {% load bootstrap %} {% load i18n %} -{% block content %} - -
- {% blocktrans trimmed %} - Privoxy is a non-caching web proxy with advanced filtering - capabilities for enhancing privacy, modifying web page data and - HTTP headers, controlling access, and removing ads and other - obnoxious Internet junk. - {% endblocktrans %} -
- -- {% blocktrans trimmed %} - You can use Privoxy by modifying your browser proxy settings to - your {{ box_name }} hostname (or IP address) with port 8118. - While using Privoxy, you can see its configuration details and - documentation at - http://config.privoxy.org/ - or http://p.p. - {% endblocktrans %} -
+{% block configuration %}