Commit b3fb9eed9ca42f339eca9c6ac8dc6702e57f440a

Authored by fbormann
1 parent 6697cc58

added image support #207

app/templates/home_teacher_student_content.html
... ... @@ -7,7 +7,7 @@
7 7  
8 8 <div class="row">
9 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 11 </div>
12 12 <div class="col-xs-10 col-md-11">
13 13 <h4 class="resource_inline"><b>{{ notification.actor.username }}</b></h4>
... ...
core/static/css/base/amadeus.css
... ... @@ -15,6 +15,10 @@
15 15 width: 300px;
16 16 }
17 17  
  18 +.user-notification-img{
  19 + width:40%;
  20 +}
  21 +
18 22 /* HEADER */
19 23  
20 24  
... ...
core/templates/notifications.html
... ... @@ -5,8 +5,13 @@
5 5 <li>
6 6 <a href="{% url 'core:notification_read' notification.id %}"><div class="list-group-item">
7 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 15 </div>
11 16 <div class="row-content">
12 17 <p class="list-group-item-text">{{ notification.message }}</p>
... ... @@ -19,11 +24,11 @@
19 24 <a href="{% url 'core:notification_read' notification.id %}">
20 25 <div class="list-group-item">
21 26 <div class="row-action-primary">
22   - <i class="material-icons">folder</i>
  27 + <i class="material-icons"></i>
23 28 </div>
24 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 33 <p class="list-group-item-text">{{ notification.message }}</p>
29 34 </div>
... ...