Commit 745e5f6cbda12fe294de70060ccf16acebf468fa
1 parent
738ceb6e
Exists in
master
and in
5 other branches
Fixing avatar error #185
Showing
1 changed file
with
17 additions
and
10 deletions
Show diff stats
users/templates/users/profile.html
... | ... | @@ -44,7 +44,15 @@ |
44 | 44 | <div class="well well-lg"> |
45 | 45 | <div class="row"> |
46 | 46 | <div class="col-md-4"> |
47 | - <img src="{{ user.image_url }}" class="img-responsive center-block img-circle" alt="foto perfil" style="max-height:174px"> | |
47 | + {% if user.image %} | |
48 | + <div style="background-image: url('{{ user.image.url }}'); background-size: 100% 100%; background-repeat: no-repeat; margin-left: 8em;" alt="photoUser" class="img-circle img-responsive img-list-user"></div> | |
49 | + {% else %} | |
50 | + {% if usser.gender == 'M' %} | |
51 | + <img src="{% static 'img/male_avatar.png' %}" alt="Avatar" class="img-circle img-responsive img-list-user" style="margin-left: 8em;"> | |
52 | + {% else %} | |
53 | + <img src="{% static 'img/female_avatar.png' %}" alt="Avatar" class="img-circle img-responsive img-list-user" style="margin-left: 8em;"> | |
54 | + {% endif %} | |
55 | + {% endif %} | |
48 | 56 | </div> |
49 | 57 | <div class="col-md-8"> |
50 | 58 | <table class="table table-hover table-edited"> |
... | ... | @@ -123,22 +131,21 @@ |
123 | 131 | </tr> |
124 | 132 | <tr> |
125 | 133 | <td>{% trans "Institution" %}:</td> |
126 | - {% if user.institution %} | |
127 | - <td>{{user.institution}}</td> | |
128 | - {% else %} | |
129 | - <td>{% trans "Didn't inform institution" %}</td> | |
130 | - {% endif %} | |
131 | - | |
132 | - | |
134 | + {% if user.institution %} | |
135 | + <td>{{user.institution}}</td> | |
136 | + {% else %} | |
137 | + <td>{% trans "Didn't inform institution" %}</td> | |
138 | + {% endif %} | |
133 | 139 | </tr> |
134 | 140 | <tr> |
135 | 141 | <td>{% trans "Curriculum" %}:</td> |
136 | 142 | {% if user.curriculum %} |
137 | - <td>{{user.curriculum}}</td> | |
143 | + <td> | |
144 | + <a href="{{user.curriculum.url }}" target="_blank">link</a> | |
145 | + </td> | |
138 | 146 | {% else %} |
139 | 147 | <td>{% trans "Didn't upload any curriculum" %}</td> |
140 | 148 | {% endif %} |
141 | - | |
142 | 149 | </tr> |
143 | 150 | </tbody> |
144 | 151 | </table> | ... | ... |