organize template directories

This commit is contained in:
ryanmerolle 2022-07-18 11:49:10 +00:00
parent 47c64ebd42
commit 2828a355f2
5 changed files with 2 additions and 20 deletions

View File

@ -17,7 +17,7 @@ class AccessLists(PluginTemplateExtension):
#elif ctype.model == 'virtualmachine':
# access_lists = AccessList.objects.filter(device=obj.pk)
return self.render('inc/device_access_lists.html', extra_context={
return self.render('inc/device/access_lists.html', extra_context={
'access_lists': access_lists,
'type': ctype.model if ctype.model == 'device' else ctype.name.replace(' ', '_'),
})

View File

@ -3,7 +3,7 @@
Access Lists
</h5>
<div class="card-body">
{% include 'inc/assigned_access_lists.html' %}
{% include 'inc/device/assigned_access_lists.html' %}
</div>
<div class="card-footer text-end noprint">
<a href="{% url 'plugins:netbox_access_lists:accesslist_add' %}?{{ type }}={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-primary">

View File

@ -46,24 +46,6 @@
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Source Ports</th>
<td>{{ object.source_ports|join:", "|placeholder }}</td>
</tr>
<tr>
<th scope="row">Destination Prefix</th>
<td>
{% if object.destination_prefix %}
<a href="{{ object.destination_prefix.get_absolute_url }}">{{ object.destination_prefix }}</a>
{% else %}
{{ ''|placeholder }}
{% endif %}
</td>
</tr>
<tr>
<th scope="row">Destination Ports</th>
<td>{{ object.destination_ports|join:", "|placeholder }}</td>
</tr>
<tr>
<th scope="row">Action</th>
<td>{{ object.get_action_display }}</td>