Skip to content

Commit 1f909dc

Browse files
committed
118223: Add instructive alert to item-bitstreams edit page
1 parent d674bcc commit 1f909dc

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<div class="item-bitstreams" *ngVar="(bundles$ | async) as bundles">
2+
<div class="mt-2" id="reorder-description">
3+
<ds-alert [content]="'item.edit.bitstreams.info-alert'" [type]="AlertType.Info"></ds-alert>
4+
</div>
5+
26
<div class="button-row top d-flex mt-2 space-children-mr">
37
<button class="mr-auto btn btn-success"
48
[routerLink]="[itemPageRoute, 'bitstreams', 'new']"><i
@@ -29,7 +33,8 @@
2933
[item]="item"
3034
[columnSizes]="columnSizes"
3135
[isFirstTable]="isFirst"
32-
(dropObject)="dropBitstream(bundle, $event)">
36+
(dropObject)="dropBitstream(bundle, $event)"
37+
aria-describedby="reorder-description">
3338
</ds-item-edit-bitstream-bundle>
3439
</div>
3540
<div *ngIf="bundles?.length === 0"

src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { ResponsiveTableSizes } from '../../../shared/responsive-table-sizes/res
2525
import { NoContent } from '../../../core/shared/NoContent.model';
2626
import { Operation } from 'fast-json-patch';
2727
import { ItemBitstreamsService } from './item-bitstreams.service';
28+
import { AlertType } from '../../../shared/alert/aletr-type';
2829

2930
@Component({
3031
selector: 'ds-item-bitstreams',
@@ -36,6 +37,9 @@ import { ItemBitstreamsService } from './item-bitstreams.service';
3637
*/
3738
export class ItemBitstreamsComponent extends AbstractItemUpdateComponent implements OnDestroy {
3839

40+
// Declared for use in template
41+
protected readonly AlertType = AlertType;
42+
3943
/**
4044
* The currently listed bundles
4145
*/

src/assets/i18n/en.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,6 +1956,8 @@
19561956

19571957
"item.edit.bitstreams.empty": "This item doesn't contain any bitstreams. Click the upload button to create one.",
19581958

1959+
"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.",
1960+
19591961
"item.edit.bitstreams.headers.actions": "Actions",
19601962

19611963
"item.edit.bitstreams.headers.bundle": "Bundle",

0 commit comments

Comments
 (0)