167 lines
5.2 KiB
HTML
167 lines
5.2 KiB
HTML
<app-data-table
|
|
[columns]="columns"
|
|
[data]="elements()"
|
|
[detailTemplate]="expandedProject"
|
|
[queryParamSortKey]="queryParamKeys.sortBy"
|
|
[queryParamSortDirectionKey]="queryParamKeys.sortDirection" />
|
|
|
|
<app-query-param-paginator
|
|
[total]="total()"
|
|
queryParamPageKey="page"
|
|
queryParamSizeKey="size"
|
|
[pageSizeOptions]="[10, 25, 50]" />
|
|
|
|
<ng-template #fundingStartTmp let-element>
|
|
<span>
|
|
{{ getStartDate(element) | date: 'dd.MM.yyyy' }}
|
|
</span>
|
|
</ng-template>
|
|
|
|
<ng-template #fundingEndTmp let-element>
|
|
<span>
|
|
{{ getEndDate(element) | date: 'dd.MM.yyyy' }}
|
|
</span>
|
|
</ng-template>
|
|
|
|
<ng-template #fundingAmountTmp let-element>
|
|
<span>
|
|
{{
|
|
getFundingAmount(element) | currency: 'EUR' : 'symbol' : '1.0-0' : 'de'
|
|
}}
|
|
</span>
|
|
</ng-template>
|
|
|
|
<ng-template #actionsTmp let-element>
|
|
<a
|
|
[routerLink]="['/projects/bund', getDetailId(element.funding_code)]"
|
|
target="_blank"
|
|
mat-icon-button
|
|
color="primary">
|
|
<mat-icon>open_in_new</mat-icon>
|
|
</a>
|
|
</ng-template>
|
|
|
|
<ng-template #institutionsTmp let-project>
|
|
@let institutions = getProjectInstitutions(project);
|
|
|
|
<div
|
|
class="institution-tags"
|
|
aria-label="Institutionen"
|
|
style="padding: 0.5rem 0">
|
|
<button
|
|
type="button"
|
|
class="publication-institution-tag"
|
|
[class.active]="isInstitutionActive(institutions[0].name!)"
|
|
[matTooltip]="getInstitutionTooltipText(institutions[0])"
|
|
matTooltipPosition="above"
|
|
[attr.aria-label]="getInstitutionTooltipText(institutions[0])"
|
|
(click)="filterByInstitution(institutions[0])">
|
|
<mat-icon class="institution-icon">apartment</mat-icon>
|
|
<span class="institution-name">{{
|
|
institutions[0].name || institutions[0].recepient || '-'
|
|
}}</span>
|
|
</button>
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #fundingTypeTmp let-project>
|
|
@if (project.funding_type) {
|
|
<button
|
|
type="button"
|
|
class="type-filter-btn"
|
|
[class.active]="isFundingTypeActive(project.funding_type)"
|
|
matTooltip="Nach Typ filtern"
|
|
matTooltipPosition="above"
|
|
(click)="toggleFundingTypeFilter(project.funding_type)">
|
|
<app-chip [color]="getFundingTypeColor(project.funding_type)">
|
|
<span>{{ project.funding_type }}</span>
|
|
</app-chip>
|
|
</button>
|
|
} @else {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
</ng-template>
|
|
|
|
<ng-template #topicsTmp let-project>
|
|
@let projectTopics = getProjectTopics(project);
|
|
@let isTopicsExpanded = isProjectTopicsExpanded(project);
|
|
@let visibleTopics =
|
|
isTopicsExpanded ? projectTopics : projectTopics.slice(0, 3);
|
|
<div class="topic-chips" aria-label="Themen" style="padding: 0.5rem 0">
|
|
@for (topic of visibleTopics; track $index) {
|
|
<app-topic-chip-2
|
|
size="mini"
|
|
[topic]="topic"
|
|
[showIcon]="false"
|
|
[isSelected]="isTopicActive(topic)"
|
|
[isClickable]="topicFilterEnabled()"
|
|
(handleChipClick)="filterByTopic(topic)" />
|
|
} @empty {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
@if (projectTopics.length > 3) {
|
|
<app-chip-overflow-toggle
|
|
[expanded]="isTopicsExpanded"
|
|
[hiddenCount]="projectTopics.length - 3"
|
|
(toggle)="toggleProjectTopicsExpansion(project)" />
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
<ng-template #expandedProject let-project>
|
|
<section class="project-panel" aria-label="Weitere Projektdetails">
|
|
<div class="project-panel__content">
|
|
@if (project.highlight?.topic.length > 0) {
|
|
<article class="panel-field panel-field--full">
|
|
<h4 class="panel-field__label">Titel</h4>
|
|
<app-highlighted-text
|
|
class="panel-field__text"
|
|
[content]="project.topic"
|
|
[highlights]="
|
|
getHighlightTerms(extractHighlightTerms(project.highlight?.topic))
|
|
" />
|
|
</article>
|
|
}
|
|
|
|
@if (project.highlight?.recipient.length > 0) {
|
|
<article class="panel-field panel-field--full">
|
|
<h4 class="panel-field__label">Zuwendungsempfänger</h4>
|
|
<app-highlighted-text
|
|
class="panel-field__text"
|
|
[content]="project.recipient"
|
|
[highlights]="
|
|
getHighlightTerms(
|
|
extractHighlightTerms(project.highlight?.recipient)
|
|
)
|
|
" />
|
|
</article>
|
|
}
|
|
@if (project.highlight?.joint_project.length > 0) {
|
|
<article class="panel-field panel-field--full">
|
|
<h4 class="panel-field__label">Verbundprojekt</h4>
|
|
<app-highlighted-text
|
|
class="panel-field__text"
|
|
[content]="project.joint_project"
|
|
[highlights]="
|
|
getHighlightTerms(
|
|
extractHighlightTerms(project.highlight?.joint_project)
|
|
)
|
|
" />
|
|
</article>
|
|
}
|
|
@if (project.highlight?.executing_agency.length > 0) {
|
|
<article class="panel-field panel-field--full">
|
|
<h4 class="panel-field__label">Ausführende Stelle</h4>
|
|
<app-highlighted-text
|
|
class="panel-field__text"
|
|
[content]="project.executing_agency"
|
|
[highlights]="
|
|
getHighlightTerms(
|
|
extractHighlightTerms(project.highlight?.executing_agency)
|
|
)
|
|
" />
|
|
</article>
|
|
}
|
|
</div>
|
|
</section>
|
|
</ng-template>
|