aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-07-27 16:34:41 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-07-27 16:34:41 +0200
commit90f23ce16a064eb7cbcfcb25644f3272b7cb5ae6 (patch)
tree9a75abceafbc50aff227ff78cf7028c12c9bb79f /client
parentbug fixes and visual improvements (diff)
downloadscout-subs-90f23ce16a064eb7cbcfcb25644f3272b7cb5ae6.tar.gz
scout-subs-90f23ce16a064eb7cbcfcb25644f3272b7cb5ae6.zip
about page and licence
Diffstat (limited to 'client')
-rw-r--r--client/templates/client/about.html46
-rw-r--r--client/templates/client/approve.html2
-rw-r--r--client/urls.py1
-rw-r--r--client/views.py9
4 files changed, 57 insertions, 1 deletions
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%}
+ <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+ <a href="!#" class="breadcrumb hide-on-med-and-down">Informazioni</a>
+{% endblock%}
+
+{% block content %}
+ <div class="row">
+ <div class="col l4 offset-l4 m8 offset-m2 s12">
+ <div class="card">
+ <div class="card-content">
+ <p>
+ Versione software {{version}}
+ </p>
+ <h5>Licenza</h5>
+ <blockquote>
+ Copyright (C) 2020 Andrea Lepori<br><br>
+
+ 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.<br><br>
+
+ 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.<br><br>
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <a href=https://www.gnu.org/licenses>https://www.gnu.org/licenses/</a>.
+ </blockquote>
+ <h5>Codice sorgente</h5>
+ <blockquote>
+ <a href=git.thearcway.org>git.thearcway.org</a>
+ </blockquote>
+ </div>
+ </div>
+ </div>
+ </div>
+{% 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 %}
<a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
- <a style="margin-left: 10px;" href="{% url 'approve' %}" class="breadcrumb hide-on-med-and-down">Approva</a>
+ <a href="{% url 'approve' %}" class="breadcrumb hide-on-med-and-down">Approva</a>
{% 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