Selaa lähdekoodia

Fix template logic

Jeremy Stretch 6 vuotta sitten
vanhempi
commit
ec2dc8d7a4
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      netbox/templates/home.html

+ 2 - 2
netbox/templates/home.html

@@ -3,13 +3,13 @@
 
 
 {% block header %}
 {% block header %}
     {{ block.super }}
     {{ block.super }}
-    {% if new_release and request.user.is_staff or request.user.is_superuser %}
+    {% if new_release %}{% if request.user.is_staff or request.user.is_superuser %}
         <div class="alert alert-info text-center" role="alert">
         <div class="alert alert-info text-center" role="alert">
             <i class="fa fa-info-circle"></i>
             <i class="fa fa-info-circle"></i>
             A new release is available: <a href="{{ new_release_url }}">NetBox v{{ new_release }}</a> |
             A new release is available: <a href="{{ new_release_url }}">NetBox v{{ new_release }}</a> |
             <a href="https://netbox.readthedocs.io/en/stable/installation/upgrading/">Upgrade instructions</a>
             <a href="https://netbox.readthedocs.io/en/stable/installation/upgrading/">Upgrade instructions</a>
         </div>
         </div>
-    {% endif %}
+    {% endif %}{% endif %}
 {% endblock %}
 {% endblock %}