From 54107e2d139b6e371ba7df42f30f783d04c465e0 Mon Sep 17 00:00:00 2001
From: Benjamin Bertrand <benjamin.bertrand@esss.se>
Date: Mon, 5 Mar 2018 13:55:35 +0100
Subject: [PATCH] Add Action tab next to attributes

Allow to easily print the actions
---
 app/templates/inventory/attributes.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/templates/inventory/attributes.html b/app/templates/inventory/attributes.html
index 6a9d453..36f15f6 100644
--- a/app/templates/inventory/attributes.html
+++ b/app/templates/inventory/attributes.html
@@ -5,7 +5,7 @@
 
 {% block main %}
   <ul class="nav nav-tabs">
-    {% for attribute in ('Manufacturer', 'Model', 'Location', 'Status') %}
+    {% for attribute in ('Manufacturer', 'Model', 'Location', 'Status', 'Action') %}
     <li class="nav-item">
       <a class="nav-link {% if attribute == kind %}active{% endif %}" href="{{ url_for('inventory.attributes', kind=attribute) }}">{{ attribute }}</a>
     </li>
@@ -14,7 +14,7 @@
 
   <br>
 
-  {% if kind in ('Manufacturer', 'Model', 'Location') or (current_user.is_authenticated and current_user.is_admin) %}
+  {% if kind in ('Manufacturer', 'Model', 'Location') or (current_user.is_authenticated and current_user.is_admin and kind != 'Action') %}
     <form id="attributeForm" method="POST">
       {{ form.hidden_tag() }}
       {{ render_field(form.name) }}
-- 
GitLab