diff farol/templates/document/view.j2 @ 132:812e613cbbb4

Add possibility to delete the current document.
author Benoît Allard <benoit.allard@greenbone.net>
date Fri, 24 Oct 2014 12:59:35 +0200
parents 09915cbdf549
children
line wrap: on
line diff
--- a/farol/templates/document/view.j2	Fri Oct 24 10:53:37 2014 +0200
+++ b/farol/templates/document/view.j2	Fri Oct 24 12:59:35 2014 +0200
@@ -169,4 +169,13 @@
     {% endcall %}
   </div>
 </div>
+<div class="pull-right"><a href="#delete_modal" data-toggle="modal" class="btn btn-danger btn-xs" role="btn">delete</a></div>
+{% call modal('delete_modal', 'Delete document') %}
+  <p>This will delete the document <strong>{{ current_id }}</strong>.</p>
+  <p>Are you sure ?</p>
+</div>
+<div class="modal-footer">
+  <button type="button" class="btn btn-link" data-dismiss="modal">Cancel</button>
+  {{ POST_button(url_for('.delete'), text="Delete " + cvrf.getDocId(), style="btn-danger") }}
+{% endcall %}
 {% endblock %}

http://farol.wald.intevation.org