mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-15 08:12:18 -06:00
Added CBVs for CircuitTypes
This commit is contained in:
21
netbox/templates/circuits/circuittype_list.html
Normal file
21
netbox/templates/circuits/circuittype_list.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block title %}Circuit Types{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="pull-right">
|
||||
{% if perms.circuits.add_circuittype %}
|
||||
<a href="{% url 'circuits:circuittype_add' %}" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||
Add a circuit type
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>Circuit Types</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'circuits/inc/circuittype_table.html' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
14
netbox/templates/circuits/inc/circuittype_table.html
Normal file
14
netbox/templates/circuits/inc/circuittype_table.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% load render_table from django_tables2 %}
|
||||
{% if perms.circuits.delete_circuittype %}
|
||||
<form method="post" class="form form-horizontal">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="redirect_url" value="{{ request.path }}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}" />
|
||||
{% render_table table table_template|default:'table.html' %}
|
||||
<button type="submit" name="_delete" formaction="{% url 'circuits:circuittype_bulk_delete' %}" class="btn btn-danger btn-sm">
|
||||
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
|
||||
Delete Selected
|
||||
</button>
|
||||
</form>
|
||||
{% else %}
|
||||
{% render_table table table_template|default:'table.html' %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user