118223: Add instructive alert to item-bitstreams edit page

This commit is contained in:
Andreas Awouters
2024-09-17 13:34:08 +02:00
parent d674bcc390
commit 1f909dc6ea
3 changed files with 12 additions and 1 deletions

View File

@@ -1,4 +1,8 @@
<div class="item-bitstreams" *ngVar="(bundles$ | async) as bundles">
<div class="mt-2" id="reorder-description">
<ds-alert [content]="'item.edit.bitstreams.info-alert'" [type]="AlertType.Info"></ds-alert>
</div>
<div class="button-row top d-flex mt-2 space-children-mr">
<button class="mr-auto btn btn-success"
[routerLink]="[itemPageRoute, 'bitstreams', 'new']"><i
@@ -29,7 +33,8 @@
[item]="item"
[columnSizes]="columnSizes"
[isFirstTable]="isFirst"
(dropObject)="dropBitstream(bundle, $event)">
(dropObject)="dropBitstream(bundle, $event)"
aria-describedby="reorder-description">
</ds-item-edit-bitstream-bundle>
</div>
<div *ngIf="bundles?.length === 0"

View File

@@ -25,6 +25,7 @@ import { ResponsiveTableSizes } from '../../../shared/responsive-table-sizes/res
import { NoContent } from '../../../core/shared/NoContent.model';
import { Operation } from 'fast-json-patch';
import { ItemBitstreamsService } from './item-bitstreams.service';
import { AlertType } from '../../../shared/alert/aletr-type';
@Component({
selector: 'ds-item-bitstreams',
@@ -36,6 +37,9 @@ import { ItemBitstreamsService } from './item-bitstreams.service';
*/
export class ItemBitstreamsComponent extends AbstractItemUpdateComponent implements OnDestroy {
// Declared for use in template
protected readonly AlertType = AlertType;
/**
* The currently listed bundles
*/

View File

@@ -1956,6 +1956,8 @@
"item.edit.bitstreams.empty": "This item doesn't contain any bitstreams. Click the upload button to create one.",
"item.edit.bitstreams.info-alert": "Bitstreams can be reordered within their bundles by holding the drag handle and moving the mouse. Alternatively, bitstreams can be moved using the keyboard in the following way: Select the bitstream by pressing enter when the bitstream's drag handle is in focus. Move the bitstream up or down using the arrow keys. Press enter again to confirm the current position of the bitstream.",
"item.edit.bitstreams.headers.actions": "Actions",
"item.edit.bitstreams.headers.bundle": "Bundle",