]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/buttons/action-dropdown.component.html
99e8b7ec1651482c39dc0c1285777cb83e3f15dc
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / buttons / action-dropdown.component.html
1 <div class="dropdown-root" ngbDropdown [placement]="placement" *ngIf="areActionsDisplayed(actions, entry)">
2 <div
3 class="action-button" [ngClass]="{ small: buttonSize === 'small', grey: theme === 'grey', orange: theme === 'orange', 'button-styled': buttonStyled }"
4 ngbDropdownToggle role="button"
5 >
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
9 <span *ngIf="label" class="dropdown-toggle">{{ label }}</span>
10 </div>
11
12 <div ngbDropdownMenu class="dropdown-menu">
13 <ng-container *ngFor="let actions of getActions()">
14
15 <ng-container *ngFor="let action of actions">
16 <ng-container *ngIf="action.isDisplayed === undefined || action.isDisplayed(entry) === true">
17
18 <a *ngIf="action.linkBuilder" [ngClass]="{ 'with-icon': !!action.iconName }" class="dropdown-item" [routerLink]="action.linkBuilder(entry)">
19 <my-global-icon *ngIf="action.iconName" [iconName]="action.iconName" [ngClass]="'icon-' + action.iconName"></my-global-icon>
20 {{ action.label }}
21 </a>
22
23 <span
24 *ngIf="!action.linkBuilder" [ngClass]="{ 'with-icon': !!action.iconName }" (click)="action.handler(entry)"
25 class="custom-action dropdown-item" role="button"
26 >
27 <my-global-icon *ngIf="action.iconName" [iconName]="action.iconName" [ngClass]="'icon-' + action.iconName"></my-global-icon>
28 {{ action.label }}
29 </span>
30
31 </ng-container>
32 </ng-container>
33
34 <div *ngIf="areActionsDisplayed(actions, entry)" class="dropdown-divider"></div>
35
36 </ng-container>
37 </div>
38 </div>