feat(frontend/search): added card search template, moved institutions and projects to it
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -2,98 +2,59 @@
|
||||
<h1>Passende Projekte finden</h1>
|
||||
|
||||
<mat-divider />
|
||||
|
||||
<div style="padding: 0 1rem">
|
||||
<app-query-param-input
|
||||
label="Suche nach Namen"
|
||||
[debounceTime]="400"
|
||||
queryParamKey="search">
|
||||
</app-query-param-input>
|
||||
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
">
|
||||
<mat-chip-listbox
|
||||
[value]="urlChips()"
|
||||
(change)="handleChipBoxChange($event)"
|
||||
multiple>
|
||||
<mat-chip-option value="eu">EU</mat-chip-option>
|
||||
<mat-chip-option value="bund">BUND</mat-chip-option>
|
||||
<mat-chip-option value="dfg">DFG</mat-chip-option>
|
||||
</mat-chip-listbox>
|
||||
|
||||
<div class="sorting">
|
||||
<app-query-param-selector
|
||||
[options]="sortingOptions"
|
||||
queryParamKey="sort_by"
|
||||
label="Sortieren nach" />
|
||||
|
||||
<app-query-param-selector
|
||||
[options]="sortingDirectionOptions"
|
||||
queryParamKey="sorting_order"
|
||||
label="Sortierreihenfolge" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-divider />
|
||||
|
||||
@let fundingProjectPageValue = fundingProjectPage();
|
||||
|
||||
@if (
|
||||
fundingProjectPageValue.elements &&
|
||||
fundingProjectPageValue.elements.length > 0
|
||||
) {
|
||||
<div class="cards">
|
||||
@for (fundingProject of fundingProjectPageValue.elements; track $index) {
|
||||
<mat-card
|
||||
class="card"
|
||||
appearance="outlined"
|
||||
[routerLink]="getDetaiLink(fundingProject)">
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{ fundingProject.title }}</mat-card-title>
|
||||
<mat-card-subtitle>{{
|
||||
fundingProject.type | uppercase
|
||||
}}</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content class="card-content">
|
||||
<mat-divider />
|
||||
<div class="card-metadata">
|
||||
<span
|
||||
>Von {{ fundingProject.start_date | date: 'dd.MM.yyyy' }} bis
|
||||
{{ fundingProject.end_date | date: 'dd.MM.yyyy' }}</span
|
||||
>
|
||||
</div>
|
||||
<mat-divider />
|
||||
</mat-card-content>
|
||||
|
||||
<mat-card-footer>
|
||||
<mat-card-actions>
|
||||
<a
|
||||
mat-button
|
||||
[routerLink]="getDetaiLink(fundingProject)"
|
||||
(click)="$event.stopPropagation()">
|
||||
<mat-icon>info</mat-icon>
|
||||
Übersicht
|
||||
</a>
|
||||
</mat-card-actions>
|
||||
</mat-card-footer>
|
||||
</mat-card>
|
||||
}
|
||||
</div>
|
||||
} @else {
|
||||
<div class="no-results">
|
||||
<p>Keine passenden Projekte gefunden.</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
<mat-divider />
|
||||
|
||||
<app-query-param-paginator
|
||||
[total]="fundingProjectPageValue.total || 0"
|
||||
[pageSizeOptions]="[10, 25, 50]" />
|
||||
<app-card-search
|
||||
[page]="page()"
|
||||
[cardTmp]="cardTmp"
|
||||
[additionalFiltersTmp]="additionalFiltersTmp"
|
||||
[cardMinWidth]="380"
|
||||
[sortingOptions]="sortingOptions"
|
||||
[sortingDirectionOptions]="sortingDirectionOptions"
|
||||
searchLabel="Suche nach Namen" />
|
||||
</div>
|
||||
|
||||
<ng-template #cardTmp let-element>
|
||||
<mat-card
|
||||
class="card"
|
||||
appearance="outlined"
|
||||
[routerLink]="getDetaiLink(element)">
|
||||
<mat-card-header>
|
||||
<mat-card-title>{{ element.title }}</mat-card-title>
|
||||
<mat-card-subtitle>{{ element.type | uppercase }}</mat-card-subtitle>
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content class="card-content">
|
||||
<mat-divider />
|
||||
<div class="card-metadata">
|
||||
<span
|
||||
>Von {{ element.start_date | date: 'dd.MM.yyyy' }} bis
|
||||
{{ element.end_date | date: 'dd.MM.yyyy' }}</span
|
||||
>
|
||||
</div>
|
||||
<mat-divider />
|
||||
</mat-card-content>
|
||||
|
||||
<mat-card-footer>
|
||||
<mat-card-actions>
|
||||
<a
|
||||
mat-button
|
||||
[routerLink]="getDetaiLink(element)"
|
||||
(click)="$event.stopPropagation()">
|
||||
<mat-icon>info</mat-icon>
|
||||
Übersicht
|
||||
</a>
|
||||
</mat-card-actions>
|
||||
</mat-card-footer>
|
||||
</mat-card>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #additionalFiltersTmp>
|
||||
<mat-chip-listbox
|
||||
[value]="urlChips()"
|
||||
(change)="handleChipBoxChange($event)"
|
||||
multiple
|
||||
style="padding: 0rem 1rem">
|
||||
<mat-chip-option value="eu">EU</mat-chip-option>
|
||||
<mat-chip-option value="bund">BUND</mat-chip-option>
|
||||
<mat-chip-option value="dfg">DFG</mat-chip-option>
|
||||
</mat-chip-listbox>
|
||||
</ng-template>
|
||||
|
||||
Reference in New Issue
Block a user