]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/buttons/action-dropdown.component.html
Fix lint
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / buttons / action-dropdown.component.html
CommitLineData
9b4241e3 1<div class="dropdown-root" ngbDropdown [placement]="placement" [container]="container" *ngIf="areActionsDisplayed(actions, entry)">
adcf9212 2 <button
3a0fb65c 3 class="action-button" [ngClass]="{ small: buttonSize === 'small', grey: theme === 'grey', orange: theme === 'orange', 'button-styled': buttonStyled }"
2346a6dc 4 ngbDropdownToggle aria-label="Open actions" i18n-aria-label
791645e6 5 >
3a0fb65c
C
6 <my-global-icon *ngIf="!label && buttonDirection === 'horizontal'" class="more-icon" iconName="more-horizontal"></my-global-icon>
7 <my-global-icon *ngIf="!label && buttonDirection === 'vertical'" class="more-icon" iconName="more-vertical"></my-global-icon>
8
791645e6 9 <span *ngIf="label" class="dropdown-toggle">{{ label }}</span>
8b57efbf 10 </button>
eacb25c4 11
141b177d 12 <div ngbDropdownMenu class="dropdown-menu">
f97c91f7 13 <ng-container *ngFor="let actions of getActions()">
eacb25c4 14
f97c91f7 15 <ng-container *ngFor="let action of actions">
a2c3564a 16 <div [ngClass]="action.class" *ngIf="action.isDisplayed === undefined || action.isDisplayed(entry) === true">
f97c91f7 17
9b82d49d 18 <ng-template #templateActionLabel let-action>
adcf9212 19 <my-global-icon *ngIf="action.iconName" [iconName]="action.iconName" [ngClass]="'icon-' + action.iconName" aria-hidden="true"></my-global-icon>
f0ad4710 20
52444ea1 21 <div class="item-label">
9b82d49d 22 <span i18n>{{ action.label }}</span>
b788e691 23 <small class="muted" *ngIf="action.description">{{ action.description }}</small>
9b82d49d
RK
24 </div>
25 </ng-template>
26
bb152476
RK
27 <a
28 *ngIf="action.linkBuilder && !action.isHeader" [ngClass]="{ 'with-icon': !!action.iconName }"
d50e8d1a 29 class="dropdown-item" [routerLink]="action.linkBuilder(entry)" [queryParams]="getQueryParams(action, entry)" [title]="action.title || ''"
bb152476 30 >
9b82d49d 31 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container>
3a0fb65c
C
32 </a>
33
34 <span
bb152476 35 *ngIf="!action.linkBuilder && !action.isHeader" [ngClass]="{ 'with-icon': !!action.iconName }"
adcf9212 36 class="custom-action dropdown-item" tabindex="0" role="button" [title]="action.title || ''" (click)="action.handler(entry)" (keyup.enter)="action.handler(entry)"
3a0fb65c 37 >
9b82d49d 38 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container>
f97c91f7 39 </span>
3a0fb65c 40
bb152476 41 <h6
5b0ec7cd 42 *ngIf="!action.linkBuilder && action.isHeader && areActionsDisplayed(actions, entry)" [ngClass]="{ 'with-icon': !!action.iconName }"
d0fbc9fd 43 class="dropdown-header" [title]="action.title || ''"
bb152476
RK
44 >
45 <ng-container *ngTemplateOutlet="templateActionLabel; context:{ $implicit: action }"></ng-container>
46 </h6>
47
a2c3564a 48 </div>
af5767ff 49 </ng-container>
f97c91f7 50
3a0fb65c 51 <div *ngIf="areActionsDisplayed(actions, entry)" class="dropdown-divider"></div>
f97c91f7 52
141b177d
C
53 </ng-container>
54 </div>
f97c91f7 55</div>