diff options
Diffstat (limited to '')
-rw-r--r-- | client/templates/client/about.html | 46 | ||||
-rw-r--r-- | client/templates/client/approve.html | 2 | ||||
-rw-r--r-- | client/urls.py | 1 | ||||
-rw-r--r-- | client/views.py | 9 |
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 |