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

	<div class="lt-module-page__top lt-module-page-top">
		<div class="lt-module-page-top__title">
			<h1>{{'Polls' | translate}}</h1>
		</div>
		<div class="lt-module-page-top__actions">
			<button class="btn btn-primary pull-right" ng-click="editPoll(0)" type="button">{{"Create poll" | translate}}</button>
		</div>
	</div>

	<div class="panel panel-default lt-module-page__content-panel">
		<div class="panel-heading">{{'Polls' | translate}}</div>
		<ul class="list-group lt-list" ng-show="polls.length">

			<li class="list-group-item lt-list__item lt-flextable__table">
				<div class="lt-flextable__row lt-flextable__row-heading">{{'Title' | translate}}</div>
				<div class="lt-flextable__row lt-flextable__row-heading">{{'Closed' | translate}}</div>
				<div class="lt-flextable__row lt-flextable__row-heading"></div>
			</li>

			<li class="list-group-item lt-list__item lt-flextable__table" ng-repeat="poll in polls track by $index">
				<div class="lt-list-item__title lt-list-item__title lt-flextable__row">{{poll.title}}</div>
				<div class="lt-flextable__row">
					<span ng-show="poll.closed">{{'Yes' | translate}}</span><span ng-hide="poll.closed">{{'No' | translate}}</span>
				</div>
				<div class="lt-list-item__actions lt-flextable__row">
					<span title="{{'Download poll result' | translate}}" class="streamline icon-download-bottom" ng-click="download(poll)" aria-hidden="true"></span>
					<span ng-show="poll.isAdmin" title="{{'Edit poll' | translate}}" class="streamline icon-pencil-1" ng-click="editPoll(poll.id)" aria-hidden="true"></span>
				</div>
			</li>
		</ul>
		<div wizdom365-spinner="" loading="loading"></div>
	</div>
	
</div>

