瀏覽代碼

Add top & bottom banners, maintenance notice

jeremystretch 4 年之前
父節點
當前提交
cc5ea61f5a
共有 1 個文件被更改,包括 19 次插入0 次删除
  1. 19 0
      netbox/templates/base/layout.html

+ 19 - 0
netbox/templates/base/layout.html

@@ -105,6 +105,19 @@
             </div>
         </nav>
 
+        {% if settings.BANNER_TOP %}
+          <div class="alert alert-info text-center mx-3" role="alert">
+            {{ settings.BANNER_TOP|safe }}
+          </div>
+        {% endif %}
+
+        {% if settings.MAINTENANCE_MODE %}
+          <div class="alert alert-warning text-center mx-3" role="alert">
+            <h4><i class="mdi mdi-alert"></i> Maintenance Mode</h4>
+            <span>NetBox is currently in maintenance mode. Functionality may be limited.</span>
+          </div>
+        {% endif %}
+
         {# Page header #}
         {% block header %}
           <div class="title-container px-3 pb-3">
@@ -129,6 +142,12 @@
           </div>
         </div>
 
+        {% if settings.BANNER_BOTTOM %}
+          <div class="alert alert-info text-center mx-3" role="alert">
+            {{ settings.BANNER_BOTTOM|safe }}
+          </div>
+        {% endif %}
+
         {# Page footer #}
         <footer class="footer container-fluid pb-3 pt-4 px-0">
           <div class="row align-items-center justify-content-end mx-0">