{{header}}{{column_left}}
<div id="content">
    <div class="page-header">
        <div class="container-fluid">
            <div class="form-inline pull-right">
                <a href="{{cancel}}" data-toggle="tooltip" title="{{button_cancel}}" class="btn btn-default">
                    <i class="fa fa-reply"></i>
                </a>
            </div>
            <h1>
                {{heading_title}}
                {{version}}</h1>
            <ul class="breadcrumb">
                {% for breadcrumb in breadcrumbs %}
                    <li>
                        <a href="{{breadcrumb.href}}">
                            {{breadcrumb.text}}</a>
                    </li>
                {% endfor %}
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        {% if error.warning %}
            <div class="alert alert-danger">
                <i class="fa fa-exclamation-circle"></i>
                {{error.warning}}
                <button class="close" data-dismiss="alert" type="button">&times;</button>
            </div>
        {% endif %}
        {% if error.success %}
            <div class="alert alert-success">
                <i class="fa fa-exclamation-circle"></i>
                {{success}}
                <button class="close" data-dismiss="alert" type="button">&times;</button>
            </div>
        {% endif %}
        {% if notify %}
            <style>
                .notify > a {
                    color: inherit;
                    padding: 10px;
                    margin: -10px;
                    display: block;
                    font-size: 13px;
                    font-weight: 700;
                    text-align: center;
                }
            </style>
            <div class="notify alert alert-warning">
                {{text_complete_version}}</div>
        {% endif %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">
                    <i class="fa fa-pencil"></i>
                    {{text_edit}}</h3>
            </div>
            <div class="panel-body">
                <form action="{{action}}" method="post" enctype="multipart/form-data" id="form-excel" class="form-horizontal">
                    <div class="row">
                        <div class="col-sm-{{notify ? '9' : '12'}}">
                            {{tabs}}
                            <div class="form-group required">
                                <label class="control-label col-sm-2">
                                    {{entry_language}}</label>
                                <div class="col-sm-10">
                                    <select class="form-control" name="language_id">
                                        {% for language in languages %}
                                            <option value="{{language.language_id}}">
                                                {{language.name}}</option>
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                            <input accept="application/zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" name="import" style="display: none;" type="file"/>
                            <input name="recipient" type="hidden" value=""/>
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <td class="text-left">
                                            {{column_name}}
                                        </td>
                                        <td class="text-left">
                                            {{column_description}}
                                        </td>
                                        <td class="text-center">
                                            {{column_action}}
                                        </td>
                                    </tr>
                                </thead>
                                <tbody>
                                    {% for key, module in modules %}
                                        <tr>
                                            <td class="text-left">
                                                {{module.title}}
                                            </td>
                                            <td class="text-left">
                                                {{module.description}}
                                            </td>
                                            <td class="text-center">
                                                <a id="button-export" class="btn btn-success" data-value="{{key}}" data-toggle="tooltip" title="{{button_export}}">
                                                    <i class="fa fa-download"></i>
                                                </a>
                                                <a id="button-import" class="btn btn-primary" data-value="{{key}}" data-toggle="tooltip" title="{{button_import}}">
                                                    <i class="fa fa-upload"></i>
                                                </a>
                                                <a id="button-setting" class="btn btn-info" data-value="{{key}}" data-toggle="tooltip" title="{{button_filter}}">
                                                    <i class="fa fa-filter"></i>
                                                </a>
                                            </td>
                                        </tr>
                                    {% endfor %}
                                </tbody>
                            </table>
                            <ei_progress_modal></ei_progress_modal>
                            <ei_setting_modal></ei_setting_modal>
                        </div>
                        {% if notify %}
                            <div class="col-sm-3">
                                <div class="d_shopunity_widget_1"></div>
                            </div>
                        {% endif %}
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% for riot_tag in riot_tags %}
    <script src="{{riot_tag}}" type="riot/tag"></script>
{% endfor %}
<script type="text/javascript">
    riot.mixin({store: d_export_import.createStore({{json|json_encode}})});
    riot.mount('*');
    $(document).ready(function () {
        $(document).on('click', 'a#button-export', function () {
            d_export_import.updateState({mode: 'export', source: $(this).data('value')});
            d_export_import.initStart();
            d_export_import.export();
            $('#modal-progress').modal({backdrop: 'static', keyboard: false, show: true});
        });
        $(document).on('click', 'a#button-import', function () {
            $('input[name=recipient]').val($(this).data('value'));
            $('input[type=file][name=import]').val('');
            $('input[type=file][name=import]').click();
        });
        $(document).on('click', 'a#button-setting', function () {
            d_export_import.updateState({'filter_active': $(this).data('value')});
            $('#modal-setting').modal({backdrop: 'static', keyboard: false, show: true});
        });
        $("input:file").change(function () {
            d_export_import.updateState({mode: 'import', source: $(this).data('value')});
            d_export_import.initStart();
            d_export_import.import ();
            $('#modal-progress').modal({backdrop: 'static', keyboard: false, show: true});
        });
        var d_shopunity_widget_1 = jQuery.extend(true, {}, d_shopunity_widget);
        d_shopunity_widget_1.init({class: '.d_shopunity_widget_1', token: '{{token}}', extension_id: '128'})
    });
</script>
{{footer}}
