diff --git a/src/app/core/shared/bitstream.model.ts b/src/app/core/shared/bitstream.model.ts index c855325d2d6..bbc5455eead 100644 --- a/src/app/core/shared/bitstream.model.ts +++ b/src/app/core/shared/bitstream.model.ts @@ -11,6 +11,9 @@ import {BUNDLE} from './bundle.resource-type'; import {Bundle} from './bundle.model'; import { ChildHALResource } from './child-hal-resource.model'; +// Store number if the bitstream is stored in the both stores (S3 and local) +export const SYNCHRONIZED_STORES_NUMBER = 77; + @typedObject @inheritSerialization(DSpaceObject) export class Bitstream extends DSpaceObject implements ChildHALResource { @@ -34,6 +37,12 @@ export class Bitstream extends DSpaceObject implements ChildHALResource { @autoserialize bundleName: string; + /** + * The number of the store where the bitstream is store, it could be S3, local or both. + */ + @autoserialize + storeNumber: number; + /** * The {@link HALLink}s for this Bitstream */ diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.html b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.html index 4cb9577fcb5..b5c84ab8760 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.html +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.html @@ -32,6 +32,7 @@
{{'item.edit.bitstreams.headers.description' | translate}}
{{'item.edit.bitstreams.headers.format' | translate}}
{{'item.edit.bitstreams.headers.actions' | translate}}
+
{{'item.edit.bitstreams.headers.synchronized' | translate}}
+
+
+ + + +
+
diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts index 306c0d41e39..ca9aff92e1a 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts @@ -21,8 +21,9 @@ let fixture: ComponentFixture; const columnSizes = new ResponsiveTableSizes([ new ResponsiveColumnSizes(2, 2, 3, 4, 4), new ResponsiveColumnSizes(2, 3, 3, 3, 3), - new ResponsiveColumnSizes(2, 2, 2, 2, 2), - new ResponsiveColumnSizes(6, 5, 4, 3, 3) + new ResponsiveColumnSizes(1, 1, 1, 1, 1), + new ResponsiveColumnSizes(5, 4, 3, 2, 2), + new ResponsiveColumnSizes(2, 2, 2, 2, 2) ]); const format = Object.assign(new BitstreamFormat(), { diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts index fcb5c706ac7..ec527f349c9 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild, ViewContainerRef } from '@angular/core'; -import { Bitstream } from '../../../../core/shared/bitstream.model'; +import { Bitstream, SYNCHRONIZED_STORES_NUMBER } from '../../../../core/shared/bitstream.model'; import cloneDeep from 'lodash/cloneDeep'; import { ObjectUpdatesService } from '../../../../core/data/object-updates/object-updates.service'; import { Observable } from 'rxjs'; @@ -63,6 +63,11 @@ export class ItemEditBitstreamComponent implements OnChanges, OnInit { */ format$: Observable; + /** + * The value of the store number if the bitstream is stored in both stores (S3 and local) + */ + syncStoresNumber = SYNCHRONIZED_STORES_NUMBER; + constructor(private objectUpdatesService: ObjectUpdatesService, private dsoNameService: DSONameService, private viewContainerRef: ViewContainerRef) { diff --git a/src/assets/i18n/cs.json5 b/src/assets/i18n/cs.json5 index d806f54d5f1..784183489ec 100644 --- a/src/assets/i18n/cs.json5 +++ b/src/assets/i18n/cs.json5 @@ -3212,6 +3212,9 @@ // "item.edit.bitstreams.empty": "This item doesn't contain any bitstreams. Click the upload button to create one.", "item.edit.bitstreams.empty" : "Tato položka neobsahuje žádné bitstreamy. Klikněte na tlačítko pro nahrání a jeden vytvořte.", + // "item.edit.bitstreams.headers.synchronized": "Synchronized", + "item.edit.bitstreams.headers.synchronized": "Synchronizováno", + // "item.edit.bitstreams.headers.actions": "Actions", "item.edit.bitstreams.headers.actions" : "Akce", diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index f3fdad9ee54..4721c5e73f6 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -2178,6 +2178,8 @@ "item.edit.bitstreams.empty": "This item doesn't contain any bitstreams. Click the upload button to create one.", + "item.edit.bitstreams.headers.synchronized": "Synchronized", + "item.edit.bitstreams.headers.actions": "Actions", "item.edit.bitstreams.headers.bundle": "Bundle",