Introduce generic object template

This commit is contained in:
Jeremy Stretch
2021-03-02 15:58:33 -05:00
parent 8dd7123923
commit 51120ccf31
27 changed files with 494 additions and 1324 deletions

View File

@@ -1,57 +1,14 @@
{% extends 'base.html' %}
{% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %}
{% load plugins %}
{% block header %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'ipam:vrf_list' %}">VRFs</a></li>
<li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'ipam:vrf_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search VRFs" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.ipam.add_vrf %}
{% clone_button object %}
{% endif %}
{% if perms.ipam.change_vrf %}
{% edit_button object %}
{% endif %}
{% if perms.ipam.delete_vrf %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}VRF {{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">VRF</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'ipam:vrf_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% block title %}VRF {{ object }}{% endblock %}
{% block breadcrumbs %}
<li><a href="{% url 'ipam:vrf_list' %}">VRFs</a></li>
<li>{{ object }}</li>
{% endblock %}
{% block content %}