mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Enable reordering table columns
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
{% load form_helpers %}
|
||||
|
||||
<button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#tableconfig" title="Configure table"><i class="fa fa-cog"></i></button>
|
||||
<div class="modal fade" tabindex="-1" id="tableconfig">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -12,9 +10,15 @@
|
||||
<form action="" method="post" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% render_form table_config_form %}
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<a class="btn btn-primary btn-xs" id="move-option-up" data-target="id_columns"><i class="fa fa-arrow-up"></i> Move up</a>
|
||||
<a class="btn btn-primary btn-xs" id="move-option-down" data-target="id_columns"><i class="fa fa-arrow-down"></i> Move down</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<input type="submit" class="btn btn-primary" name="set" value="Save" />
|
||||
<input type="submit" class="btn btn-danger" name="clear" value="Clear" />
|
||||
<input type="submit" class="btn btn-danger" name="clear" value="Reset" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -5,6 +5,9 @@
|
||||
{% block content %}
|
||||
<div class="pull-right noprint">
|
||||
{% block buttons %}{% endblock %}
|
||||
{% if table_config_form %}
|
||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#tableconfig" title="Configure table"><i class="fa fa-cog"></i> Configure</button>
|
||||
{% endif %}
|
||||
{% if permissions.add and 'add' in action_buttons %}
|
||||
{% add_button content_type.model_class|url_name:"add" %}
|
||||
{% endif %}
|
||||
@@ -18,9 +21,6 @@
|
||||
<h1>{% block title %}{{ content_type.model_class|meta:"verbose_name_plural"|bettertitle }}{% endblock %}</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-{% if filter_form %}9{% else %}12{% endif %}">
|
||||
{% if table_config_form %}
|
||||
{% include 'inc/table_config_form.html' %}
|
||||
{% endif %}
|
||||
{% with bulk_edit_url=content_type.model_class|url_name:"bulk_edit" bulk_delete_url=content_type.model_class|url_name:"bulk_delete" %}
|
||||
{% if permissions.change or permissions.delete %}
|
||||
<form method="post" class="form form-horizontal">
|
||||
@@ -71,6 +71,9 @@
|
||||
{% endwith %}
|
||||
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
||||
<div class="clearfix"></div>
|
||||
{% if table_config_form %}
|
||||
{% include 'inc/table_config_form.html' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if filter_form %}
|
||||
<div class="col-md-3 noprint">
|
||||
|
Reference in New Issue
Block a user