From 4cc0ceb7770093bd110a36724dd51382af59fb16 Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Wed, 21 Oct 2026 12:13:10 +0200 Subject: [PATCH 1/5] ZCU-PUB/fix(item-page): drop embargo badge onto its own line under the filename (#1088) The per-bitstream access-status badge ("Embargo until ") is rendered by ds-file-download-link right after the download link. The item Files list separates entries with a projected
(FileSectionComponent.separator) that lands inside the link, so the badge wrapped onto the next visual line and ran straight into the following file's lock icon. Scope the custom theme's item-page file section so each file is block-level and the badge drops onto its own line directly under the filename: filename (size) Embargo until Done via SCSS only (no template duplication); submission and process-detail, which reuse ds-file-download-link, keep their inline layout. Fixes dataquest-dev/dspace-customers#1088 Co-Authored-By: Claude Opus 4.8 --- .../file-section/file-section.component.scss | 39 +++++++++++++++++++ .../file-section/file-section.component.ts | 1 + 2 files changed, 40 insertions(+) create mode 100644 src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss diff --git a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss new file mode 100644 index 00000000000..2e0d40fc686 --- /dev/null +++ b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss @@ -0,0 +1,39 @@ +// ZCU-PUB / dspace-customers#1088 - embargo badge position in the item view. +// +// Each bitstream in the Files section is a that renders +// the (optional) lock icon + filename, followed by a +// (the "Embargo until " badge). The file list separates entries with a +// projected
(see FileSectionComponent.separator), which lands *inside* +// the link, before the badge. The result was: the badge wrapped onto the next +// visual line and ran straight into the following file's lock icon. +// +// Fix: lay each file out as its own block and drop the badge onto its own line +// directly under the filename, so the layout reads: +// +// filename (size) +// Embargo until +// +// Scoped to the custom theme's item-page file section only - submission and +// process-detail reuse and must keep their inline layout. +:host ::ng-deep .file-section { + + ds-themed-file-download-link { + display: block; + + // Block layout already breaks between files, so the projected
+ // separator would only add an empty line between the filename and badge. + br { + display: none; + } + + &:not(:last-of-type) { + margin-bottom: 0.25rem; + } + } + + // Badge onto its own line, under the filename (instead of inline, where it + // collided with the next file's lock icon). + ds-themed-access-status-badge { + display: block; + } +} diff --git a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.ts b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.ts index 7f36623b3a7..72b892b2c90 100644 --- a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.ts +++ b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.ts @@ -6,6 +6,7 @@ import { FileSectionComponent as BaseComponent } from '../../../../../../../app/ selector: 'ds-item-page-file-section', // templateUrl: './file-section.component.html', templateUrl: '../../../../../../../app/item-page/simple/field-components/file-section/file-section.component.html', + styleUrls: ['./file-section.component.scss'], animations: [slideSidebarPadding], }) export class FileSectionComponent extends BaseComponent { From e4a744c0cf9759cea84dbd8cda3021a7c809d380 Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Wed, 21 Oct 2026 13:01:00 +0200 Subject: [PATCH 2/5] Removed docs --- .../file-section/file-section.component.scss | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss index 2e0d40fc686..486082e6642 100644 --- a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss +++ b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss @@ -1,27 +1,8 @@ -// ZCU-PUB / dspace-customers#1088 - embargo badge position in the item view. -// -// Each bitstream in the Files section is a that renders -// the (optional) lock icon + filename, followed by a -// (the "Embargo until " badge). The file list separates entries with a -// projected
(see FileSectionComponent.separator), which lands *inside* -// the link, before the badge. The result was: the badge wrapped onto the next -// visual line and ran straight into the following file's lock icon. -// -// Fix: lay each file out as its own block and drop the badge onto its own line -// directly under the filename, so the layout reads: -// -// filename (size) -// Embargo until -// -// Scoped to the custom theme's item-page file section only - submission and -// process-detail reuse and must keep their inline layout. :host ::ng-deep .file-section { ds-themed-file-download-link { display: block; - // Block layout already breaks between files, so the projected
- // separator would only add an empty line between the filename and badge. br { display: none; } @@ -31,8 +12,6 @@ } } - // Badge onto its own line, under the filename (instead of inline, where it - // collided with the next file's lock icon). ds-themed-access-status-badge { display: block; } From 0ae0f910592c099dc0f4bff6beca3414c48b95ba Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Wed, 4 Nov 2026 10:18:09 +0100 Subject: [PATCH 3/5] ZCU-PUB/style(item-page): flatten embargo-badge file-section SCSS (#1088) Collapse the nested rules into flat, single-level selectors and drop the inline comments. Compiles to the same four selectors, so the rendered layout is unchanged. Co-Authored-By: Claude Opus 4.8 --- .../file-section/file-section.component.scss | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss index 486082e6642..feea026d22f 100644 --- a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss +++ b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss @@ -1,18 +1,8 @@ :host ::ng-deep .file-section { + ds-themed-file-download-link { display: block; } + ds-themed-file-download-link:not(:last-of-type) { margin-bottom: 0.25rem; } - ds-themed-file-download-link { - display: block; + ds-themed-access-status-badge { display: block; } - br { - display: none; - } - - &:not(:last-of-type) { - margin-bottom: 0.25rem; - } - } - - ds-themed-access-status-badge { - display: block; - } + ds-themed-file-download-link br { display: none; } } From 3ce122ee3733af50ab4f3824df969d3b0e0c2fce Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Wed, 4 Nov 2026 16:21:20 +0100 Subject: [PATCH 4/5] ZCU-PUB/fix(item-page): keep embargo badge inline when it fits (#1088) Drop the `display: block` on the access-status badge so it flows inline after the filename and only wraps onto its own line when it does not fit. Each file stays block-level, so a wrapped badge still cannot collide with the next file's lock icon. Co-Authored-By: Claude Opus 4.8 --- .../field-components/file-section/file-section.component.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss index feea026d22f..0f44a7a02c7 100644 --- a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss +++ b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss @@ -2,7 +2,5 @@ ds-themed-file-download-link { display: block; } ds-themed-file-download-link:not(:last-of-type) { margin-bottom: 0.25rem; } - ds-themed-access-status-badge { display: block; } - ds-themed-file-download-link br { display: none; } } From 38ae51b07618659d179ccf9bf34bba540b2eadb6 Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Thu, 5 Nov 2026 10:25:03 +0100 Subject: [PATCH 5/5] ZCU-PUB/fix(item-page): gap before embargo badge, keep lock with filename (#1088) - add a 0.5rem gap between the filename and the inline access-status badge - word-break: break-all so the filename wraps beside the lock icon instead of jumping to the next line and leaving the lock orphaned on its own line Verified across widths (140-240px): the lock always stays with the start of the filename, and the badge stays inline when it fits, wrapping underneath otherwise. Co-Authored-By: Claude Opus 4.8 --- .../field-components/file-section/file-section.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss index 0f44a7a02c7..3ce8d044ef4 100644 --- a/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss +++ b/src/themes/custom/app/item-page/simple/field-components/file-section/file-section.component.scss @@ -1,6 +1,6 @@ :host ::ng-deep .file-section { ds-themed-file-download-link { display: block; } ds-themed-file-download-link:not(:last-of-type) { margin-bottom: 0.25rem; } - ds-themed-file-download-link br { display: none; } + ds-themed-file-download-link a { word-break: break-all; margin-right: 0.5rem; } }