223 lines
7.3 KiB
HTML
223 lines
7.3 KiB
HTML
<app-data-table
|
|
[columns]="columns()"
|
|
[data]="projects()"
|
|
[detailTemplate]="highlightRowEnabled() ? expandedProject : null"
|
|
[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)">
|
|
<span>{{ getProjectTypeLabel(project) }}</span>
|
|
</app-chip>
|
|
</button>
|
|
} @else {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
</ng-template>
|
|
|
|
<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 #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)) {
|
|
<app-author-chip
|
|
size="mini"
|
|
[author]="author"
|
|
[showIcon]="true"
|
|
[isSelected]="isAuthorActive(author.id!)"
|
|
[isClickable]="authorFilterEnabled()"
|
|
(handleChipClick)="filterByAuthor($event!)" />
|
|
} @empty {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
|
|
@if (projectAuthors.length > 3) {
|
|
<app-chip-overflow-toggle
|
|
[expanded]="isExpanded"
|
|
[hiddenCount]="projectAuthors.length - 3"
|
|
(toggle)="toggleProjectAuthorsExpansion(project)" />
|
|
}
|
|
</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) {
|
|
<app-chip-overflow-toggle
|
|
[expanded]="isExpanded"
|
|
[hiddenCount]="organizations.length - 3"
|
|
(toggle)="toggleProjectOrganizationsExpansion(project)" />
|
|
}
|
|
</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 $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]="isExpanded"
|
|
[hiddenCount]="projectTopics.length - 3"
|
|
(toggle)="toggleProjectTopicsExpansion(project)" />
|
|
}
|
|
</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>
|
|
<ng-template #expandedProject let-project>
|
|
@if (project.highlight) {
|
|
@let highlight = project.highlight;
|
|
<app-table-detail-row>
|
|
<div table-detail-header>
|
|
<h4 class="panel-field__label">Fundstelle im Projekt</h4>
|
|
</div>
|
|
|
|
<ng-container table-detail-body>
|
|
<div class="project-panel__content">
|
|
@if (highlight.title.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.title"
|
|
[highlights]="
|
|
getHighlightTerms(extractHighlightTerms(highlight.title))
|
|
" />
|
|
</article>
|
|
}
|
|
|
|
@if (highlight.objective.length > 0) {
|
|
<article class="panel-field panel-field--full">
|
|
<h4 class="panel-field__label">Zusammenfassung</h4>
|
|
<app-highlighted-text
|
|
class="panel-field__text"
|
|
[content]="project.objective"
|
|
[highlights]="
|
|
getHighlightTerms(extractHighlightTerms(highlight.objective))
|
|
" />
|
|
</article>
|
|
}
|
|
@if (highlight.acronym.length > 0) {
|
|
<article class="panel-field panel-field--full">
|
|
<h4 class="panel-field__label">Akronym</h4>
|
|
<app-highlighted-text
|
|
class="panel-field__text"
|
|
[content]="project.acronym"
|
|
[highlights]="
|
|
getHighlightTerms(extractHighlightTerms(highlight.acronym))
|
|
" />
|
|
</article>
|
|
}
|
|
@if (highlight.cordis_topic_text.length > 0) {
|
|
<article class="panel-field panel-field--full">
|
|
<h4 class="panel-field__label">Cordis-Thema</h4>
|
|
<app-highlighted-text
|
|
class="panel-field__text"
|
|
[content]="project.cordis_topic_text"
|
|
[highlights]="
|
|
getHighlightTerms(
|
|
extractHighlightTerms(highlight.cordis_topic_text)
|
|
)
|
|
" />
|
|
</article>
|
|
}
|
|
@if (highlight.keywords.length > 0) {
|
|
<article class="panel-field panel-field--full">
|
|
<h4 class="panel-field__label">Schlüsselwörter</h4>
|
|
<app-highlighted-text
|
|
class="panel-field__text"
|
|
[content]="project.keywords"
|
|
[highlights]="
|
|
getHighlightTerms(extractHighlightTerms(highlight.keywords))
|
|
" />
|
|
</article>
|
|
}
|
|
</div>
|
|
</ng-container>
|
|
</app-table-detail-row>
|
|
}
|
|
</ng-template>
|