Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Port dspace-7_x] 🚸remove thumbnail from file-upload section and show bitstream format … #2486

Merged
merged 3 commits into from
Sep 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -29,6 +29,18 @@ export class WorkspaceitemSectionUploadFileObject {
value: string;
};

/**
* The file format information
*/
format: {
shortDescription: string,
description: string,
mimetype: string,
supportLevel: string,
internal: boolean,
type: string
};

/**
* The file url
*/
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
<ng-container *ngIf="fileData">
<div class="row">
<div class="col-md-2">
<!--ds-themed-thumbnail [thumbnail]="bitstreamsList[bitstreamKey].url | async"></ds-themed-thumbnail-->
<ds-themed-thumbnail [thumbnail]="fileData?.thumbnail"></ds-themed-thumbnail>
</div>
<div class="col-md-10">
<div class="col-md-12">
<div class="float-left w-75">
<h3>{{fileName}} <span class="text-muted">({{fileData?.sizeBytes | dsFileSize}})</span></h3>
</div>
<div class="float-right w-15">
<ng-container>
<ds-themed-file-download-link [cssClasses]="'btn btn-link-focus'" [isBlank]="true" [bitstream]="getBitstream()" [enableRequestACopy]="false">
<ds-themed-file-download-link [cssClasses]="'btn btn-link-focus'" [isBlank]="true"
[bitstream]="getBitstream()" [enableRequestACopy]="false">
<i class="fa fa-download fa-2x text-normal" aria-hidden="true"></i>
</ds-themed-file-download-link>
<button class="btn btn-link-focus"
@@ -46,7 +43,9 @@ <h4 class="modal-title text-danger">{{ 'submission.sections.upload.delete.confir
<p>{{ 'submission.sections.upload.delete.confirm.info' | translate }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="c('cancel')">{{ 'submission.sections.upload.delete.confirm.cancel' | translate }}</button>
<button type="button" class="btn btn-danger" (click)="c('ok')">{{ 'submission.sections.upload.delete.confirm.submit' | translate }}</button>
<button type="button" class="btn btn-secondary"
(click)="c('cancel')">{{ 'submission.sections.upload.delete.confirm.cancel' | translate }}</button>
<button type="button" class="btn btn-danger"
(click)="c('ok')">{{ 'submission.sections.upload.delete.confirm.submit' | translate }}</button>
</div>
</ng-template>
Original file line number Diff line number Diff line change
@@ -15,15 +15,23 @@ <h5 *ngIf="metadata[fileTitleKey].indexOf(entry) === 0">
</ng-container>
<ng-container *ngFor="let entry of getAllMetadataValue(fileDescrKey)">
<ng-container *ngIf="entry.value !== ''">
{{entry.value | dsTruncate:['150']}}
{{entry.value | dsTruncate:['150']}}
</ng-container>
<ng-container *ngIf="entry.value === ''">
<span *ngIf="metadata[fileDescrKey].indexOf(entry) === 0" class="text-muted">{{'submission.sections.upload.no-entry' | translate}} {{fileDescrKey}}</span>
<span *ngIf="metadata[fileDescrKey].indexOf(entry) === 0"
class="text-muted">{{'submission.sections.upload.no-entry' | translate}} {{fileDescrKey}}</span>
</ng-container>
<span class="clearfix"></span>
</ng-container>
</ng-container>


<div class="mt-1" *ngIf="fileFormat">
{{'admin.registries.bitstream-formats.edit.head' | translate:{format: fileFormat} }}
</div>
<div class="mt-1" *ngIf="fileCheckSum">
Checksum {{fileCheckSum.checkSumAlgorithm}}: {{fileCheckSum.value}}
</div>
<span class="clearfix"></span>
<ds-submission-section-upload-access-conditions [accessConditions]="fileData.accessConditions"></ds-submission-section-upload-access-conditions>
</div>
Original file line number Diff line number Diff line change
@@ -38,6 +38,13 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit {
*/
public fileDescrKey = 'Description';

public fileFormat!: string;

public fileCheckSum!: {
checkSumAlgorithm: string;
value: string;
};

/**
* Initialize instance variables
*/
@@ -46,6 +53,8 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit {
this.metadata[this.fileTitleKey] = Metadata.all(this.fileData.metadata, 'dc.title');
this.metadata[this.fileDescrKey] = Metadata.all(this.fileData.metadata, 'dc.description');
}
this.fileCheckSum = this.fileData.checkSum;
this.fileFormat = this.fileData.format.shortDescription;
}

/**