clean templates, add userdetail and proper landing page
This commit is contained in:
parent
413728b24f
commit
96ff186913
13 changed files with 253 additions and 80 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "base.html" %}
|
||||
{% extends "member_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block container %}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,23 @@
|
|||
{% extends "base.html" %}
|
||||
{% extends "form_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<h2>Gastro-Pin</h2>
|
||||
{% if message %}
|
||||
<div class="alert alert-success">{{ message }}</div>
|
||||
{% endif %}
|
||||
<form action="/gastropin/" method="post">
|
||||
{{ form.non_field_errors }}
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
{% block form_title %}{% trans "Gastro PIN"%}{% endblock %}
|
||||
|
||||
{% block form_description %}
|
||||
<p>{% blocktrans %}Change your Gastro PIN to access the vending machines.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block form_fields %}
|
||||
{{ form.non_field_errors }}
|
||||
<form action="{% url account.views.gastropin %}" method="post" class="form-horizontal well">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary">{% trans "Save"%}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</form>
|
||||
{% endblock form_fields %}
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
|
|
@ -7,11 +9,15 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span">
|
||||
<form class="form" action="/account/login/?next={{ redirect_to }}" method="post">
|
||||
<div class="well">
|
||||
<form class="form form-horizontal" action="/account/login/?next={{ redirect_to }}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input class="btn" type="submit" value="login"/>
|
||||
{{ form|crispy }}
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary">{% trans "Login" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
43
account/templates/member_base.html
Normal file
43
account/templates/member_base.html
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
<ul class="nav nav-tabs">
|
||||
{% url account.views.home as home_url %}
|
||||
<li class="{% if request.path == home_url %}active{% endif %}">
|
||||
<a href="{{ home_url }}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
{% url account.views.password as password_url %}
|
||||
<li class="{% if request.path == password_url %}active{% endif %}">
|
||||
<a href="{{ password_url }}">{% trans "Password" %}</a>
|
||||
</li>
|
||||
{% url account.views.gastropin as gastro_url %}
|
||||
<li class="{% if request.path == gastro_url %}active{% endif %}">
|
||||
<a href="{{ gastro_url }}">{% trans "Gastro-PIN" %}</a>
|
||||
</li>
|
||||
{% url account.views.wlan_presence as wlan_presence_url %}
|
||||
<li class="{% if request.path == wlan_presence_url %}active{% endif %}">
|
||||
<a href="{{ wlan_presence_url }}">{% trans "WiFi presence" %}</a>
|
||||
</li>
|
||||
{% url account.views.rfid as rfid_url %}
|
||||
<li class="{% if request.path == rfid_url %}active{% endif %}">
|
||||
<a href="{{ rfid_url }}">{% trans "RFID" %}</a>
|
||||
</li>
|
||||
{% url account.views.nrf24 as nrf24_url %}
|
||||
<li class="{% if request.path == nrf24_url %}active{% endif %}">
|
||||
<a href="{{ nrf24_url }}">{% trans "NRF24" %}</a>
|
||||
</li>
|
||||
{% url account.views.sippin as sippin_url %}
|
||||
<li class="{% if request.path == sippin_url %}active{% endif %}">
|
||||
<a href="{{ sippin_url }}">{% trans "SIP-PIN" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% block container %}{% endblock container %}
|
||||
|
||||
<hr />
|
||||
<div class="row pull-right">
|
||||
<small class="muted">Copyright © 2013 by c-base e.V.</small>
|
||||
</div>
|
||||
</div><!-- /.container -->
|
||||
{% endblock body %}
|
||||
23
account/templates/password.html
Normal file
23
account/templates/password.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{% extends "form_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block form_title %}{% trans "Password"%}{% endblock %}
|
||||
|
||||
{% block form_description %}
|
||||
<p>{% blocktrans %}You can change your password here.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block form_fields %}
|
||||
{{ form.non_field_errors }}
|
||||
<form action="{% url account.views.password %}" method="post" class="form-horizontal well">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary">{% trans "Save"%}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock form_fields %}
|
||||
23
account/templates/sippin.html
Normal file
23
account/templates/sippin.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{% extends "form_base.html" %}
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block form_title %}{% trans "SIP PIN"%}{% endblock %}
|
||||
|
||||
{% block form_description %}
|
||||
<p>{% blocktrans %}The SIP PIN is your access to the c-base SIP server for voice telephony.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block form_fields %}
|
||||
{{ form.non_field_errors }}
|
||||
<form action="{% url account.views.sippin %}" method="post" class="form-horizontal well">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary">{% trans "Save"%}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock form_fields %}
|
||||
51
account/templates/start.html
Normal file
51
account/templates/start.html
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{% extends "member_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block container %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<h2>{% trans "Welcome to the c-base member interface" %}</h2>
|
||||
<p class="lead">{% blocktrans %}Here you can change
|
||||
some parameters of your c-base member account.{% endblocktrans %}</p>
|
||||
|
||||
<h3>{% trans "Basic information about your account" %}</h3>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>{% trans "Your user ID:" %}
|
||||
<code>{{ member.uid }}</code></li>
|
||||
<li>{% trans "Numeric user ID:" %}
|
||||
<code>{{ member.uidNumber }}</code><br />
|
||||
<span class="muted">{% blocktrans %}The numeric user ID can be used to login with
|
||||
the vending machines and network connected combination
|
||||
locks.{% endblocktrans %}</span></li>
|
||||
<li>
|
||||
{% trans "Your c-base e-mail address:" %}
|
||||
<code>{{ member.mail }}</code>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>{% trans "Management information" %}</h3>
|
||||
|
||||
<ul>
|
||||
<li>{% trans "Name:" %}
|
||||
{{ member.displayName }}
|
||||
</li>
|
||||
<li>
|
||||
{% trans "External e-mail address:" %}
|
||||
{{ member.externalEmail }}<br>
|
||||
<span class="muted">{% blocktrans %}The external e-mail address is used by the
|
||||
board of c-base to reach you in cases where your c-base
|
||||
address (see above) is not working. To change your
|
||||
externe e-mail address please contact the c-base board
|
||||
(<a href="mailto:vorstand@c-base.org">vorstand@c-base.org</a>).{% endblocktrans %}</span>
|
||||
</li>
|
||||
<li>
|
||||
{% trans "Your c-base member account balance:" %}
|
||||
<a class="btn btn-small" href="https://vorstand.c-base.org/member/">{% trans "Check balance" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock container %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue