Browse Source

Fixes #591: Correct display of device type component creation buttons

Jeremy Stretch 8 years ago
parent
commit
f1c70cd896
1 changed files with 10 additions and 9 deletions
  1. 10 9
      netbox/templates/dcim/inc/devicetype_component_table.html

+ 10 - 9
netbox/templates/dcim/inc/devicetype_component_table.html

@@ -15,19 +15,20 @@
                 {% endif %}
             </div>
             {% render_table table 'table.html' %}
-            {% if table.rows %}
-                <div class="panel-footer">
+            <div class="panel-footer">
+                {% if table.rows %}
                     <button type="submit" class="btn btn-xs btn-danger">
                         <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete Selected
                     </button>
-                    <div class="pull-right">
-                        <a href="{% url add_url pk=devicetype.pk %}{{ add_url_extra }}" class="btn btn-primary btn-xs">
-                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
-                            Add {{ title }}
-                        </a>
-                    </div>
+                {% endif %}
+                <div class="pull-right">
+                    <a href="{% url add_url pk=devicetype.pk %}{{ add_url_extra }}" class="btn btn-primary btn-xs">
+                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
+                        Add {{ title }}
+                    </a>
                 </div>
-            {% endif %}
+                <div class="clearfix"></div>
+            </div>
         </div>
     </form>
 {% else %}