Bläddra i källkod

[tasks] Add description of task to the template

Colin Powell 2 månader sedan
förälder
incheckning
cf77e12cc3
1 ändrade filer med 7 tillägg och 1 borttagningar
  1. 7 1
      vrobbler/templates/scrobbles/_row.html

+ 7 - 1
vrobbler/templates/scrobbles/_row.html

@@ -2,6 +2,12 @@
 {% load naturalduration %}
 <tr {% if scrobble.in_progress %}class="in-progress"{% endif %}>
     <td>{% if scrobble.in_progress %}{{scrobble.media_obj.strings.verb}} now | <a class="right" href="{% url "scrobbles:finish" scrobble.uuid %}">Finish</a>{% else %}{{scrobble.timestamp|naturaltime}}{% endif %}</td>
-    <td><a href="{{scrobble.media_obj.get_absolute_url}}">{{scrobble.media_obj|truncatechars_html:45}}</a></td>
+    <td>
+        {% if scrobble.media_type == "Task" %}
+        <p><em><a href="{{scrobble.media_obj.get_absolute_url}}">{{scrobble.media_obj.title|truncatechars_html:45}} - {% if scrobble.logdata %}{% if scrobble.logdata.description %}{{scrobble.logdata.description}}{% endif %}{% endif %}</a></em></p>
+        {% else %}
+        <a href="{{scrobble.media_obj.get_absolute_url}}">{{scrobble.media_obj|truncatechars_html:45}}</a>
+        {% endif %}
+    </td>
     <td>{{scrobble.elapsed_time|natural_duration}}</td>
 </tr>