Skip to content

Commit 8dd132d

Browse files
DanGastardelligithub-actions[bot]
authored andcommitted
Changing the bitstream title in the submission form to use the view component title, avoiding disappearance with changes to the form
(cherry picked from commit fec4aa6)
1 parent 1cafe15 commit 8dd132d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/app/submission/sections/upload/file/section-upload-file.component.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</div>
1919
<div class="col-md-10">
2020
<div class="float-left w-75">
21-
<h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
21+
<ds-submission-section-upload-file-view [fileData]="fileData"></ds-submission-section-upload-file-view>
2222
</div>
2323
<div class="float-right w-15">
2424
<ng-container>
@@ -43,7 +43,6 @@ <h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})
4343
</ng-container>
4444
</div>
4545
<div class="clearfix"></div>
46-
<ds-submission-section-upload-file-view [fileData]="fileData"></ds-submission-section-upload-file-view>
4746
</div>
4847
</div>
4948
</ng-container>

src/app/submission/sections/upload/file/view/section-upload-file-view.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
<ng-container *ngIf="metadata">
33
<ng-container *ngFor="let entry of getAllMetadataValue(fileTitleKey)">
44
<ng-container *ngIf="entry.value !== ''">
5-
<h5>
5+
<h3>
66
{{entry.value}}
7-
</h5>
7+
<span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span>
8+
</h3>
89
</ng-container>
910
<ng-container *ngIf="entry.value === ''">
1011
<h5 *ngIf="metadata[fileTitleKey].indexOf(entry) === 0">

src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submis
1818
import { isNotEmpty } from '../../../../../shared/empty.util';
1919
import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe';
2020
import { SubmissionSectionUploadAccessConditionsComponent } from '../../accessConditions/submission-section-upload-access-conditions.component';
21+
import { FileSizePipe } from "../../../../../shared/utils/file-size-pipe";
2122

2223
/**
2324
* This component allow to show bitstream's metadata
@@ -31,7 +32,8 @@ import { SubmissionSectionUploadAccessConditionsComponent } from '../../accessCo
3132
TruncatePipe,
3233
NgIf,
3334
NgForOf,
34-
],
35+
FileSizePipe
36+
],
3537
standalone: true,
3638
})
3739
export class SubmissionSectionUploadFileViewComponent implements OnInit {

0 commit comments

Comments
 (0)