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


{# --- 适配django原生admin风格 --- #}


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

    {% if custom_import_and_export_buttons %}
    <div style="margin-bottom: 40px;">

            {% if has_export_perm %}
            <a href="export_all_excel/" target="_blank">
               <button type="button" class="button"
                       style="font-size: 13px;
                        border: 1px solid #ccc;
                        border-radius: 4px;
                        background: #fff;
                        box-shadow: 0 -15px 20px -10px rgb(0 0 0 / 15%) inset;
                        cursor: pointer;
                        height: 24px;
                        line-height: 1;
                        padding: 4px 8px;
                        margin: 0;
                        float: right;
                        {#margin-right: 12px;#}
                        color: #333;"
               >
                    <span class="fas fa-download"></span>
                    <span>
                        全部导出
                    </span>
                </button>
            </a>
            {% endif %}

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

                            style="font-size: 13px;
                            border: 1px solid #ccc;
                            border-radius: 4px;
                            background: #fff;
                            box-shadow: 0 -15px 20px -10px rgb(0 0 0 / 15%) inset;
                            cursor: pointer;
                            height: 24px;
                            line-height: 1;
                            padding: 4px 8px;
                            margin: 0;
                            float: right;
                            margin-right: 12px;
                            color: #333;"

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

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

