From 4cc0ceb7770093bd110a36724dd51382af59fb16 Mon Sep 17 00:00:00 2001 From: Matus Kasak Date: Wed, 21 Oct 2026 12:13:10 +0200 Subject: [PATCH 1/2] 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/2] 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; }