+
-
+
diff --git a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts
index 6da37b436b..a3a02bce9b 100644
--- a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts
+++ b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts
@@ -4,12 +4,21 @@ import { TranslateModule } from '@ngx-translate/core';
import { NO_ERRORS_SCHEMA, ViewContainerRef } from '@angular/core';
import { Item } from '../../../../core/shared/item.model';
import { Bundle } from '../../../../core/shared/bundle.model';
+import { ResponsiveTableSizes } from '../../../../shared/responsive-table-sizes/responsive-table-sizes';
+import { ResponsiveColumnSizes } from '../../../../shared/responsive-table-sizes/responsive-column-sizes';
describe('ItemEditBitstreamBundleComponent', () => {
let comp: ItemEditBitstreamBundleComponent;
let fixture: ComponentFixture
;
let viewContainerRef: ViewContainerRef;
+ 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)
+ ]);
+
const item = Object.assign(new Item(), {
id: 'item-1',
uuid: 'item-1'
@@ -35,6 +44,7 @@ describe('ItemEditBitstreamBundleComponent', () => {
comp = fixture.componentInstance;
comp.item = item;
comp.bundle = bundle;
+ comp.columnSizes = columnSizes;
viewContainerRef = (comp as any).viewContainerRef;
spyOn(viewContainerRef, 'createEmbeddedView');
fixture.detectChanges();
diff --git a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts
index c8e12d53b9..bbf896e5cd 100644
--- a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts
+++ b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts
@@ -16,6 +16,8 @@ import { combineLatest as observableCombineLatest } from 'rxjs';
import { hasNoValue, isEmpty } from '../../../../shared/empty.util';
import { PaginatedSearchOptions } from '../../../../shared/search/paginated-search-options.model';
import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
+import { ResponsiveColumnSizes } from '../../../../shared/responsive-table-sizes/responsive-column-sizes';
+import { ResponsiveTableSizes } from '../../../../shared/responsive-table-sizes/responsive-table-sizes';
@Component({
selector: 'ds-item-edit-bitstream-bundle',
@@ -42,10 +44,22 @@ export class ItemEditBitstreamBundleComponent implements OnInit {
*/
@Input() item: Item;
+ /**
+ * The bootstrap sizes used for the columns within this table
+ */
+ @Input() columnSizes: ResponsiveTableSizes;
+
+ /**
+ * The bootstrap sizes used for the Bundle Name column
+ * This column stretches over the first 3 columns and thus is a combination of their sizes processed in ngOnInit
+ */
+ bundleNameColumn: ResponsiveColumnSizes;
+
constructor(private viewContainerRef: ViewContainerRef) {
}
ngOnInit(): void {
+ this.bundleNameColumn = this.columnSizes.combineColumns(0, 2);
this.viewContainerRef.createEmbeddedView(this.bundleView);
}
}
diff --git a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html
index 451e820325..25941f472e 100644
--- a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html
+++ b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.html
@@ -19,7 +19,8 @@
'bg-white': updateValue.changeType === undefined
}">
+ [bundleUrl]="bundle.self"
+ [columnSizes]="columnSizes">
diff --git a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.spec.ts b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.spec.ts
index edb0087b31..dc5c65af30 100644
--- a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.spec.ts
+++ b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.spec.ts
@@ -13,6 +13,8 @@ import { BitstreamFormat } from '../../../../../core/shared/bitstream-format.mod
import { createPaginatedList, createSuccessfulRemoteDataObject$ } from '../../../../../shared/testing/utils';
import { of as observableOf } from 'rxjs/internal/observable/of';
import { take } from 'rxjs/operators';
+import { ResponsiveTableSizes } from '../../../../../shared/responsive-table-sizes/responsive-table-sizes';
+import { ResponsiveColumnSizes } from '../../../../../shared/responsive-table-sizes/responsive-column-sizes';
describe('PaginatedDragAndDropBitstreamListComponent', () => {
let comp: PaginatedDragAndDropBitstreamListComponent;
@@ -20,6 +22,13 @@ describe('PaginatedDragAndDropBitstreamListComponent', () => {
let objectUpdatesService: ObjectUpdatesService;
let bundleService: BundleDataService;
+ 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)
+ ]);
+
const bundle = Object.assign(new Bundle(), {
id: 'bundle-1',
uuid: 'bundle-1',
@@ -104,6 +113,7 @@ describe('PaginatedDragAndDropBitstreamListComponent', () => {
fixture = TestBed.createComponent(PaginatedDragAndDropBitstreamListComponent);
comp = fixture.componentInstance;
comp.bundle = bundle;
+ comp.columnSizes = columnSizes;
fixture.detectChanges();
});
diff --git a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts
index 6ca78dbe89..4c52f5f811 100644
--- a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts
+++ b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts
@@ -6,6 +6,7 @@ import { ObjectUpdatesService } from '../../../../../core/data/object-updates/ob
import { BundleDataService } from '../../../../../core/data/bundle-data.service';
import { switchMap } from 'rxjs/operators';
import { PaginatedSearchOptions } from '../../../../../shared/search/paginated-search-options.model';
+import { ResponsiveTableSizes } from '../../../../../shared/responsive-table-sizes/responsive-table-sizes';
@Component({
selector: 'ds-paginated-drag-and-drop-bitstream-list',
@@ -24,6 +25,11 @@ export class PaginatedDragAndDropBitstreamListComponent extends AbstractPaginate
*/
@Input() bundle: Bundle;
+ /**
+ * The bootstrap sizes used for the columns within this table
+ */
+ @Input() columnSizes: ResponsiveTableSizes;
+
constructor(protected objectUpdatesService: ObjectUpdatesService,
protected elRef: ElementRef,
protected bundleService: BundleDataService) {
diff --git a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html
index 3ddc10be46..0885fa5c32 100644
--- a/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html
+++ b/src/app/+item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html
@@ -1,21 +1,21 @@
-
+
-
+
{{ bitstream.description }}
-
+
{{ (format$ | async).shortDescription }}
-