<my-info   [msg]="msg" (msg_)="msg_($event)"></my-info>
<section class="content-header">
  <h1>
    {{secondName}}
    <small>{{firstName}}</small>
  </h1>
  <ol class="breadcrumb">
    <li><a ><i class="fa fa-dashboard"></i> Home</a></li>
    <li><a >{{firstName}}</a></li>
    <li class="active">{{secondName}}</li>
  </ol>
</section>


<!-- Main content -->
<section class="content">
  <div class="row">
    <!-- Custom Tabs -->
    <div class="nav-tabs-custom">
      <ul class="nav nav-tabs">
        <li  *ngFor="let groupType of groupTypeList" (click)="selectedGroupType(groupType.id);" class="{{selectedGroupTypeId==groupType.id?'active':''}}">
          <a  data-toggle="tab">{{groupType.name}}</a>
        </li>
      </ul>
    </div>
  </div>
  <div class="row">
    <div class="col-xs-12">
      <div class="box">
        <div class="box-header">
          <h3 class="box-title">组织列表</h3>
          <div class="btn-group" style="margin-left:10px;">
            <button *ngIf="addButton"  (click)="add()" type="button" class="btn btn-info"><i class="fa fa-plus"></i></button>
            <button *ngIf="editButton"  (click)="edit()"  type="button" class="btn btn-info"><i class="fa fa-pencil"></i></button>
            <button *ngIf="deleteButton"  (click)="delete()"  type="button" class="btn btn-info"><i class="fa fa-trash"></i></button>
            <button *ngIf="groupAuthorityButton"  (click)="groupAuthority()"  type="button" class="btn btn-info"><i class="fa fa-object-group"></i>角色授权</button>
            <button *ngIf="groupAddUserButton"  (click)="groupAddUser()"  type="button" class="btn btn-info"><i class="fa fa-user-plus"></i>关联用户</button>
          </div>

          <div class="box-tools">
            <div class="input-group input-group-sm" style="width: 150px;">
              <input type="text" name="table_search" class="form-control pull-right" placeholder="Search">

              <div class="input-group-btn">
                <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
              </div>
            </div>
          </div>
        </div>
        <div class="tab-content">
          <div class="box-body table-responsive ">
            <table class="table table-hover table-bordered">
              <tr>
                <th style="width:8px;"></th>
                <th>ID</th>
                <th>父ID</th>
                <th>编码</th>
                <th>名称</th>
                <th>路径</th>
              </tr>
              <tr *ngFor="let group of groupList" (click)="radio.checked=true;selectedGroup=group;">
                <td><input type="radio" name="r1" class="minimal" #radio ></td>
                <td>{{group.id}}</td>
                <td>{{group.parentId}}</td>
                <td>{{group.code}}</td>
                <td>{{group.name}}</td>
                <td>{{group.path}}</td>
              </tr>
              <tr>
                <td colspan="8">
                  <form class="form-inline" style="float:right;">
                    <div class="form-group">
                      <pagination [disabled]="disabled" [totalItems]="totalItems"
                                  [itemsPerPage]="pageSize"
                                  (pageChanged)="pageChanged($event)"
                                  (numPages)="numPages($event)"
                                  [maxSize]="maxSize" [boundaryLinks]="true" class="pagination-sm"></pagination>
                      </div>
                  </form>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
