<!DOCTYPE html>
<html class="" lang="en">
<head  >
    <script src="/dev/lib/jquery.min.js"></script>
    <script src="/dev/lib/jquery-ui/jquery-ui.min.js"></script>
    {% include 'twig/common/header/include.twig' %}

    <script src="/dev/lib/url_param.js" type="text/javascript" charset="utf-8"></script>
    <script src="/dev/js/admin/issue_ui.js?v=<?=_version?>" type="text/javascript"  charset="utf-8"></script>
    <script src="/dev/js/issue/form.js?v=<?=_version?>" type="text/javascript"  charset="utf-8"></script>
    <script src="/dev/js/issue/detail.js?v=<?=_version?>" type="text/javascript"  charset="utf-8"></script>
    <script src="/dev/js/issue/main.js?v=<?=_version?>" type="text/javascript"  charset="utf-8"></script>
    <script src="/dev/lib/handlebars-v4.0.10.js" type="text/javascript" charset="utf-8"></script>
    <script src="/dev/lib/bootstrap-paginator/src/bootstrap-paginator.js?v=<?=_version?>"  type="text/javascript"></script>

    <link href="/dev/lib/laydate/theme/default/laydate.css" rel="stylesheet">
    <script src="/dev/lib/laydate/laydate.js"></script>

    <link rel="stylesheet" href="/dev/lib/editor.md/css/editormd.css">
    <script src="/dev/lib/editor.md/editormd.js"></script>
    <script src="/dev/lib/editor.md/lib/marked.min.js"></script>
    <script src="/dev/lib/editor.md/lib/prettify.min.js"></script>
    <script src="/dev/lib/editor.md/lib/flowchart.min.js"></script>
    <script src="/dev/lib/editor.md/lib/jquery.flowchart.min.js"></script>

    <link rel=stylesheet href="/dev/lib/jQueryGantt/platform.css" type="text/css">
    <link rel=stylesheet href="/dev/lib/jQueryGantt/libs/jquery/dateField/jquery.dateField.css" type="text/css">

    <link rel=stylesheet href="/dev/lib/jQueryGantt/gantt.css" type="text/css">
    <link rel=stylesheet href="/dev/lib/jQueryGantt/ganttPrint.css" type="text/css" media="print">

    <script src="/dev/lib/jQueryGantt/libs/jquery/jquery.livequery.1.1.1.min.js"></script>
    <script src="/dev/lib/jQueryGantt/libs/jquery/jquery.timers.js"></script>

    <script src="/dev/lib/jQueryGantt/libs/utilities.js"></script>
    <script src="/dev/lib/jQueryGantt/libs/forms.js"></script>
    <script src="/dev/lib/jQueryGantt/libs/date.js"></script>
    <script src="/dev/lib/jQueryGantt/libs/dialogs.js"></script>
    <script src="/dev/lib/jQueryGantt/libs/layout.js"></script>
    <script src="/dev/lib/jQueryGantt/libs/i18nJs.js"></script>
    <script src="/dev/lib/jQueryGantt/libs/jquery/dateField/jquery.dateField.js"></script>
    <script src="/dev/lib/jQueryGantt/libs/jquery/JST/jquery.JST.js"></script>

    <script src="/dev/lib/jQueryGantt/libs/jquery/svg/jquery.svg.min.js" type="text/javascript" ></script>
    <script  src="/dev/lib/jQueryGantt/libs/jquery/svg/jquery.svgdom.1.8.js" type="text/javascript"></script>

    <script src="/dev/lib/jQueryGantt/ganttUtilities.js"></script>
    <script src="/dev/lib/jQueryGantt/ganttTask.js"></script>
    <script src="/dev/lib/jQueryGantt/ganttDrawerSVG.js"></script>
    <script src="/dev/lib/jQueryGantt/ganttZoom.js"></script>
    <script src="/dev/lib/jQueryGantt/ganttGridEditor.js"></script>
    <script src="/dev/lib/jQueryGantt/ganttMaster.js"></script>

    <script src="/dev/lib/bootstrap-select/js/bootstrap-select.js" type="text/javascript"   charset="utf-8"></script>
    <link href="/dev/lib/bootstrap-select/css/bootstrap-select.css" rel="stylesheet">
    <link href="/dev/lib/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>

    <script src="/dev/lib/sweetalert2/sweetalert-dev.js"></script>
    <link rel="stylesheet" href="/dev/lib/sweetalert2/sweetalert-dev.css"/>

    <style>
        .resEdit {
            padding: 15px;
        }
        .resLine {
            width: 95%;
            padding: 3px;
            margin: 5px;
            border: 1px solid #d0d0d0;
        }
        body {
            overflow: hidden;
        }
        .ganttButtonBar h1{
            color: #000000;
            font-weight: bold;
            font-size: 28px;
            margin-left: 10px;
        }

    </style>
</head>
<body class="" data-group="" data-page="projects:issues:index" data-project="hornet" style="background-color: #fff;">
{% include 'twig/common/body/script.twig' %}

<div class="has-sidebar page-layout max-sidebar">
    {% include 'twig/common/body/page-left.twig' %}

    <div class="page-layout page-content-body">
{% include 'twig/common/body/header-content.twig' %}


<div class="page-with-sidebar">
    {% include 'twig/project/common-page-nav-project.twig' %}
    <div class="content-wrapper page-with-layout-nav page-with-sub-nav">
        <div class="alert-wrapper">
            <div class="flash-container flash-container-page">
            </div>
        </div>
        <div class="content gantt-content" id="content-body">
            <div id="ndo" style="display:none;position:absolute;right:5px;top:5px;width:378px;padding:5px;background-color: #FFF5E6; border:1px solid #F9A22F; font-size:12px" class="noprint">

            </div>
            <div id="workSpace" style="padding:0px; overflow-y:auto; overflow-x:hidden;border:1px solid #e5e5e5;position:relative;margin:0 5px 0 0"></div>


            <form id="gimmeBack" style="display:none;" action="../gimmeBack.jsp" method="post" target="_blank"><input type="hidden" name="prj" id="gimBaPrj"></form>
            <div id="gantEditorTemplates" style="display:none;">
                <div class="__template__" type="GANTBUTTONS"><!--
  <div class="ganttButtonBar noprint">
    <div class="buttons">

      <button onclick="$('#workSpace').trigger('undo.gantt');return false;" class="button textual icon requireWrite " title="undo"><span class="teamworkIcon">&#39;</span></button>
      <button onclick="$('#workSpace').trigger('redo.gantt');return false;" class="button textual icon requireWrite " title="redo"><span class="teamworkIcon">&middot;</span></button>
      <span class="ganttButtonSeparator requireCanWrite  "></span>
      <button onclick="$('#workSpace').trigger('showAddAboveCurrentTask.gantt');" title="添加事项"   class="button textual icon requireWrite "  ><span class="teamworkIcon">l</span></button>
      <button  onclick="$('#workSpace').trigger('showAddBelowCurrentTask.gantt');" title="添加事项"    class="button textual icon requireWrite "  ><span class="teamworkIcon">X</span></button>
      <span class="ganttButtonSeparator requireWrite "></span>
      <button onclick="$('#workSpace').trigger('outdentCurrentTask.gantt');return false;" class="button textual icon requireWrite " title="升级"><span class="teamworkIcon">.</span></button>
      <button onclick="$('#workSpace').trigger('indentCurrentTask.gantt');return false;" class="button textual icon requireWrite " title="降级"><span class="teamworkIcon">:</span></button>
      <span class="ganttButtonSeparator requireWrite "></span>
      <button onclick="$('#workSpace').trigger('moveUpCurrentTask.gantt');return false;" class="button textual icon requireWrite " title="向上移动"><span class="teamworkIcon">k</span></button>
      <button onclick="$('#workSpace').trigger('moveDownCurrentTask.gantt');return false;" class="button textual icon requireWrite " title="向下移动"><span class="teamworkIcon">j</span></button>
      <span class="ganttButtonSeparator requireWrite "></span>
      <button onclick="$('#workSpace').trigger('deleteFocused.gantt');return false;" class="button textual icon delete requireWrite" title="隐藏事项(删除事项需到事项列表操作)"><span class="teamworkIcon">&cent;</span></button>
      <button onclick="show_be_hidden_list();" class="button textual icon delete requireWrite" title="隐藏的事项列表"><span class="teamworkIcon">q</span></button>
      <span class="ganttButtonSeparator"></span>
     {% if (projectPermArr['ADMIN_GANTT'] is defined and projectPermArr['ADMIN_GANTT'] =='1') %} {% endif %}
      <button onclick="$('#workSpace').trigger('expandAll.gantt');return false;" class="button textual icon " title="展开"><span class="teamworkIcon">6</span></button>
      <button onclick="$('#workSpace').trigger('collapseAll.gantt'); return false;" class="button textual icon " title="折叠"><span class="teamworkIcon">5</span></button>

      <span class="ganttButtonSeparator"></span>
      <button onclick="$('#workSpace').trigger('zoomMinus.gantt'); return false;" class="button textual icon " title="放大日期"><span class="teamworkIcon">)</span></button>
      <button onclick="$('#workSpace').trigger('zoomPlus.gantt');return false;" class="button textual icon " title="缩小日期"><span class="teamworkIcon">(</span></button>
      <span class="ganttButtonSeparator"></span>
      <button onclick="$('#workSpace').trigger('print.gantt');return false;" class="button textual icon " title="打印"><span class="teamworkIcon">p</span></button>
      <span class="ganttButtonSeparator"></span>
      <button onclick="ge.gantt.showCriticalPath=!ge.gantt.showCriticalPath; ge.redraw();return false;" class="button textual icon requireCanSeeCriticalPath" title="关键路径"><span class="teamworkIcon">&pound;</span></button>
      <span class="ganttButtonSeparator requireCanSeeCriticalPath"></span>
      <button onclick="ge.splitter.resize(.1);return false;" class="button textual icon" ><span class="teamworkIcon">F</span></button>
      <button onclick="ge.splitter.resize(50);return false;" class="button textual icon" ><span class="teamworkIcon">O</span></button>
      <button onclick="ge.splitter.resize(100);return false;" class="button textual icon"><span class="teamworkIcon">R</span></button>
      <span class="ganttButtonSeparator"></span>
      <button id="toggle_focus_mode"  onclick="$('#workSpace').trigger('fullScreen.gantt');return false;" class="button textual icon" title="全屏模式" id="fullscrbtn"><span class="teamworkIcon">@</span></button>
      <button onclick="ge.element.toggleClass('colorByStatus' );return false;" class="button textual icon"  title="颜色设置"><span class="teamworkIcon">&sect;</span></button>

      <button onclick="editResources();" class="button textual requireWrite" title="项目成员设置"><span class="teamworkIcon">M</span></button>
      <button onclick="show_setting();" class="button textual requireWrite" title="数据源设置"><span class="teamworkIcon">g</span></button>
      {% if (projectPermArr['ADMIN_GANTT'] is defined  and projectPermArr['ADMIN_GANTT'] =='1') %}{% endif %}
      &nbsp; &nbsp;
     <button onclick="saveGanttOnServer();" class="button first big requireWrite hide"  title="Save">Save</button>
     <button onclick='newProject();' class='button requireWrite newproject hide' ><em>clear project</em></button>

     <button class="button login hide" title="login/enroll" onclick="loginEnroll($(this));" style="display:none;">login/enroll</button>
     <button class="button opt collab hide" title="Start with Twproject" onclick="collaborate($(this));"  ><em>collaborate</em></button>
     </div>
     </div>
  --></div>

  <div class="__template__" type="TASKSEDITHEAD"><!--
  <table class="gdfTable" cellspacing="0" cellpadding="0">
    <thead>
    <tr style="height:40px">
      <th class="gdfColHeader" style="width:35px; border-right: none"></th>
      <th class="gdfColHeader" style="width:25px;"></th>
      <th class="gdfColHeader gdfResizable" style="width:100px;">编号</th>
      <th class="gdfColHeader gdfResizable" style="width:300px;">事项</th>
      <th class="gdfColHeader"  align="center" style="width:17px;" title="里程碑开始日期."><span class="teamworkIcon" style="font-size: 8px;">^</span></th>
      <th class="gdfColHeader gdfResizable" style="width:80px;">开始日期</th>
      <th class="gdfColHeader"  align="center" style="width:17px;" title="里程碑结束日期."><span class="teamworkIcon" style="font-size: 8px;">^</span></th>
      <th class="gdfColHeader gdfResizable" style="width:80px;">结束日期</th>
      <th class="gdfColHeader gdfResizable" style="width:50px;">用时.</th>
      <th class="gdfColHeader gdfResizable" style="width:20px;">进度%</th>
      <th class="gdfColHeader gdfResizable requireCanSeeDep" style="width:50px;">依赖.</th>
      <th class="gdfColHeader gdfResizable" style="width:1000px; text-align: left; padding-left: 10px;">经办人</th>
    </tr>
    </thead>
  </table>
  --></div>

 <div class="__template__" type="TASKROW"><!--
  <tr id="tid_(#=obj.id#)" taskId="(#=obj.id#)" class="taskEditRow (#=obj.isParent()?'isParent':''#) (#=obj.collapsed?'collapsed':''#)" level="(#=level#)">
    <th class="gdfCell edit" align="right" style="cursor:pointer;"><span class="taskRowIndex">(#=obj.getRow()+1#)</span> <span class="teamworkIcon" style="font-size:12px;" >e</span></th>
    <td class="gdfCell noClip" align="center"><div class="taskStatus cvcColorSquare" status="(#=obj.status#)"></div></td>
    <td class="gdfCell"><input type="text" name="code" value="(#=obj.code?obj.code:''#)" placeholder="code/short name"></td>
    <td class="gdfCell indentCell" style="padding-left:(#=obj.level*10+18#)px;">
      <div class=" (#=obj.isSprintTop()?' is_sprint_top':'exp-controller'#) (#=obj.isModuleTop()?' is_module_top':'exp-controller'#)" align="center"></div>
      <input type="text" name="name" value="(#=obj.name#)" placeholder="name">
    </td>
    <td class="gdfCell" align="center"><input type="checkbox" name="startIsMilestone"></td>
    <td class="gdfCell"><input type="text" name="start"  value="" class="date"></td>
    <td class="gdfCell" align="center"><input type="checkbox" name="endIsMilestone"></td>
    <td class="gdfCell"><input type="text" name="end" value="" class="date"></td>
    <td class="gdfCell"><input type="text" name="duration" autocomplete="off" value="(#=obj.duration#)"></td>
    <td class="gdfCell"><input type="text" name="progress" class="validated" entrytype="PERCENTILE" autocomplete="off" value="(#=obj.progress?obj.progress:''#)" (#=obj.progressByWorklog?"readOnly":""#)></td>
    <td class="gdfCell requireCanSeeDep"><input type="text" name="depends" autocomplete="off" value="(#=obj.depends#)" (#=obj.hasExternalDep?"readonly":""#)></td>
    <td class="gdfCell taskAssigs">(#=obj.getAssigsString()#)</td>
  </tr>
  --></div>


  <div class="__template__" type="TASKEMPTYROW"><!--
  <tr class="taskEditRow emptyRow" >
    <th class="gdfCell" align="right"></th>
    <td class="gdfCell noClip" align="center"></td>
    <td class="gdfCell"></td>
    <td class="gdfCell"></td>
    <td class="gdfCell"></td>
    <td class="gdfCell"></td>
    <td class="gdfCell"></td>
    <td class="gdfCell"></td>
    <td class="gdfCell"></td>
    <td class="gdfCell"></td>
    <td class="gdfCell requireCanSeeDep"></td>
    <td class="gdfCell"></td>
  </tr>
  --></div>

   <div class="__template__" type="TASKBAR"><!--
  <div class="taskBox taskBoxDiv" taskId="(#=obj.id#)" >
    <div class="layout (#=obj.hasExternalDep?'extDep':''#)">
      <div class="taskStatus" status="(#=obj.status#)"></div>
      <div class="taskProgress" style="width:(#=obj.progress>100?100:obj.progress#)%; background-color:(#=obj.progress>100?'red':'rgb(153,255,51);'#);"></div>
      <div class="milestone (#=obj.startIsMilestone?'active':''#)" ></div>

      <div class="taskLabel"></div>
      <div class="milestone end (#=obj.endIsMilestone?'active':''#)" ></div>
    </div>
  </div>
  --></div>


    <div class="__template__" type="CHANGE_STATUS"><!--
    <div class="taskStatusBox">
    <div class="taskStatus cvcColorSquare" status="STATUS_ACTIVE" title="Active"></div>
    <div class="taskStatus cvcColorSquare" status="STATUS_DONE" title="Completed"></div>
    <div class="taskStatus cvcColorSquare" status="STATUS_FAILED" title="Failed"></div>
    <div class="taskStatus cvcColorSquare" status="STATUS_SUSPENDED" title="Suspended"></div>
    <div class="taskStatus cvcColorSquare" status="STATUS_WAITING" title="Waiting" style="display: none;"></div>
    <div class="taskStatus cvcColorSquare" status="STATUS_UNDEFINED" title="Undefined"></div>
    </div>
  --></div>




   <div class="__template__" type="TASK_EDITOR"><!--
  <div class="ganttTaskEditor">
    <h2 class="taskData">Task editor</h2>
    <table  cellspacing="1" cellpadding="5" width="100%" class="taskData table" border="0">
          <tr>
        <td width="200" style="height: 80px"  valign="top">
          <label for="code">code/short name</label><br>
          <input type="text" name="code" id="code" value="" size=15 class="formElements" autocomplete='off' maxlength=255 style='width:100%' oldvalue="1">
        </td>
        <td colspan="3" valign="top"><label for="name" class="required">name</label><br><input type="text" name="name" id="name"class="formElements" autocomplete='off' maxlength=255 style='width:100%' value="" required="true" oldvalue="1"></td>
          </tr>


      <tr class="dateRow">
        <td nowrap="">
          <div style="position:relative">
            <label for="start">start</label>&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="checkbox" id="startIsMilestone" name="startIsMilestone" value="yes"> &nbsp;<label for="startIsMilestone">is milestone</label>&nbsp;
            <br><input type="text" name="start" id="start" size="8" class="formElements dateField validated date" autocomplete="off" maxlength="255" value="" oldvalue="1" entrytype="DATE">
            <span title="calendar" id="starts_inputDate" class="teamworkIcon openCalendar" onclick="$(this).dateField({inputField:$(this).prevAll(':input:first'),isSearchField:false});">m</span>          </div>
        </td>
        <td nowrap="">
          <label for="end">End</label>&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="checkbox" id="endIsMilestone" name="endIsMilestone" value="yes"> &nbsp;<label for="endIsMilestone">is milestone</label>&nbsp;
          <br><input type="text" name="end" id="end" size="8" class="formElements dateField validated date" autocomplete="off" maxlength="255" value="" oldvalue="1" entrytype="DATE">
          <span title="calendar" id="ends_inputDate" class="teamworkIcon openCalendar" onclick="$(this).dateField({inputField:$(this).prevAll(':input:first'),isSearchField:false});">m</span>
        </td>
        <td nowrap="" >
          <label for="duration" class=" ">Days</label><br>
          <input type="text" name="duration" id="duration" size="4" class="formElements validated durationdays" title="Duration is in working days." autocomplete="off" maxlength="255" value="" oldvalue="1" entrytype="DURATIONDAYS">&nbsp;
        </td>
      </tr>

      <tr>
        <td  colspan="2">
          <label for="status" class=" ">status</label><br>
          <select id="status" name="status" class="taskStatus" status="(#=obj.status#)"  onchange="$(this).attr('STATUS',$(this).val());">
            <option value="STATUS_ACTIVE" class="taskStatus" status="STATUS_ACTIVE" >active</option>
            <option value="STATUS_WAITING" class="taskStatus" status="STATUS_WAITING" >suspended</option>
            <option value="STATUS_SUSPENDED" class="taskStatus" status="STATUS_SUSPENDED" >suspended</option>
            <option value="STATUS_DONE" class="taskStatus" status="STATUS_DONE" >completed</option>
            <option value="STATUS_FAILED" class="taskStatus" status="STATUS_FAILED" >failed</option>
            <option value="STATUS_UNDEFINED" class="taskStatus" status="STATUS_UNDEFINED" >undefined</option>
          </select>
        </td>

        <td valign="top" nowrap>
          <label>progress</label><br>
          <input type="text" name="progress" id="progress" size="7" class="formElements validated percentile" autocomplete="off" maxlength="255" value="" oldvalue="1" entrytype="PERCENTILE">
        </td>
      </tr>

          </tr>
          <tr>
            <td colspan="4">
              <label for="description">Description</label><br>
              <textarea rows="3" cols="30" id="description" name="description" class="formElements" style="width:100%"></textarea>
            </td>
          </tr>
        </table>

    <h2>Assignments</h2>
  <table  cellspacing="1" cellpadding="0" width="100%" id="assigsTable">
    <tr>
      <th style="width:100px;">name</th>
      <th style="width:70px;">Role</th>
      <th style="width:30px;">est.wklg.</th>
      <th style="width:30px;" id="addAssig"><span class="teamworkIcon" style="cursor: pointer">+</span></th>
    </tr>
  </table>

  <div style="text-align: right; padding-top: 20px">
    <span id="saveButton" class="button first" onClick="$(this).trigger('saveFullEditor.gantt');">Save</span>
  </div>

  </div>
  --></div>



  <div class="__template__" type="ASSIGNMENT_ROW"><!--
  <tr taskId="(#=obj.task.id#)" assId="(#=obj.assig.id#)" class="assigEditRow" >
    <td ><select name="resourceId"  class="formElements" (#=obj.assig.id.indexOf("tmp_")==0?"":"disabled"#) ></select></td>
    <td ><select type="select" name="roleId"  class="formElements"></select></td>
    <td ><input type="text" name="effort" value="(#=getMillisInHoursMinutes(obj.assig.effort)#)" size="5" class="formElements"></td>
    <td align="center"><span class="teamworkIcon delAssig del" style="cursor: pointer">d</span></td>
  </tr>
  --></div>



  <div class="__template__" type="RESOURCE_EDITOR"><!--
  <div class="resourceEditor" style="padding: 5px;">

    <h2>团队成员</h2>
    <table  cellspacing="1" cellpadding="0" width="100%" id="resourcesTable">

    </table>

    <div style="text-align: right; padding-top: 20px"><button id="resSaveButton" class="button big">Save</button></div>
  </div>
  --></div>



  <div class="__template__" type="RESOURCE_ROW"><!--
  <tr resId="(#=obj.id#)" class="resRow" >
    <td ><input type="text" name="name" value="(#=obj.name#)" style="width:100%;" class="formElements"></td>
    <td align="center"><span class="teamworkIcon delRes del" style="cursor: pointer">d</span></td>
  </tr>
  --></div>


            </div>

        </div>
    </div>
    </div>
</div>

</div>

<div class="modal" id="modal-create-issue" style=" padding-right: 16px;">
    <form autocomplete="off" class="form-horizontal issue-form common-note-form js-quick-submit js-requires-input gfm-form" id="create_issue" action="/issue/main/add?&from_module=mind" accept-charset="UTF-8" method="post">
        <div class="modal-dialog issue-modal-dialog" style="width: 900px;">
            <div class="modal-content issue-modal-content">
                <div class="modal-header issue-modal-header">
                    <h3 class="modal-header-title">事项维护</h3>
                    <a class="close" data-dismiss="modal" href="#">×</a>
                </div>
                <div id="modal-body" class="modal-body issue-modal-body form-horizontal" style="padding: 15px 50px;">
                    <input name="utf8" type="hidden" value="✓">
                    <input type="hidden" name="params[project_id]" id="project_id" value="<?=project_id?>">
                    <input type="hidden" name="action" id="action" value="">
                    <input type="hidden" name="issue_id" id="issue_id" value="">
                    <input type="hidden" name="params[master_issue_id]" id="gantt_master_issue_id" value="">
                    <input type="hidden" name="params[below_id]" id="below_id" value="">
                    <input type="hidden" name="params[above_id]" id="above_id" value="">
                    <input type="hidden" name="params[sprint]" id="gantt_sprint" value="0">
                    <input type="hidden" name="params[duration]" id="gantt_duration" value="0">
                    <input type="hidden" name="params[add_gantt_dir]" id="add_gantt_dir" value="">

                    <input type="hidden" name="authenticity_token" value="">

                        <div class="form-group">
                            <div class="col-sm-2">事项类型:</div>
                            <div class="col-sm-10">
                                <select id="gantt_issue_type"
                                        name="params[issue_type]"
                                        class="selectpicker"
                                        dropdownAlignRight="true"
                                        data-live-search="true"
                                        title=""
                                >
                                    <option value="">请选择类型</option>
                                </select>
                            </div>
                        </div>
                        <hr id="create_header_hr" style="display: block;">

                        <div class="form-group">
                            <div class="col-sm-2">标 题:<span class="required"> *</span></div>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="params[summary]" id="gantt_summary"  value=""  />
                                <p id="tip-summary" class="gl-field-error hide"></p>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-2">优先级:<span class="required"> *</span></div>
                            <div class="col-sm-4">
                                <select id="gantt_priority" name="params[priority]" class="selectpicker"   title=""  ></select>
                                    <p id="tip-priority" class="gl-field-error hide"></p>
                            </div>
                            <div class="col-sm-2">状态:<span class="required"> *</span></div>
                            <div class="col-sm-4">
                                <select id="gantt_status" name="params[status]" class="selectpicker"   title=""  ></select>
                                <p id="tip-status" class="gl-field-error hide"></p>
                            </div>
                        </div>

                    <div class="form-group">
                        <div class="col-sm-2">经办人:<span class="required"> *</span></div>
                        <div class="col-sm-4">
                            <select id="gantt_assignee" name="params[assignee]" title="经办人" class="selectpicker">
                                {% for row in project_users %}
                                    {% set  display_name = row['display_name'] %}
                                    <option value="<?=row.uid?>"  data-content="<img width='20px' height='20px' class=' float-none' style='border-radius: 50%;' src='/attachment/avatar/<?=row.uid?>.png' > <?=display_name?>"  ><?=display_name?></option>
                                {% endfor %}
                            </select>
                            <p id="tip-assignee" class="gl-field-error hide"></p>

                        </div>
                        <div class="col-sm-2"><span id="sprint_title">迭代:</span></div>
                        <div class="col-sm-4">
                            <span id="sprint_name"></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2">开始日期:<span class="required"> *</span></div>
                        <div class="col-sm-4">
                            <input type="text" style="width: 60%" class="laydate_input_date form-control" name="params[start_date]" id="gantt_start_date"  value="" autocomplete="off"  />
                            <p id="tip-start_date" class="gl-field-error hide"></p>
                        </div>
                        <div class="col-sm-2">结束日期:<span class="required"> *</span></div>
                        <div class="col-sm-4">
                            <input type="text"  style="width: 60%"  class="laydate_input_date form-control" name="params[due_date]" id="gantt_due_date"  value="" autocomplete="off" />
                            <p id="tip-due_date" class="gl-field-error hide"></p>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2">用时:</div>
                        <div class="col-sm-4">
                            <!--<input type="number"  style="width: 30%"    class="form-control" name="params[duration]" id="duration"  value="1" autocomplete="off">-->
                            <span id="edit_duration"></span>天
                            <p id="tip-duration" class="gl-field-error hide"></p>
                        </div>
                        <div class="col-sm-2">进度:</div>
                        <div class="col-sm-4">
                            <input type="number"  style="width: 30%"   class="form-control" name="params[progress]" id="gantt_progress"  max="100"  value="1" autocomplete="off">
                            <p id="tip-progress" class="gl-field-error hide"></p>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2">起始里程碑</div>
                        <div class="col-sm-4">
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox"  name="params[is_start_milestone]" id="gantt_is_start_milestone" >
                                </label>
                            </div>
                            <p id="tip-is_start_milestone" class="gl-field-error hide"></p>
                        </div>
                        <div class="col-sm-2">结束里程碑:</div>
                        <div class="col-sm-4">
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox"  name="params[is_end_milestone]" id="gantt_is_end_milestone" >
                                </label>
                            </div>
                            <p id="tip-is_end_milestone" class="gl-field-error hide"></p>
                        </div>
                    </div>

                    <div class=" form-group">
                        <div class="col-sm-2">描 述:</div>
                        <div class="col-sm-10">
                            <div id="description_md" style="margin: 0">
                                <textarea class="editormd-html-textarea"  name="params[description]" id="gantt_description"></textarea>
                            </div>
                            <p id="tip-description" class="gl-field-error hide"></p>
                        </div>
                    </div>

                </div>
                <div class="modal-footer issue-modal-footer footer-block row-content-block">
                    <a class="btn btn-cancel" data-dismiss="modal" href="#">取消</a>
                    <span class="append-right-10">
                    <input id="btn-add" type="button" name="commit" value="保存" class="btn btn-save">
                </span>
                </div>
            </div>
        </div>
    </form>
</div>

<div class="modal" id="modal-setting" style=" padding-right: 16px;">
    <form class="form-horizontal issue-form common-note-form js-quick-submit js-requires-input gfm-form"
          id="form_gantt_setting" action="/project/gantt/setting" accept-charset="UTF-8" method="post">
        <div class="modal-dialog issue-modal-dialog" style="width: 700px;">
            <div class="modal-content issue-modal-content">
                <div class="modal-header issue-modal-header">

                    <h3 class="modal-header-title">甘特图数据源设置</h3>

                    <a class="close" data-dismiss="modal" href="#">×</a>
                </div>
                <div id="modal-body" class="modal-body issue-modal-body form-horizontal">
                    <input name="utf8" type="hidden" value="✓">
                    <input type="hidden" name="params[project_id]" id="project_id" value="<?=project_id?>">

                    <div class="form-group">
                        <label class="control-label"  >数据源：</label>
                        <div class="col-sm-10">
                            <div class="form-group col-md-8">
                                <label class="radio-inline">
                                    <input type="radio" name="source" id="source_active_sprint" value="active_sprint"> 当前迭代
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="source" id="source_project" value="project"> 整个项目
                                </label>
                                <label class="radio-inline hide">
                                    <input type="radio" name="source" id="source_module" value="module"> 模块
                                </label>
                            </div>
                            <div class="form-group  col-md-1">
                            </div>
                            <div class="form-group col-md-2">

                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label"  >显示待办事项：</label>
                        <div class="col-sm-10">
                            <div class="form-group col-md-8">
                                <label class="radio-inline">
                                    <input type="radio" name="is_display_backlog" id="is_display_backlog_0" value="0"> 否（如果迭代为空，待办事项仍然会显示）
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="is_display_backlog" id="is_display_backlog_1" value="1"> 是
                                </label>
                            </div>
                            <div class="form-group  col-md-1">
                            </div>
                            <div class="form-group col-md-2">

                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label"  title="定义哪些类型的事项不会出现在甘特图中">隐藏的类型：</label>
                        <div class="col-sm-10">
                            <div class="form-group col-md-8">
                                <select id="hide_issue_types" name="hide_issue_types" title="事项类型" class="selectpicker" multiple>
                                    {% for row in issue_types %}
                                        {% set  display_name = row['display_name'] %}
                                        <option value="<?=row._key?>"  data-content="<i class='fa <?= row.font_awesome ?>'  ></i> <?=row.name?>"  ><?=row.name?></option>
                                    {% endfor %}
                                </select>
                            </div>
                            <div class="form-group  col-md-1">
                            </div>
                            <div class="form-group col-md-2">

                            </div>
                        </div>
                    </div>
                    <hr style="display: block;">
                    <div class="form-group">
                        <label class="control-label" for="label_holiday">上班日：</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox"  name="work_dates" id="work_dates1" value="1"> 星期一
                                    </label>
                                    <label>
                                        <input type="checkbox"  name="work_dates" id="work_dates2" value="2"> 星期二
                                    </label>
                                    <label>
                                        <input type="checkbox"  name="work_dates" id="work_dates3" value="3"> 星期三
                                    </label>
                                    <label>
                                        <input type="checkbox"  name="work_dates" id="work_dates4" value="4"> 星期四
                                    </label>
                                    <label>
                                        <input type="checkbox"  name="work_dates" id="work_dates5" value="5"> 星期五
                                    </label>
                                    <label>
                                        <input type="checkbox"  name="work_dates" id="work_dates6" value="6"> 星期六
                                    </label>
                                    <label>
                                        <input type="checkbox"  name="work_dates" id="work_dates7" value="7"> 星期日
                                    </label>
                                </div>
                            </div>
                            <div class="help-block">

                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label" for="label_holiday">节假日：</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <input  type="hidden" value=""  name="holiday_dates" id="holiday_dates">
                                <input class="" type="text" value="" title="添加节假日"  name="holiday_laydate" id="holiday_laydate">
                            </div>
                            <div class="help-block">
                                添加除了周六周日之外的假期,如元旦,春节,5.1,国庆
                            </div>
                            <div class="suggest-colors" id="holidays_list">

                            </div>
                        </div>
                    </div>
                    <hr style="display: block;">
                    <div class="form-group">
                        <label class="control-label" for="label_holiday">额外上班日：</label>
                        <div class="col-sm-10">
                            <div class="input-group">
                                <input  type="hidden" value=""  name="extra_holiday_dates" id="extra_holiday_dates">
                                <input class="" type="text" value="" title="添加上班日"  name="extra_holiday_laydate" id="extra_holiday_laydate">
                            </div>
                            <div class="help-block">
                                添加额外的上班日期
                            </div>
                            <div class="suggest-colors" id="extra_holidays_list">

                            </div>
                        </div>
                    </div>
                    <hr style="display: block;">

                </div>
                <div class="modal-footer issue-modal-footer footer-block row-content-block">
                    <a class="btn btn-cancel" data-dismiss="modal" href="#" onclick="$('#modal-setting').modal('hide');">取消</a>
                    <span class="append-right-10">
                         <input  id="btn-setting-save"  type="button" value="保 存" class="btn btn-create" >
                    </span>
                </div>
            </div>
        </div>
    </form>
</div>

<div class="modal" id="modal-team" style=" padding-right: 16px;">
    <form class="form-horizontal issue-form common-note-form js-quick-submit js-requires-input gfm-form"
          id="edit_team" action="/project/team/update" accept-charset="UTF-8" method="post">
        <div class="modal-dialog issue-modal-dialog" style="width: 900px;">
            <div class="modal-content issue-modal-content">
                <div class="modal-header issue-modal-header">

                    <h3 class="modal-header-title">团队成员</h3>

                    <a class="close" data-dismiss="modal" href="#">×</a>
                </div>
                <div id="modal-body" class="modal-body issue-modal-body form-horizontal">
                    <input name="utf8" type="hidden" value="✓">
                    <input type="hidden" name="params[project_id]" id="project_id" value="<?=project_id?>">

                    <div class="form-group">
                        <label class="control-label"  ></label>
                        <div class="col-sm-11">
                            <div class="form-group  col-md-4">
                                <div class="issuable-form-select-holder">
                                    <select id="input_member_user_id" name="user_id" title="用户" class="selectpicker" >

                                    </select>
                                </div>
                            </div>
                            <div class="form-group  col-md-1">
                            </div>
                            <div class="form-group col-md-4">
                                <select class="selectpicker form-control" id="role_select" multiple name="role_id[]">
                                    {% for role in roles %}
                                        <option value="<?=role['id']?>"><?=role['name']?></option>
                                    {% endfor %}
                                </select>
                            </div>
                            <div class="form-group  col-md-1">
                            </div>
                            <div class="form-group col-md-2">
                                <input  id="btn-member-add"  type="button" value="添 加" class="btn btn-create" >
                            </div>
                        </div>
                    </div>
                    <hr id="create_header_hr" style="display: block;">

                    <div class="panel panel-default">

                        <ul class="content-list" id="ul_member_content">

                        </ul>
                    </div>

                </div>
                <div class="modal-footer issue-modal-footer footer-block row-content-block">
                    <a class="btn btn-cancel" data-dismiss="modal" href="#" onclick="$('#modal-team').modal('hide');">取消</a>
                    <span class="append-right-10">
                </span>
                </div>
            </div>
        </div>
    </form>
</div>

<div class="modal" id="modal_be_hidden_issue_list" style=" padding-right: 16px;">
    <div class="modal-dialog issue-modal-dialog" style="width: 700px;">
        <div class="modal-content issue-modal-content">
            <div class="modal-header issue-modal-header">
                <h3 class="modal-header-title">隐藏的事项列表</h3>
                <a class="close" data-dismiss="modal" href="#">×</a>
            </div>
            <div id="modal-body" class="modal-body issue-modal-body form-horizontal">

                <table class="table table-hover table-condensed">

                    <thead>
                        <tr>
                            <th style="width: 100px;">#编号</th>
                            <th style="width: 300px;">主题</th>
                            <th style="width: 100px;">模块</th>
                            <th style="width: 100px;">迭代</th>
                            <th style="width: 150px;">时间</th>
                            <th style="width: 50px;">操作</th>
                        </tr>
                    </thead>
                    <tbody id="tr_be_hidden_issue_list_content">

                    </tbody>
                </table>
                <div id="tr_be_hidden_issue_list_content_empty"></div>


                <div class="gl-pagination border-0" id="ampagination-bootstrap"></div>

            </div>
            <div class="modal-footer issue-modal-footer footer-block row-content-block">
                <a class="btn btn-cancel" data-dismiss="modal" href="#" onclick="$('#modal-setting').modal('hide');">取消</a>
            </div>
        </div>
    </div>
</div>

{% verbatim %}
<script type="text/html" id="be_hidden_issue_list_tpl">
    {{#tasks}}
    <tr class="js-hidden-row-id-{{id}}">
        <th scope="row">#{{issue_num}}</th>
        <td>{{summary}}</td>
        <td>{{format_module_name}}</td>
        <td>{{format_sprint_name}}</td>
        <td>{{format_create_time}}</td>
        <td>
            <a class="btn btn-transparent js-masterlab-behidden-clicked" data-id="{{id}}" title="恢复" href="javascript:void(0)">
                <i class="fa fa-reply"></i>
            </a>
        </td>
    </tr>
    {{/tasks}}
</script>{% endverbatim %}

{% verbatim %}
<script id="tpl_holiday_a" type="text/tpl">
{{#holidays}}
    <a style="width: 80px;" href="#" title="点击可移除" data-date="{{this}}">&nbsp;{{this}}</a>
{{/holidays}}
</script>

<script id="tpl_extra_holiday_a" type="text/tpl">
{{#extra_holidays}}
    <a style="width: 80px;" href="#" title="点击可移除" data-date="{{this}}">&nbsp;{{this}}</a>
{{/extra_holidays}}
</script>


<script type="text/html" id="member_list_tpl">
    {{#project_users}}
    <li class="group_member member" id="group_member_{{id}}">
        <span class="list-item-name" style="width: 30%;">
            <img class="avatar s40" alt="" src="{{avatar}}">
            <strong>
            <a target="_blank" href="/user/profile/{{uid}}">{{display_name}}</a>
            </strong>
            ·
            <span>{{title}}</span>
            <div class="hidden-xs cgray">
                <time>{{create_time_text}}</time>
            </div>
        </span>
        <div class="controls member-controls" style="width: 700px;max-width: 70%;">
            <select class="selectpicker form-control select-item-for-user"
                    multiple id="selectpicker_uid_{{uid}}"
                    data-select_id="selectpicker_uid_{{uid}}"
                    data-ids="{{have_roles_ids}}">
{% endverbatim %}
                {% for role in roles %}
                    <option value="<?=role['id']?>"><?=role['name']?></option>
                {% endfor %}
{% verbatim %}
            </select>

            <a class="btn btn-transparent btn-actionprepend-left-10" href='javascript:window.$_gantAjax.saveMemberRole({{uid}});'>
                <span class="visible-xs-block">保存</span>
                <i class="fa fa-floppy-o hidden-xs"></i>
            </a>
            <a title="移出项目" class="btn btn-transparent btn-action remove-row"   href='javascript:window.$_gantAjax.delMember({{uid}}, "{{display_name}}", "");'>
                <span class="sr-only">移出</span>
                <i class="fa fa-trash-o"></i>
            </a>

        </div>

    </li>
    {{/project_users}}
</script>{% endverbatim %}

<script src="/dev/lib/handlebars-v4.0.10.js" type="text/javascript" charset="utf-8"></script>
<script src="/dev/js/handlebars.helper.js?v=<?=_version?>" type="text/javascript" charset="utf-8"></script>
<script src="/dev/js/project/member.js?v=<?=_version?>" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    // JqueryGantt的全局变量实例
    var ge;

    // 后端传递给页面的全局变量
    var _cur_project_id = '<?=project_id?>';
    var _cur_uid = '<?=G_uid?>';
    var _gantt_editor_md = null;
    var $_gantAjax = null;
    var _issueConfig = {
        "priority":<?=priority|json_encode()|raw?>,
        "issue_types":<?=issue_types|json_encode()|raw?>,
        "issue_status":<?=issue_status|json_encode()|raw?>,
        "issue_resolve":<?=issue_resolve|json_encode()|raw?>,
        "issue_module":<?=project_modules|json_encode()|raw?>,
        "issue_version":<?=project_versions|json_encode()|raw?>,
        "issue_labels":<?=project_labels|json_encode()|raw?>,
        "users":<?=users|json_encode()|raw?>,
        "project_users":<?=project_users|json_encode()|raw?>,
        "projects":<?=projects|json_encode()|raw?>,
        "sprint":<?=sprints|json_encode()|raw?>
    };
    var _project_issue_types = <?=project_issue_types|json_encode()|raw?>;
    var _work_dates = <?=work_dates|json_encode()|raw?>;
    var _holidays = <?=holidays|json_encode()|raw?>;
    var _extra_holidays = <?=extra_holidays|json_encode()|raw?>;

</script>

<script src="/dev/js/project/gantt_ajax.js?v=<?=_version?>" type="text/javascript" charset="utf-8"></script>
<script src="/dev/js/project/gantt_origin.js?v=<?=_version?>" type="text/javascript" charset="utf-8"></script>
<script src="/dev/js/project/gantt_ready.js?v=<?=_version?>" type="text/javascript" charset="utf-8"></script>
<script src="/dev/js/project/gantt_date.js?v=<?=_version?>" type="text/javascript" charset="utf-8"></script>
</body>
</html>

