167 lines
5.3 KiB
HTML
167 lines
5.3 KiB
HTML
<app-data-table
|
|
[columns]="columns()"
|
|
[data]="projects()"
|
|
[queryParamSortKey]="queryParamKeys.sortBy"
|
|
[queryParamSortDirectionKey]="queryParamKeys.sortDirection" />
|
|
|
|
<app-query-param-paginator
|
|
[total]="total()"
|
|
queryParamPageKey="page"
|
|
queryParamSizeKey="size"
|
|
[pageSizeOptions]="[10, 25, 50]" />
|
|
|
|
<ng-template #projectTypeTmp let-project>
|
|
@if (project.project_type) {
|
|
<button
|
|
type="button"
|
|
class="type-filter-btn"
|
|
[class.active]="isTypeActive(project.project_type)"
|
|
matTooltip="Nach Typ filtern"
|
|
matTooltipPosition="above"
|
|
(click)="toggleTypeFilter(project.project_type)">
|
|
<app-chip [color]="getProjectTypeColor(project.project_type)">
|
|
{{ getProjectTypeLabel(project) }}
|
|
</app-chip>
|
|
</button>
|
|
} @else {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
</ng-template>
|
|
|
|
<ng-template #fundingStartTmp let-element>
|
|
{{ getStartDate(element) | date: 'dd.MM.yyyy' }}
|
|
</ng-template>
|
|
|
|
<ng-template #fundingEndTmp let-element>
|
|
{{ getEndDate(element) | date: 'dd.MM.yyyy' }}
|
|
</ng-template>
|
|
|
|
<ng-template #fundingAmountTmp let-element>
|
|
{{ getFundingAmount(element) | currency: 'EUR' : 'symbol' : '1.0-0' : 'de' }}
|
|
</ng-template>
|
|
|
|
<ng-template #authorsTmp let-project>
|
|
@let projectAuthors = getProjectAuthors(project);
|
|
@let isExpanded = isProjectAuthorsExpanded(project);
|
|
@let visibleAuthors =
|
|
isExpanded ? projectAuthors : projectAuthors.slice(0, 3);
|
|
|
|
<div class="author-tags" aria-label="Autoren" style="padding: 0.5rem 0">
|
|
@for (author of visibleAuthors; track getAuthorTrackId(author, $index)) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-tag"
|
|
[class.active]="isAuthorActive(getAuthorId(author))"
|
|
[class.disabled]="!getAuthorId(author)"
|
|
[matTooltip]="getAuthorTooltipText(author)"
|
|
matTooltipPosition="above"
|
|
[attr.aria-label]="getAuthorTooltipText(author)"
|
|
[disabled]="!getAuthorId(author) || !authorFilterEnabled()"
|
|
(click)="filterByAuthor(author)">
|
|
<mat-icon class="institution-icon">person</mat-icon>
|
|
<span class="institution-name">{{ getAuthorName(author) }}</span>
|
|
</button>
|
|
} @empty {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
|
|
@if (projectAuthors.length > 3) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-more"
|
|
[attr.aria-expanded]="isExpanded"
|
|
(click)="toggleProjectAuthorsExpansion(project)">
|
|
{{ isExpanded ? 'weniger' : '+' + (projectAuthors.length - 3) }}
|
|
</button>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #organizationsTmp let-project>
|
|
@let organizations = getProjectOrganizations(project);
|
|
@let isExpanded = isProjectOrganizationsExpanded(project);
|
|
@let visibleOrganizations =
|
|
isExpanded ? organizations : organizations.slice(0, 3);
|
|
|
|
<div
|
|
class="institution-tags"
|
|
aria-label="Organisationen"
|
|
style="padding: 0.5rem 0">
|
|
@for (
|
|
organization of visibleOrganizations;
|
|
track getOrganizationId(organization)
|
|
) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-tag"
|
|
[class.active]="isOrganizationActive(getOrganizationId(organization))"
|
|
[matTooltip]="getOrganizationTooltipText(organization)"
|
|
matTooltipPosition="above"
|
|
[attr.aria-label]="getOrganizationTooltipText(organization)"
|
|
(click)="filterByOrganization(organization)">
|
|
<mat-icon class="institution-icon">apartment</mat-icon>
|
|
<span class="institution-name">
|
|
{{ getOrganizationName(organization) }}
|
|
</span>
|
|
</button>
|
|
} @empty {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
|
|
@if (organizations.length > 3) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-more"
|
|
[attr.aria-expanded]="isExpanded"
|
|
(click)="toggleProjectOrganizationsExpansion(project)">
|
|
{{ isExpanded ? 'weniger' : '+' + (organizations.length - 3) }}
|
|
</button>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #topicsTmp let-project>
|
|
@let projectTopics = getProjectTopics(project);
|
|
@let isExpanded = isProjectTopicsExpanded(project);
|
|
@let visibleTopics = isExpanded ? projectTopics : projectTopics.slice(0, 3);
|
|
|
|
<div class="topic-chips" aria-label="Themen" style="padding: 0.5rem 0">
|
|
@for (topic of visibleTopics; track topic.id ?? $index) {
|
|
<app-topic-chip
|
|
size="mini"
|
|
[label]="topic.display_name || ''"
|
|
[description]="topic.description"
|
|
[subfieldName]="topic.subfield?.display_name"
|
|
[fieldName]="topic.field?.display_name"
|
|
[domainName]="topic.domain?.display_name"
|
|
[color]="getWorkTopicColor(topic)"
|
|
[disabled]="!topic.id"
|
|
[active]="isTopicActive(topic)"
|
|
(chipClick)="filterByTopic(topic)">
|
|
</app-topic-chip>
|
|
} @empty {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
|
|
@if (projectTopics.length > 3) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-more"
|
|
[attr.aria-expanded]="isExpanded"
|
|
(click)="toggleProjectTopicsExpansion(project)">
|
|
{{ isExpanded ? 'weniger' : '+' + (projectTopics.length - 3) }}
|
|
</button>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #actionsTmp let-element>
|
|
<a
|
|
[routerLink]="['/projects/eu', element.id]"
|
|
target="_blank"
|
|
mat-icon-button
|
|
color="primary">
|
|
<mat-icon>open_in_new</mat-icon>
|
|
</a>
|
|
</ng-template>
|