mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Supply a customizable themed version.
This commit is contained in:
@@ -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>
|
@@ -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;
|
||||||
|
}
|
@@ -141,6 +141,7 @@ import {
|
|||||||
import { NgxGalleryModule } from '@kolkov/ngx-gallery';
|
import { NgxGalleryModule } from '@kolkov/ngx-gallery';
|
||||||
import { WorkspaceItemsDeletePageComponent } from './app/workspace-items-delete-page/workspace-items-delete/workspace-items-delete.component';
|
import { WorkspaceItemsDeletePageComponent } from './app/workspace-items-delete-page/workspace-items-delete/workspace-items-delete.component';
|
||||||
import { ThumbnailComponent } from './app/thumbnail/thumbnail.component';
|
import { ThumbnailComponent } from './app/thumbnail/thumbnail.component';
|
||||||
|
import { SubmissionSectionUploadFileComponent } from './app/submission/sections/upload/file/section-upload-file.component';
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
FileSectionComponent,
|
FileSectionComponent,
|
||||||
@@ -217,6 +218,7 @@ const DECLARATIONS = [
|
|||||||
MediaViewerVideoComponent,
|
MediaViewerVideoComponent,
|
||||||
WorkspaceItemsDeletePageComponent,
|
WorkspaceItemsDeletePageComponent,
|
||||||
ThumbnailComponent,
|
ThumbnailComponent,
|
||||||
|
SubmissionSectionUploadFileComponent,
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
Reference in New Issue
Block a user