<div class="listview">
    <div class="row">
        <div class="col-sm-8">
            <div class="btn-group" ng-if="campaignStatus=='10'">
                <button class="btn btn-link" data-toggle="sidebar" data-target=".sidebar-right" ng-if="vm.view.type=='default'" ng-show="vm.privilege.IsCreate"
                    ui-sref=".edit({id:''})" ui-sref-opts="{location:true}">
                    <i class="fa fa-plus"></i> 新建
                </button>
                <button class="btn btn-link" ng-if="vm.view.type=='grid'" ng-click="vm.actions.showForm('', 'Module/TrainingCampaign/TrainingCampaignRewardQuotaEditView.html', 'TrainingCampaignRewardQuotaEditController')"
                    ng-show="vm.privilege.IsCreate">
                    <i class="fa fa-plus"></i> 新建
                </button>
                <button class="btn btn-link" ng-click="vm.actions.del()" ng-show="vm.privilege.IsDelete">
                    <i class="fa fa-trash"></i> 删除
                </button>
            </div>
            <!-- div[.btn-group] -->
        </div>
    </div>
    <!-- div[.row]-->

    <div class="viewlist">
        <rt-data-grid rt-page-record-count="vm.page.recordCount"  rt-page-index="vm.page.index" rt-page-size="vm.page.size" rt-get-data="vm.view.search()" rt-sort-field="vm.view.sortField"
            rt-rows="vm.data" rt-selected-ids="vm.view.selectedIds" rt-auto-height=" ">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th>
                            <rt-header-checkbox></rt-header-checkbox>
                        </th>
                        <!-- @@ 视图表头 -->
                        <th>部门</th>
                        <th>配额次数</th>
                        <th>已使用次数</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="row in vm.data track by row.Id">
                        <td>
                            <rt-data-checkbox value="{{row.Id}}" />
                        </td>
                        <td ng-if="vm.view.type=='grid'&&campaignStatus=='10'">
                            <a href="javascript:;" ng-click="vm.actions.showForm(row.Id, 'Module/TrainingCampaign/TrainingCampaignRewardQuotaEditView.html', 'TrainingCampaignRewardQuotaEditController')">{{row.quota_businessunitid.Name}}</a>
                        </td>
                        <td ng-if="vm.view.type=='grid'&&campaignStatus!='10'">
                            <a href="javascript:;">{{row.quota_businessunitid.Name}}</a>
                        </td>
                        <td>{{row.quota_count}}</td>
                        <td>{{row.used_count?row.used_count:0}}</td>
                    </tr>
                </tbody>
            </table>
        </rt-data-grid>
        <!-- rt-data-grid  -->
    </div>
    <!-- div[.panel-default] -->
</div>
<!-- div[.listview] -->

<div class="editview borderShadow sidebar sidebar-right sidebar-animate" ng-if="vm.view.type=='default'">
    <div ui-view class="content"></div>
</div>
<!-- div[.editview] -->