diff farol/templates/document/view.j2 @ 67:023080ffd995

Allow deletion of revisions
author Benoît Allard <benoit.allard@greenbone.net>
date Thu, 09 Oct 2014 09:50:57 +0200
parents 7c4d001839e7
children 42915aaa6888
line wrap: on
line diff
--- a/farol/templates/document/view.j2	Thu Oct 09 09:48:05 2014 +0200
+++ b/farol/templates/document/view.j2	Thu Oct 09 09:50:57 2014 +0200
@@ -60,7 +60,10 @@
     {% for revision in cvrf._tracking._history %}
       <li class="list-group-item">
         <div class="form-horizontal">
-          <a class="pull-right" href="{{ url_for('.edit_revision', index=loop.index0) }}">edit revision</a>
+          <div class="pull-right">
+            <a  href="{{ url_for('.edit_revision', index=loop.index0) }}"><span class="label label-default">edit</span></a>
+            <form class="delete" role="button" action="{{ url_for('.del_revision') }}" method="POST"><input type=hidden name="index", value="{{ loop.index0 }}"><button type="submit" class="btn btn-link btn-xs"><span class="label label-danger"><strong>delete</strong></span></button></form>
+          </div>
           {{ label_value('Number', revision._number | join('.'), right=8) }}
           {{ label_value('Date', revision._date) }}
           {{ label_value('Description', revision._description) }}

http://farol.wald.intevation.org