159 lines
5.0 KiB
HTML
159 lines
5.0 KiB
HTML
<app-data-table
|
|
[columns]="columns"
|
|
[data]="elements()"
|
|
[queryParamSortKey]="queryParamKeys.sortBy"
|
|
[queryParamSortDirectionKey]="queryParamKeys.sortDirection" />
|
|
|
|
<app-query-param-paginator
|
|
[total]="total()"
|
|
queryParamPageKey="page"
|
|
queryParamSizeKey="size"
|
|
[pageSizeOptions]="[10, 25, 50]" />
|
|
|
|
<ng-template #fundingEndTmp let-element>
|
|
{{
|
|
element.funding_end == '2999' || element.funding_end == null
|
|
? 'laufend'
|
|
: element.funding_end
|
|
}}
|
|
</ng-template>
|
|
|
|
<ng-template #actionsTmp let-element>
|
|
<a
|
|
[routerLink]="['/projects/dfg', element.id]"
|
|
target="_blank"
|
|
mat-icon-button
|
|
color="primary">
|
|
<mat-icon>open_in_new</mat-icon>
|
|
</a>
|
|
</ng-template>
|
|
<ng-template #detailRowTmp let-element>
|
|
<div class="classification-container">
|
|
@for (classification of element.subject_classifications; track $index) {
|
|
<p>
|
|
{{ classification.wissenschaftsbereich || '-' }}
|
|
→ {{ classification.fachkollegium || '-' }} →
|
|
{{ classification.fachgebiet || '-' }} →
|
|
{{ classification.fach || '-' }}
|
|
</p>
|
|
} @empty {
|
|
<span>-</span>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #authorsTmp let-project>
|
|
@let projectAuthors = getProjectAuthors(project);
|
|
@let isProjectAuthorsExpanded = isProjectPersonsExpanded(project);
|
|
@let visibleAuthors =
|
|
isProjectAuthorsExpanded ? projectAuthors : projectAuthors.slice(0, 3);
|
|
<div class="author-tags" aria-label="Autoren" style="padding: 0.5rem 0">
|
|
@for (author of visibleAuthors; track author.person_id + $index) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-tag"
|
|
[class.active]="isAuthorActive(author.person_id!)"
|
|
[matTooltip]="getAuthorTooltipText(author)"
|
|
matTooltipPosition="above"
|
|
[attr.aria-label]="getAuthorTooltipText(author)"
|
|
(click)="filterByAuthor(author.person_id!)">
|
|
<mat-icon class="institution-icon">person</mat-icon>
|
|
<span class="institution-name">{{ author.full_name }}</span>
|
|
</button>
|
|
} @empty {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
@if (projectAuthors.length > 3) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-more"
|
|
[attr.aria-expanded]="isProjectAuthorsExpanded"
|
|
(click)="toggleProjectAuthorsExpansion(project)">
|
|
{{
|
|
isProjectAuthorsExpanded
|
|
? 'weniger'
|
|
: '+' + (projectAuthors.length - 3)
|
|
}}
|
|
</button>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #institutionsTmp let-project>
|
|
@let institutions = getProjectInstitutions(project);
|
|
|
|
<div
|
|
class="institution-tags"
|
|
aria-label="Institutionen"
|
|
style="padding: 0.5rem 0">
|
|
@for (
|
|
institution of isProjectInstitutionsExpanded(project)
|
|
? institutions
|
|
: institutions.slice(0, 3);
|
|
track getProjectInstitutionId(institution)
|
|
) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-tag"
|
|
[class.active]="isInstitutionActive(institution.id!)"
|
|
[matTooltip]="getInstitutionTooltipText(institution)"
|
|
matTooltipPosition="above"
|
|
[attr.aria-label]="getInstitutionTooltipText(institution)"
|
|
(click)="filterByInstitution(institution)">
|
|
<mat-icon class="institution-icon">apartment</mat-icon>
|
|
<span class="institution-name">{{
|
|
institution.institute_name_de || institution.institute_name_en
|
|
}}</span>
|
|
</button>
|
|
} @empty {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
@if (institutions.length > 3) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-more"
|
|
(click)="toggleProjectInstitutionsExpansion(project)">
|
|
@if (isProjectInstitutionsExpanded(project)) {
|
|
Weniger anzeigen
|
|
} @else {
|
|
+{{ institutions.length - 3 }} weitere
|
|
}
|
|
</button>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #topicsTmp let-project>
|
|
@let projectTopics = project.topics ?? [];
|
|
@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
|
|
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]="isTopicsExpanded"
|
|
(click)="toggleProjectTopicsExpansion(project)">
|
|
{{ isTopicsExpanded ? 'weniger' : '+' + (projectTopics.length - 3) }}
|
|
</button>
|
|
}
|
|
</div>
|
|
</ng-template>
|