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,7 +44,15 @@ | ||
| 44 | <div class="well well-lg"> | 44 | <div class="well well-lg"> |
| 45 | <div class="row"> | 45 | <div class="row"> |
| 46 | <div class="col-md-4"> | 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 | </div> | 56 | </div> |
| 49 | <div class="col-md-8"> | 57 | <div class="col-md-8"> |
| 50 | <table class="table table-hover table-edited"> | 58 | <table class="table table-hover table-edited"> |
| @@ -123,22 +131,21 @@ | @@ -123,22 +131,21 @@ | ||
| 123 | </tr> | 131 | </tr> |
| 124 | <tr> | 132 | <tr> |
| 125 | <td>{% trans "Institution" %}:</td> | 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 | </tr> | 139 | </tr> |
| 134 | <tr> | 140 | <tr> |
| 135 | <td>{% trans "Curriculum" %}:</td> | 141 | <td>{% trans "Curriculum" %}:</td> |
| 136 | {% if user.curriculum %} | 142 | {% if user.curriculum %} |
| 137 | - <td>{{user.curriculum}}</td> | 143 | + <td> |
| 144 | + <a href="{{user.curriculum.url }}" target="_blank">link</a> | ||
| 145 | + </td> | ||
| 138 | {% else %} | 146 | {% else %} |
| 139 | <td>{% trans "Didn't upload any curriculum" %}</td> | 147 | <td>{% trans "Didn't upload any curriculum" %}</td> |
| 140 | {% endif %} | 148 | {% endif %} |
| 141 | - | ||
| 142 | </tr> | 149 | </tr> |
| 143 | </tbody> | 150 | </tbody> |
| 144 | </table> | 151 | </table> |