mirror of https://github.com/Ombi-app/Ombi
parent
9f696bfc7d
commit
1f188b3618
@ -1,35 +1,92 @@
|
||||
<h1>Vote</h1>
|
||||
|
||||
<div *ngIf="viewModel">
|
||||
|
||||
<table class="table table-striped table-hover table-responsive table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>Title</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let vm of viewModel">
|
||||
<td class="vcenter">
|
||||
<button class="btn btn-info-outline" (click)="upvote(vm)"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i></button>
|
||||
<button class="btn btn-info-outline" (click)="downvote(vm)"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i></button>
|
||||
</td>
|
||||
<td style="width: 10%"> <img *ngIf="vm.image" class="img-responsive poster" style="max-width: 100%;
|
||||
height: auto;
|
||||
width: 100%;"
|
||||
(click)="toggle($event, vm.image)" src="{{vm.image}}" alt="poster"></td>
|
||||
<td class="vcenter">{{vm.title}}</td>
|
||||
<td class="vcenter" [innerHTML]="vm.description"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<ul id="nav-tabs" class="nav nav-tabs" role="tablist">
|
||||
|
||||
<li role="presentation" class="active">
|
||||
<a id="currentVotes" href="#currentVotes" aria-controls="home" role="tab" data-toggle="tab" (click)="selectCurrentTab()"><i
|
||||
class="fa fa-meh-o"></i> {{ 'Votes.VotesTab' | translate }}</a>
|
||||
</li>
|
||||
|
||||
<li role="presentation">
|
||||
<a id="completedVotes" href="#completedVotes" aria-controls="profile" role="tab" data-toggle="tab" (click)="selectCompletedVotesTab()"><i
|
||||
class="fa fa-smile-o"></i> {{ 'Votes.CompletedVotesTab' | translate }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
|
||||
<div [hidden]="!showCurrent">
|
||||
<div *ngIf="currentVotes">
|
||||
<table class="table table-striped table-hover table-responsive table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 10%"></td>
|
||||
<td></td>
|
||||
<td style="width: 10%">Title</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let vm of currentVotes">
|
||||
<td class="vcenter">
|
||||
<button class="btn btn-info-outline col-md-6" (click)="upvote(vm)"><i class="fa fa-thumbs-o-up"
|
||||
aria-hidden="true"></i></button>
|
||||
<button class="btn btn-info-outline col-md-6" (click)="downvote(vm)" ><i class="fa fa-thumbs-o-down"
|
||||
aria-hidden="true"></i></button>
|
||||
</td>
|
||||
<td style="width: 10%"> <img *ngIf="vm.image" class="img-responsive poster" style="max-width: 100%;
|
||||
height: auto;
|
||||
width: 100%;"
|
||||
(click)="toggle($event, vm.image)" src="{{vm.image}}" alt="poster"></td>
|
||||
<td class="vcenter">{{vm.title}}</td>
|
||||
<td class="vcenter" [innerHTML]="vm.description"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div [hidden]="!showCompleted">
|
||||
<div *ngIf="completedVotes">
|
||||
<table class="table table-striped table-hover table-responsive table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 10%"></td>
|
||||
<td></td>
|
||||
<td style="width: 10%">Title</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let vm of completedVotes">
|
||||
<td class="vcenter">
|
||||
<button class="btn btn-info-outline col-md-6" [ngClass]="{'btn-success-outline': vm.myVote == VoteType.Upvote, 'btn-info-outline': vm.myVote != VoteType.Upvote}"
|
||||
(click)="upvote(vm)" [disabled]="vm.myVote == VoteType.Upvote"><i class="fa fa-thumbs-o-up"
|
||||
aria-hidden="true"></i></button>
|
||||
<button class="btn btn-info-outline col-md-6" [ngClass]="{'btn-danger-outline': vm.myVote == VoteType.Downvote, 'btn-info-outline': vm.myVote != VoteType.Downvote}"
|
||||
(click)="downvote(vm)" [disabled]="vm.myVote == VoteType.Downvote"><i class="fa fa-thumbs-o-down"
|
||||
aria-hidden="true"></i></button>
|
||||
</td>
|
||||
<td style="width: 10%"> <img *ngIf="vm.image" class="img-responsive poster" style="max-width: 100%;
|
||||
height: auto;
|
||||
width: 100%;"
|
||||
(click)="toggle($event, vm.image)" src="{{vm.image}}" alt="poster"></td>
|
||||
<td class="vcenter">{{vm.title}}</td>
|
||||
<td class="vcenter" [innerHTML]="vm.description"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p-overlayPanel #op [dismissable]="true" [styleClass]="'hideBackground'">
|
||||
<img class="img-responsive poster" width="70%" src="{{panelImage}}" alt="poster">
|
||||
</p-overlayPanel>
|
||||
<img class="img-responsive poster" width="70%" src="{{panelImage}}" alt="poster">
|
||||
</p-overlayPanel>
|
Loading…
Reference in new issue