mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-17 04:32:51 -06:00
Templatized show_available toggle
This commit is contained in:
parent
8e3a371688
commit
28ae6849b4
@ -40,14 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<h1>{% block title %}{{ aggregate }}{% endblock %}</h1>
|
<h1>{% block title %}{{ aggregate }}{% endblock %}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=aggregate %}
|
{% include 'inc/created_updated.html' with obj=aggregate %}
|
||||||
{% if show_available is not None %}
|
{% include 'ipam/inc/toggle_available.html' %}
|
||||||
<div class="pull-right">
|
|
||||||
<div class="btn-group" role="group">
|
|
||||||
<a href="{{ request.path }}{% querystring request show_available='true' %}" class="btn btn-default{% if show_available %} active disabled{% endif %}">Show available</a>
|
|
||||||
<a href="{{ request.path }}{% querystring request show_available='false' %}" class="btn btn-default{% if not show_available %} active disabled{% endif %}">Hide available</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links aggregate %}
|
{% custom_links aggregate %}
|
||||||
</div>
|
</div>
|
||||||
|
9
netbox/templates/ipam/inc/toggle_available.html
Normal file
9
netbox/templates/ipam/inc/toggle_available.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{% load helpers %}
|
||||||
|
{% if show_available is not None %}
|
||||||
|
<div class="pull-right">
|
||||||
|
<div class="btn-group" role="group">
|
||||||
|
<a href="{{ request.path }}{% querystring request show_available='true' %}" class="btn btn-default{% if show_available %} active disabled{% endif %}">Show available</a>
|
||||||
|
<a href="{{ request.path }}{% querystring request show_available='false' %}" class="btn btn-default{% if not show_available %} active disabled{% endif %}">Hide available</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
@ -53,14 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<h1>{% block title %}{{ prefix }}{% endblock %}</h1>
|
<h1>{% block title %}{{ prefix }}{% endblock %}</h1>
|
||||||
{% include 'inc/created_updated.html' with obj=prefix %}
|
{% include 'inc/created_updated.html' with obj=prefix %}
|
||||||
{% if show_available is not None %}
|
{% include 'ipam/inc/toggle_available.html' %}
|
||||||
<div class="pull-right">
|
|
||||||
<div class="btn-group" role="group">
|
|
||||||
<a href="{{ request.path }}{% querystring request show_available='true' %}" class="btn btn-default{% if show_available %} active disabled{% endif %}">Show available</a>
|
|
||||||
<a href="{{ request.path }}{% querystring request show_available='false' %}" class="btn btn-default{% if not show_available %} active disabled{% endif %}">Hide available</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="pull-right noprint">
|
<div class="pull-right noprint">
|
||||||
{% custom_links prefix %}
|
{% custom_links prefix %}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user