diff default/ticket/item.html @ 140:b1e22caab8bc

ticket (item), merge-request (item): added "edit" button when url_ticket_edit is defined
author Goffi <goffi@goffi.org>
date Fri, 01 Jun 2018 12:47:54 +0200
parents 24920d436e77
children
line wrap: on
line diff
--- a/default/ticket/item.html	Fri Jun 01 12:46:08 2018 +0200
+++ b/default/ticket/item.html	Fri Jun 01 12:47:54 2018 +0200
@@ -7,7 +7,8 @@
 #}
 
 {% set category_menu = [('tickets', url_tickets_list),
-                         ('ticket_new', url_tickets_new)] %}
+                        ('ticket_new', url_tickets_new),
+                        ] %}
 {% if not embedded %}{% extends 'base/base.html' %}{% endif %}
 {% import 'input/xmlui.html' as xmlui with context %}
 {% import 'blog/macros.html' as blog with context %}
@@ -20,7 +21,16 @@
 {% endblock confirm_message %}
 
 {% block body %}
+{{ icon_defs('pencil') }}
 <div id="{{ item.widget_value['id'] }}" class="view single ticket box">
+    {% if url_ticket_edit is defined %}
+        <p class="box__tools">
+            <a href="{{url_ticket_edit}}">
+            {{ icon('pencil', cls='icon--small') }}
+            edit
+            </a>
+        </p>
+    {% endif %}
     {{ xmlui.generate(item,
         form=false,
         filters={'created': {'filters': ['date_fmt'], 'filters_args':[{'fmt': 'short'}]},