drinks-manager/app/templates/userpanel.html

42 lines
2 KiB
HTML
Raw Permalink 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">
<img src="/profilepictures/{{ user.profile_picture_filename|urlencode }}">
2022-08-06 18:56:39 +02:00
<span>
{% if user.first_name != "" %}
2023-02-17 22:01:09 +01:00
{% translate "User" %}: {{ user.first_name }} {{ user.last_name }} ({{ user.username }})
2022-08-06 18:56:39 +02:00
{% else %}
2023-02-17 22:01:09 +01:00
{% translate "User" %}: {{ user.username }}
2022-08-06 18:56:39 +02:00
{% endif %}
&nbsp;-&nbsp;
{% if user.balance < 0.01 %}
2023-02-17 22:01:09 +01:00
<span class="userbalancewarn">{% translate "Balance" %}: {{ user.balance }}{{ currency_suffix }}</span>
2022-08-06 18:56:39 +02:00
{% else %}
2023-02-17 22:01:09 +01:00
<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">
2022-05-14 11:28:32 +02:00
<div>{% translate "Account" %}</div>
</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 %}
{% 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>