Fix dummy user photo in profile

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 0d8356c18a
commit 7ddeb29998
  1. 14
      apps/user/templates/user/profile.html

@ -1,17 +1,15 @@
{% extends "templates/lilcity/index.html" %} {% load static %} {% block content %}
{% extends "templates/lilcity/index.html" %} {% load static %} {% load thumbnail %} {% block content %}
<div class="section">
<div class="section__center center">
<div class="profile">
<a class="profile__btn profile__btn_edit btn" href="{% url 'user-edit-profile' user.id %}">Редактировать</a>
{% if user.photo %}
<div class="profile__ava ava">
<img class="ava__pic" src="{{ user.photo.url }}">
{% thumbnail user.photo "120x120" crop="center" as im %}
<img class="ava__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />
{% empty %}
<img class="ava__pic" src="{% static 'img/no_cover.png' %}" width="120px" height="120px" />
{% endthumbnail %}
</div>
{% else %}
<div class="profile__ava ava">
<img class="ava__pic" src="{% static 'img/user.jpg' %}">
</div>
{% endif %}
<div class="profile__wrap">
<div class="profile__name">{{ user.get_full_name }}</div>
<div class="profile__share share share_sm">

Loading…
Cancel
Save