aboutsummaryrefslogtreecommitdiffstats
path: root/client/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-06-18 23:17:08 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-06-18 23:17:08 +0200
commitfbb4637a77dc5982b4e694dd31a0aa7d11cec17c (patch)
tree2b277a09a8dacff187211cacfad7da5b5a3dda9b /client/templates
downloadscout-subs-fbb4637a77dc5982b4e694dd31a0aa7d11cec17c.tar.gz
scout-subs-fbb4637a77dc5982b4e694dd31a0aa7d11cec17c.zip
initial commit
Diffstat (limited to '')
-rw-r--r--client/templates/client/approve.html18
-rw-r--r--client/templates/client/index.html36
2 files changed, 54 insertions, 0 deletions
diff --git a/client/templates/client/approve.html b/client/templates/client/approve.html
new file mode 100644
index 0000000..026a66d
--- /dev/null
+++ b/client/templates/client/approve.html
@@ -0,0 +1,18 @@
+{% extends 'registration/base.html' %}
+
+{% block title %}Approva{% endblock %}
+
+{% block nav %}
+<nav>
+ <div class="nav-wrapper">
+ <div class="col s12">
+ <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+ <a href="#!" class="breadcrumb">Approva</a>
+ </div>
+ </div>
+</nav>
+{% endblock %}
+
+{% block content %}
+{{ code }}
+{% endblock %} \ No newline at end of file
diff --git a/client/templates/client/index.html b/client/templates/client/index.html
new file mode 100644
index 0000000..2c55dbc
--- /dev/null
+++ b/client/templates/client/index.html
@@ -0,0 +1,36 @@
+{% extends 'registration/base.html' %}
+
+{% block title %}Home{% endblock %}
+
+{%block nav%}
+<nav>
+ <div class="nav-wrapper">
+ <a style="margin-left: 10px;" href="{% url 'index' %}" class="breadcrumb">Home</a>
+ <ul class="right hide-on-med-and-down">
+ <li>{{ user.username}}</li>
+ <li><a href="{% url 'logout' %}">Logout</a></li>
+ </ul>
+ </div>
+</nav>
+{% endblock%}
+
+{% block content %}
+{% if user.is_authenticated %}
+ {% if user.is_staff %}
+ Ciao {{ user.username }}!
+ <p><a class="waves-effect waves-light btn" href="{% url 'server' %}">admin</a>
+ <a class="waves-effect waves-light btn" href="{% url 'logout' %}">logout</a></p>
+ {% elif perms.client.approved %}
+ Ciao {{ user.username }}!
+ <p><a class="waves-effect waves-light btn" href="{% url 'logout' %}">logout</a></p>
+ {% else %}
+ Il tuo utente non e` ancora stato approvato.
+ <p><a class="waves-effect waves-light btn" href="{% url 'approve' %}">approva</a>
+ <a class="waves-effect waves-light btn" href="{% url 'logout' %}">logout</a></p>
+ {% endif %}
+{% else %}
+ <p>Non hai fatto il login</p>
+ <p><a class="waves-effect waves-light btn" href="{% url 'login' %}">login</a>
+ <a class="waves-effect waves-light btn" href="{% url 'signup' %}">registrazione</a></p>
+{% endif %}
+{% endblock %} \ No newline at end of file