|
|
@@ -5,61 +5,61 @@
|
|
|
|
|
|
{% block content %}
|
|
|
<div class="row">
|
|
|
- <div class="col-md-4">
|
|
|
- <div class="panel panel-default">
|
|
|
- <div class="panel-heading">
|
|
|
- <strong>Chassis</strong>
|
|
|
- </div>
|
|
|
- <table class="table table-hover panel-body attr-table">
|
|
|
- <tr>
|
|
|
- <td>Model</td>
|
|
|
- <td>{{ device.device_type.display_name }}</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>Serial Number</td>
|
|
|
- <td><span>{{ device.serial|placeholder }}</span></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>Asset Tag</td>
|
|
|
- <td><span>{{ device.asset_tag|placeholder }}</span></td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-8">
|
|
|
- <div class="panel panel-default">
|
|
|
- <div class="panel-heading">
|
|
|
- <strong>Hardware</strong>
|
|
|
- </div>
|
|
|
- <table class="table table-hover table-condensed panel-body" id="hardware">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>Name</th>
|
|
|
- <th></th>
|
|
|
- <th>Manufacturer</th>
|
|
|
- <th>Part ID</th>
|
|
|
- <th>Serial Number</th>
|
|
|
- <th>Asset Tag</th>
|
|
|
- <th>Description</th>
|
|
|
- <th></th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- {% for item in inventory_items %}
|
|
|
- {% with template_name='dcim/inc/inventoryitem.html' indent=0 %}
|
|
|
- {% include template_name %}
|
|
|
- {% endwith %}
|
|
|
- {% endfor %}
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- {% if perms.dcim.add_inventoryitem %}
|
|
|
- <div class="panel-footer text-right noprint">
|
|
|
- <a href="{% url 'dcim:inventoryitem_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-primary btn-xs">
|
|
|
- <span class="fa fa-plus" aria-hidden="true"></span> Add Inventory Item
|
|
|
- </a>
|
|
|
+ <div class="col-md-12">
|
|
|
+ <form method="post">
|
|
|
+ {% csrf_token %}
|
|
|
+ <div class="panel panel-default">
|
|
|
+ <div class="panel-heading">
|
|
|
+ <strong>Inventory Items</strong>
|
|
|
</div>
|
|
|
- {% endif %}
|
|
|
- </div>
|
|
|
+ <table class="table table-hover table-condensed panel-body" id="hardware">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ {% if perms.dcim.change_inventoryitem or perms.dcim.delete_inventoryitem %}
|
|
|
+ <th class="pk"><input type="checkbox" class="toggle" title="Toggle all" /></th>
|
|
|
+ {% endif %}
|
|
|
+ <th>Name</th>
|
|
|
+ <th>Manufacturer</th>
|
|
|
+ <th>Part ID</th>
|
|
|
+ <th>Serial Number</th>
|
|
|
+ <th>Asset Tag</th>
|
|
|
+ <th>Discovered</th>
|
|
|
+ <th>Description</th>
|
|
|
+ <th></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ {% for item in inventory_items %}
|
|
|
+ {% with template_name='dcim/inc/inventoryitem.html' indent=0 %}
|
|
|
+ {% include template_name %}
|
|
|
+ {% endwith %}
|
|
|
+ {% endfor %}
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div class="panel-footer noprint">
|
|
|
+ {% if inventory_items and perms.dcim.change_inventoryitem %}
|
|
|
+ <button type="submit" name="_rename" formaction="{% url 'dcim:inventoryitem_bulk_rename' %}?return_url={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-warning btn-xs">
|
|
|
+ <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Rename
|
|
|
+ </button>
|
|
|
+ <button type="submit" name="_edit" formaction="{% url 'dcim:inventoryitem_bulk_edit' %}?device={{ device.pk }}&return_url={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-warning btn-xs">
|
|
|
+ <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
|
|
|
+ </button>
|
|
|
+ {% endif %}
|
|
|
+ {% if inventory_items and perms.dcim.delete_inventoryitem %}
|
|
|
+ <button type="submit" name="_delete" formaction="{% url 'dcim:inventoryitem_bulk_delete' %}?return_url={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-danger btn-xs">
|
|
|
+ <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete
|
|
|
+ </button>
|
|
|
+ {% endif %}
|
|
|
+ {% if perms.dcim.add_inventoryitem %}
|
|
|
+ <div class="pull-right">
|
|
|
+ <a href="{% url 'dcim:inventoryitem_add' %}?device={{ device.pk }}&return_url={% url 'dcim:device_inventory' pk=device.pk %}" class="btn btn-primary btn-xs">
|
|
|
+ <span class="fa fa-plus" aria-hidden="true"></span> Add Inventory Item
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ {% endif %}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
</div>
|
|
|
</div>
|
|
|
{% endblock %}
|