From 90f23ce16a064eb7cbcfcb25644f3272b7cb5ae6 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 27 Jul 2020 16:34:41 +0200 Subject: about page and licence --- client/templates/client/about.html | 46 ++++++++++++++++++++++++++++++++++++ client/templates/client/approve.html | 2 +- client/urls.py | 1 + client/views.py | 9 +++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 client/templates/client/about.html (limited to 'client') diff --git a/client/templates/client/about.html b/client/templates/client/about.html new file mode 100644 index 0000000..5f7e27f --- /dev/null +++ b/client/templates/client/about.html @@ -0,0 +1,46 @@ +{% extends 'registration/base_client.html' %} + +{% block title %}About{% endblock %} + +{%block nav%} + Home + Informazioni +{% endblock%} + +{% block content %} +
+
+
+
+

+ Versione software {{version}} +

+
Licenza
+
+ Copyright (C) 2020 Andrea Lepori

+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public License for more details.

+ + You should have received a copy of the GNU General Public License + along with this program. If not, see https://www.gnu.org/licenses/. +
+
Codice sorgente
+
+ git.thearcway.org +
+
+
+
+
+{% endblock %} + +{% block script %} +{% endblock %} \ No newline at end of file diff --git a/client/templates/client/approve.html b/client/templates/client/approve.html index d24df88..ddfc30c 100644 --- a/client/templates/client/approve.html +++ b/client/templates/client/approve.html @@ -4,7 +4,7 @@ {% block nav %} Home - Approva + Approva {% endblock %} {% block content %} diff --git a/client/urls.py b/client/urls.py index 164eefc..b0477d1 100644 --- a/client/urls.py +++ b/client/urls.py @@ -7,4 +7,5 @@ urlpatterns = [ path('approve', views.approve, name='approve'), path('create', views.create, name='create'), path('edit', views.edit, name='edit'), + path('about', views.about, name='about'), ] diff --git a/client/views.py b/client/views.py index c9bb89b..51351dd 100644 --- a/client/views.py +++ b/client/views.py @@ -244,3 +244,12 @@ def edit_wrapper(request, context): return HttpResponseRedirect('/') return render(request, 'client/doc_edit.html', context) + +def about(request): + version = "" + with open("version.txt", 'r') as f: + version = f.read() + if version.startswith("0"): + version = "Beta " + version + context = {"version": version} + return render(request, 'client/about.html', context) \ No newline at end of file -- cgit v1.2.1