diff --git a/resources/i18n/en.json b/resources/i18n/en.json index 7489228eb5..82a51f2ebd 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -10,6 +10,15 @@ "license": "License" } }, + "community": { + "page": { + "news": "News", + "license": "License" + }, + "sub-collection-list": { + "head": "Collections of this Community" + } + }, "item": { "page": { "author": "Author", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 95bfc73517..8a20dee66d 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -10,6 +10,7 @@ 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 { CommunityPageModule } from './community-page/community-page.module'; import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component'; @@ -24,6 +25,7 @@ import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component'; HomeModule, ItemPageModule, CollectionPageModule, + CommunityPageModule, CoreModule.forRoot(), AppRoutingModule ], diff --git a/src/app/collection-page/collection-page.component.html b/src/app/collection-page/collection-page.component.html index e9a4ab9916..64520d3e84 100644 --- a/src/app/collection-page/collection-page.component.html +++ b/src/app/collection-page/collection-page.component.html @@ -1,16 +1,32 @@
- - - - - - - - - - + + + + + + + + + + + + + + + + + +
diff --git a/src/app/collection-page/collection-page.component.ts b/src/app/collection-page/collection-page.component.ts index 42afe78881..a7148cbc74 100644 --- a/src/app/collection-page/collection-page.component.ts +++ b/src/app/collection-page/collection-page.component.ts @@ -1,19 +1,21 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnDestroy, 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"; +import { Subscription } from "rxjs/Subscription"; @Component({ selector: 'ds-collection-page', styleUrls: ['./collection-page.component.css'], templateUrl: './collection-page.component.html', }) -export class CollectionPageComponent implements OnInit { +export class CollectionPageComponent implements OnInit, OnDestroy { collectionData: RemoteData; logoData: RemoteData; + private subs: Subscription[] = []; constructor( private collectionDataService: CollectionDataService, @@ -24,12 +26,16 @@ export class CollectionPageComponent implements OnInit { ngOnInit(): void { this.route.params.subscribe((params: Params) => { - this.collectionData = this.collectionDataService.findById(params['id']) - this.collectionData.payload - .subscribe(collection => this.logoData = collection.logo); + this.collectionData = this.collectionDataService.findById(params['id']); + this.subs.push(this.collectionData.payload + .subscribe(collection => this.logoData = collection.logo)); }); } + ngOnDestroy(): void { + this.subs.forEach(sub => sub.unsubscribe()); + } + universalInit() { } } diff --git a/src/app/collection-page/collection-page.module.ts b/src/app/collection-page/collection-page.module.ts index 9b204cb0bb..0dfe33fd5a 100644 --- a/src/app/collection-page/collection-page.module.ts +++ b/src/app/collection-page/collection-page.module.ts @@ -3,14 +3,8 @@ import { CommonModule } from '@angular/common'; import { TranslateModule } from "@ngx-translate/core"; +import { SharedModule } from '../shared/shared.module'; 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({ @@ -18,16 +12,10 @@ import { CollectionPageRoutingModule } from './collection-page-routing.module'; CollectionPageRoutingModule, CommonModule, TranslateModule, + SharedModule, ], 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 deleted file mode 100644 index db7b77d614..0000000000 --- a/src/app/collection-page/copyright/collection-page-copyright.component.html +++ /dev/null @@ -1,3 +0,0 @@ - -

-
\ 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 deleted file mode 100644 index e4bc21553f..0000000000 --- a/src/app/collection-page/copyright/collection-page-copyright.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 677ff2f918..0000000000 --- a/src/app/collection-page/field-wrapper/field-wrapper.component.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ 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 deleted file mode 100644 index c8420661ea..0000000000 --- a/src/app/collection-page/field-wrapper/field-wrapper.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 904a6d7f21..0000000000 --- a/src/app/collection-page/introductory-text/collection-page-introductory-text.component.html +++ /dev/null @@ -1,3 +0,0 @@ - -

-
\ 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 deleted file mode 100644 index f6526c9943..0000000000 --- a/src/app/collection-page/introductory-text/collection-page-introductory-text.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index af0a6e4261..0000000000 --- a/src/app/collection-page/license/collection-page-license.component.html +++ /dev/null @@ -1,4 +0,0 @@ - -

{{ 'collection.page.license' | translate }}

-

{{ license }}

-
\ 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 deleted file mode 100644 index 8f269cca8c..0000000000 --- a/src/app/collection-page/license/collection-page-license.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 090bbe3bbd..0000000000 --- a/src/app/collection-page/logo/collection-page-logo.component.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/src/app/collection-page/logo/collection-page-logo.component.scss b/src/app/collection-page/logo/collection-page-logo.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/collection-page/logo/collection-page-logo.component.scss +++ /dev/null @@ -1 +0,0 @@ -@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 deleted file mode 100644 index 22c34422ea..0000000000 --- a/src/app/collection-page/logo/collection-page-logo.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -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.scss b/src/app/collection-page/name/collection-page-name.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/collection-page/name/collection-page-name.component.scss +++ /dev/null @@ -1 +0,0 @@ -@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 deleted file mode 100644 index 30121fd01b..0000000000 --- a/src/app/collection-page/name/collection-page-name.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index bd17c7ea77..0000000000 --- a/src/app/collection-page/news/collection-page-news.component.html +++ /dev/null @@ -1,4 +0,0 @@ - -

{{ '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 deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/collection-page/news/collection-page-news.component.scss +++ /dev/null @@ -1 +0,0 @@ -@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 deleted file mode 100644 index 479c37a7c6..0000000000 --- a/src/app/collection-page/news/collection-page-news.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -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/community-page/community-page-routing.module.ts b/src/app/community-page/community-page-routing.module.ts new file mode 100644 index 0000000000..40585617f6 --- /dev/null +++ b/src/app/community-page/community-page-routing.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import { CommunityPageComponent } from './community-page.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: 'communities/:id', component: CommunityPageComponent } + ]) + ] +}) +export class CommunityPageRoutingModule { } diff --git a/src/app/community-page/community-page.component.html b/src/app/community-page/community-page.component.html new file mode 100644 index 0000000000..8a1fbdf18c --- /dev/null +++ b/src/app/community-page/community-page.component.html @@ -0,0 +1,26 @@ +
+ + + + + + + + + + + + + + + +
diff --git a/src/app/community-page/community-page.component.scss b/src/app/community-page/community-page.component.scss new file mode 100644 index 0000000000..da97dd7a62 --- /dev/null +++ b/src/app/community-page/community-page.component.scss @@ -0,0 +1 @@ +@import '../../styles/variables.scss'; diff --git a/src/app/community-page/community-page.component.ts b/src/app/community-page/community-page.component.ts new file mode 100644 index 0000000000..e1434fb21f --- /dev/null +++ b/src/app/community-page/community-page.component.ts @@ -0,0 +1,41 @@ +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { ActivatedRoute, Params } from '@angular/router'; + +import { Community } from "../core/shared/community.model"; +import { Bitstream } from "../core/shared/bitstream.model"; +import { RemoteData } from "../core/data/remote-data"; +import { CommunityDataService } from "../core/data/community-data.service"; +import { Subscription } from "rxjs/Subscription"; + +@Component({ + selector: 'ds-community-page', + styleUrls: ['./community-page.component.css'], + templateUrl: './community-page.component.html', +}) +export class CommunityPageComponent implements OnInit, OnDestroy { + communityData: RemoteData; + logoData: RemoteData; + private subs: Subscription[] = []; + + constructor( + private communityDataService: CommunityDataService, + private route: ActivatedRoute + ) { + this.universalInit(); + } + + ngOnInit(): void { + this.route.params.subscribe((params: Params) => { + this.communityData = this.communityDataService.findById(params['id']); + this.subs.push(this.communityData.payload + .subscribe(community => this.logoData = community.logo)); + }); + } + + ngOnDestroy(): void { + this.subs.forEach(sub => sub.unsubscribe()); + } + + universalInit() { + } +} \ No newline at end of file diff --git a/src/app/community-page/community-page.module.ts b/src/app/community-page/community-page.module.ts new file mode 100644 index 0000000000..1410e786b7 --- /dev/null +++ b/src/app/community-page/community-page.module.ts @@ -0,0 +1,25 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule } from "@angular/router"; + +import { TranslateModule } from "@ngx-translate/core"; + +import { SharedModule } from '../shared/shared.module'; +import { CommunityPageComponent } from './community-page.component'; +import { CommunityPageSubCollectionListComponent } from './sub-collection-list/community-page-sub-collection-list.component'; +import { CommunityPageRoutingModule } from './community-page-routing.module'; + +@NgModule({ + imports: [ + CommunityPageRoutingModule, + CommonModule, + TranslateModule, + RouterModule, + SharedModule, + ], + declarations: [ + CommunityPageComponent, + CommunityPageSubCollectionListComponent, + ] +}) +export class CommunityPageModule { } 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 new file mode 100644 index 0000000000..f1f05a0467 --- /dev/null +++ b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.html @@ -0,0 +1,11 @@ +
+

{{'community.sub-collection-list.head' | translate}}

+ +
diff --git a/src/app/collection-page/copyright/collection-page-copyright.component.scss b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.scss similarity index 100% rename from src/app/collection-page/copyright/collection-page-copyright.component.scss rename to src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.scss 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 new file mode 100644 index 0000000000..f3c39914ee --- /dev/null +++ b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts @@ -0,0 +1,28 @@ +import { Component, OnInit } from '@angular/core'; +import { CollectionDataService } from "../../core/data/collection-data.service"; +import { RemoteData } from "../../core/data/remote-data"; +import { Collection } from "../../core/shared/collection.model"; + + +@Component({ + selector: 'ds-community-page-sub-collection-list', + styleUrls: ['./community-page-sub-collection-list.component.css'], + templateUrl: './community-page-sub-collection-list.component.html', +}) +export class CommunityPageSubCollectionListComponent implements OnInit { + subCollections: RemoteData; + + constructor( + private cds: CollectionDataService + ) { + this.universalInit(); + } + + universalInit() { + + } + + ngOnInit(): void { + this.subCollections = this.cds.findAll(); + } +} diff --git a/src/app/core/cache/models/normalized-community.model.ts b/src/app/core/cache/models/normalized-community.model.ts index 07583e0ef3..f0e7c5681d 100644 --- a/src/app/core/cache/models/normalized-community.model.ts +++ b/src/app/core/cache/models/normalized-community.model.ts @@ -17,6 +17,8 @@ export class NormalizedCommunity extends NormalizedDSpaceObject { /** * The Bitstream that represents the logo of this Community */ + @autoserialize + @relationship(ResourceType.Bitstream) logo: string; /** diff --git a/src/app/shared/comcol-page-content/comcol-page-content.component.html b/src/app/shared/comcol-page-content/comcol-page-content.component.html new file mode 100644 index 0000000000..4a0be8cfc7 --- /dev/null +++ b/src/app/shared/comcol-page-content/comcol-page-content.component.html @@ -0,0 +1,5 @@ +
+

{{ title | translate }}

+
+
{{content}}
+
\ No newline at end of file diff --git a/src/app/collection-page/field-wrapper/field-wrapper.component.scss b/src/app/shared/comcol-page-content/comcol-page-content.component.scss similarity index 100% rename from src/app/collection-page/field-wrapper/field-wrapper.component.scss rename to src/app/shared/comcol-page-content/comcol-page-content.component.scss diff --git a/src/app/shared/comcol-page-content/comcol-page-content.component.ts b/src/app/shared/comcol-page-content/comcol-page-content.component.ts new file mode 100644 index 0000000000..da679d31b2 --- /dev/null +++ b/src/app/shared/comcol-page-content/comcol-page-content.component.ts @@ -0,0 +1,37 @@ +import { Component, Input } from '@angular/core'; + +/** + * This component renders any content inside of this component. + * If there is a title set it will render the title. + * If hasInnerHtml is true the content will be handled as html. + * To see how it is used see collection-page or community-page. + */ + +@Component({ + selector: 'ds-comcol-page-content', + styleUrls: ['./comcol-page-content.component.css'], + templateUrl: './comcol-page-content.component.html' +}) +export class ComcolPageContentComponent { + + // Optional title + @Input() title: string; + + // The content to render. Might be html + @Input() content: string; + + // flag whether the content contains html syntax or not + @Input() hasInnerHtml: boolean; + + + + constructor() { + this.universalInit(); + + } + + universalInit() { + + } + +} diff --git a/src/app/collection-page/name/collection-page-name.component.html b/src/app/shared/comcol-page-header/comcol-page-header.component.html similarity index 100% rename from src/app/collection-page/name/collection-page-name.component.html rename to src/app/shared/comcol-page-header/comcol-page-header.component.html diff --git a/src/app/collection-page/introductory-text/collection-page-introductory-text.component.scss b/src/app/shared/comcol-page-header/comcol-page-header.component.scss similarity index 100% rename from src/app/collection-page/introductory-text/collection-page-introductory-text.component.scss rename to src/app/shared/comcol-page-header/comcol-page-header.component.scss diff --git a/src/app/shared/comcol-page-header/comcol-page-header.component.ts b/src/app/shared/comcol-page-header/comcol-page-header.component.ts new file mode 100644 index 0000000000..f6578ace29 --- /dev/null +++ b/src/app/shared/comcol-page-header/comcol-page-header.component.ts @@ -0,0 +1,11 @@ +import { Component, Input } from '@angular/core'; + + +@Component({ + selector: 'ds-comcol-page-header', + styleUrls: ['./comcol-page-header.component.css'], + templateUrl: './comcol-page-header.component.html', +}) +export class ComcolPageHeaderComponent { + @Input() name: String; +} diff --git a/src/app/shared/comcol-page-logo/comcol-page-logo.component.html b/src/app/shared/comcol-page-logo/comcol-page-logo.component.html new file mode 100644 index 0000000000..da1b4418b7 --- /dev/null +++ b/src/app/shared/comcol-page-logo/comcol-page-logo.component.html @@ -0,0 +1,3 @@ + diff --git a/src/app/collection-page/license/collection-page-license.component.scss b/src/app/shared/comcol-page-logo/comcol-page-logo.component.scss similarity index 100% rename from src/app/collection-page/license/collection-page-license.component.scss rename to src/app/shared/comcol-page-logo/comcol-page-logo.component.scss diff --git a/src/app/shared/comcol-page-logo/comcol-page-logo.component.ts b/src/app/shared/comcol-page-logo/comcol-page-logo.component.ts new file mode 100644 index 0000000000..87239e3a11 --- /dev/null +++ b/src/app/shared/comcol-page-logo/comcol-page-logo.component.ts @@ -0,0 +1,15 @@ +import { Component, Input } from '@angular/core'; + +import { Bitstream } from "../../core/shared/bitstream.model"; + + +@Component({ + selector: 'ds-comcol-page-logo', + styleUrls: ['./comcol-page-logo.component.css'], + templateUrl: './comcol-page-logo.component.html', +}) +export class ComcolPageLogoComponent { + @Input() logo: Bitstream; + + @Input() alternateText: string; +} \ No newline at end of file diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 6f93a0b86e..817ae5f26e 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -14,6 +14,9 @@ import { ThumbnailComponent } from "../thumbnail/thumbnail.component"; import { SafeUrlPipe } from "./utils/safe-url-pipe"; import { HostWindowService } from "./host-window.service"; import { NativeWindowFactory, NativeWindowService } from "./window.service"; +import { ComcolPageContentComponent } from "./comcol-page-content/comcol-page-content.component"; +import { ComcolPageHeaderComponent } from "./comcol-page-header/comcol-page-header.component"; +import { ComcolPageLogoComponent } from "./comcol-page-logo/comcol-page-logo.component"; const MODULES = [ // Do NOT include UniversalModule, HttpModule, or JsonpModule here @@ -35,7 +38,10 @@ const PIPES = [ const COMPONENTS = [ // put shared components here PaginationComponent, - ThumbnailComponent + ThumbnailComponent, + ComcolPageContentComponent, + ComcolPageHeaderComponent, + ComcolPageLogoComponent ]; const PROVIDERS = [ diff --git a/src/backend/communities.ts b/src/backend/communities.ts index 0eea2480ab..d301936cdf 100644 --- a/src/backend/communities.ts +++ b/src/backend/communities.ts @@ -39,7 +39,8 @@ export const COMMUNITIES = { }, "collections": [ { "href": "/collections/5179" } - ] + ], + "logo": { "href": "/bitstreams/4688" } } }, { @@ -85,4 +86,4 @@ export const COMMUNITIES = { } } ] -}; +}; \ No newline at end of file diff --git a/src/backend/items.ts b/src/backend/items.ts index 5460cafa81..45d71fa092 100644 --- a/src/backend/items.ts +++ b/src/backend/items.ts @@ -94,7 +94,6 @@ export const ITEMS = { ], "_embedded": { "parents": [ - { "_links": { "self": { "href": "/collections/6547" }, @@ -108,6 +107,28 @@ export const ITEMS = { "type": "collection", "name": "Another Test Collection", "handle": "123456789/6547", + "metadata": [ + { + "key": "dc.rights", + "value": "

© 2005-2016 JOHN DOE SOME RIGHTS RESERVED

", + "language": null + }, + { + "key": "dc.description", + "value": "

Another introductory text dolor sit amet, consectetur adipiscing elit. Duis laoreet lorem erat, eget auctor est ultrices quis. Nullam ac tincidunt quam. In nec nisl odio. In egestas aliquam tincidunt.

\r\n

Integer vitae diam id dolor pharetra dignissim in sed enim. Vivamus pulvinar tristique sem a iaculis. Aenean ultricies dui vel facilisis laoreet. Integer porta erat eu ultrices rhoncus. Sed condimentum malesuada ex sit amet ullamcorper. Morbi a ipsum dolor. Vivamus interdum eget lacus ut fermentum.

", + "language": null + }, + { + "key": "dc.description.abstract", + "value": "Another collection for testing purposes", + "language": null + }, + { + "key": "dc.description.tableofcontents", + "value": "

Some more news sed condimentum malesuada ex sit amet ullamcorper. Morbi a ipsum dolor. Vivamus interdum eget lacus ut fermentum. Donec sed ultricies erat, nec sollicitudin mauris. Duis varius nulla quis quam vulputate, at hendrerit turpis rutrum. Integer nec facilisis sapien. Fusce fringilla malesuada lectus id pulvinar. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae

", + "language": null + } + ] } ], "bundles": [ @@ -239,13 +260,36 @@ export const ITEMS = { "items": [ { "href": "/items/8871" }, { "href": "/items/9978" } - ] + ], + "logo": { "href": "/bitstreams/4688" } }, "id": "5179", "uuid": "9e32a2e2-6b91-4236-a361-995ccdc14c60", "type": "collection", "name": "A Test Collection", "handle": "123456789/5179", + "metadata": [ + { + "key": "dc.rights", + "value": "

© 2005-2016 JOHN DOE SOME RIGHTS RESERVED

", + "language": null + }, + { + "key": "dc.description", + "value": "

An introductory text dolor sit amet, consectetur adipiscing elit. Duis laoreet lorem erat, eget auctor est ultrices quis. Nullam ac tincidunt quam. In nec nisl odio. In egestas aliquam tincidunt.

\r\n

Integer vitae diam id dolor pharetra dignissim in sed enim. Vivamus pulvinar tristique sem a iaculis. Aenean ultricies dui vel facilisis laoreet. Integer porta erat eu ultrices rhoncus. Sed condimentum malesuada ex sit amet ullamcorper. Morbi a ipsum dolor. Vivamus interdum eget lacus ut fermentum.

", + "language": null + }, + { + "key": "dc.description.abstract", + "value": "A collection for testing purposes", + "language": null + }, + { + "key": "dc.description.tableofcontents", + "value": "

Some news sed condimentum malesuada ex sit amet ullamcorper. Morbi a ipsum dolor. Vivamus interdum eget lacus ut fermentum. Donec sed ultricies erat, nec sollicitudin mauris. Duis varius nulla quis quam vulputate, at hendrerit turpis rutrum. Integer nec facilisis sapien. Fusce fringilla malesuada lectus id pulvinar. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae

", + "language": null + } + ] }, { "_links": { @@ -260,6 +304,28 @@ export const ITEMS = { "type": "collection", "name": "Another Test Collection", "handle": "123456789/6547", + "metadata": [ + { + "key": "dc.rights", + "value": "

© 2005-2016 JOHN DOE SOME RIGHTS RESERVED

", + "language": null + }, + { + "key": "dc.description", + "value": "

Another introductory text dolor sit amet, consectetur adipiscing elit. Duis laoreet lorem erat, eget auctor est ultrices quis. Nullam ac tincidunt quam. In nec nisl odio. In egestas aliquam tincidunt.

\r\n

Integer vitae diam id dolor pharetra dignissim in sed enim. Vivamus pulvinar tristique sem a iaculis. Aenean ultricies dui vel facilisis laoreet. Integer porta erat eu ultrices rhoncus. Sed condimentum malesuada ex sit amet ullamcorper. Morbi a ipsum dolor. Vivamus interdum eget lacus ut fermentum.

", + "language": null + }, + { + "key": "dc.description.abstract", + "value": "Another collection for testing purposes", + "language": null + }, + { + "key": "dc.description.tableofcontents", + "value": "

Some more news sed condimentum malesuada ex sit amet ullamcorper. Morbi a ipsum dolor. Vivamus interdum eget lacus ut fermentum. Donec sed ultricies erat, nec sollicitudin mauris. Duis varius nulla quis quam vulputate, at hendrerit turpis rutrum. Integer nec facilisis sapien. Fusce fringilla malesuada lectus id pulvinar. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae

", + "language": null + } + ] } ] } diff --git a/src/server.routes.ts b/src/server.routes.ts index 19ba0264aa..834923da30 100644 --- a/src/server.routes.ts +++ b/src/server.routes.ts @@ -10,5 +10,5 @@ * ]; **/ export const routes: string[] = [ - 'home', 'items/:id' , 'collections/:id', '**' + 'home', 'items/:id' , 'collections/:id', 'communities/:id', '**' ];