Fix dummy avatar in profile settings

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 05085dd0c9
commit ca26dd4c4c
  1. 14
      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__center center center_xs">
<div class="menu">
@ -39,11 +39,11 @@
<div class="form__group">
<div class="form__title">Личные данные</div>
<div class="form__ava ava">
{% if user.photo %}
<img id="photo" class="ava__pic" src="{{user.photo.url}}">
{% else %}
<img id="photo" class="ava__pic" src="{% static 'img/user.jpg' %}">
{% endif %}
{% thumbnail user.photo "120x120" crop="center" as im %}
<img id="photo" class="ava__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />
{% empty %}
<img id="photo" class="ava__pic" src="{% static 'img/no_cover.png' %}" width="120px" height="120px" />
{% endthumbnail %}
<input name="photo" class="ava__input" type="file" accept='image/*' onchange='openFile(event)'>
<div class="ava__icon">
<svg class="icon icon-photo">
@ -266,4 +266,4 @@ var openFile = function(file) {
<script>
(new Inputmask('+7 (999) 999-99-99')).mask(document.querySelector('[name=phone]'));
</script>
{% endblock foot %}
{% endblock foot %}

Loading…
Cancel
Save