{% extends 'generic/object.html' %}
{% load buttons %}
{% load helpers %}
{% load perms %}

{% block title %}{{ object.value }} nm{% endblock %}

{% block breadcrumbs %}
  <li><a href="{% url 'plugins:netbox_optics:opticalgrid_list' %}">Optical Grids</a></li>
  <li><a href="{% url 'plugins:netbox_optics:opticalgrid' pk=object.grid.pk %}">{{ object.grid.name }}</a></li>
  <li>{{ object.value }} nm</li>
{% endblock %}

{% block buttons %}
  {% if perms.netbox_optics.change_opticalgridwavelength %}
    <a href="{% url 'plugins:netbox_optics:opticalgridwavelength_edit' pk=object.pk %}" class="btn btn-warning">
      <span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
    </a>
  {% endif %}
  {% if perms.netbox_optics.delete_opticalgridwavelength %}
    <a href="{% url 'plugins:netbox_optics:opticalgridwavelength_delete' pk=object.pk %}?return_url={% if 'opticalgrid' in request.META.HTTP_REFERER %}{% url 'plugins:netbox_optics:opticalgrid' pk=object.grid.pk %}{% else %}{% url 'plugins:netbox_optics:opticalgridwavelength_list' %}{% endif %}" class="btn btn-danger">
      <span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
    </a>
  {% endif %}
{% endblock %}

{% block content %}
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <strong>Grid Wavelength</strong>
            </div>
            <table class="table table-hover panel-body attr-table">
                <tr>
                    <td>Value</td>
                    <td>{{ object.value }} nm</td>
                </tr>
                <tr>
                    <td>Grid</td>
                    <td><a href="{% url 'plugins:netbox_optics:opticalgrid' pk=object.grid.pk %}">{{ object.grid.name }}</a></td>
                </tr>
            </table>
        </div>
    </div>
</div>
{% endblock %} 