<div ng-controller="Wizdom365NoticeboardNewsChannelSetsController" class="lt-module-page">

	<div class="lt-module-page__top lt-module-page-top">
		<div class="lt-module-page-top__title">
			<h1>Noticeboard Channels</h1>
		</div>
		<div class="lt-module-page-top__actions">
			<button type="button" class="btn btn-primary" ng-click="openDialogCreateChannelset()">{{'Create channelset' | translate}}</button>
		</div>
	</div>


	<div class="panel panel-default lt-module-page__content-panel">
		<div class="panel-heading">{{'Channelsets' | translate}}</div>
		
			<ul class="list-group lt-list">
				<li class="list-group-item lt-list__item" ng-repeat="set in channelsets">

					<div class="lt-list-item__title">{{set.name}}</div>
					<div class="lt-list-item__actions">
						
						<div class="radio" ng-if="emailNotificationEnabled">
							<label><input type="radio" name="email" ng-model="notificationChannelSet.email" ng-change="changeEmailNotificationChannelSet(set.id)" ng-value="set.id">{{'Use for Email Notification' | translate}}</label>
						</div>
						
						<div class="radio" ng-if="notificationEnabled">
							<label><input type="radio" name="notification" ng-model="notificationChannelSet.value" ng-change="changeNotificationChannelSet(set.id)" ng-value="set.id">{{'Use for Notification' | translate}}</label>
						</div>
						
						<span class="streamline icon-pencil-1" aria-hidden="true" title="{{'Edit' | translate}}" ng-click="openDialogEditChannelset(set)"></span>
						<span class="streamline icon-bin-1" aria-hidden="true" title="{{'Delete' | translate}}" ng-style="{visibility: !allowDelete(set.id) ? 'hidden':'visible'}" ng-disabled="!allowDelete(set.id)" ng-click="setChannelsetToNotShared(set.id)"></span>
						
					</div>


					<div style="display: table; width: 100%;" ng-if="false">
						<div class="channelchild-label" style="display: table-cell">
							{{set.name}}
						</div>
						<div style="display: table-cell; text-align: right">
							<div class="radio" style="display: inline-block" ng-if="emailNotificationEnabled">
								<label><input type="radio" name="email" ng-model="notificationChannelSet.email" ng-change="changeEmailNotificationChannelSet(set.id)" ng-value="set.id">{{'Use for Email Notification' | translate}}</label>
							</div> &nbsp;
							<div class="radio" style="display: inline-block" ng-if="notificationEnabled">
								<label><input type="radio" name="notification" ng-model="notificationChannelSet.value" ng-change="changeNotificationChannelSet(set.id)" ng-value="set.id">{{'Use for Notification' | translate}}</label>
							</div> &nbsp;
							<!-- allowDelete(set.id) -->
							<button type="button" class="btn btn-danger" ng-disabled="!allowDelete(set.id)" ng-click="setChannelsetToNotShared(set.id)">{{'Delete' | translate}}</button>

							<button type="button" class="btn btn-primary" ng-click="openDialogEditChannelset(set)">
								<span class="glyphicon glyphicon-pencil"></span>{{'Edit' | translate}}
							</button>
						</div>
					</div>
				</li>
			</ul>
		
	</div>



</div>


