Skip to content

Commit

Permalink
Merge a87900c into 1103f18
Browse files Browse the repository at this point in the history
  • Loading branch information
atarix83 committed Mar 21, 2019
2 parents 1103f18 + a87900c commit df83389
Show file tree
Hide file tree
Showing 369 changed files with 25,491 additions and 1,673 deletions.
62 changes: 62 additions & 0 deletions config/environment.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,68 @@ module.exports = {
// NOTE: 'fade' | 'fromTop' | 'fromRight' | 'fromBottom' | 'fromLeft' | 'rotate' | 'scale'
animate: 'scale'
},
// Submission settings
submission: {
autosave: {
// NOTE: which metadata trigger an autosave
metadata: ['dc.title', 'dc.identifier.doi', 'dc.identifier.pmid', 'dc.identifier.arxiv'],
// NOTE: every how many minutes submission is saved automatically
timer: 5
},
icons: {
metadata: [
/**
* NOTE: example of configuration
* {
* // NOTE: metadata name
* name: 'dc.author',
* // NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
* style: 'fa-user'
* }
*/
{
name: 'dc.author',
style: 'fas fa-user'
},
// default configuration
{
name: 'default',
style: ''
}
],
authority: {
confidence: [
/**
* NOTE: example of configuration
* {
* // NOTE: confidence value
* value: 'dc.author',
* // NOTE: fontawesome (v4.x) icon classes and bootstrap utility classes can be used
* style: 'fa-user'
* }
*/
{
value: 600,
style: 'text-success'
},
{
value: 500,
style: 'text-info'
},
{
value: 400,
style: 'text-warning'
},
// default configuration
{
value: 'default',
style: 'text-muted'
},

]
}
}
},
// Angular Universal settings
universal: {
preboot: true,
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
"@angular/router": "^6.1.4",
"@angularclass/bootloader": "1.0.1",
"@ng-bootstrap/ng-bootstrap": "^2.0.0",
"@ng-dynamic-forms/core": "6.0.9",
"@ng-dynamic-forms/ui-ng-bootstrap": "6.0.9",
"@ng-dynamic-forms/core": "6.2.0",
"@ng-dynamic-forms/ui-ng-bootstrap": "6.2.0",
"@ngrx/effects": "^6.1.0",
"@ngrx/router-store": "^6.1.0",
"@ngrx/store": "^6.1.0",
Expand All @@ -97,6 +97,7 @@
"express": "4.16.2",
"express-session": "1.15.6",
"fast-json-patch": "^2.0.7",
"file-saver": "^1.3.8",
"font-awesome": "4.7.0",
"fork-ts-checker-webpack-plugin": "^0.4.10",
"http-server": "0.11.1",
Expand Down Expand Up @@ -142,6 +143,7 @@
"@types/deep-freeze": "0.1.1",
"@types/express": "^4.11.1",
"@types/express-serve-static-core": "4.16.0",
"@types/file-saver": "^1.3.0",
"@types/hammerjs": "2.0.35",
"@types/jasmine": "^2.8.6",
"@types/js-cookie": "2.1.0",
Expand Down
108 changes: 107 additions & 1 deletion resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,25 @@
"license": {
"notgranted": "You must grant this license to complete your submission. If you are unable to grant this license at this time you may save your work and return later or remove the submission."
}
},
"submission": {
"sections": {
"init-form-error": "An error occurred during section initialize, please check your input-form configuration. Details are below : <br> <br>"
}
}
},
"form": {
"submit": "Submit",
"cancel": "Cancel",
"search": "Search",
"search-help": "Click here to looking for an existing correspondence",
"remove": "Remove",
"clear": "Clear",
"clear-help": "Click here to remove the selected value",
"edit": "Edit",
"edit-help": "Click here to edit the selected value",
"save": "Save",
"save-help": "Save changes",
"first-name": "First name",
"last-name": "Last name",
"loading": "Loading...",
Expand All @@ -638,7 +650,9 @@
"group-collapse": "Collapse",
"group-expand": "Expand",
"group-collapse-help": "Click here to collapse",
"group-expand-help": "Click here to expand and add more elements"
"group-expand-help": "Click here to expand and add more element",
"other-information": {
}
},
"login": {
"title": "Login",
Expand Down Expand Up @@ -668,5 +682,97 @@
},
"chips": {
"remove": "Remove chip"
},
"submission": {
"general":{
"cannot_submit": "You have not the privilege to make a new submission.",
"deposit": "Deposit",
"discard": {
"submit": "Discard",
"confirm": {
"cancel": "Cancel",
"submit": "Yes, I'm sure",
"title": "Discard submission",
"info": "This operation can't be undone. Are you sure?"
}
},
"save": "Save",
"save-later": "Save for later"
},
"submit": {
"title": "Submission"
},
"edit": {
"title": "Edit Submission"
},
"mydspace": {

},
"sections": {

"general": {
"add-more": "Add more",
"no-sections": "No options available",
"sections_not_valid": "There are incomplete sections.",
"collection": "Collection",
"no-collection": "No collection found",
"search-collection": "Search for a collection",
"save_error_notice": "There was an issue when saving the item, please try again later.",
"deposit_success_notice": "Submission deposited successfully.",
"deposit_error_notice": "There was an issue when submitting the item, please try again later.",
"discard_success_notice": "Submission discarded successfully.",
"discard_error_notice": "There was an issue when discarding the item, please try again later.",
"save_success_notice": "Submission saved successfully.",
"metadata-extracted": "New metadata have been extracted and added to the <strong>{{sectionId}}</strong> section.",
"metadata-extracted-new-section": "New <strong>{{sectionId}}</strong> section has been added to submission."
},
"submit.progressbar.describe.stepone": "Describe",
"submit.progressbar.describe.steptwo": "Describe",
"submit.progressbar.describe.stepcustom": "Describe",
"submit.progressbar.describe.recycle": "Recycle",
"submit.progressbar.upload": "Upload files",
"submit.progressbar.license": "Deposit license",
"submit.progressbar.cclicense": "Creative commons license",
"submit.progressbar.detect-duplicate": "Potential duplicates",

"upload": {
"no-entry": "No",
"no-file-uploaded": "No file uploaded yet.",
"info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or <strong>upload additional files just dragging & dropping them everywhere in the page</strong>",
"drop-message": "Drop files to attach them to the item",
"upload-successful": "Upload successful",
"upload-failed": "Upload failed",
"header.policy.default.nolist": "Uploaded files in the {{collectionName}} collection will be accessible according to the following group(s):",
"header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):",
"form": {
"access-condition-label": "Access condition type",
"from-label": "Access grant from",
"from-placeholder": "From",
"until-label": "Access grant until",
"until-placeholder": "Until",
"group-label": "Group",
"group-required": "Group is required.",
"date-required": "Date is required."
},
"save-metadata": "Save metadata",
"undo": "Cancel",
"delete": {
"submit": "Delete",
"confirm": {
"cancel": "Cancel",
"submit": "Yes, I'm sure",
"title": "Delete bitstream",
"info": "This operation can't be undone. Are you sure?"
}
}
}
}
},
"uploader": {
"drag-message": "Drag & Drop your files here",
"or": ", or",
"browse": "browse",
"queue-lenght": "Queue length",
"processing": "Processing"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MetadataRegistryComponent } from './metadata-registry.component';
import { async, ComponentFixture, fakeAsync, inject, TestBed, tick } from '@angular/core/testing';
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
import { of as observableOf } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
Expand Down Expand Up @@ -44,7 +44,7 @@ describe('MetadataRegistryComponent', () => {
getSelectedMetadataSchemas: () => observableOf([]),
editMetadataSchema: (schema) => {},
cancelEditMetadataSchema: () => {},
deleteMetadataSchema: () => observableOf(new RestResponse(true, '200')),
deleteMetadataSchema: () => observableOf(new RestResponse(true, 200, 'OK')),
deselectAllMetadataSchema: () => {},
clearMetadataSchemaRequests: () => observableOf(undefined)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('MetadataSchemaComponent', () => {
getSelectedMetadataFields: () => observableOf([]),
editMetadataField: (schema) => {},
cancelEditMetadataField: () => {},
deleteMetadataField: () => observableOf(new RestResponse(true, '200')),
deleteMetadataField: () => observableOf(new RestResponse(true, 200, 'OK')),
deselectAllMetadataField: () => {},
clearMetadataFieldRequests: () => observableOf(undefined)
};
Expand Down
2 changes: 1 addition & 1 deletion src/app/+collection-page/collection-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</ds-comcol-page-content>
<!-- Licence -->
<ds-comcol-page-content
[content]="collection.license"
[content]="collection.dcLicense"
[title]="'collection.page.license'">
</ds-comcol-page-content>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {Item} from '../../../core/shared/item.model';
import {RouterStub} from '../../../shared/testing/router-stub';
import {of as observableOf} from 'rxjs';
import {RemoteData} from '../../../core/data/remote-data';
import {NotificationsServiceStub} from '../../../shared/testing/notifications-service-stub';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {RouterTestingModule} from '@angular/router/testing';
import {TranslateModule} from '@ngx-translate/core';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import {ActivatedRoute, Router} from '@angular/router';
import {ItemDataService} from '../../../core/data/item-data.service';
import {NotificationsService} from '../../../shared/notifications/notifications.service';
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
import {By} from '@angular/platform-browser';
import {ItemPrivateComponent} from './item-private.component';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Item } from '../../../core/shared/item.model';
import { RouterStub } from '../../../shared/testing/router-stub';
import { of as observableOf } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ActivatedRoute, Router } from '@angular/router';
import { ItemDataService } from '../../../core/data/item-data.service';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { By } from '@angular/platform-browser';
import { ItemPrivateComponent } from './item-private.component';
import { RestResponse } from '../../../core/cache/response.models';

let comp: ItemPrivateComponent;
Expand Down Expand Up @@ -44,8 +44,8 @@ describe('ItemPrivateComponent', () => {
url: `${itemPageUrl}/edit`
});

mockItemDataService = jasmine.createSpyObj('mockItemDataService',{
setDiscoverable: observableOf(new RestResponse(true, '200'))
mockItemDataService = jasmine.createSpyObj('mockItemDataService', {
setDiscoverable: observableOf(new RestResponse(true, 200, 'OK'))
});

routeStub = {
Expand All @@ -62,19 +62,19 @@ describe('ItemPrivateComponent', () => {
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [ItemPrivateComponent],
providers: [
{provide: ActivatedRoute, useValue: routeStub},
{provide: Router, useValue: routerStub},
{provide: ItemDataService, useValue: mockItemDataService},
{provide: NotificationsService, useValue: notificationsServiceStub},
{ provide: ActivatedRoute, useValue: routeStub },
{ provide: Router, useValue: routerStub },
{ provide: ItemDataService, useValue: mockItemDataService },
{ provide: NotificationsService, useValue: notificationsServiceStub },
], schemas: [
CUSTOM_ELEMENTS_SCHEMA
]
}).compileComponents();
}));

beforeEach(() => {
successfulRestResponse = new RestResponse(true, '200');
failRestResponse = new RestResponse(false, '500');
successfulRestResponse = new RestResponse(true, 200, 'OK');
failRestResponse = new RestResponse(false, 500, 'Internal Server Error');

fixture = TestBed.createComponent(ItemPrivateComponent);
comp = fixture.componentInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ describe('ItemPublicComponent', () => {
url: `${itemPageUrl}/edit`
});

mockItemDataService = jasmine.createSpyObj('mockItemDataService',{
setDiscoverable: observableOf(new RestResponse(true, '200'))
mockItemDataService = jasmine.createSpyObj('mockItemDataService', {
setDiscoverable: observableOf(new RestResponse(true, 200, 'OK'))
});

routeStub = {
Expand All @@ -62,19 +62,19 @@ describe('ItemPublicComponent', () => {
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
declarations: [ItemPublicComponent],
providers: [
{provide: ActivatedRoute, useValue: routeStub},
{provide: Router, useValue: routerStub},
{provide: ItemDataService, useValue: mockItemDataService},
{provide: NotificationsService, useValue: notificationsServiceStub},
{ provide: ActivatedRoute, useValue: routeStub },
{ provide: Router, useValue: routerStub },
{ provide: ItemDataService, useValue: mockItemDataService },
{ provide: NotificationsService, useValue: notificationsServiceStub },
], schemas: [
CUSTOM_ELEMENTS_SCHEMA
]
}).compileComponents();
}));

beforeEach(() => {
successfulRestResponse = new RestResponse(true, '200');
failRestResponse = new RestResponse(false, '500');
successfulRestResponse = new RestResponse(true, 200, 'OK');
failRestResponse = new RestResponse(false, 500, 'Internal Server Error');

fixture = TestBed.createComponent(ItemPublicComponent);
comp = fixture.componentInstance;
Expand Down

0 comments on commit df83389

Please sign in to comment.