<div class="layui-form">
<div class="layui-collapse" lay-accordion id="chapterlistbox">
<?php foreach($chapters as $chapterkey => $onechapter){ ?>
  <div class="layui-colla-item">
    <h2 class="layui-colla-title"><span><?php echo $onechapter->name; ?></span>
    <div class="layui-btn-group" style="float: right;">
      <a class="layui-btn layui-btn-sm" title="添加系" onclick="javascript:return showSectionEditBox(0, <?php echo $onechapter->id; ?>);"><i class="layui-icon layui-icon-add-circle"></i> 添加系</a>
      <a class="layui-btn layui-btn-sm" title="编辑院" onclick="javascript:return showChapterEditBox(<?php echo $onechapter->id; ?>);">编辑</a>
      <?php /* ?><a class="layui-btn layui-btn-sm" title="上移" onclick="javascript:return showNodeMoveupBox(<?php echo $onechapter->id; ?>, 'up');">上移</a>
      <a class="layui-btn layui-btn-sm" title="下移" onclick="javascript:return showNodeMoveupBox(<?php echo $onechapter->id; ?>, 'down');">下移</a><?php */ ?>
      <a class="layui-btn layui-btn-sm" title="删除院" onclick="javascript:return showChapterDeleBox(<?php echo $onechapter->id; ?>);">删除</a>
    </div>
    </h2>
    <div class="layui-colla-content<?php if(stripos($treepath, ','. $onechapter->id .',')!==false || empty($treepath)){echo ' layui-show';} ?>">
      <div class="layui-collapse" lay-accordion id="sectionlistbox_<?php echo $onechapter->id; ?>">
        <?php foreach($onechapter->children as $sectionkey => $onesection){ ?>
        <div class="layui-colla-item">
          <h2 class="layui-colla-title"><span><?php echo $onesection->name; ?></span>
            <div class="layui-btn-group" style="float: right;">
              <a class="layui-btn layui-btn-sm" title="添加专业" onclick="javascript:return showKnowledEditBox(0, <?php echo $onesection->id; ?>);"><i class="layui-icon layui-icon-add-circle"></i> 添加专业</a>
              <a class="layui-btn layui-btn-sm" title="编辑系" onclick="javascript:return showSectionEditBox(<?php echo $onesection->id; ?>, <?php echo $onechapter->id; ?>);">编辑</a>
              <?php /* ?><a class="layui-btn layui-btn-sm" title="上移" onclick="javascript:return showNodeMoveupBox(<?php echo $onesection->id; ?>, 'up');">上移</a>
              <a class="layui-btn layui-btn-sm" title="下移" onclick="javascript:return showNodeMoveupBox(<?php echo $onesection->id; ?>, 'down');">下移</a><?php */ ?>
              <a class="layui-btn layui-btn-sm" title="团队成员" onclick="javascript:return showLeaderListBox(<?php echo $onesection->id; ?>);">团队</a>
              <a class="layui-btn layui-btn-sm" title="删除系" onclick="javascript:return showSectionDeleBox(<?php echo $onesection->id; ?>);">删除</a>
            </div>
          </h2>
          <div class="layui-colla-content<?php if(stripos($treepath, ','. $onesection->id .',')!==false || empty($treepath)){echo ' layui-show';} ?>">
            <div class="layui-collapse" lay-accordion id="knowledlistbox_<?php echo $onesection->id; ?>">
              <?php foreach($onesection->children as $knowledkey => $oneknowled){ ?>
              <div class="layui-colla-item">
                <h2 class="layui-colla-title"><span><?php echo $oneknowled->name; ?></span>
                  <div class="layui-btn-group" style="float: right;">
                    <a class="layui-btn layui-btn-sm" title="编辑专业" onclick="javascript:return showKnowledEditBox(<?php echo $oneknowled->id; ?>, <?php echo $onesection->id; ?>);">编辑</a>
                    <?php /* ?><a class="layui-btn layui-btn-sm" title="上移" onclick="javascript:return showNodeMoveupBox(<?php echo $oneknowled->id; ?>, 'up');">上移</a>
                    <a class="layui-btn layui-btn-sm" title="下移" onclick="javascript:return showNodeMoveupBox(<?php echo $oneknowled->id; ?>, 'down');">下移</a><?php */ ?>
                    <a class="layui-btn layui-btn-sm" title="团队成员" onclick="javascript:return showLeaderListBox(<?php echo $oneknowled->id; ?>);">团队</a>
                    <a class="layui-btn layui-btn-sm" title="删除专业" onclick="javascript:return showKnowledDeleBox(<?php echo $oneknowled->id; ?>);">删除</a>
                  </div>
                </h2>
              </div>
              <?php } ?>
            </div>
          </div>
        </div>
        <?php } ?>
      </div>
    </div>
  </div>
<?php } ?>
</div>
<div style="margin-top: 20px;"><a class="layui-btn" title="添加院" onclick="javascript:return showChapterEditBox(0);"><i class="layui-icon layui-icon-add-circle"></i> 添加院</a></div>
</div>

<script src="/public/modules/glspecial/default/index.js"></script>