kopia lustrzana https://github.com/wagtail/wagtail
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
rodzic
9a523dbf2e
commit
7842e4907b
|
@ -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>
|
||||
|
|
Ładowanie…
Reference in New Issue