1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge branch 'feature' of https://github.com/netbox-community/netbox into feature

# Conflicts:
#	netbox/dcim/tables/template_code.py
#	netbox/netbox/forms.py
#	netbox/templates/dcim/cable_connect.html
#	netbox/templates/dcim/consoleport.html
#	netbox/templates/dcim/consoleserverport.html
#	netbox/templates/dcim/device.html
#	netbox/templates/dcim/device/base.html
#	netbox/templates/dcim/device_edit.html
#	netbox/templates/dcim/interface.html
#	netbox/templates/dcim/rack.html
#	netbox/templates/dcim/rack_edit.html
#	netbox/templates/dcim/site.html
#	netbox/templates/extras/configcontext.html
#	netbox/templates/extras/objectchange.html
#	netbox/templates/generic/object.html
#	netbox/templates/inc/nav_menu.html
#	netbox/templates/ipam/ipaddress_edit.html
#	netbox/templates/ipam/vrf.html
#	netbox/utilities/templates/buttons/export.html
This commit is contained in:
checktheroads
2021-03-17 22:02:43 -07:00
197 changed files with 6374 additions and 2288 deletions

View File

@@ -1,18 +1,21 @@
{% if export_templates %}
<div class="btn-group m-1">
<button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bi bi-download"></i>&nbsp;Export
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="?{% if url_params %}{{ url_params.urlencode }}&{% endif %}export">Default format</a></li>
<li class="divider"></li>
{% for et in export_templates %}
<li><a href="?{% if url_params %}{{ url_params.urlencode }}&{% endif %}export={{ et.name }}"{% if et.description %} title="{{ et.description }}"{% endif %}>{{ et.name }}</a></li>
{% endfor %}
</ul>
</div>
{% else %}
<a href="?{% if url_params %}{{ url_params.urlencode }}&{% endif %}export" class="btn btn-sm btn-outline-secondary">
<div class="btn-group m-1">
<button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bi bi-download"></i>&nbsp;Export
</a>
{% endif %}
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li><a class="dropdown-item" href="?{% if url_params %}{{ url_params.urlencode }}&{% endif %}export=table">Current view</a></li>
<li><a class="dropdown-item" href="?{% if url_params %}{{ url_params.urlencode }}&{% endif %}export">Default format</a></li>
{% if export_templates %}
<li class="divider"></li>
{% for et in export_templates %}
<li>
<a class="dropdown-item"
href="?{% if url_params %}{{ url_params.urlencode }}&{% endif %}export={{ et.name }}"{% if et.description %}
title="{{ et.description }}"{% endif %}>
{{ et.name }}
</a>
</li>
{% endfor %}
{% endif %}
</ul>
</div>