mirror of https://github.com/interlegis/sigi.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
3.4 KiB
97 lines
3.4 KiB
{% extends "admin/change_list.html" %}
|
|
{% load i18n static admin_list %}
|
|
{% load i18n admin_urls %}
|
|
|
|
{% block extrastyle %}
|
|
{{ block.super }}
|
|
<link rel="stylesheet" type="text/css" href="{% static 'material/admin/css/changelists.min.css' %}">
|
|
<link rel="stylesheet" type="text/css" href="{% static 'css/changelists.css' %}">
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div id="content-main" class="list-content">
|
|
{% block object-tools %}
|
|
<div class="fixed-action-btn">
|
|
<a class="btn-floating btn-large">
|
|
<i class="large material-icons">build</i>
|
|
</a>
|
|
<ul>
|
|
{% block object-tools-items %}
|
|
<li>
|
|
<a href="#" data-target="float-filter" class="btn-floating tooltipped waves-effect waves-light sidenav-trigger" data-position="left" data-tooltip="{% trans 'Filter' %}">
|
|
<i class="material-icons" aria-hidden="true">filter_list</i>
|
|
</a>
|
|
</li>
|
|
{% if has_add_permission %}
|
|
<li>
|
|
{% url cl.opts|admin_urlname:'add' as add_url %}
|
|
<a href="{% add_preserved_filters add_url is_popup to_field %}" class="btn-floating tooltipped waves-effect waves-light" data-position="left" data-tooltip="{% trans 'Add' %}">
|
|
<i class="material-icons" aria-hidden="true">add</i>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% endblock %}
|
|
</ul>
|
|
</div>
|
|
{% endblock %}
|
|
{% if cl.formset.errors %}
|
|
<p class="errornote">
|
|
{% if cl.formset.total_error_count == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
|
</p>
|
|
{{ cl.formset.non_form_errors }}
|
|
{% endif %}
|
|
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
|
|
|
|
{% block date_hierarchy %}{% date_hierarchy cl %}{% endblock %}
|
|
|
|
<form id="changelist-form" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %}
|
|
{% if cl.formset %}
|
|
<div>{{ cl.formset.management_form }}</div>
|
|
{% endif %}
|
|
|
|
{% block result_list %}
|
|
{% result_list cl %}
|
|
{% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %}
|
|
{% endblock %}
|
|
{% block pagination %}{% pagination cl %}{% endblock %}
|
|
</form>
|
|
</div>
|
|
{% block side_wrapper %}
|
|
<div id="float-filter" class="float-filter hide">
|
|
<div id="side-wrapper" class="side-wrapper">
|
|
<div id="changelist-form" class="card">
|
|
{% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %}
|
|
</div>
|
|
<div class="card">
|
|
{% block search %}{% search_form cl %}{% endblock %}
|
|
</div>
|
|
<div class="card">
|
|
{% block filters %}
|
|
{{ block.super }}
|
|
{% endblock %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block footer %}
|
|
{{ block.super }}
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('.fixed-action-btn').floatingActionButton();
|
|
M.Tooltip.init($('.tooltipped'), {});
|
|
$('.float-filter').each(function() {
|
|
var id=this.id;
|
|
$(`[data-target="${id}"]`).on("click", function(e) {
|
|
e.preventDefault();
|
|
console.log('Rodou aqui também');
|
|
var targetid = $(this).attr('data-target');
|
|
$(`#${targetid}`).toggleClass('hide');
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock footer %}
|
|
|