changeset 25:4a3fdd3f2723

Move the 'Save' to the cache menu, only show render when a document is loaded
author Benoît Allard <benoit.allard@greenbone.net>
date Thu, 02 Oct 2014 11:27:01 +0200
parents 6de88f98983c
children 33a3a36b5bf6
files farol/templates/base.j2
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/farol/templates/base.j2	Thu Oct 02 11:25:17 2014 +0200
+++ b/farol/templates/base.j2	Thu Oct 02 11:27:01 2014 +0200
@@ -84,22 +84,22 @@
           {% endif %}
         </ul>
         <ul class="nav navbar-nav navbar-right">
-          <li class="dropdown{{ ' disabled' if not has_current }}{{ ' active' if active == 'render' }}">
-            <a href="#" class="dropdown-toggle{{ ' disabled' if not has_current }}" data-toggle="dropdown">Render <span class="caret"></span></a>
+          {% if has_current %}
+          <li class="dropdown{{ ' active' if active == 'render' }}">
+            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Render <span class="caret"></span></a>
             <ul class="dropdown-menu" role="menu">
               {% for format in ('cvrf', 'nasl', 'oval') %}<li><a href="{{ url_for('render', format_=format)}}">as {{ format | upper }}</a></li>{% endfor %}
             </ul>
           </li>
+          {% endif %}
           {% if caching %}
-          <li>
-            <form action="{{ url_for('cache.save') }}">
-              <button class="btn btn-success navbar-btn"{% if not has_current %} disabled="disabled"{% endif %}>Save</button>
-            </form>
-          </li>
           <li class="dropdown">
             <a href="#" class="dropdown-toggle" data-toggle="dropdown">Cache <span class="caret"></span></a>
             <ul class="dropdown-menu" role="menu">
-              {% for element in cache | sort %}<li><a href="{{ url_for('cache.load', element=element)}}">{{ element }}</a></li>{% endfor %}
+              <li role="presentation"{{ ' class="disabled"' if not has_current }}><a role="menuitem" tabindex="-1" href="{{ url_for('cache.save') }}">Save current</a>
+              </li>
+              <li role="presentation" class="divider"></li>
+              {% for element in cache | sort %}<li role="presentation"><a href="{{ url_for('cache.load', element=element)}}">{{ element }}</a></li>{% endfor %}
             </ul>
           </li>
           {% endif %}

http://farol.wald.intevation.org