198 lines
5.9 KiB
HTML
198 lines
5.9 KiB
HTML
<app-data-table
|
|
[columns]="columns"
|
|
[data]="elements()"
|
|
queryParamSortKey="sort_by"
|
|
queryParamSortDirectionKey="sort_direction" />
|
|
|
|
<ng-template #titleTmp let-work>
|
|
<span>{{ work.title }}</span>
|
|
</ng-template>
|
|
|
|
<ng-template #typeTmp let-work>
|
|
@if (work.type) {
|
|
<button
|
|
type="button"
|
|
class="type-filter-btn"
|
|
[class.active]="isTypeActive(work.type)"
|
|
matTooltip="Nach Typ filtern"
|
|
matTooltipPosition="above"
|
|
(click)="toggleTypeFilter(work.type)">
|
|
<app-chip [color]="typeColor(work.type)">
|
|
{{ work.type | workType }}
|
|
</app-chip>
|
|
</button>
|
|
} @else {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
</ng-template>
|
|
|
|
<ng-template #yearTmp let-work>
|
|
@if (work.publication_year) {
|
|
<button
|
|
type="button"
|
|
class="cell-filter-pill"
|
|
[class.active]="isYearActive(work.publication_year)"
|
|
matTooltip="Nach Jahr filtern"
|
|
matTooltipPosition="above"
|
|
(click)="toggleYearFilter(work.publication_year)">
|
|
{{ work.publication_year }}
|
|
</button>
|
|
} @else {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
</ng-template>
|
|
|
|
<ng-template #languageTmp let-work>
|
|
@if (work.language) {
|
|
<button
|
|
type="button"
|
|
class="cell-filter-pill"
|
|
[class.active]="isLanguageActive(work.language)"
|
|
matTooltip="Nach Sprache filtern"
|
|
matTooltipPosition="above"
|
|
(click)="toggleLanguageFilter(work.language)">
|
|
{{ work.language | languageCode }}
|
|
</button>
|
|
} @else {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
</ng-template>
|
|
|
|
<ng-template #classificationTmp let-work>
|
|
@let classification = getWorkClassification(work.id);
|
|
@if (classification) {
|
|
<button type="button" class="cell-filter-pill" matTooltipPosition="above">
|
|
{{
|
|
classification.classification?.primary_category | workPrimaryCategory
|
|
}}
|
|
</button>
|
|
} @else {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
</ng-template>
|
|
|
|
<ng-template #authorsTmp let-work>
|
|
@let workAuthors = getWorkAuthors(work);
|
|
@let workAuthorsExpanded = isWorkAuthorsExpanded(work);
|
|
@let visibleAuthors =
|
|
workAuthorsExpanded ? workAuthors : workAuthors.slice(0, 3);
|
|
<div class="author-tags" aria-label="Autoren" style="padding: 0.5rem 0">
|
|
@for (author of visibleAuthors; track author.id) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-tag"
|
|
[class.active]="isAuthorActive(author.id!)"
|
|
[matTooltip]="getAuthorTooltipText(author)"
|
|
matTooltipPosition="above"
|
|
[attr.aria-label]="getAuthorTooltipText(author)"
|
|
(click)="filterByAuthor(author.id!)">
|
|
<mat-icon class="institution-icon">person</mat-icon>
|
|
<span class="institution-name">{{ author.display_name }}</span>
|
|
</button>
|
|
} @empty {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
@if (workAuthors.length > 3) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-more"
|
|
[attr.aria-expanded]="workAuthorsExpanded"
|
|
(click)="toggleWorkAuthorsExpansion(work)">
|
|
{{ workAuthorsExpanded ? 'weniger' : '+' + (workAuthors.length - 3) }}
|
|
</button>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #institutionsTmp let-work>
|
|
@let publicationInstitutions = getWorkInstitutions(work);
|
|
@let institutionsExpanded = isWorkInstitutionsExpanded(work);
|
|
@let visibleInstitutions =
|
|
institutionsExpanded
|
|
? publicationInstitutions
|
|
: publicationInstitutions.slice(0, 3);
|
|
<div
|
|
class="institution-tags"
|
|
aria-label="Institutionen"
|
|
style="padding: 0.5rem 0">
|
|
@for (institution of visibleInstitutions; track institution.id) {
|
|
<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.display_name }}</span>
|
|
@if (institution.country_code) {
|
|
<img
|
|
alt=""
|
|
class="flag-img"
|
|
[src]="
|
|
'https://flagcdn.io/' +
|
|
institution.country_code.toLowerCase() +
|
|
'.svg'
|
|
"
|
|
height="10" />
|
|
<span class="country-code">{{
|
|
institution.country_code.toUpperCase()
|
|
}}</span>
|
|
}
|
|
</button>
|
|
} @empty {
|
|
<span class="empty-text">-</span>
|
|
}
|
|
@if (publicationInstitutions.length > 3) {
|
|
<button
|
|
type="button"
|
|
class="publication-institution-more"
|
|
[attr.aria-expanded]="institutionsExpanded"
|
|
(click)="toggleWorkInstitutionsExpansion(work)">
|
|
{{
|
|
institutionsExpanded
|
|
? 'weniger'
|
|
: '+' + (publicationInstitutions.length - 3)
|
|
}}
|
|
</button>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #topicsTmp let-work>
|
|
@let workTopics = work.topics ?? [];
|
|
<div class="topic-chips" aria-label="Themen" style="padding: 0.5rem 0">
|
|
@for (topic of workTopics; track topic.id) {
|
|
<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>
|
|
}
|
|
</div>
|
|
</ng-template>
|
|
|
|
<ng-template #citationsTmp let-work>
|
|
{{ work.cited_by_count ?? 0 }}
|
|
</ng-template>
|
|
|
|
<ng-template #actionsTmp let-work>
|
|
<a
|
|
mat-icon-button
|
|
color="primary"
|
|
[routerLink]="['/publication', extractRawId(work.id)]"
|
|
matTooltip="Details anzeigen">
|
|
<mat-icon>open_in_new</mat-icon>
|
|
</a>
|
|
</ng-template>
|