diff --git a/plinth/modules/repro/__init__.py b/plinth/modules/repro/__init__.py index 5cba93082..0a72adcf8 100644 --- a/plinth/modules/repro/__init__.py +++ b/plinth/modules/repro/__init__.py @@ -21,25 +21,57 @@ Plinth module for repro. from django.utils.translation import ugettext_lazy as _ +from plinth import actions from plinth import action_utils from plinth import cfg from plinth import service as service_module +version = 1 + depends = ['apps'] +title = _('SIP Server (repro)') + +description = [ + _('repro provides various SIP services that a SIP softphone can utilize ' + 'to provide audio and video calls as well as presence and instant ' + 'messaging. repro provides a server and SIP user accounts that clients ' + 'can use to let their presence known. It also acts as a proxy to ' + 'federate SIP communications to other servers on the Internet similar ' + 'to email.'), + + _('To make SIP calls, a client application is needed. Available clients ' + 'include Jitsi (for computers) and ' + ' ' + 'CSipSimple (for Android phones).'), + + _('Note: Before using repro, domains and users will ' + 'need to be configured using the ' + 'web-based configuration panel. Users in the admin group ' + 'will be able to log in to the repro configuration panel. After setting ' + 'the domain, it is required to restart the repro service. Disable the ' + 'service and re-enable it.'), +] + service = None def init(): """Initialize the repro module.""" menu = cfg.main_menu.get('apps:index') - menu.add_urlname(_('SIP Server (repro)'), 'glyphicon-phone-alt', - 'repro:index', 825) + menu.add_urlname(title, 'glyphicon-phone-alt', 'repro:index', 825) global service service = service_module.Service( - 'repro', _('repro SIP Server'), ['sip-plinth', 'sip-tls-plinth'], - is_external=True, enabled=is_enabled()) + 'repro', title, ['sip-plinth', 'sip-tls-plinth'], is_external=True, + enabled=is_enabled()) + + +def setup(helper, old_version=None): + """Install and configure the module.""" + helper.install(['repro']) + helper.call('post', actions.superuser_run, 'repro', ['setup']) + helper.call('post', service.notify_enabled, None, True) def is_enabled(): diff --git a/plinth/modules/repro/templates/repro.html b/plinth/modules/repro/templates/repro.html index 1d4b2fe7d..df5109cb0 100644 --- a/plinth/modules/repro/templates/repro.html +++ b/plinth/modules/repro/templates/repro.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "app.html" %} {% comment %} # # This file is part of Plinth. @@ -21,39 +21,7 @@ {% load bootstrap %} {% load i18n %} -{% block content %} - -
- {% blocktrans trimmed %} - repro provides various SIP services that a SIP softphone can utilize to - provide audio and video calls as well as presence and instant messaging. - repro provides a server and SIP user accounts that clients can use to let - their presence known. It also acts as a proxy to federate SIP - communications to other servers on the Internet similar to email. - {% endblocktrans %} -
- -- {% blocktrans trimmed %} - To make SIP calls, a client application is needed. Available clients - include Jitsi (for computers) and - - CSipSimple (for Android phones). - {% endblocktrans %} -
- -- {% blocktrans trimmed %} - Note: Before using repro, domains and users will need - to be configured using the web-based - configuration panel. Users in the admin group will be able - to log in to the repro configuration panel. After setting the domain, it - is required to restart the repro service. Disable the service and - re-enable it. - {% endblocktrans %} -
+{% block configuration %}