-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supply a customizable themed version.
- Loading branch information
1 parent
055ed9b
commit 8a93bef
Showing
4 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<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="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"> | ||
<i class="fa fa-download fa-2x text-normal" aria-hidden="true"></i> | ||
</ds-themed-file-download-link> | ||
<button class="btn btn-link-focus" | ||
[attr.aria-label]="'submission.sections.upload.edit.title' | translate" | ||
title="{{ 'submission.sections.upload.edit.title' | translate }}" | ||
(click)="$event.preventDefault();editBitstreamData();"> | ||
<i class="fa fa-edit fa-2x text-normal"></i> | ||
</button> | ||
<button class="btn btn-link-focus" | ||
[attr.aria-label]="'submission.sections.upload.delete.confirm.title' | translate" | ||
title="{{ 'submission.sections.upload.delete.confirm.title' | translate }}" | ||
[disabled]="(processingDelete$ | async)" | ||
(click)="$event.preventDefault();confirmDelete(content);"> | ||
<i *ngIf="(processingDelete$ | async)" class="fas fa-circle-notch fa-spin fa-2x text-danger"></i> | ||
<i *ngIf="!(processingDelete$ | async)" class="fa fa-trash fa-2x text-danger"></i> | ||
</button> | ||
</ng-container> | ||
</div> | ||
<div class="clearfix"></div> | ||
<ds-submission-section-upload-file-view [fileData]="fileData"></ds-submission-section-upload-file-view> | ||
</div> | ||
</div> | ||
</ng-container> | ||
|
||
<ng-template #content let-c="close" let-d="dismiss"> | ||
<div class="modal-header"> | ||
<h4 class="modal-title text-danger">{{ 'submission.sections.upload.delete.confirm.title' | translate }}</h4> | ||
<button type="button" class="close" aria-label="Close" (click)="d('cancel')"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
<div class="modal-body"> | ||
<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> | ||
</div> | ||
</ng-template> |
Empty file.
89 changes: 89 additions & 0 deletions
89
src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import { | ||
Component, Input, ViewChild | ||
} from '@angular/core'; | ||
|
||
import { | ||
SubmissionFormsModel | ||
} from 'src/app/core/config/models/config-submission-forms.model'; | ||
import { | ||
SubmissionSectionUploadFileEditComponent | ||
} from 'src/app/submission/sections/upload/file/edit/section-upload-file-edit.component'; | ||
import { | ||
SubmissionSectionUploadFileComponent as BaseComponent | ||
} from 'src/app/submission/sections/upload/file/section-upload-file.component'; | ||
|
||
/** | ||
* This component represents a single bitstream contained in the submission | ||
*/ | ||
@Component({ | ||
selector: 'ds-submission-upload-section-file', | ||
// styleUrls: ['./section-upload-file.component.scss'], | ||
styleUrls: ['../../../../../../../app/submission/sections/upload/file/section-upload-file.component.scss'], | ||
// templateUrl: './section-upload-file.component.html' | ||
templateUrl: '../../../../../../../app/submission/sections/upload/file/section-upload-file.component.html' | ||
}) | ||
export class SubmissionSectionUploadFileComponent | ||
extends BaseComponent { | ||
|
||
/** | ||
* The list of available access condition | ||
* @type {Array} | ||
*/ | ||
@Input() availableAccessConditionOptions: any[]; | ||
|
||
/** | ||
* The submission id | ||
* @type {string} | ||
*/ | ||
@Input() collectionId: string; | ||
|
||
/** | ||
* Define if collection access conditions policy type : | ||
* POLICY_DEFAULT_NO_LIST : is not possible to define additional access group/s for the single file | ||
* POLICY_DEFAULT_WITH_LIST : is possible to define additional access group/s for the single file | ||
* @type {number} | ||
*/ | ||
@Input() collectionPolicyType: number; | ||
|
||
/** | ||
* The configuration for the bitstream's metadata form | ||
* @type {SubmissionFormsModel} | ||
*/ | ||
@Input() configMetadataForm: SubmissionFormsModel; | ||
|
||
/** | ||
* The bitstream id | ||
* @type {string} | ||
*/ | ||
@Input() fileId: string; | ||
|
||
/** | ||
* The bitstream array key | ||
* @type {string} | ||
*/ | ||
@Input() fileIndex: string; | ||
|
||
/** | ||
* The bitstream id | ||
* @type {string} | ||
*/ | ||
@Input() fileName: string; | ||
|
||
/** | ||
* The section id | ||
* @type {string} | ||
*/ | ||
@Input() sectionId: string; | ||
|
||
/** | ||
* The submission id | ||
* @type {string} | ||
*/ | ||
@Input() submissionId: string; | ||
|
||
/** | ||
* The [[SubmissionSectionUploadFileEditComponent]] reference | ||
* @type {SubmissionSectionUploadFileEditComponent} | ||
*/ | ||
@ViewChild(SubmissionSectionUploadFileEditComponent) fileEditComp: SubmissionSectionUploadFileEditComponent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters