Commit bab5c53dba7985b4a0780361ecf490d57709f34c
1 parent
43160328
Exists in
master
and in
5 other branches
Message tag -User image #55
Showing
1 changed file
with
7 additions
and
3 deletions
Show diff stats
users/templates/list_users.html
1 | 1 | {% extends 'home.html' %} |
2 | 2 | |
3 | -{% load i18n pagination django_bootstrap_breadcrumbs %} | |
3 | +{% load i18n pagination django_bootstrap_breadcrumbs static %} | |
4 | 4 | |
5 | 5 | {% block breadcrumbs %} |
6 | 6 | |
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | {% block content %} |
27 | 27 | {% if messages %} |
28 | 28 | {% for message in messages %} |
29 | - <div class="alert alert-success alert-dismissible" role="alert"> | |
29 | + <div class="alert alert-{{ message.tag }} alert-dismissible" role="alert"> | |
30 | 30 | <button type="button" class="close" data-dismiss="alert" aria-label="Close"> |
31 | 31 | <span aria-hidden="true">×</span> |
32 | 32 | </button> |
... | ... | @@ -50,7 +50,11 @@ |
50 | 50 | <div class="row panel panel-default"> |
51 | 51 | <div class="panel-body"> |
52 | 52 | <div class="col-md-4"> |
53 | - <img src="{{ acc.image.url }}" alt="photoUser" class="img-circle img-responsive"> | |
53 | + {% if acc.image %} | |
54 | + <img src="{{ acc.image.url }}" alt="photoUser" class="img-circle img-responsive"> | |
55 | + {% else %} | |
56 | + <img src="{% static 'images/avatar.png' %}" alt="Avatar" class="img-circle img-responsive"> | |
57 | + {% endif %} | |
54 | 58 | </div> |
55 | 59 | <div class="col-md-8"> |
56 | 60 | <p>{% trans 'Name' %}: {{ acc.name }}</p> | ... | ... |