}
@@ -362,7 +386,10 @@
@if (institutionsExpanded) {
- @for (institution of institutions(); track institution.id) {
+ @for (
+ institution of pagedInstitutions();
+ track institution.id
+ ) {
+ @if (institutionsPageCount() > 1) {
+
+ }
}
diff --git a/webapp/src/app/modules/publication-detail/publication-detail.component.scss b/webapp/src/app/modules/publication-detail/publication-detail.component.scss
index 463604b8..6c9b3334 100644
--- a/webapp/src/app/modules/publication-detail/publication-detail.component.scss
+++ b/webapp/src/app/modules/publication-detail/publication-detail.component.scss
@@ -444,6 +444,50 @@ dd {
font-size: 11px;
}
+.list-pagination {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ margin-top: 12px;
+}
+
+.page-btn {
+ display: grid;
+ place-items: center;
+ width: 28px;
+ height: 28px;
+ border: 1px solid var(--sg-border);
+ border-radius: 8px;
+ background: none;
+ cursor: pointer;
+ color: var(--sg-text-muted);
+ transition: background 0.12s;
+
+ &:hover:not(:disabled) {
+ background: var(--sg-surface-muted);
+ color: var(--sg-text);
+ }
+
+ &:disabled {
+ opacity: 0.35;
+ cursor: default;
+ }
+
+ mat-icon {
+ font-size: 18px;
+ width: 18px;
+ height: 18px;
+ }
+}
+
+.page-indicator {
+ font-size: 12px;
+ color: var(--sg-text-muted);
+ min-width: 36px;
+ text-align: center;
+}
+
.institution-country {
display: inline-flex;
align-items: center;
diff --git a/webapp/src/app/modules/publication-detail/publication-detail.component.ts b/webapp/src/app/modules/publication-detail/publication-detail.component.ts
index 72552ecc..0153993b 100644
--- a/webapp/src/app/modules/publication-detail/publication-detail.component.ts
+++ b/webapp/src/app/modules/publication-detail/publication-detail.component.ts
@@ -65,12 +65,20 @@ export class PublicationDetailComponent implements OnInit {
fundingExpanded = false;
linksExpanded = false;
+ authorsPage = 0;
+ readonly authorsPageSize = 10;
+
+ institutionsPage = 0;
+ readonly institutionsPageSize = 5;
+
ngOnInit(): void {
this.loading = true;
this.route.data.pipe(takeUntilDestroyed(this.destroyRef)).subscribe({
next: ({ publication }) => {
this.publication = publication;
+ this.authorsPage = 0;
+ this.institutionsPage = 0;
this.loading = false;
},
error: () => {
@@ -130,6 +138,28 @@ export class PublicationDetailComponent implements OnInit {
return this.publication?.authorships ?? [];
}
+ pagedAuthors(): Authorship[] {
+ return this.authors().slice(
+ this.authorsPage * this.authorsPageSize,
+ (this.authorsPage + 1) * this.authorsPageSize,
+ );
+ }
+
+ authorsPageCount(): number {
+ return Math.ceil(this.authors().length / this.authorsPageSize);
+ }
+
+ pagedInstitutions(): InstitutionDetail[] {
+ return this.institutions().slice(
+ this.institutionsPage * this.institutionsPageSize,
+ (this.institutionsPage + 1) * this.institutionsPageSize,
+ );
+ }
+
+ institutionsPageCount(): number {
+ return Math.ceil(this.institutions().length / this.institutionsPageSize);
+ }
+
institutions(): InstitutionDetail[] {
const institutions = new Map
();
for (const authorship of this.authors()) {