From 519b573e9fcf563806c162b3389dfe540d7ad971 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Wed, 28 Aug 2019 00:05:04 +0530 Subject: [PATCH] help: Add button for Support Reviewed-by: Sunil Mohan Adapa --- plinth/modules/help/help.py | 11 ++++ .../modules/help/templates/help_support.html | 52 +++++++++++++++++++ plinth/modules/help/urls.py | 1 + 3 files changed, 64 insertions(+) create mode 100644 plinth/modules/help/templates/help_support.html diff --git a/plinth/modules/help/help.py b/plinth/modules/help/help.py index 8e949f8fb..9ade7443a 100644 --- a/plinth/modules/help/help.py +++ b/plinth/modules/help/help.py @@ -57,6 +57,11 @@ class HelpApp(app_module.App): 'fa-download', 'help:download-manual', parent_url_name='help:index', order=15) self.add(menu_item) + menu_item = menu.Menu('menu-help-support', + ugettext_lazy('Get Support'), None, + 'fa-life-ring', 'help:support', + parent_url_name='help:index', order=20) + self.add(menu_item) menu_item = menu.Menu('menu-help-feedback', ugettext_lazy('Submit Feedback'), None, 'fa-comments', 'help:feedback', @@ -87,6 +92,12 @@ def feedback(request): {'title': _('Submit Feedback')}) +def support(request): + """Serve the support page""" + return TemplateResponse(request, 'help_support.html', + {'title': _('Get Support')}) + + def about(request): """Serve the about page""" cache = Cache() diff --git a/plinth/modules/help/templates/help_support.html b/plinth/modules/help/templates/help_support.html new file mode 100644 index 000000000..2308438af --- /dev/null +++ b/plinth/modules/help/templates/help_support.html @@ -0,0 +1,52 @@ +{% extends 'help_base.html' %} +{% comment %} +# +# This file is part of FreedomBox. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +{% endcomment %} + +{% load i18n %} + +{% block content %} +

{% trans "Get Support" %}

+ +

+ {% blocktrans trimmed %} + If you need help in getting something done or if you are facing problems + using {{ box_name }}, you can ask for help from our community of users + and contributors. + {% endblocktrans %} +

+ +

+ {% blocktrans trimmed %} + Search for past discussions or post a new query on our + discussion forum. + {% endblocktrans %} +

+ +

+ {% blocktrans trimmed %} + You can also chat with us on our IRC and Matrix channels (bridged): +

    +
  • #freedombox on irc.oftc.net
  • +
  • #freedombox:matrix.org
  • +
+ Or send an email to our mailing list. + {% endblocktrans %} +

+{% endblock %} diff --git a/plinth/modules/help/urls.py b/plinth/modules/help/urls.py index 8322574fb..b7d276168 100644 --- a/plinth/modules/help/urls.py +++ b/plinth/modules/help/urls.py @@ -28,6 +28,7 @@ urlpatterns = [ url(r'^help/$', non_admin_view(views.index), name='index'), url(r'^help/about/$', non_admin_view(views.about), name='about'), url(r'^help/feedback/$', non_admin_view(views.feedback), name='feedback'), + url(r'^help/support/$', non_admin_view(views.support), name='support'), url(r'^help/manual/$', non_admin_view(views.manual), name='manual'), url(r'^help/manual/download/$', non_admin_view(views.download_manual), name='download-manual'),