summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/blocks/window_nav.html6
-rw-r--r--ishtar_common/templates/ishtar/sheet.html7
2 files changed, 9 insertions, 4 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/window_nav.html b/ishtar_common/templates/ishtar/blocks/window_nav.html
index c248bae82..60e620f16 100644
--- a/ishtar_common/templates/ishtar/blocks/window_nav.html
+++ b/ishtar_common/templates/ishtar/blocks/window_nav.html
@@ -1,4 +1,4 @@
-{% load i18n %}
+{% load i18n ishtar_helpers %}
<div class="row toolbar">
{% if previous or next %}
<div class='col-md-2'>
@@ -44,7 +44,7 @@
{% endif %}
<div class="btn-group btn-group-sm" role="group" aria-label="{% trans 'Actions' %}">
{% block extra_actions %}{% endblock %}
- {% if modify_url and not item.locked %}
+ {% if modify_url and not item|is_locked:current_user %}
<a class="btn btn-success wait-button" href='{% url modify_url item.pk %}'
title="{% trans 'Modify' %}">
<i class="fa fa-pencil"></i>
@@ -56,7 +56,7 @@
<i class="{{icon}}"></i> {{extra_text}}
</a>
{% endfor %}
- {% if delete_url and not item.locked %}
+ {% if delete_url and not item|is_locked:current_user %}
<a class="btn btn-danger wait-button" href='{% url delete_url item.pk %}'
title="{% trans 'Delete' %}">
<i class="fa fa-trash" aria-hidden="true"></i>
diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html
index 5676a4419..1c3ae37a0 100644
--- a/ishtar_common/templates/ishtar/sheet.html
+++ b/ishtar_common/templates/ishtar/sheet.html
@@ -1,4 +1,4 @@
-{% load i18n %}{% block main_head %}<html lang="en">
+{% load i18n ishtar_helpers %}{% block main_head %}<html lang="en">
<head>
<title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}
</title>
@@ -121,12 +121,17 @@
<div class="body">
{% if item.locked %}
<div class="alert alert-warning" role="alert">
+ {% if item|is_locked:request.user %}
<i class="fa fa-lock text-danger" aria-hidden="true"></i>&nbsp;
{% if item.lock_user %}{% blocktrans with locker=item.lock_user.ishtaruser %}
This item has been locked by {{locker}}. Edition is disabled.
{% endblocktrans %}{% else %}
{% trans "This item has been locked. Edition is disabled." %}
{% endif %}
+ {% else %}
+ <i class="fa fa-lock text-success" aria-hidden="true"></i>&nbsp;
+ {% trans "You have locked this item." %}
+ {% endif %}
</div>
{% endif %}
{% block content %}