Skip to content

ZCU-PUB/fix(item-page): drop embargo badge onto its own line under the filename (#1088) - #1652

Open
Kasinhou wants to merge 2 commits into
customer/zcu-pubfrom
zcu-pub/fix-embargo-badge-position-1088
Open

Kasinhou wants to merge 2 commits into
customer/zcu-pubfrom
zcu-pub/fix-embargo-badge-position-1088

Conversation

@Kasinhou

@Kasinhou Kasinhou commented Oct 21, 2026 •

Copy link
Copy Markdown

What

Fixes the embargo-badge position in the ZCU-PUB item view
(dataquest-dev/dspace-customers#1088).

Each file in the Files section is a ds-file-download-link that renders the
lock icon + filename, followed by the per-bitstream access-status badge
(ds-access-status-badge → "Embargo until <date>"). The Files list separates
entries with a projected <br/> (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.

Before → After

BEFORE                                        AFTER
🔒 JAGER_BP_Vzornik_pisma.zip (81 B)          🔒 JAGER_BP_Vzornik_pisma.zip (81 B)
[Embargo until 2028-06-11] 🔒  ← glued        [Embargo until 2028-06-11]
Jager_BP_Plakaty_70x100cm.pdf (84 B)          🔒 Jager_BP_Plakaty_70x100cm.pdf (84 B)
[Embargo until 2028-06-11] 🔒  ← glued        [Embargo until 2028-06-11]
Jager_BP_Cyrilice-...pdf (92 B)               🔒 Jager_BP_Cyrilice-...pdf (92 B)
[Embargo until 2028-06-11]                     [Embargo until 2028-06-11]
PV_Jager_D21B0131P.pdf (77 B)                  PV_Jager_D21B0131P.pdf (77 B)

Requested layout: lock at the start of the line, then the filename; the
embargo badge on its own line directly under the filename
, and the next file
starts fresh (badge no longer collides with the next file's lock).

before
1088-embargo-badge-BEFORE-local

after
1088-embargo-badge-AFTER-pr

How

SCSS only, scoped to the custom theme's item-page file section — no template
duplication, so the base file-section template keeps propagating:

  • each ds-file-download-link is made block-level (one file per line);
  • the inner, projected <br/> separator is neutralised (block layout already
    breaks between files, so it would otherwise add a blank line);
  • ds-access-status-badge is made block-level so it drops onto its own line
    under the filename.

Submission (section-upload-file) and process-detail, which also reuse
ds-file-download-link, are not affected (the rule is scoped to
:host ::ng-deep .file-section).

Verification (local)

  • Backend: zcu-pub Clarin fork rebuilt from source (has the per-bitstream
    accessStatus/embargo REST endpoint), running in Docker.
  • Seeded an item with 3 embargoed + 1 open bitstream; endpoint returns
    status: embargo, embargoDate: 2028-06-11.
  • Built the FE (production SSR, where the badge renders) without then
    with this change on the identical seeded item → the before/after above.

Fixes dataquest-dev/dspace-customers#1088

🤖 Generated with Claude Code

Matus Kasak and others added 2 commits October 21, 2026 12:13
…e filename (#1088)

The per-bitstream access-status badge ("Embargo until <date>") is rendered by
ds-file-download-link right after the download link. The item Files list
separates entries with a projected <br/> (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:

    <lock> filename (size)
    Embargo until <date>

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 <noreply@anthropic.com>
@Kasinhou Kasinhou self-assigned this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant