UoE/feat: show embargo badge on embargoed bitstreams in file section#6
Merged
milanmajchrak merged 3 commits intoApr 21, 2026
Conversation
There was a problem hiding this comment.
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
accessStatuslink + AccessStatus modelembargoDate, 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.
8523977
into
datashare-UoEMainLibrary-dspace-8_x
5 of 9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: show embargo badge on embargoed bitstreams
Changes
AccessStatusBadgeComponent— extended to supportBitstreamobjects (not justItem), displays "Embargo until {date}"FileDownloadLinkComponent— renders<ds-access-status-badge>before the download linkBitstreammodel — addedaccessStatusHAL linkAccessStatusModel— addedembargoDatefieldAccessStatusDataService— newfindAccessStatusForBitstream()method#004f71)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.