diff farol/templates/new.j2 @ 102:65341d05a8f8

Spawn a Modal when loading a doc, and another one is already loaded
author Benoît Allard <benoit.allard@greenbone.net>
date Tue, 14 Oct 2014 10:25:43 +0200
parents 22d89f53e34c
children 07210df10edd
line wrap: on
line diff
--- a/farol/templates/new.j2	Tue Oct 14 10:23:08 2014 +0200
+++ b/farol/templates/new.j2	Tue Oct 14 10:25:43 2014 +0200
@@ -171,7 +171,15 @@
 {% if caching %}
   {% call panel(heading="Load a document from the cache", title=4, collapsible=False) %}
   <ul>
-    {% for element in cache | sort %}<li><a href="{{ url_for('cache.load', element=element)}}">{{ element }}</a></li>{% endfor %}
+    {% for element in cache | sort %}
+      <li>
+        {% if has_current %}
+          <a href="#{{element}}_modal" data-toggle="modal">{{ element }}</a>
+        {% else %}
+          {{ POST_button(url_for('cache.load', element=element), text=element, style="btn-link") }}
+        {% endif %}
+      </li>
+    {% endfor %}
   </ul>
   {% endcall %}
 {% endif %}

http://farol.wald.intevation.org