diff --git a/resources/i18n/en.json b/resources/i18n/en.json
index 43b90d7165..7489228eb5 100644
--- a/resources/i18n/en.json
+++ b/resources/i18n/en.json
@@ -4,6 +4,12 @@
"link.dspace": "DSpace software",
"link.duraspace": "DuraSpace"
},
+ "collection": {
+ "page": {
+ "news": "News",
+ "license": "License"
+ }
+ },
"item": {
"page": {
"author": "Author",
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 42304c865e..95bfc73517 100755
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -9,6 +9,7 @@ import { SharedModule } from './shared/shared.module';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HeaderComponent } from './header/header.component';
+import { CollectionPageModule } from './collection-page/collection-page.module';
import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
@@ -22,6 +23,7 @@ import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
SharedModule,
HomeModule,
ItemPageModule,
+ CollectionPageModule,
CoreModule.forRoot(),
AppRoutingModule
],
diff --git a/src/app/collection-page/collection-page-routing.module.ts b/src/app/collection-page/collection-page-routing.module.ts
new file mode 100644
index 0000000000..ac8c9b9cb5
--- /dev/null
+++ b/src/app/collection-page/collection-page-routing.module.ts
@@ -0,0 +1,13 @@
+import { NgModule } from '@angular/core';
+import { RouterModule } from '@angular/router';
+
+import { CollectionPageComponent } from './collection-page.component';
+
+@NgModule({
+ imports: [
+ RouterModule.forChild([
+ { path: 'collections/:id', component: CollectionPageComponent }
+ ])
+ ]
+})
+export class CollectionPageRoutingModule { }
diff --git a/src/app/collection-page/collection-page.component.html b/src/app/collection-page/collection-page.component.html
new file mode 100644
index 0000000000..467dcb2a82
--- /dev/null
+++ b/src/app/collection-page/collection-page.component.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/collection-page/collection-page.component.scss b/src/app/collection-page/collection-page.component.scss
new file mode 100644
index 0000000000..da97dd7a62
--- /dev/null
+++ b/src/app/collection-page/collection-page.component.scss
@@ -0,0 +1 @@
+@import '../../styles/variables.scss';
diff --git a/src/app/collection-page/collection-page.component.ts b/src/app/collection-page/collection-page.component.ts
new file mode 100644
index 0000000000..42afe78881
--- /dev/null
+++ b/src/app/collection-page/collection-page.component.ts
@@ -0,0 +1,35 @@
+import { Component, OnInit } from '@angular/core';
+import { ActivatedRoute, Params } from '@angular/router';
+
+import { Collection } from "../core/shared/collection.model";
+import { Bitstream } from "../core/shared/bitstream.model";
+import { RemoteData } from "../core/data/remote-data";
+import { CollectionDataService } from "../core/data/collection-data.service";
+
+@Component({
+ selector: 'ds-collection-page',
+ styleUrls: ['./collection-page.component.css'],
+ templateUrl: './collection-page.component.html',
+})
+export class CollectionPageComponent implements OnInit {
+ collectionData: RemoteData;
+ logoData: RemoteData;
+
+ constructor(
+ private collectionDataService: CollectionDataService,
+ private route: ActivatedRoute
+ ) {
+ this.universalInit();
+ }
+
+ ngOnInit(): void {
+ this.route.params.subscribe((params: Params) => {
+ this.collectionData = this.collectionDataService.findById(params['id'])
+ this.collectionData.payload
+ .subscribe(collection => this.logoData = collection.logo);
+ });
+ }
+
+ universalInit() {
+ }
+}
diff --git a/src/app/collection-page/collection-page.module.ts b/src/app/collection-page/collection-page.module.ts
new file mode 100644
index 0000000000..9b204cb0bb
--- /dev/null
+++ b/src/app/collection-page/collection-page.module.ts
@@ -0,0 +1,33 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { TranslateModule } from "@ngx-translate/core";
+
+import { CollectionPageComponent } from './collection-page.component';
+import { FieldWrapperComponent } from './field-wrapper/field-wrapper.component';
+import { CollectionPageNameComponent } from './name/collection-page-name.component';
+import { CollectionPageLogoComponent } from './logo/collection-page-logo.component';
+import { CollectionPageIntroductoryTextComponent } from './introductory-text/collection-page-introductory-text.component';
+import { CollectionPageNewsComponent } from './news/collection-page-news.component';
+import { CollectionPageCopyrightComponent } from './copyright/collection-page-copyright.component';
+import { CollectionPageLicenseComponent } from './license/collection-page-license.component';
+import { CollectionPageRoutingModule } from './collection-page-routing.module';
+
+@NgModule({
+ imports: [
+ CollectionPageRoutingModule,
+ CommonModule,
+ TranslateModule,
+ ],
+ declarations: [
+ CollectionPageComponent,
+ FieldWrapperComponent,
+ CollectionPageNameComponent,
+ CollectionPageLogoComponent,
+ CollectionPageIntroductoryTextComponent,
+ CollectionPageNewsComponent,
+ CollectionPageCopyrightComponent,
+ CollectionPageLicenseComponent,
+ ]
+})
+export class CollectionPageModule { }
diff --git a/src/app/collection-page/copyright/collection-page-copyright.component.html b/src/app/collection-page/copyright/collection-page-copyright.component.html
new file mode 100644
index 0000000000..db7b77d614
--- /dev/null
+++ b/src/app/collection-page/copyright/collection-page-copyright.component.html
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/app/collection-page/copyright/collection-page-copyright.component.scss b/src/app/collection-page/copyright/collection-page-copyright.component.scss
new file mode 100644
index 0000000000..ad84b72f8c
--- /dev/null
+++ b/src/app/collection-page/copyright/collection-page-copyright.component.scss
@@ -0,0 +1 @@
+@import '../../../styles/variables.scss';
\ No newline at end of file
diff --git a/src/app/collection-page/copyright/collection-page-copyright.component.ts b/src/app/collection-page/copyright/collection-page-copyright.component.ts
new file mode 100644
index 0000000000..e4bc21553f
--- /dev/null
+++ b/src/app/collection-page/copyright/collection-page-copyright.component.ts
@@ -0,0 +1,11 @@
+import { Component, Input } from '@angular/core';
+
+
+@Component({
+ selector: 'ds-collection-page-copyright',
+ styleUrls: ['./collection-page-copyright.component.css'],
+ templateUrl: './collection-page-copyright.component.html',
+})
+export class CollectionPageCopyrightComponent {
+ @Input() copyrightText: String;
+}
diff --git a/src/app/collection-page/field-wrapper/field-wrapper.component.html b/src/app/collection-page/field-wrapper/field-wrapper.component.html
new file mode 100644
index 0000000000..677ff2f918
--- /dev/null
+++ b/src/app/collection-page/field-wrapper/field-wrapper.component.html
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/app/collection-page/field-wrapper/field-wrapper.component.scss b/src/app/collection-page/field-wrapper/field-wrapper.component.scss
new file mode 100644
index 0000000000..ad84b72f8c
--- /dev/null
+++ b/src/app/collection-page/field-wrapper/field-wrapper.component.scss
@@ -0,0 +1 @@
+@import '../../../styles/variables.scss';
\ No newline at end of file
diff --git a/src/app/collection-page/field-wrapper/field-wrapper.component.ts b/src/app/collection-page/field-wrapper/field-wrapper.component.ts
new file mode 100644
index 0000000000..c8420661ea
--- /dev/null
+++ b/src/app/collection-page/field-wrapper/field-wrapper.component.ts
@@ -0,0 +1,11 @@
+import { Component, Input } from '@angular/core';
+
+
+@Component({
+ selector: 'ds-field-wrapper',
+ styleUrls: ['./field-wrapper.component.css'],
+ templateUrl: './field-wrapper.component.html',
+})
+export class FieldWrapperComponent {
+ @Input() name: String;
+}
diff --git a/src/app/collection-page/introductory-text/collection-page-introductory-text.component.html b/src/app/collection-page/introductory-text/collection-page-introductory-text.component.html
new file mode 100644
index 0000000000..904a6d7f21
--- /dev/null
+++ b/src/app/collection-page/introductory-text/collection-page-introductory-text.component.html
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/app/collection-page/introductory-text/collection-page-introductory-text.component.scss b/src/app/collection-page/introductory-text/collection-page-introductory-text.component.scss
new file mode 100644
index 0000000000..ad84b72f8c
--- /dev/null
+++ b/src/app/collection-page/introductory-text/collection-page-introductory-text.component.scss
@@ -0,0 +1 @@
+@import '../../../styles/variables.scss';
\ No newline at end of file
diff --git a/src/app/collection-page/introductory-text/collection-page-introductory-text.component.ts b/src/app/collection-page/introductory-text/collection-page-introductory-text.component.ts
new file mode 100644
index 0000000000..f6526c9943
--- /dev/null
+++ b/src/app/collection-page/introductory-text/collection-page-introductory-text.component.ts
@@ -0,0 +1,11 @@
+import { Component, Input } from '@angular/core';
+
+
+@Component({
+ selector: 'ds-collection-page-introductory-text',
+ styleUrls: ['./collection-page-introductory-text.component.css'],
+ templateUrl: './collection-page-introductory-text.component.html',
+})
+export class CollectionPageIntroductoryTextComponent {
+ @Input() introductoryText: String;
+}
diff --git a/src/app/collection-page/license/collection-page-license.component.html b/src/app/collection-page/license/collection-page-license.component.html
new file mode 100644
index 0000000000..af0a6e4261
--- /dev/null
+++ b/src/app/collection-page/license/collection-page-license.component.html
@@ -0,0 +1,4 @@
+
+ {{ 'collection.page.license' | translate }}
+ {{ license }}
+
\ No newline at end of file
diff --git a/src/app/collection-page/license/collection-page-license.component.scss b/src/app/collection-page/license/collection-page-license.component.scss
new file mode 100644
index 0000000000..ad84b72f8c
--- /dev/null
+++ b/src/app/collection-page/license/collection-page-license.component.scss
@@ -0,0 +1 @@
+@import '../../../styles/variables.scss';
\ No newline at end of file
diff --git a/src/app/collection-page/license/collection-page-license.component.ts b/src/app/collection-page/license/collection-page-license.component.ts
new file mode 100644
index 0000000000..8f269cca8c
--- /dev/null
+++ b/src/app/collection-page/license/collection-page-license.component.ts
@@ -0,0 +1,11 @@
+import { Component, Input } from '@angular/core';
+
+
+@Component({
+ selector: 'ds-collection-page-license',
+ styleUrls: ['./collection-page-license.component.css'],
+ templateUrl: './collection-page-license.component.html',
+})
+export class CollectionPageLicenseComponent {
+ @Input() license: String;
+}
diff --git a/src/app/collection-page/logo/collection-page-logo.component.html b/src/app/collection-page/logo/collection-page-logo.component.html
new file mode 100644
index 0000000000..1c331e2e25
--- /dev/null
+++ b/src/app/collection-page/logo/collection-page-logo.component.html
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/app/collection-page/logo/collection-page-logo.component.scss b/src/app/collection-page/logo/collection-page-logo.component.scss
new file mode 100644
index 0000000000..ad84b72f8c
--- /dev/null
+++ b/src/app/collection-page/logo/collection-page-logo.component.scss
@@ -0,0 +1 @@
+@import '../../../styles/variables.scss';
\ No newline at end of file
diff --git a/src/app/collection-page/logo/collection-page-logo.component.ts b/src/app/collection-page/logo/collection-page-logo.component.ts
new file mode 100644
index 0000000000..22c34422ea
--- /dev/null
+++ b/src/app/collection-page/logo/collection-page-logo.component.ts
@@ -0,0 +1,13 @@
+import { Component, Input } from '@angular/core';
+
+import { Bitstream } from "../../core/shared/bitstream.model";
+
+
+@Component({
+ selector: 'ds-collection-page-logo',
+ styleUrls: ['./collection-page-logo.component.css'],
+ templateUrl: './collection-page-logo.component.html',
+})
+export class CollectionPageLogoComponent {
+ @Input() logo: Bitstream;
+}
diff --git a/src/app/collection-page/name/collection-page-name.component.html b/src/app/collection-page/name/collection-page-name.component.html
new file mode 100644
index 0000000000..21f1f65331
--- /dev/null
+++ b/src/app/collection-page/name/collection-page-name.component.html
@@ -0,0 +1 @@
+{{ name }}
\ No newline at end of file
diff --git a/src/app/collection-page/name/collection-page-name.component.scss b/src/app/collection-page/name/collection-page-name.component.scss
new file mode 100644
index 0000000000..ad84b72f8c
--- /dev/null
+++ b/src/app/collection-page/name/collection-page-name.component.scss
@@ -0,0 +1 @@
+@import '../../../styles/variables.scss';
\ No newline at end of file
diff --git a/src/app/collection-page/name/collection-page-name.component.ts b/src/app/collection-page/name/collection-page-name.component.ts
new file mode 100644
index 0000000000..30121fd01b
--- /dev/null
+++ b/src/app/collection-page/name/collection-page-name.component.ts
@@ -0,0 +1,11 @@
+import { Component, Input } from '@angular/core';
+
+
+@Component({
+ selector: 'ds-collection-page-name',
+ styleUrls: ['./collection-page-name.component.css'],
+ templateUrl: './collection-page-name.component.html',
+})
+export class CollectionPageNameComponent {
+ @Input() name: String;
+}
diff --git a/src/app/collection-page/news/collection-page-news.component.html b/src/app/collection-page/news/collection-page-news.component.html
new file mode 100644
index 0000000000..bd17c7ea77
--- /dev/null
+++ b/src/app/collection-page/news/collection-page-news.component.html
@@ -0,0 +1,4 @@
+
+ {{ 'collection.page.news' | translate }}
+
+
\ No newline at end of file
diff --git a/src/app/collection-page/news/collection-page-news.component.scss b/src/app/collection-page/news/collection-page-news.component.scss
new file mode 100644
index 0000000000..ad84b72f8c
--- /dev/null
+++ b/src/app/collection-page/news/collection-page-news.component.scss
@@ -0,0 +1 @@
+@import '../../../styles/variables.scss';
\ No newline at end of file
diff --git a/src/app/collection-page/news/collection-page-news.component.ts b/src/app/collection-page/news/collection-page-news.component.ts
new file mode 100644
index 0000000000..479c37a7c6
--- /dev/null
+++ b/src/app/collection-page/news/collection-page-news.component.ts
@@ -0,0 +1,11 @@
+import { Component, Input } from '@angular/core';
+
+
+@Component({
+ selector: 'ds-collection-page-news',
+ styleUrls: ['./collection-page-news.component.css'],
+ templateUrl: './collection-page-news.component.html',
+})
+export class CollectionPageNewsComponent {
+ @Input() sidebarText: String;
+}
diff --git a/src/app/core/cache/models/normalized-bitstream.model.ts b/src/app/core/cache/models/normalized-bitstream.model.ts
index b6df211c2e..c89cf5dc05 100644
--- a/src/app/core/cache/models/normalized-bitstream.model.ts
+++ b/src/app/core/cache/models/normalized-bitstream.model.ts
@@ -16,6 +16,7 @@ export class NormalizedBitstream extends NormalizedDSpaceObject {
/**
* The relative path to this Bitstream's file
*/
+ @autoserialize
url: string;
/**
diff --git a/src/app/core/cache/models/normalized-collection.model.ts b/src/app/core/cache/models/normalized-collection.model.ts
index 9b31f34837..cc6a4173e8 100644
--- a/src/app/core/cache/models/normalized-collection.model.ts
+++ b/src/app/core/cache/models/normalized-collection.model.ts
@@ -17,6 +17,8 @@ export class NormalizedCollection extends NormalizedDSpaceObject {
/**
* The Bitstream that represents the logo of this Collection
*/
+ @autoserialize
+ @relationship(NormalizedDSOType.NormalizedBitstream)
logo: string;
/**
diff --git a/src/backend/bitstreams.ts b/src/backend/bitstreams.ts
index df10fae3e1..67ab3dbe76 100644
--- a/src/backend/bitstreams.ts
+++ b/src/backend/bitstreams.ts
@@ -63,5 +63,18 @@ export const BITSTREAMS = [
],
"format": "Text",
"mimetype": "text/plain"
- }
+ },
+ {
+ "_links": {
+ "self": { "href": "/bitstreams/4688" },
+ },
+ "id": "4688",
+ "uuid": "1bb1be24-c934-41e3-a0fb-ca7a71ab0e71",
+ "type": "bitstream",
+ "name": "collection-5179-logo.png",
+ "size": 299832,
+ "url": "/bitstreams/1bb1be24-c934-41e3-a0fb-ca7a71ab0e71/retrieve",
+ "format": "PNG",
+ "mimetype": "image/png"
+ },
];
diff --git a/src/backend/collections.ts b/src/backend/collections.ts
index c701b38ed4..995f93f98c 100644
--- a/src/backend/collections.ts
+++ b/src/backend/collections.ts
@@ -5,7 +5,8 @@ export const COLLECTIONS = [
"items": [
{ "href": "/items/8871" },
{ "href": "/items/9978" }
- ]
+ ],
+ "logo": { "href": "/bitstreams/4688" }
},
"id": "5179",
"uuid": "9e32a2e2-6b91-4236-a361-995ccdc14c60",
diff --git a/src/server.routes.ts b/src/server.routes.ts
index 704ea15df5..19ba0264aa 100644
--- a/src/server.routes.ts
+++ b/src/server.routes.ts
@@ -10,5 +10,5 @@
* ];
**/
export const routes: string[] = [
- 'home', 'items/:id' , '**'
+ 'home', 'items/:id' , 'collections/:id', '**'
];