proposal-list.html 2.3 KB
<div class="proposal-list">
	<div class="" ng-if="vm.loading">
		<div class="">Carregando...</div>
	</div>
	<div class="" ng-if="!vm.loading && vm.proposalsPerPage">
		<table class="table table-striped">
			<thead>
				<tr>
					<th>
						Colocação
						<a tabindex="0" class="btn btn-link btn-question" role="button" data-toggle="popover" data-trigger="focus">?</a>
					</th>
					<th>{{vm.proposals.length}} PROPOSTAS</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="proposal in vm.proposalsPerPage">
					<td class="color-theme-fg">
						<span class="position">{{::proposal.ranking_position}}º</span>
					</td>
					<td>
						<div class="row">
							<div class="col-xs-12">
								<div class="abstract" ng-bind-html="proposal.abstract"></div>
							</div>
						</div>
						<div class="row row-actions">
							<div class="col-sm-8">
								<button type="button" class="btn btn-link btn-rate color-theme-common-fg" ng-click="vm.showContent(proposal)">
									Avalie esta proposta
									<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
								</button>
							</div>
							<div class="col-sm-4">
								<proposal-stats class="text-right" views="{{::proposal.hits}}" up="{{::proposal.votes_for}}" down="{{::proposal.votes_against}}"></proposal-stats>
							</div>
						</div>
					</td>
				</tr>
			</tbody>
		</table>
		<nav ng-if="vm.arraypages.length > 1">
			<ul class="pagination">
				<li ng-style="{'visibility': (vm.currentPageIndex === 0) ? 'hidden' : 'visible'}">
					<a  class="btn-pagination" href="#" aria-label="Previous" ng-click="vm.showPage(vm.currentPageIndex-1)">
						<span aria-hidden="true" class="glyphicon glyphicon-chevron-left pagination-icon"></span>
					</a>
				</li>
				<li ng-repeat="paginas in vm.arraypages track by $index" ng-class="{ 'active' : ($index) == vm.currentPageIndex }" >
					<a class="btn-pagination"  href="#" ng-click="vm.showPage($index)">{{::($index)+1}}</a>
				</li>
				<li ng-style="{'visibility': (vm.currentPageIndex === (vm.arraypages.length -1)) ? 'hidden' : 'visible'}">
					<a  class="btn-pagination" href="#" aria-label="Next" ng-click="vm.showPage(vm.currentPageIndex+1)">
						<span aria-hidden="true" class="glyphicon glyphicon-chevron-right pagination-icon"></span>
					</a>
				</li>
			</ul>
		</nav>
	</div>
</div>