</div>
<div class="video-actions-rates">
- <ng-template #ratePopoverText>
- <span [innerHTML]="getRatePopoverText()"></span>
- </ng-template>
-
<div class="video-actions full-width justify-content-end">
- <button
- [ngbPopover]="getRatePopoverText() && ratePopoverText" [ngClass]="{ 'activated': userRating === 'like' }" (click)="setLike()" (keyup.enter)="setLike()"
- class="action-button action-button-like" [attr.aria-pressed]="userRating === 'like'" [attr.aria-label]="tooltipLike"
- [ngbTooltip]="tooltipLike"
- placement="bottom auto"
- >
- <my-global-icon iconName="like"></my-global-icon>
- <span *ngIf="video.likes" class="count">{{ video.likes }}</span>
- </button>
-
- <button
- [ngbPopover]="getRatePopoverText() && ratePopoverText" [ngClass]="{ 'activated': userRating === 'dislike' }" (click)="setDislike()" (keyup.enter)="setDislike()"
- class="action-button action-button-dislike" [attr.aria-pressed]="userRating === 'dislike'" [attr.aria-label]="tooltipDislike"
- [ngbTooltip]="tooltipDislike"
- placement="bottom auto"
- >
- <my-global-icon iconName="dislike"></my-global-icon>
- <span *ngIf="video.dislikes" class="count">{{ video.dislikes }}</span>
- </button>
+ <my-video-rate
+ [video]="video" [isUserLoggedIn]="isUserLoggedIn()"
+ (rateUpdated)="onRateUpdated($event)" (userRatingLoaded)="onRateUpdated($event)"
+ ></my-video-rate>
<button *ngIf="video.support" (click)="showSupportModal()" (keyup.enter)="showSupportModal()" class="action-button action-button-support" [attr.aria-label]="tooltipSupport"
[ngbTooltip]="tooltipSupport"