Initial commit - existing project files
This commit is contained in:
commit
c49798a9ea
82 changed files with 4304 additions and 0 deletions
18
application/app/templates/admin/base_site.html
Normal file
18
application/app/templates/admin/base_site.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{% if subtitle %}
|
||||
{{ subtitle }} |
|
||||
{% endif %}
|
||||
{{ title }} | {{ site_title|default:_('Django site admin') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block extrahead %}
|
||||
<link rel="shortcut icon" href="/static/favicon.png" sizes="480x480" />
|
||||
{% endblock %}
|
||||
|
||||
{% block branding %}
|
||||
<h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Django administration') }}</a></h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav-global %}{% endblock %}
|
19
application/app/templates/admin/index.html
Normal file
19
application/app/templates/admin/index.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% extends "admin/index.html" %}
|
||||
|
||||
{% block sidebar %}
|
||||
|
||||
{{ block.super }}
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<p>Current Register Balance: {{ registerBalance }}{{ currency_suffix }}</p>
|
||||
{% if global_message != "" %}
|
||||
<p>Global Message: {{ global_message }}</p>
|
||||
{% endif %}
|
||||
{% if admin_info != "" %}
|
||||
<p>Admin Info: {{ admin_info }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
59
application/app/templates/baseLayout.html
Normal file
59
application/app/templates/baseLayout.html
Normal file
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.95">
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
<link rel="shortcut icon" href="/static/favicon.png" sizes="480x480" />
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
{% block headAdditional %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="baseLayout">
|
||||
|
||||
{% include "globalMessage.html" %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
|
||||
<div class="userPanel">
|
||||
{% include "userPanel.html" %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<main>
|
||||
|
||||
{% if user.is_authenticated or "accounts/login/" in request.path or "accounts/logout/" in request.path %}
|
||||
|
||||
<h1>{% block heading %}{% endblock %}</h1>
|
||||
<div class="content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class="centeringFlex">
|
||||
{% translate "An error occured. Please log out and log in again." %}
|
||||
<br>
|
||||
<a href="/accounts/logout">log out</a>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</main>
|
||||
|
||||
{% include "footer.html" %}
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
39
application/app/templates/deposit.html
Normal file
39
application/app/templates/deposit.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
{% extends "baseLayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - Deposit" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headAdditional %}
|
||||
<link rel="stylesheet" href="/static/css/deposit.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% translate "Deposit" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form id="depositForm">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="row">
|
||||
<div class="column">{% translate "Amount" %} {{ currency_suffix }}:</div>
|
||||
<div class="column"><input type="number" name="depositAmount" id="depositAmount" max="9999.99" min="1.00"
|
||||
step="0.01" autofocus></div>
|
||||
</div>
|
||||
|
||||
<div id="statusInfo"></div>
|
||||
|
||||
<div class="horizontalButtonList">
|
||||
<a href="/" class="button">{% translate "cancel" %}</a>
|
||||
<input type="submit" id="depositSubmitBtn" class="button" value='{% translate "confirm" %}'>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script src="/static/js/deposit.js"></script>
|
||||
|
||||
{% endblock %}
|
6
application/app/templates/footer.html
Normal file
6
application/app/templates/footer.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% load i18n %}
|
||||
|
||||
<div class="footer">
|
||||
<div>Version {{ app_version }}</div>
|
||||
<div>Copyright (C) 2021, <a href="https://gitlab.com/W13R">Julian Müller (W13R)</a></div>
|
||||
</div>
|
5
application/app/templates/globalMessage.html
Normal file
5
application/app/templates/globalMessage.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% if global_message != "" %}
|
||||
<div class="globalMessage">
|
||||
<div>{{ global_message }}</div>
|
||||
</div>
|
||||
{% endif %}
|
36
application/app/templates/history.html
Normal file
36
application/app/templates/history.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{% extends "baseLayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - History" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headAdditional %}
|
||||
<link rel="stylesheet" href="/static/css/history.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% translate "History" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if history %}
|
||||
<table class="history">
|
||||
<tr>
|
||||
<th>{% translate "last 30 actions" %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
{% for h in history %}
|
||||
<tr>
|
||||
<td>{{ h.0 }}</td>
|
||||
<td class="historyDate">{{ h.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
{% translate "No history." %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
47
application/app/templates/index.html
Normal file
47
application/app/templates/index.html
Normal file
|
@ -0,0 +1,47 @@
|
|||
{% extends "baseLayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - Home" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headAdditional %}
|
||||
<link rel="stylesheet" href="/static/css/index.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% translate "Available Drinks" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if available_drinks %}
|
||||
|
||||
<ul class="availableDrinksList">
|
||||
{% for drink in available_drinks %}
|
||||
{% if drink.binary_availability %}
|
||||
<li>
|
||||
<a class="button" href="/order/{{ drink.id }}">
|
||||
<span>{{ drink }}</span>
|
||||
<span>{% translate "available" %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a class="button" href="/order/{{ drink.id }}">
|
||||
<span>{{ drink }}</span>
|
||||
<span>{{ drink.available }} {% translate "available" %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% else %}
|
||||
|
||||
{% translate "No drinks available." %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
99
application/app/templates/order.html
Normal file
99
application/app/templates/order.html
Normal file
|
@ -0,0 +1,99 @@
|
|||
{% extends "baseLayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - Order" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headAdditional %}
|
||||
<link rel="stylesheet" href="/static/css/order.css">
|
||||
<link rel="stylesheet" href="/static/css/customNumberInput.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% translate "Order" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if drink and drink.available > 0 and not drink.deleted %}
|
||||
|
||||
{% if user.balance > 0 or user.allow_order_with_negative_balance %}
|
||||
|
||||
<form id="orderForm">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="row">
|
||||
<div class="column">{% translate "Drink" %}:</div>
|
||||
<div class="column">{{ drink.product_name }}</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="column">{% translate "Price per Item" %} ({{ currency_suffix }}):</div>
|
||||
<div class="column" id="pricePerDrink" data-drink-price="{{ drink.price }}">{{ drink.price }}</div>
|
||||
</div>
|
||||
|
||||
{% if not drink.binary_availability %}
|
||||
<div class="row">
|
||||
<div class="column">{% translate "Available" %}:</div>
|
||||
<div class="column">{{ drink.available }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="column">{% translate "Count" %}:</div>
|
||||
<div class="column">
|
||||
<span class="customNumberInput">
|
||||
<button type="button" class="customNumberInput-minus" id="numberOfDrinksBtnA">-</button>
|
||||
{% if drink.binary_availability %}
|
||||
<input type="number" class="customNumberInputField" name="numberOfDrinks" id="numberOfDrinks"
|
||||
min="1" max="100" value="1">
|
||||
{% else %}
|
||||
<input type="number" class="customNumberInputField" name="numberOfDrinks" id="numberOfDrinks"
|
||||
max="{{ drink.available }}" min="1" max="100" value="1">
|
||||
{% endif %}
|
||||
<button type="button" class="customNumberInput-plus" id="numberOfDrinksBtnB">+</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="column">{% translate "Sum" %} ({{ currency_suffix }}):</div>
|
||||
<div class="column" id="orderCalculatedSum">{{ drink.price }}</div>
|
||||
</div>
|
||||
|
||||
<div id="statusInfo"></div>
|
||||
|
||||
<input type="hidden" name="drinkID" id="drinkID" value="{{ drink.id }}">
|
||||
|
||||
<div class="horizontalButtonList">
|
||||
<a href="/" class="button">{% translate "cancel" %}</a>
|
||||
<input type="submit" id="orderSubmitBtn" class="button" value='{% translate "order" %}'>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script src="/static/js/order.js"></script>
|
||||
<script src="/static/js/customNumberInput.js"></script>
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class="centeringFlex">
|
||||
<p>{% translate "You can't order this, because you have a negative balance." %}</p>
|
||||
<a href="/">{% translate "back" %}</a>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class="centeringFlex">
|
||||
<p>{% translate "This drink is not available." %}</p>
|
||||
<a href="/">{% translate "back" %}</a>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
24
application/app/templates/registration/logged_out.html
Normal file
24
application/app/templates/registration/logged_out.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
{% extends "baseLayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - Logged Out" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headAdditional %}
|
||||
<link rel="stylesheet" href="/static/css/login.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="centeringFlex">
|
||||
{% translate "Logged out! You will be redirected shortly." %}
|
||||
<br><br>
|
||||
<a href="/">{% translate "Click here if automatic redirection does not work." %}</a>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/logged_out.js"></script>
|
||||
|
||||
{% endblock %}
|
91
application/app/templates/registration/login.html
Normal file
91
application/app/templates/registration/login.html
Normal file
|
@ -0,0 +1,91 @@
|
|||
|
||||
{% extends "baseLayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - Login" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headAdditional %}
|
||||
<link rel="stylesheet" href="/static/css/login.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if error_message %}
|
||||
<p class="errorText">{{ error_message }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="passwordOverlayContainer nodisplay" id="passwordOverlayContainer">
|
||||
|
||||
<div class="passwordOverlay">
|
||||
|
||||
<form method="post" action="{% url 'login' %}">
|
||||
{% csrf_token %}
|
||||
<h1>{% translate "Log in" %}</h1>
|
||||
<input type="text" name="username" autofocus="" autocapitalize="none" autocomplete="username" maxlength="150" required="" id="id_username">
|
||||
<input type="password" name="password" autocomplete="current-password" required="" id="id_password" placeholder='{% translate "Password/PIN" %}'>
|
||||
|
||||
<div class="pinpad">
|
||||
<table>
|
||||
<tr>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="1">1</button></td>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="2">2</button></td>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="3">3</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="4">4</button></td>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="5">5</button></td>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="6">6</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="7">7</button></td>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="8">8</button></td>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="9">9</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="0">0</button></td>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="x">x</button></td>
|
||||
<td><button type="button" class="pinpadBtn" data-btn="enter">⏎</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="horizontalButtonList">
|
||||
<button type="button" id="pwoCancel">{% translate "cancel" %}</button>
|
||||
<input class="button" id="submit_login" type="submit" value='{% translate "login" %}' />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1>{% translate "Choose your account" %}</h1>
|
||||
|
||||
<div class="userlistContainer">
|
||||
<ul class="userlist">
|
||||
{% for user_ in user_list %}
|
||||
<li class="userlistButton button" data-username="{{ user_.username }}">
|
||||
|
||||
{% if user_.first_name %}
|
||||
|
||||
{{ user_.first_name }}
|
||||
|
||||
{% if user_.last_name %}
|
||||
{{ user_.last_name }}
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
{{ user_.username }}
|
||||
{% endif %}
|
||||
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/login.js"></script>
|
||||
|
||||
{% endblock %}
|
179
application/app/templates/statistics.html
Normal file
179
application/app/templates/statistics.html
Normal file
|
@ -0,0 +1,179 @@
|
|||
{% extends "baseLayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - Statistics" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headAdditional %}
|
||||
<link rel="stylesheet" href="/static/css/statistics.css">
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block heading %}
|
||||
{% translate "Statistics" %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="mainContainer">
|
||||
|
||||
<div class="dropDownMenu" id="statisticsDropDownMenu">
|
||||
<button class="dropDownButton" id="statisticsDropDownMenuButton">
|
||||
<div>
|
||||
{% translate "Choose" %}
|
||||
</div>
|
||||
</button>
|
||||
<div class="dropDownList">
|
||||
<button class="sChoice dropDownChoice" data-statistics_div="noyopd">
|
||||
{% translate "Your orders per drink" %}
|
||||
</button>
|
||||
<button class="sChoice dropDownChoice" data-statistics_div="yopwd">
|
||||
{% translate "Your orders per weekday" %}
|
||||
</button>
|
||||
<button class="sChoice dropDownChoice" data-statistics_div="yopml12m">
|
||||
{% translate "Your orders per month (last 12 months)" %}
|
||||
</button>
|
||||
<button class="sChoice dropDownChoice" data-statistics_div="noaopd">
|
||||
{% translate "All orders per drink" %}
|
||||
</button>
|
||||
<button class="sChoice dropDownChoice" data-statistics_div="aopwd">
|
||||
{% translate "All orders per weekday" %}
|
||||
</button>
|
||||
<button class="sChoice dropDownChoice" data-statistics_div="aopml12m">
|
||||
{% translate "All orders per month (last 12 months)" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tablesContainer">
|
||||
|
||||
<div id="noyopd" class="statisticsTable nodisplay">
|
||||
<h1>{% translate "Your orders per drink" %}</h1>
|
||||
{% if noyopd %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "drink" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in noyopd %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="noaopd" class="statisticsTable nodisplay">
|
||||
<h1>{% translate "All orders per drink" %}</h1>
|
||||
{% if noaopd %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "drink" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in noaopd %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="yopml12m" class="statisticsTable nodisplay">
|
||||
<h1>{% translate "Your orders per month (last 12 months)" %}</h1>
|
||||
{% if yopml12m %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "month" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in yopml12m %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="aopml12m" class="statisticsTable nodisplay">
|
||||
<h1>{% translate "All orders per month (last 12 months)" %}</h1>
|
||||
{% if aopml12m %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "month" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in aopml12m %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="yopwd" class="statisticsTable nodisplay">
|
||||
<h1>{% translate "Your orders per weekday" %}</h1>
|
||||
{% if yopwd %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "day" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in yopwd %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="aopwd" class="statisticsTable nodisplay">
|
||||
<h1>{% translate "All orders per weekday" %}</h1>
|
||||
{% if aopwd %}
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% translate "day" %}</th>
|
||||
<th>{% translate "count" %}</th>
|
||||
</tr>
|
||||
{% for row in aopwd %}
|
||||
<tr>
|
||||
<td>{{ row.0 }}</td>
|
||||
<td>{{ row.1 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div>{% translate "No history." %}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/js/statistics.js"></script>
|
||||
|
||||
{% endblock %}
|
31
application/app/templates/userPanel.html
Normal file
31
application/app/templates/userPanel.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
{% load i18n %}
|
||||
|
||||
<div class="dropDownMenu" id="dropDownMenu">
|
||||
<button class="dropDownButton" id="dropDownMenuButton">
|
||||
<div>
|
||||
{% if user.first_name != "" %}
|
||||
{% translate "User" %}: {{ user.first_name }} {{ user.last_name }} ({{ user.username }})
|
||||
{% else %}
|
||||
{% translate "User" %}: {{ user.username }}
|
||||
{% endif %}
|
||||
-
|
||||
{% if user.balance < 0.01 %}
|
||||
<span class="userBalanceWarn">{% translate "Balance" %}: {{ user.balance }}{{ currency_suffix }}</span>
|
||||
{% else %}
|
||||
<span>{% translate "Balance" %}: {{ user.balance }}{{ currency_suffix }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</button>
|
||||
<div class="dropDownList">
|
||||
<a class="button dropDownChoice" id="navBarBtnHome" href="/">Home</a>
|
||||
<a class="button dropDownChoice" id="navBarBtnHistory" href="/history">{% translate "History" %}</a>
|
||||
<a class="button dropDownChoice" id="navBarBtnStatistics" href="/statistics">{% translate "Statistics" %}</a>
|
||||
<a class="button dropDownChoice" id="navBarBtnDeposit" href="/deposit">{% translate "Deposit" %}</a>
|
||||
{% if user.is_superuser %}
|
||||
<a class="button dropDownChoice" href="/admin/">Admin Panel</a>
|
||||
{% else %}
|
||||
<a class="button dropDownChoice" href="/accounts/password_change/">{% translate "Change Password" %}</a>
|
||||
{% endif %}
|
||||
<a class="button dropDownChoice" href="/accounts/logout">{% translate "Logout" %}</a>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue