Added support for profile pictures
This commit is contained in:
parent
f5bf77fbed
commit
ca160781dd
7 changed files with 88 additions and 35 deletions
|
@ -2,6 +2,7 @@
|
|||
{% extends "baseLayout.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}
|
||||
{% translate "Drinks - Login" %}
|
||||
|
@ -68,19 +69,20 @@
|
|||
<ul class="userlist">
|
||||
{% for user_ in user_list %}
|
||||
<li class="userlistButton button" data-username="{{ user_.username }}">
|
||||
|
||||
{% if user_.first_name %}
|
||||
<img src="{% static 'profilepictures/'|add:user_.profile_picture_filename %}">
|
||||
<div>
|
||||
{% if user_.first_name %}
|
||||
|
||||
{% if user_.last_name %}
|
||||
{{ user_.last_name }},
|
||||
{% if user_.last_name %}
|
||||
{{ user_.last_name }},
|
||||
{% endif %}
|
||||
|
||||
{{ user_.first_name }}
|
||||
|
||||
{% else %}
|
||||
{{ user_.username }}
|
||||
{% endif %}
|
||||
|
||||
{{ user_.first_name }}
|
||||
|
||||
{% else %}
|
||||
{{ user_.username }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
<div class="userPanel">
|
||||
<div class="userInfo">
|
||||
{% 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 %}
|
||||
<img src="{% static 'profilepictures/'|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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue