Added last login to the admin Users list

Added a table header and data element to the html template for users list. Table now includes a human readable last login date. Code is exactly the same as the Document list column.
pull/4887/head
Noah B Johnson 2018-10-30 23:11:51 -05:00 zatwierdzone przez Janneke Janssen
rodzic 9a523dbf2e
commit 7842e4907b
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -20,6 +20,7 @@
</th>
<th class="level">{% trans "Level" %}</th>
<th class="status">{% trans "Status" %}</th>
<th class="last-login">{% trans "Last Login" %}</th>
</tr>
</thead>
<tbody>
@ -37,6 +38,7 @@
<td class="username" valign="top">{{ user.get_username }}</td>
<td class="level" valign="top">{% if user.is_superuser %}{% trans "Admin" %}{% endif %}</td>
<td class="status" valign="top"><div class="status-tag {% if user.is_active %}primary{% endif %}">{% if user.is_active %}{% trans "Active" %}{% else %}{% trans "Inactive" %}{% endif %}</div></td>
<td class="human-readable-date" title="{{ user.last_login|date:"d M Y H:i" }}">{% blocktrans with time_period=user.last_login|timesince %}{{ time_period }} ago{% endblocktrans %}</td>
</tr>
{% endfor %}
</tbody>