<div class="modal" id="modal-export_excel">
    <form class="js-quick-submit js-upload-blob-form form-horizontal" id="form-export_excel"
          action="/project/export/issue" accept-charset="UTF-8" method="POST">
        <input type="hidden" name="cur_project_id" value="<?= project_id ?>">
        <div class="modal-dialog">
            <div class="modal-content modal-middle">
                <div class="modal-header">
                    <a class="close js-key-modal-close1" data-dismiss="modal" href="#">×</a>
                    <h3 class="modal-header-title">导出Excel</h3>
                </div>

                <div class="modal-body overflow-x-hidden">
                    <div class="form-group">
                        <label class="control-label" for="id_name">导出范围:<span class="required">
													*</span>
                        </label>
                        <div class="col-sm-6">
                            <div class="form-group">
                                <div class="checkbox">
                                    <label>
                                        <input checked type="radio" name="radio-export_range"
                                               value="current_page">
                                        当前页事项
                                    </label>
                                    <label>
                                        <input type="radio" name="radio-export_range" value="all_page">
                                        所有筛选后事项
                                    </label>
                                    <label>
                                        <input type="radio" name="radio-export_range" value="project_all">
                                        项目所有事项
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="id_name"></label>
                        <div class="col-sm-6">
                            <div class="form-group"></div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="id_description">选择字段:<span class="required">
													*</span>
                        </label>
                        <div class="col-sm-8">
                            <div class="form-group">
                                <table class="table table-bordered table-condensed">
                                    <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Name</th>
                                        <th>原始字段</th>
                                        <th>格式化</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="summary">
                                                </label>
                                            </div>
                                        </td>
                                        <td>标题</td>
                                        <td>summary</td>
                                        <td>字符串</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="project_id">
                                                </label>
                                            </div>
                                        </td>
                                        <td>项目</td>
                                        <td>project_id</td>
                                        <td>
                                            <select class="form-control" name="field_format_project_id">
                                                <option value="title" selected>名称</option>
                                                <option value="id">id</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="issue_num">
                                                </label>
                                            </div>
                                        </td>
                                        <td>编号</td>
                                        <td>issue_num</td>
                                        <td>字符串</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="issue_type">
                                                </label>
                                            </div>
                                        </td>
                                        <td>类型</td>
                                        <td>issue_type</td>
                                        <td>字符串</td>
                                    </tr>

                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="module">
                                                </label>
                                            </div>
                                        </td>
                                        <td>模块</td>
                                        <td>module</td>
                                        <td>
                                            <select class="form-control" name="field_format_module">
                                                <option value="title" selected>名称</option>
                                                <option value="id">id</option>
                                            </select>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="sprint">
                                                </label>
                                            </div>
                                        </td>
                                        <td>迭代</td>
                                        <td>sprint</td>
                                        <td>
                                            <select class="form-control" name="field_format_sprint">
                                                <option value="title" selected>名称</option>
                                                <option value="id">id</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="weight">
                                                </label>
                                            </div>
                                        </td>
                                        <td>权重值</td>
                                        <td>weight</td>
                                        <td>数字</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="description">
                                                </label>
                                            </div>
                                        </td>
                                        <td>描述</td>
                                        <td>description</td>
                                        <td>字符串</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="priority">
                                                </label>
                                            </div>
                                        </td>
                                        <td>优先级</td>
                                        <td>priority</td>
                                        <td>字符串</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="status">
                                                </label>
                                            </div>
                                        </td>
                                        <td>状态</td>
                                        <td>status</td>
                                        <td>字符串</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="resolve">
                                                </label>
                                            </div>
                                        </td>
                                        <td>解决结果</td>
                                        <td>resolve</td>
                                        <td>字符串</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="environment">
                                                </label>
                                            </div>
                                        </td>
                                        <td>运行环境</td>
                                        <td>environment</td>
                                        <td>字符串</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="reporter">
                                                </label>
                                            </div>
                                        </td>
                                        <td>报告人</td>
                                        <td>reporter</td>
                                        <td>
                                            <select class="form-control" name="field_format_reporter">
                                                <option value="display_name" selected>显示名称</option>
                                                <option value="username">用户名</option>
                                                <option value="avatar">用户头像</option>
                                                <option value="avatar_url">用户头像url</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="assignee">
                                                </label>
                                            </div>
                                        </td>
                                        <td>经办人</td>
                                        <td>assignee</td>
                                        <td>
                                            <select class="form-control" name="field_format_assignee">
                                                <option value="display_name" selected>显示名称</option>
                                                <option value="username">用户名</option>
                                                <option value="avatar">用户头像</option>
                                                <option value="avatar_url">用户头像url</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="assistants">
                                                </label>
                                            </div>
                                        </td>
                                        <td>协助人(多个)</td>
                                        <td>assistants</td>
                                        <td>
                                            <select class="form-control" name="field_format_assistants">
                                                <option value="display_name" selected>显示名称</option>
                                                <option value="username">用户名</option>
                                                <option value="avatar">用户头像</option>
                                                <option value="avatar_url">用户头像url</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="modifier">
                                                </label>
                                            </div>
                                        </td>
                                        <td>最后修改人</td>
                                        <td>modifier</td>
                                        <td>
                                            <select class="form-control" name="field_format_modifier">
                                                <option value="display_name" selected>显示名称</option>
                                                <option value="username">用户名</option>
                                                <option value="avatar">用户头像</option>
                                                <option value="avatar_url">用户头像url</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="master_id">
                                                </label>
                                            </div>
                                        </td>
                                        <td>是否父任务</td>
                                        <td>master_id</td>
                                        <td>是|否</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="created">
                                                </label>
                                            </div>
                                        </td>
                                        <td>创建时间</td>
                                        <td>created</td>
                                        <td>完整时间格式</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="updated">
                                                </label>
                                            </div>
                                        </td>
                                        <td>最后修改时间</td>
                                        <td>updated</td>
                                        <td>完整时间格式</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="start_date">
                                                </label>
                                            </div>
                                        </td>
                                        <td>计划开始日期</td>
                                        <td>start_date</td>
                                        <td>日期</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="due_date">
                                                </label>
                                            </div>
                                        </td>
                                        <td>计划结束日期</td>
                                        <td>due_date</td>
                                        <td>日期</td>
                                    </tr>
                                    <tr>
                                        <td scope="row">
                                            <div class="checkbox">
                                                <label>
                                                    <input checked type="checkbox" name="export_fields[]"
                                                           value="resolve_date">
                                                </label>
                                            </div>
                                        </td>
                                        <td>实际解决日期</td>
                                        <td>resolve_date</td>
                                        <td>日期</td>
                                    </tr>

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <hr>

                </div>

                <div class="modal-footer form-actions">
                    <button name="export_excel_btn" type="button" class="btn btn-create js-key-modal-enter1"
                            id="btn-export_excel">导出
                    </button>
                    <a class="btn btn-cancel" data-dismiss="modal" href="#">取消</a>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="modal" id="modal-setting_columns">
    <form class="js-quick-submit js-upload-blob-form form-horizontal" id="form-setting_columns"
          action="/issue/main/setting_columns" accept-charset="UTF-8" method="POST">
        <input type="hidden" name="cur_project_id" value="<?= project_id ?>">
        <div class="modal-dialog">
            <div class="modal-content modal-middle">
                <div class="modal-header">
                    <a class="close js-key-modal-close1" data-dismiss="modal" href="#">×</a>
                    <h3 class="modal-header-title">显示列设置</h3>
                </div>

                <div class="modal-body overflow-x-hidden">

                    <div class="form-group">
                        <label class="control-label"  ></label>
                        <div class="col-sm-6">
                            <div class="form-group">注：当前设置只会在表格视图下生效</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="id_description"></label>
                        <div class="col-sm-8">
                            <div class="form-group">
                                <table class="table table-bordered table-condensed">
                                    <thead>
                                    <tr>
                                        <th>#打勾显示则表示</th>
                                        <th>待选字段</th>
                                    </tr>
                                    </thead>
                                    <tbody>

                                    {% for field,fieldName in uiDisplayFields %}
                                        {% set checked = '' %}
                                        {% if ( field in display_fields) %}
                                            {% set checked = 'checked' %}
                                        {% endif %}
                                        <tr>
                                            <td scope="row">
                                                <div class="checkbox">
                                                    <label>
                                                        <input <?= checked ?> type="checkbox"
                                                                             name="display_fields[]"
                                                                             value="<?= field ?>">
                                                    </label>
                                                </div>
                                            </td>
                                            <td><?= fieldName ?></td>
                                        </tr>

                                    {% endfor %}

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <hr>

                </div>

                <div class="modal-footer form-actions">
                    <button name="btn-setting_columns" type="button"
                            class="btn btn-create js-key-modal-enter1" id="btn-setting_columns">保 存
                    </button>
                    <a class="btn btn-cancel" data-dismiss="modal" href="#">取 消</a>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="modal" id="modal-import_excel">
    <!--<form class="js-quick-submit js-upload-blob-form form-horizontal" id="form-import_excel"  action="/issue/main/import_excel"  accept-charset="UTF-8"  method="POST">-->
    <input type="hidden" name="project_id" value="<?= project_id ?>">
    <div class="modal-dialog">
        <div class="modal-content modal-middle">
            <div class="modal-header">
                <a class="close js-key-modal-close1" data-dismiss="modal" href="#">×</a>
                <h3 class="modal-header-title">导入Excel数据</h3>
            </div>

            <div class="modal-body overflow-x-hidden">

                <div class="form-group">

                    <div class="col-sm-2">
                        1.导入说明
                    </div>
                    <div class="col-sm-9">
											<span style="font-size: 12px;">
												导入前须知:<br>
												1).excel中的第二行为导入的字段名称，请勿更改<br>
												2).如果编号不为空，则会查找该编号的事项进行更新操作<br>
												3).数据格式请查看字段的批注说明<br>
											</span>
                    </div>
                    <div class="col-sm-1"></div>
                </div>
                <div class="form-group">

                    <div class="col-sm-2">
                        2.下载模板
                    </div>
                    <div class="col-sm-9">
                        <a target="_blank" href="/tpl/import_tpl.xlsx">导入的模板文件.xlsx</a>
                    </div>
                    <div class="col-sm-1"></div>
                </div>
                <div class="form-group">

                    <div class="col-sm-2">
                        3.上传文件
                    </div>
                    <div class="col-sm-9">

                        <input id="import_excel_file" type="file" name="import_excel_file">

                        <div id="import_excel_progress" class="progress " style="margin-top: 5px">
                            <div class="progress-bar progress-bar-success progress-bar-striped"
                                 role="progressbar"></div>
                        </div>

                    </div>
                    <div class="col-sm-1"></div>
                </div>
                <div class="form-group">

                    <div class="col-sm-2">
                        4.查看执行结果
                    </div>
                    <div class="col-sm-9">
                        <div class="form-control " style="min-height:200px; font-size: 10px; overflow: hidden; overflow-y: scroll;"
                             name="import_excel_result" id="import_excel_result"></div>
                    </div>
                    <div class="col-sm-1"></div>
                </div>
            </div>

            <div class="modal-footer form-actions">
                <a class="btn btn-cancel" data-dismiss="modal" href="#" onclick="window.location.reload()">关闭</a>
            </div>
        </div>
    </div>
    <!-- </form> -->
</div>
<div class="modal adv-modal" id="modal-adv_query">
    <div class="form-horizontal" id="form-adv-query">
        <input type="hidden" name="project_id" value="<?= project_id ?>">

        <div class="modal-dialog">
            <div class="modal-content modal-middle">
                <div class="modal-header">
                    <a class="close js-key-modal-close1" data-dismiss="modal" href="#">×</a>
                    <h3 class="modal-header-title">高级查询</h3>
                </div>

                <div class="modal-body">
                    <input type="hidden" name="adv_query_id" id="adv_query_id" value="">
                    <div class="form-group">
                        <div class="col-sm-2">
                            <select id="adv_andor" name="ad_logic" class="selectpicker form-control"
                                    dropdownalignright="true" title="关系">
                                <option value="and">
                                    并且
                                </option>
                                <option value="or">
                                    或者
                                </option>
                            </select>
                        </div>

                        <div class="col-sm-2">
                            <select id="adv_field" name="params[field]" class="selectpicker form-control"
                                    dropdownalignright="true" title="字段">
                                {% for key ,field in advFields %}
                                    <option value="<?= key ?>" data-type="<?= field.type ?>"
                                            data-source="<?= field.source ?>"
                                            data-content="<?= field.title ?>">
                                        <?= field.title ?>
                                    </option>
                                {% endfor %}
                            </select>
                        </div>
                        <div class="col-sm-2"><select id="adv_opt" name="params[opt]"
                                                      class="selectpicker form-control"
                                                      dropdownalignright="true" title="操作符">
                                <option value="LIKE">LIKE</option>
                                <option value="LIKE %...%">LIKE %...%</option>
                                <!--option value="NOT LIKE">NOT LIKE</option-->
                                <option value="=">=</option>
                                <option value="!=">!=</option>
                                <option value=">">></option>
                                <option value=">=">>=</option>
                                <option value="<"><</option>
                                <option value="<="><=</option>
                                <option value="REGEXP">REGEXP</option>
                                <option value="REGEXP ^...$">REGEXP ^...$</option>
                                <!--option value="NOT REGEXP">NOT REGEXP</option-->
                                <!--option value="IN (...)">IN (...)</option-->
                                <!--option value="NOT IN (...)">NOT IN (...)</option-->
                                <!--option value="BETWEEN">BETWEEN</option>
                                <option value="NOT BETWEEN">NOT BETWEEN</option>
                                <option value="IS NULL">IS NULL</option>
                                <option value="IS NOT NULL">IS NOT NULL</option-->
                            </select>
                        </div>

                        <div class="col-sm-3 dynamic-form" id="dynamic-form">
                            <input type="text" class="form-control"
                                   datatype="text" name="content"
                                   id="adv_content" value=""
                                   placeholder="查询内容"/>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn" id="btn-adv_add_condition">
                                <i class="fa fa-plus"></i>
                                添加条件
                            </button>
                        </div>

                    </div>


                    <div class="form-group">
                        <div class="panel panel-info"
                             style="border: 1px solid transparent;border-radius: 4px;">
                            <div class="panel-heading">
                                <h3 class="panel-title">查询条件</h3>
                            </div>
                            <table class="table table-hover table-adv-query" id="adv-query-box">
                                <thead>
                                <tr>
                                    <th width="20">#</th>
                                    <th width="80">关系</th>
                                    <th width="80">括号</th>
                                    <th width="150">字段名</th>
                                    <th width="120">运算符</th>
                                    <th>内容</th>
                                    <th width="80">括号</th>
                                    <th width="50">操作</th>
                                </tr>
                                </thead>
                                <tbody id="adv-tbody" class="adv-tbody"></tbody>
                            </table>
                        </div>
                        <style>
                            .panel-info {
                                border-color: #bce8f1;
                            }

                            .panel {
                                margin-bottom: 20px;
                                background-color: #fff;
                                border: 1px solid transparent;
                                border-radius: 4px;
                                -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
                                box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
                            }

                            .panel-info > .panel-heading {
                                color: #31708f;
                                background-color: #d9edf7;
                                border-color: #bce8f1;
                            }
                        </style>
                    </div>


                    <div class="form-group">
                        <div class="col-sm-3">
                            <select id="adv_sort_field" name="adv_sort_field"
                                    class="selectpicker form-control" dropdownalignright="true"
                                    title="排序字段">
                                {% for avl_sort_field,field_name in avl_sort_fields %}
                                    <option value="<?= avl_sort_field ?>" data-content="<?= field_name ?>">
                                        <?= field_name ?>"
                                    </option>
                                {% endfor %}
                            </select>
                        </div>
                        <div class="col-sm-3">
                            <input type="hidden" id="adv_sort_by" name="sort_by" value="<?= sort_by ?>">
                            <a id="btn_adv_sort_by" type="button"
                               class="btn btn-default reverse-sort-btn qa-reverse-sort"
                               title="<?= sort_by == 'desc' ? '升序' : '降序' ?>" style="height:35px"
                               href="javascript:">
                                <svg class="s16 adv-sort-img <?= sort_by == 'asc' ? '' : 'hidden' ?>"
                                     id="adv-sort-by-desc">
                                    <use style="stroke: rgba(245, 245, 245, 0.85);"  xlink:href="/dev/img/svg/icons-sort.svg#sort-highest"></use>
                                </svg>
                                <svg class="s16 <?= sort_by == 'asc' ? 'hidden' : '' ?> adv-sort-img"
                                     id="adv-sort-by-asc">
                                    <use style="stroke: rgba(245, 245, 245, 0.85);"  xlink:href="/dev/img/svg/icons-sort.svg#sort-lowest"></use>
                                </svg>
                            </a>
                        </div>
                    </div>
                </div>

                <div class="modal-footer form-actions">
                    <button name="btn-setting_columns" type="button" class="btn btn-close"
                            id="btn-adv_clear">清空条件
                    </button>

                    <button name="btn-setting_columns" type="button" class="btn btn-info" id="btn-save_adv_filter">
                        <i class="fa fa-save"></i>
                        保存条件

                    </button>
                    <button name="btn-setting_columns" type="button"
                            class="btn btn-create js-key-modal-enter1" id="btn-adv_submit">
                        <i class="fa fa-play"></i> 执行查询
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>