{% extends 'admin/change_list.html' %}


{# --- 适配simpleui风格 --- #}


{% block object-tools %}
    {{ block.super }}

    {% if custom_import_and_export_buttons %}
        <div>
            <div class="my_table_title" style="display: flex;">

                <span
                    style="
                        font-weight: 700;
                        margin: 5px 20px 20px 20px;
                        /*margin-top: 10px;*/
                        font-size: 20px!important;
                        color: #666;
                    "
                >
                    {{ opts.verbose_name_plural }}
                </span>

                <div class="my_buttons" style="margin-left: auto;margin-right: 5px;margin-top: 10px">
                    {% if has_export_perm %}
                    <a href="export_all_excel/" target="_blank">
                       <button type="button" class="el-button el-button--default el-button--small"

                                style="
                                float: right;
                                margin-right: 5px;"

                               data-name="export_all_excel"><!----><!---->
                            <span class="fas fa-download"></span>
                            <span>
                                全部导出
                            </span>
                        </button>
                    </a>
                    {% endif %}

                    {% if has_import_perm %}
                    <a href="import-csv/">
                        <button type="button" class="el-button el-button--default el-button--small"

                                style="
                                float: right;
                                margin-right: 10px;"

                                data-name="export_as_csv">

                            <i class="fas fa-upload"></i>
                            <span>
                                导入数据
                            </span>
                        </button>
                    </a>
                    {% endif %}

                </div>

            </div>
        </div>
    {% endif %}
{% endblock %}

