Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

17301 script buttons #17311

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 22 additions & 15 deletions netbox/templates/extras/script_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,30 @@
{% for module in script_modules %}
{% include 'inc/sync_warning.html' with object=module %}
<div class="card">
<h2 class="card-header justify-content-between" id="module{{ module.pk }}">
<div>
<i class="mdi mdi-file-document-outline"></i> {{ module }}

<div class="card-header container-fluid">
<div class="col col-md-10">
<h2 id="module{{ module.pk }}">
<div>
<i class="mdi mdi-file-document-outline"></i> {{ module }}
</div>
</h2>
</div>
<div>
{% if perms.extras.edit_scriptmodule %}
<a href="{% url 'extras:scriptmodule_edit' pk=module.pk %}" class="btn btn-warning btn-sm">
<i class="mdi mdi-pencil" aria-hidden="true"></i> {% trans "Edit" %}
</a>
{% endif %}
{% if perms.extras.delete_scriptmodule %}
<a href="{% url 'extras:scriptmodule_delete' pk=module.pk %}" class="btn btn-danger btn-sm">
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> {% trans "Delete" %}
</a>
{% endif %}
<div class="col col-md-2 d-print-none">
<div class="btn-list justify-content-end mb-2">
{% if perms.extras.edit_scriptmodule %}
<a href="{% url 'extras:scriptmodule_edit' pk=module.pk %}" class="btn btn-yellow" role="button">
<i class="mdi mdi-pencil" aria-hidden="true"></i> {% trans "Edit" %}
</a>
{% endif %}
{% if perms.extras.delete_scriptmodule %}
<a href={% url 'extras:scriptmodule_delete' pk=module.pk %} class="btn btn-red" role="button">
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> {% trans "Delete" %}
</a>
{% endif %}
</div>
</div>
</h2>
</div>
{% if module.scripts %}
<table class="table table-hover scripts">
<thead>
Expand Down