Skip to content

Commit 0180242

Browse files
polyzenjelly
authored andcommitted
todolists: include last_modified in template
Closes #551
1 parent bf29716 commit 0180242

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

templates/todolists/view.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
{% load static %}
33
{% load package_extras %}
44
{% load todolists %}
5+
{% load tz %}
6+
{% load humanize %}
57

68
{% block title %}Arch Linux - Todo: {{ list.name }}{% endblock %}
79

@@ -103,7 +105,15 @@ <h3>Filter Todo List Packages</h3>
103105
<span class="{{ pkg.status_css_class }}">{{ pkg.get_status_display }}</span>
104106
{% endif %}
105107
</td>
106-
<td>{{ pkg.user|default:"" }}</td>
108+
<td>
109+
{% if pkg.user %}
110+
{% if user.is_authenticated %}
111+
{{ pkg.user }} <span title="{{ pkg.last_modified|timezone:user.userprofile.time_zone|date:"Y-m-d H:i T" }}">({{ pkg.last_modified|naturaltime }})</span>
112+
{% else %}
113+
{{ pkg.user }} <span title="{{ pkg.last_modified|date:"Y-m-d H:i T" }}">({{ pkg.last_modified|naturaltime }})</span>
114+
{% endif %}
115+
{% endif %}
116+
</td>
107117
</tr>
108118
{% endfor %}
109119
</tbody>

0 commit comments

Comments
 (0)