|
1 | 1 | <div> |
2 | | -<!-- <ng-container *ngIf="topSection.showAsCard">--> |
3 | | - <!-- CARD VIEW --> |
4 | | - <div [ngClass]="{'card': topSection.showAsCard}"> |
5 | | - <ng-container *ngIf="topSection.showAsCard"> |
6 | | - <div *ngIf="topSection.titleKey" class="card-header">{{ 'explore.index.' + topSection.titleKey | translate }}</div> |
7 | | - <div *ngIf="!topSection.titleKey" class="card-header">{{ 'explore.index.' + topSection.sortField | translate }}</div> |
8 | | - </ng-container> |
9 | | - <!-- LIST VIEW --> |
10 | | - <ng-container *ngIf="!topSection.showAsCard"> |
11 | | - <h3 *ngIf="topSection.titleKey" class="mx-2">{{ 'explore.index.' + topSection.titleKey | translate }}</h3> |
12 | | - <h3 *ngIf="!topSection.titleKey" class="mx-2">{{ 'explore.index.' + topSection.sortField | translate }}</h3> |
13 | | - </ng-container> |
14 | | - <div [ngClass]="{'card-body': topSection.showAsCard}"> |
15 | | - <div class="row pl-2" *ngIf="topSection.showLayoutSwitch"> |
16 | | - <div class="col"> |
17 | | - <div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" [(ngModel)]="layoutMode"> |
18 | | - <label ngbButtonLabel class="btn-outline-primary"> |
19 | | - <input ngbButton type="radio" [value]="'list'" /> |
20 | | - <i class="fa fa-list-ul" title="List"></i> |
21 | | - </label> |
22 | | - <label ngbButtonLabel class="btn-outline-primary"> |
23 | | - <input ngbButton type="radio" [value]="'card'" /> |
24 | | - <i class="fas fa-th-large" title="Cards"></i> |
25 | | - </label> |
26 | | - </div> |
| 2 | + <div [ngClass]="{'card': topSection.showAsCard}"> |
| 3 | + <ng-container *ngIf="topSection.showAsCard; else listView"> |
| 4 | + <div class="card-header">{{ 'explore.index.' + (topSection.titleKey ? topSection.titleKey : topSection.sortField) | translate }}</div> |
| 5 | + </ng-container> |
| 6 | + <ng-template #listView> |
| 7 | + <h3 class="mx-2">{{ 'explore.index.' + (topSection.titleKey ? topSection.titleKey : topSection.sortField) | translate }}</h3> |
| 8 | + </ng-template> |
| 9 | + <div [ngClass]="{'card-body': topSection.showAsCard}"> |
| 10 | + <div class="row pl-2" *ngIf="topSection.showLayoutSwitch"> |
| 11 | + <div class="col"> |
| 12 | + <div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" [(ngModel)]="layoutMode"> |
| 13 | + <label ngbButtonLabel class="btn-outline-primary"> |
| 14 | + <input ngbButton type="radio" [value]="'list'" /> |
| 15 | + <i class="fa fa-list-ul" title="List"></i> |
| 16 | + </label> |
| 17 | + <label ngbButtonLabel class="btn-outline-primary"> |
| 18 | + <input ngbButton type="radio" [value]="'card'" /> |
| 19 | + <i class="fas fa-th-large" title="Cards"></i> |
| 20 | + </label> |
27 | 21 | </div> |
28 | 22 | </div> |
29 | | - <ds-themed-browse-most-elements [context]="context" |
30 | | - [paginatedSearchOptions]="paginatedSearchOptions" |
31 | | - [topSection]="topSection" |
32 | | - [mode]="layoutMode"> |
33 | | - </ds-themed-browse-most-elements> |
34 | 23 | </div> |
| 24 | + <ds-themed-browse-most-elements [context]="context" |
| 25 | + [paginatedSearchOptions]="paginatedSearchOptions" |
| 26 | + [topSection]="topSection" |
| 27 | + [mode]="layoutMode"> |
| 28 | + </ds-themed-browse-most-elements> |
35 | 29 | </div> |
36 | | -<!-- </ng-container>--> |
37 | | -<!-- <ng-container *ngIf="!topSection.showAsCard">--> |
38 | | -<!-- <!– LIST VIEW –>--> |
39 | | -<!-- <div class="row" *ngIf="topSection.showLayoutSwitch">--> |
40 | | -<!-- <div class="col">--> |
41 | | -<!-- <div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" [(ngModel)]="layoutMode">--> |
42 | | -<!-- <label ngbButtonLabel class="btn-outline-primary">--> |
43 | | -<!-- <input ngbButton type="radio" [value]="'list'" />--> |
44 | | -<!-- <i class="fa fa-list-ul" title="List"></i>--> |
45 | | -<!-- </label>--> |
46 | | -<!-- <label ngbButtonLabel class="btn-outline-primary">--> |
47 | | -<!-- <input ngbButton type="radio" [value]="'card'" />--> |
48 | | -<!-- <i class="fas fa-th-large" title="Cards"></i>--> |
49 | | -<!-- </label>--> |
50 | | -<!-- </div>--> |
51 | | -<!-- </div>--> |
52 | | -<!-- </div>--> |
53 | | -<!-- <div class="row">--> |
54 | | -<!-- <div class="col px-2">--> |
55 | | -<!-- <h3 *ngIf="topSection.titleKey" class="mx-2">{{ 'explore.index.' + topSection.titleKey | translate }}</h3>--> |
56 | | -<!-- <h3 *ngIf="!topSection.titleKey" class="mx-2">{{ 'explore.index.' + topSection.sortField | translate }}</h3>--> |
57 | | -<!-- <ds-themed-browse-most-elements [context]="context"--> |
58 | | -<!-- [paginatedSearchOptions]="paginatedSearchOptions"--> |
59 | | -<!-- [topSection]="topSection"--> |
60 | | -<!-- [mode]="layoutMode">--> |
61 | | -<!-- </ds-themed-browse-most-elements>--> |
62 | | -<!-- </div>--> |
63 | | -<!-- </div>--> |
64 | | -<!-- </ng-container>--> |
| 30 | + </div> |
65 | 31 | </div> |
0 commit comments