adjusted view for subject classifications

This commit is contained in:
2026-08-03 20:28:39 +02:00
parent 9d875b3935
commit e5f9d8cfdf
6 changed files with 181 additions and 51 deletions
@@ -77,15 +77,6 @@
<span>Status</span>
</div>
</div>
@if (getSubjectArea()) {
<div class="metric-item">
<mat-icon>category</mat-icon>
<div class="metric-content">
<strong>{{ getSubjectArea() }}</strong>
<span>Fachliche Zuordnung</span>
</div>
</div>
}
@if (dfgProject.dfg_procedure) {
<div class="metric-item">
<mat-icon>gavel</mat-icon>
@@ -142,6 +133,44 @@
<app-project-oa-topics
[topics]="dfgProject.topics"></app-project-oa-topics>
}
<!-- Fachsystematik -->
@if (getSubjectClassifications().length > 0) {
<mat-card appearance="outlined" class="card">
<div class="section-header">
<mat-icon>category</mat-icon>
<h2>Fachsystematik</h2>
<span class="count-badge">{{
getSubjectClassifications().length
}}</span>
</div>
<div class="classification-list">
@for (entry of getSubjectClassifications(); track $index) {
<div class="classification-path">
@for (
segment of getClassificationParentSegments(entry);
track $index
) {
<span class="classification-segment">{{ segment }}</span>
<mat-icon class="classification-separator"
>chevron_right</mat-icon
>
}
<div class="classification-leaf-group">
@for (
leaf of getClassificationLeafSegments(entry);
track $index
) {
<span
class="classification-segment classification-segment--leaf">
{{ leaf }}
</span>
}
</div>
</div>
}
</div>
</mat-card>
}
<!-- Beteiligte Personen -->
<mat-card appearance="outlined" class="card">
<div class="section-header">
@@ -335,18 +364,7 @@
<dt>Fachliche Zuordnung</dt>
<dd>{{ getSubjectArea() || 'N/A' }}</dd>
</div>
@if (getSubjectClassifications().length > 0) {
<div class="detail-row">
<dt>Fachsystematik</dt>
<dd>
@for (entry of getSubjectClassifications(); track $index) {
<div class="classification-path">
{{ formatSubjectClassification(entry) }}
</div>
}
</dd>
</div>
}
<div class="detail-row">
<dt>DFG-Verfahren</dt>
<dd>{{ dfgProject.dfg_procedure || 'N/A' }}</dd>
@@ -154,7 +154,7 @@ h1 {
.metrics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 16px;
padding-top: 20px;
border-top: 1px solid var(--sg-border);
@@ -473,10 +473,54 @@ h1 {
color: var(--sg-text-muted);
}
.classification-list {
display: flex;
flex-direction: column;
gap: 10px;
padding: 16px 20px 20px;
}
.classification-path {
font-size: 13px;
color: var(--sg-text);
line-height: 1.5;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 4px 2px;
padding: 10px 12px;
border: 1px solid var(--sg-border);
border-radius: var(--sg-radius-sm);
background: var(--sg-surface);
}
.classification-segment {
font-size: 12px;
line-height: 1.3;
padding: 3px 10px;
border-radius: 10px;
background: var(--sg-surface-soft);
color: var(--sg-text-muted);
white-space: nowrap;
&--leaf {
background: var(--sg-primary-soft);
color: var(--sg-text);
font-weight: 500;
white-space: normal;
}
}
.classification-leaf-group {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.classification-separator {
width: 16px;
height: 16px;
font-size: 16px;
color: var(--sg-text-muted);
flex-shrink: 0;
opacity: 0.5;
}
.website-html {
@@ -8,13 +8,9 @@ import { DfgProjectPublicationSummary } from '../../../api/model/dfgProjectPubli
import { DfgProjectSubprojectSummary } from '../../../api/model/dfgProjectSubprojectSummary';
import { DfgProjectInstitutionRole } from '../../../api/model/dfgProjectInstitutionRole';
import { DfgProjectPersonRole } from '../../../api/model/dfgProjectPersonRole';
import { DfgProjectSubjectArea } from '../../../api/model/dfgProjectSubjectArea';
import { DFGProjectFachgebieteInner } from '../../../api/model/dFGProjectFachgebieteInner';
import { ProjectOaTopicsComponent } from '../../../shared/ui/project-oa-topics/project-oa-topics.component';
import { Topic } from '../../../api';
import {
topicHierarchyColor,
TopicHierarchyColorInput,
} from '../../../resolvers/utils/topic-colors';
@Component({
selector: 'app-dfg-details',
standalone: true,
@@ -159,22 +155,26 @@ export class DfgDetailsComponent implements OnInit {
);
}
// --- Subject classification (DFG Fachsystematik) ---
//(DFG Fachsystematik)
getSubjectClassifications(): DfgProjectSubjectArea[] {
getSubjectClassifications(): DFGProjectFachgebieteInner[] {
return this.dfgProject?.subject_classifications ?? [];
}
/** Renders one classification entry as a breadcrumb-like path. */
formatSubjectClassification(entry: DfgProjectSubjectArea): string {
getClassificationParentSegments(entry: DFGProjectFachgebieteInner): string[] {
return [
entry.wissenschaftsbereich,
entry.fachkollegium,
entry.fachgebiet,
entry.fach,
]
.filter((part) => !!part)
.join(' › ');
].filter((part): part is string => !!part);
}
getClassificationLeafSegments(entry: DFGProjectFachgebieteInner): string[] {
if (!entry.fach) return [];
return entry.fach
.split(',')
.map((s) => s.trim())
.filter((s) => !!s);
}
// --- Subprojects & publications ---