<div class="row">
    <div class="col-md-12">
        <h2 class="featurette-heading">Notifications
            <span class="text-muted"><small>you have to speak up!</small></span></h2>
        <div class="panel panel-default">
            <div class="panel-heading">
                <div class="btn-group pull-right">
                    <button ng-click="create()" class="btn btn-primary">Create</button>
                </div>
                <div class="btn-group">
                    <button ng-model="showFilter" class="btn btn-default" uib-btn-checkbox
                            btn-checkbox-true="1"
                            btn-checkbox-false="0">Filter</button>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="table-responsive">
                <table ng-table="notificationsTable" class="table table-striped" show-filter="showFilter" template-pagination="angular/pager.html" >
                    <tbody>
                    <tr ng-repeat="notification in $data track by $index">
                        <td data-title="'Label'" sortable="'label'" filter="{ 'label': 'text' }">
                            <ul class="list-unstyled">
                                <li>{{ notification.label }}</li>
                                <li><span class="text-muted">{{ notification.description }}</span></li>
                            </ul>
                        </td>
                        <td data-title="'Plugin'">
                            <ul class="list-unstyled">
                                <li>{{ notification.plugin.title }}</li>
                                <li><span class="text-muted">{{ notification.plugin.description }}</span></li>
                            </ul>
                        </td>
                        <td data-title="'Active'" filter="{ 'active': 'select' }" filter-data="getNotificationStatus()">
                            <form>
                                <switch ng-change="notificationService.updateActive(notification)" id="status" name="status" ng-model="notification.active" class="green small"></switch>
                            </form>
                        </td>
                        <td data-title="''">
                            <div class="btn-group-vertical pull-right">
                                <button uib-tooltip="Edit Notification" ng-click="edit(notification.id)" class="btn btn-sm btn-info">
                                    Edit
                                </button>
                                <button uib-tooltip="Delete Notification" ng-click="remove(notification)"
                                        confirm-click="Proceed to remove the notification {{ notification.label }}?"
                                        type="button" class="btn btn-sm btn-danger pull-left">
                                    Remove
                                </button>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
