Fix dummy avatar in profile settings

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 05085dd0c9
commit ca26dd4c4c
  1. 12
      apps/user/templates/user/profile-settings.html

@ -1,4 +1,4 @@
{% extends "templates/lilcity/index.html" %} {% load static %} {% block content %} {% extends "templates/lilcity/index.html" %} {% load static %} {% load thumbnail %} {% block content %}
<div class="section section_gray section_menu"> <div class="section section_gray section_menu">
<div class="section__center center center_xs"> <div class="section__center center center_xs">
<div class="menu"> <div class="menu">
@ -39,11 +39,11 @@
<div class="form__group"> <div class="form__group">
<div class="form__title">Личные данные</div> <div class="form__title">Личные данные</div>
<div class="form__ava ava"> <div class="form__ava ava">
{% if user.photo %} {% thumbnail user.photo "120x120" crop="center" as im %}
<img id="photo" class="ava__pic" src="{{user.photo.url}}"> <img id="photo" class="ava__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />
{% else %} {% empty %}
<img id="photo" class="ava__pic" src="{% static 'img/user.jpg' %}"> <img id="photo" class="ava__pic" src="{% static 'img/no_cover.png' %}" width="120px" height="120px" />
{% endif %} {% endthumbnail %}
<input name="photo" class="ava__input" type="file" accept='image/*' onchange='openFile(event)'> <input name="photo" class="ava__input" type="file" accept='image/*' onchange='openFile(event)'>
<div class="ava__icon"> <div class="ava__icon">
<svg class="icon icon-photo"> <svg class="icon icon-photo">

Loading…
Cancel
Save