to other sub-directories of the static directory (Admins/Staff with the right to edit user accounts were able to set a path like ../static/favicon.png for the profile picture - this isn't a "i'm in, now i have root access and can hack your mom"-vulnerability, but better fix it before it evolves to one. or a dragon. it's too late for this crap.)
42 lines
2 KiB
HTML
42 lines
2 KiB
HTML
{% load i18n %}
|
|
{% load static %}
|
|
|
|
<div class="userPanel">
|
|
<div class="userInfo">
|
|
<img src="{{ '/profilepictures?name='|add:user.profile_picture_filename }}">
|
|
<span>
|
|
{% 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 %}
|
|
</span>
|
|
</div>
|
|
<div class="horizontalButtonList">
|
|
<a class="button" id="navBarBtnHome" href="/">Home</a>
|
|
<a class="button" id="navBarBtnDeposit" href="/deposit">{% translate "Deposit" %}</a>
|
|
<a class="button" href="/accounts/logout">{% translate "Logout" %}</a>
|
|
<div class="dropDownMenu" id="dropDownMenu">
|
|
<button class="dropDownButton" id="dropDownMenuButton">
|
|
<div>{% translate "Account" %}</div>
|
|
</button>
|
|
<div class="dropDownList">
|
|
<a class="button dropDownChoice" id="navBarBtnHistory" href="/history">{% translate "History" %}</a>
|
|
<a class="button dropDownChoice" id="navBarBtnStatistics" href="/statistics">{% translate "Statistics" %}</a>
|
|
{% if user.is_superuser or user.is_staff %}
|
|
<a class="button dropDownChoice" href="/admin/">Admin Panel</a>
|
|
{% endif %}
|
|
{% if user.is_superuser or user.allowed_to_supply %}
|
|
<a class="button dropDownChoice" href="/supply/">{% translate "Supply" %}</a>
|
|
{% endif %}
|
|
<a class="button dropDownChoice" href="/accounts/password_change/">{% translate "Change Password" %}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|