changeset 31:79b76911444e

Improve the display of the history
author Benoît Allard <benoit.allard@greenbone.net>
date Thu, 02 Oct 2014 15:39:39 +0200
parents 762cb7b3b422
children 9b0fb5ca7eff
files farol/static/style.css farol/templates/document/view.j2
diffstat 2 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/farol/static/style.css	Thu Oct 02 12:46:25 2014 +0200
+++ b/farol/static/style.css	Thu Oct 02 15:39:39 2014 +0200
@@ -1,5 +1,5 @@
 /* So that the whole panel heading be clickable */
-.panel-title a {
+.panel-title a, a.a-block {
     display: block;
 }
 /*
--- a/farol/templates/document/view.j2	Thu Oct 02 12:46:25 2014 +0200
+++ b/farol/templates/document/view.j2	Thu Oct 02 15:39:39 2014 +0200
@@ -54,19 +54,24 @@
       {{ label_value(label, value, right=8) }}
     {% endfor %}
   </div>
-  {% call panel(heading="Revision History (%d)" % cvrf._tracking._history | length, title=4) %}
+  <ul class="list-group">
+    <li class="list-group-item"><a class="a-block" data-toggle="collapse" href="#history">Revision History <span class="pull-right badge">{{ cvrf._tracking._history | length }}</span></li>
+    <div id="history" class="collapse">
     {% for revision in cvrf._tracking._history %}
-      {% call panel() %}
+      <li class="list-group-item">
         <div class="form-horizontal">
           <a class="pull-right" href="{{ url_for('.edit_revision', index=loop.index0) }}">edit revision</a>
           {{ label_value('Number', revision._number | join('.'), right=8) }}
           {{ label_value('Date', revision._date) }}
           {{ label_value('Description', revision._description) }}
         </div>
-      {% endcall %}
+      </li>
     {% endfor %}
-    <a class="pull-right" href="{{ url_for('.add_revision') }}">add revision</a>
-  {% endcall %}
+    <li class="list-group-item clearfix">
+      <a class="pull-right" href="{{ url_for('.add_revision') }}">add revision</a>
+    </li>
+    </div>
+  </ul>
   <div class="form-horizontal">
     {% for label, value in [("Initial Release Date", cvrf._tracking._initialDate),
                             ("Current Release Date", cvrf._tracking._currentDate)] %}

http://farol.wald.intevation.org