Commit b3fb9eed9ca42f339eca9c6ac8dc6702e57f440a
1 parent
6697cc58
Exists in
master
and in
5 other branches
added image support #207
Showing
3 changed files
with
14 additions
and
5 deletions
Show diff stats
app/templates/home_teacher_student_content.html
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | 7 | ||
8 | <div class="row"> | 8 | <div class="row"> |
9 | <div class="col-xs-2 col-md-1"> | 9 | <div class="col-xs-2 col-md-1"> |
10 | - <img class="imgTimeLine" src="{{ notification.user.image_url }}"> | 10 | + <img class="imgTimeLine" src="{{ notification.actor.image_url }}"> |
11 | </div> | 11 | </div> |
12 | <div class="col-xs-10 col-md-11"> | 12 | <div class="col-xs-10 col-md-11"> |
13 | <h4 class="resource_inline"><b>{{ notification.actor.username }}</b></h4> | 13 | <h4 class="resource_inline"><b>{{ notification.actor.username }}</b></h4> |
core/static/css/base/amadeus.css
core/templates/notifications.html
@@ -5,8 +5,13 @@ | @@ -5,8 +5,13 @@ | ||
5 | <li> | 5 | <li> |
6 | <a href="{% url 'core:notification_read' notification.id %}"><div class="list-group-item"> | 6 | <a href="{% url 'core:notification_read' notification.id %}"><div class="list-group-item"> |
7 | <div class="row-picture"> | 7 | <div class="row-picture"> |
8 | - <img class="circle" src="http://lorempixel.com/56/56/people/1" alt="icon"> | ||
9 | - <div class="least-content ">{{ notification.datetime }}</div> | 8 | + {% if notification.actor.image %} |
9 | + <img class="circle user-notification-img" src="{{ notification.actor.image.url }}" alt="icon"> | ||
10 | + {% else %} | ||
11 | + <img class="circle user-notification-img" src="{{ notification.actor.image_url }}" alt="icon"> | ||
12 | + {% endif %} | ||
13 | + | ||
14 | + <div class="least-content "> {{ notification.datetime|timesince }} </div> | ||
10 | </div> | 15 | </div> |
11 | <div class="row-content"> | 16 | <div class="row-content"> |
12 | <p class="list-group-item-text">{{ notification.message }}</p> | 17 | <p class="list-group-item-text">{{ notification.message }}</p> |
@@ -19,11 +24,11 @@ | @@ -19,11 +24,11 @@ | ||
19 | <a href="{% url 'core:notification_read' notification.id %}"> | 24 | <a href="{% url 'core:notification_read' notification.id %}"> |
20 | <div class="list-group-item"> | 25 | <div class="list-group-item"> |
21 | <div class="row-action-primary"> | 26 | <div class="row-action-primary"> |
22 | - <i class="material-icons">folder</i> | 27 | + <i class="material-icons"></i> |
23 | </div> | 28 | </div> |
24 | <div class="row-content"> | 29 | <div class="row-content"> |
25 | 30 | ||
26 | - <div class="least-content pull-right">{{ notification.datetime }}</div> | 31 | + <div class="least-content pull-right">{{ notification.datetime|timesince }}</div> |
27 | 32 | ||
28 | <p class="list-group-item-text">{{ notification.message }}</p> | 33 | <p class="list-group-item-text">{{ notification.message }}</p> |
29 | </div> | 34 | </div> |