Skip to content

UoE/feat: show embargo badge on embargoed bitstreams in file section#6

Merged
milanmajchrak merged 3 commits into
datashare-UoEMainLibrary-dspace-8_xfrom
uoe/add-bitstream-embargo-info
Apr 21, 2026
Merged

UoE/feat: show embargo badge on embargoed bitstreams in file section#6
milanmajchrak merged 3 commits into
datashare-UoEMainLibrary-dspace-8_xfrom
uoe/add-bitstream-embargo-info

Conversation

@milanmajchrak

Copy link
Copy Markdown
Collaborator

feat: show embargo badge on embargoed bitstreams

Changes

  • AccessStatusBadgeComponent — extended to support Bitstream objects (not just Item), displays "Embargo until {date}"
  • FileDownloadLinkComponent — renders <ds-access-status-badge> before the download link
  • Bitstream model — added accessStatus HAL link
  • AccessStatusModel — added embargoDate field
  • AccessStatusDataService — new findAccessStatusForBitstream() method
  • DataShare theme SCSS — embargo badge styled with DataShare colours (#004f71)
  • i18n keys for embargo badge text

Why

Users had no visual indication that a file is under embargo. The badge clearly shows the status and release date directly next to the download link.

Copilot AI review requested due to automatic review settings April 20, 2026 12:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an embargo/access-status badge next to bitstream download links so users can see when a file is embargoed (and until what date), with configuration support and theme styling hooks.

Changes:

  • Extends access-status badge rendering to support Bitstream (embargo date-driven) and wires it into the file download link template.
  • Adds Bitstream accessStatus link + AccessStatus model embargoDate, plus a data service method to fetch bitstream access status.
  • Adds config + i18n + DataShare theme wrapper styling to support displaying/styling the embargo badge in file sections.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/themes/datashare/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts Enables DataShare themed access-status badge styling for the themed wrapper.
src/themes/datashare/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.scss Imports base access-status badge SCSS for the DataShare theme.
src/themes/datashare/app/shared/file-download-link/file-download-link.component.ts Updates DataShare themed file-download-link standalone imports to include the access-status badge.
src/themes/datashare/app/item-page/simple/field-components/file-section/file-section.component.html Enables badge display for bitstreams in DataShare simple file section.
src/themes/custom/app/shared/file-download-link/file-download-link.component.ts Updates custom themed file-download-link standalone imports to include the access-status badge.
src/environments/environment.test.ts Enables bitstream access status display in test environment config.
src/config/item-config.interface.ts Adds bitstream.showAccessStatuses config flag to ItemConfig.
src/config/default-app-config.ts Enables bitstream access status display by default via config.
src/assets/i18n/en.json5 Adds i18n keys for embargo badge text/date interpolation.
src/app/shared/object-collection/shared/badges/access-status-badge/access-status.model.ts Adds embargoDate field to AccessStatus model.
src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts Extends badge component to support Item + Bitstream, resolving accessStatus via LinkService.
src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.spec.ts Updates unit tests to use LinkService and direct accessStatus observables.
src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.scss Adds badge spacing + status-specific styling (including embargo styling).
src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.html Switches to Angular control flow and interpolates embargo date into translated badge text.
src/app/shared/file-download-link/themed-file-download-link.component.ts Adds showAccessStatusBadge passthrough input to the themed wrapper.
src/app/shared/file-download-link/file-download-link.component.ts Adds showAccessStatusBadge input and imports the themed access-status badge component.
src/app/shared/file-download-link/file-download-link.component.html Renders access-status badge before the link and adjusts lock icon spacing.
src/app/item-page/simple/field-components/file-section/file-section.component.html Enables badge display for bitstreams in the default simple file section.
src/app/item-page/full/field-components/file-section/full-file-section.component.html Enables badge display for bitstreams in the default full file section.
src/app/core/shared/bitstream.model.ts Adds accessStatus HAL link and linked accessStatus observable to Bitstream model.
src/app/core/data/access-status-data.service.ts Adds findAccessStatusForBitstream() method for retrieving bitstream access status.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app/shared/file-download-link/file-download-link.component.ts
Comment thread src/app/shared/file-download-link/file-download-link.component.html
Comment thread src/assets/i18n/en.json5 Outdated
@milanmajchrak milanmajchrak merged commit 8523977 into datashare-UoEMainLibrary-dspace-8_x Apr 21, 2026
5 of 9 checks passed
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.

2 participants