drinks-manager/app/templates/userpanel.html

36 lines
2 KiB
HTML
Raw Normal View History

{% load i18n %}
2022-08-06 18:56:39 +02:00
{% load static %}
2023-02-17 22:01:09 +01:00
<div class="flex flex-center userpanel">
<div class="userinfo text-align-center">
<img src="/profilepictures/{{ user.profile_picture_filename|urlencode }}"><span>{% if user.first_name != "" %}
{{ user.first_name }} {{ user.last_name }} ({{ user.username }}){% else %}{{ user.username }}{% endif %}
2022-08-06 18:56:39 +02:00
&nbsp;-&nbsp;
{% if user.balance < 0.01 %}
<span class="userbalancewarn">{% translate "Balance" %}: {{ user.balance }} {{ currency_suffix }}</span>
2022-08-06 18:56:39 +02:00
{% else %}
<span>{% translate "Balance" %}: {{ user.balance }} {{ currency_suffix }}</span>
2022-08-06 18:56:39 +02:00
{% endif %}
</span>
2022-05-14 11:28:32 +02:00
</div>
2023-02-17 22:01:09 +01:00
<div class="flex flex-row flex-center flex-wrap userpanel-buttons">
<a class="button" href="/">Home</a>
<a class="button" href="/deposit">{% translate "Deposit" %}</a>
<a class="button" href="/accounts/logout">{% translate "Logout" %}</a>
<div class="dropdownmenu" id="dropdownmenu">
<button class="dropdownbutton" id="dropdownmenu-button"><img src="/static/menu-icon.svg"></button>
<div class="dropdownlist">
<a class="button dropdownchoice" href="/history">{% translate "History" %}</a>
<a class="button dropdownchoice" href="/statistics">{% translate "Statistics" %}</a>
{% if user.is_superuser or user.is_staff %}
2023-02-17 22:01:09 +01:00
<a class="button dropdownchoice" href="/admin/">Admin Panel</a>
2022-05-14 11:28:32 +02:00
{% endif %}
<a class="button dropdownchoice" href="/transfer/">{% translate "Transfer" %}</a>
{% if user.is_superuser or user.allowed_to_supply %}
2023-02-17 22:01:09 +01:00
<a class="button dropdownchoice" href="/supply/">{% translate "Supply" %}</a>
{% endif %}
<a class="button dropdownchoice" href="/accounts/password_change/">{% translate "Change Password" %}</a>
2022-05-14 11:28:32 +02:00
</div>
</div>
</div>
2023-02-17 22:01:09 +01:00
</div>