diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..5889e7a85c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,21 @@ +.git +node-modules +__build__ +__server_build__ +typings +tsd_typings +npm-debug.log +dist +coverage +.idea +*.iml +*.ngfactory.ts +*.css.shim.ts +*.scss.shim.ts +.DS_Store +webpack.records.json +npm-debug.log.* +morgan.log +yarn-error.log +*.css +package-lock.json diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..f10164ebd0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +# This image will be published as dspace/dspace-angular +# See https://dspace-labs.github.io/DSpace-Docker-Images/ for usage details + +FROM node:8-alpine +WORKDIR /app +ADD . /app/ +EXPOSE 3000 + +RUN yarn install +CMD yarn run watch diff --git a/package.json b/package.json index 7ded007e83..0936b27ea4 100644 --- a/package.json +++ b/package.json @@ -90,11 +90,12 @@ "@ngx-translate/http-loader": "2.0.1", "@nicky-lenaers/ngx-scroll-to": "^0.6.0", "angular-idle-preload": "2.0.4", + "angular2-moment": "^1.9.0", "angular-sortablejs": "^2.5.0", "angular2-text-mask": "8.0.4", "angulartics2": "^5.2.0", "body-parser": "1.18.2", - "bootstrap": "^4.0.0", + "bootstrap": "4.1.1", "cerialize": "0.1.18", "compression": "1.7.1", "cookie-parser": "1.4.3", @@ -109,10 +110,13 @@ "jsonschema": "1.2.2", "jwt-decode": "^2.2.0", "methods": "1.1.2", + "moment": "^2.22.1", "morgan": "1.9.0", + "ng2-nouislider": "^1.7.11", "ng2-file-upload": "1.2.1", "ngx-infinite-scroll": "0.8.2", "ngx-pagination": "3.0.3", + "nouislider": "^11.0.0", "pem": "1.12.3", "reflect-metadata": "0.1.12", "rxjs": "5.5.6", diff --git a/resources/i18n/en.json b/resources/i18n/en.json index f08213df06..c7cb9a5ba7 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -59,8 +59,13 @@ } }, "sorting": { - "ASC": "Ascending", - "DESC": "Descending" + "score": { + "DESC": "Relevance" + }, + "dc.title": { + "ASC": "Title Ascending", + "DESC": "Title Descending" + } }, "title": "DSpace", "404": { @@ -93,13 +98,13 @@ "close": "Back to results", "open": "Search Tools", "results": "results", - "filters":{ - "title":"Filters" + "filters": { + "title": "Filters" }, - "settings":{ - "title":"Settings", - "sort-by":"Sort By", - "rpp":"Results per page" + "settings": { + "title": "Settings", + "sort-by": "Sort By", + "rpp": "Results per page" } }, "view-switch": { @@ -109,6 +114,13 @@ "filters": { "head": "Filters", "reset": "Reset filters", + "applied": { + "f.author": "Author", + "f.dateIssued.min": "Start date", + "f.dateIssued.max": "End date", + "f.subject": "Subject", + "f.has_content_in_original_bundle": "Has files" + }, "filter": { "show-more": "Show more", "show-less": "Collapse", @@ -125,11 +137,15 @@ "head": "Subject" }, "dateIssued": { - "placeholder": "Date", + "max": { + "placeholder": "Minimum Date" + }, + "min": { + "placeholder": "Maximum Date" + }, "head": "Date" }, "has_content_in_original_bundle": { - "placeholder": "Has files", "head": "Has files" } } diff --git a/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.html b/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.html index b04e93ff71..12c2578d9c 100644 --- a/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.html +++ b/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.html @@ -2,7 +2,7 @@
{{collection.name}}
{{collection.shortDescription}}
diff --git a/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.ts b/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.ts
index fc69719896..aed2b69a30 100644
--- a/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.ts
+++ b/src/app/+community-page/sub-collection-list/community-page-sub-collection-list.component.ts
@@ -6,6 +6,7 @@ import { Collection } from '../../core/shared/collection.model';
import { Community } from '../../core/shared/community.model';
import { fadeIn } from '../../shared/animations/fade';
+import { PaginatedList } from '../../core/data/paginated-list';
@Component({
selector: 'ds-community-page-sub-collection-list',
@@ -15,7 +16,7 @@ import { fadeIn } from '../../shared/animations/fade';
})
export class CommunityPageSubCollectionListComponent implements OnInit {
@Input() community: Community;
- subCollectionsRDObs: Observable
';
+
+ }));
+
+ describe('When the requested item request has succeeded', () => {
+ beforeEach(() => {
+ collectionsComponent.item = succeededMockItem;
+ fixture.detectChanges();
+ });
+
+ it('should show the collection', () => {
+ const collectionField = fixture.debugElement.query(By.css('ds-metadata-field-wrapper div.collections'));
+ expect(collectionField).not.toBeNull();
+ });
+ });
+
+ describe('When the requested item request has failed', () => {
+ beforeEach(() => {
+ collectionsComponent.item = failedMockItem;
+ fixture.detectChanges();
+ });
+
+ it('should not show the collection', () => {
+ const collectionField = fixture.debugElement.query(By.css('ds-metadata-field-wrapper div.collections'));
+ expect(collectionField).toBeNull();
+ });
+ });
+});
diff --git a/src/app/+item-page/field-components/collections/collections.component.ts b/src/app/+item-page/field-components/collections/collections.component.ts
index 8b7b5d7f58..83bb0d464d 100644
--- a/src/app/+item-page/field-components/collections/collections.component.ts
+++ b/src/app/+item-page/field-components/collections/collections.component.ts
@@ -38,4 +38,8 @@ export class CollectionsComponent implements OnInit {
this.collections = this.item.owner.map((rd: RemoteData{{'search.filters.filter.' + filter.name + '.head'| translate}}
{{"search.filters.head" | translate}}
{{ 'search.sidebar.settings.title' | translate}}
-{{ 'search.sidebar.settings.title' | translate}}
+ {{ 'search.sidebar.settings.sort-by' | translate}}
-{{ 'search.sidebar.settings.rpp' | translate}}
-
-
-{{ 'search.sidebar.settings.rpp' | translate}}
+
+