mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-03-16 22:10:28 +00:00
Make locked pages listing compatible with translation
This commit is contained in:
parent
7421590dc7
commit
7a6ec88838
1 changed files with 18 additions and 3 deletions
|
|
@ -2,13 +2,28 @@
|
|||
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
|
||||
{% block page_navigation %}
|
||||
<td>
|
||||
{% page_permissions page as perms %}
|
||||
<p>
|
||||
Locked
|
||||
{% if page.locked_by %}by <b>{% if page.locked_by_id == request.user.pk %}you{% else %}{{ page.locked_by }}{% endif %}</b>{% endif %}
|
||||
{% if page.locked_at %}at <b>{{ page.locked_at|date:"d M Y H:i" }}</b>{% endif %}
|
||||
{% with page.locked_at|date:"d M Y H:i" as locking_date %}
|
||||
{% if page.locked_by %}
|
||||
{% if page.locked_by_id == request.user.pk %}
|
||||
{% blocktrans %}
|
||||
Locked by <b>you</b> at <b>{{ locking_date }}</b>
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with locked_by=page.locked_by %}
|
||||
Locked by <b>{{ locked_by }}</b> at <b>{{ locking_date }}</b>
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% blocktrans %}
|
||||
Locked at <b>{{ locking_date }}</b>
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</p>
|
||||
{% if perms.can_unlock %}
|
||||
<form action="{% url 'wagtailadmin_pages:unlock' page.id %}" method="post">
|
||||
|
|
|
|||
Loading…
Reference in a new issue