From 48c3cb4e46316faddff8b53c1111f0cbe06ae465 Mon Sep 17 00:00:00 2001 From: Christian Scheible Date: Fri, 9 Jun 2017 15:04:48 +0200 Subject: [PATCH 1/5] #89 added community home page --- .../community-page-routing.module.ts | 13 +++++++ .../community-page.component.html | 17 +++++++++ .../community-page.component.scss | 1 + .../community-page.component.ts | 35 ++++++++++++++++++ .../community-page/community-page.module.ts | 37 +++++++++++++++++++ .../community-page-copyright.component.html | 3 ++ .../community-page-copyright.component.scss | 1 + .../community-page-copyright.component.ts | 11 ++++++ .../field-wrapper.component.html | 3 ++ .../field-wrapper.component.scss | 1 + .../field-wrapper/field-wrapper.component.ts | 11 ++++++ ...nity-page-introductory-text.component.html | 3 ++ ...nity-page-introductory-text.component.scss | 1 + ...munity-page-introductory-text.component.ts | 11 ++++++ .../community-page-license.component.html | 4 ++ .../community-page-license.component.scss | 1 + .../community-page-license.component.ts | 11 ++++++ .../logo/community-page-logo.component.html | 3 ++ .../logo/community-page-logo.component.scss | 1 + .../logo/community-page-logo.component.ts | 13 +++++++ .../name/community-page-name.component.html | 1 + .../name/community-page-name.component.scss | 1 + .../name/community-page-name.component.ts | 11 ++++++ .../news/community-page-news.component.html | 4 ++ .../news/community-page-news.component.scss | 1 + .../news/community-page-news.component.ts | 11 ++++++ ...ty-page-sub-collection-list.component.html | 11 ++++++ ...ty-page-sub-collection-list.component.scss | 1 + ...nity-page-sub-collection-list.component.ts | 28 ++++++++++++++ 29 files changed, 250 insertions(+) create mode 100644 src/app/community-page/community-page-routing.module.ts create mode 100644 src/app/community-page/community-page.component.html create mode 100644 src/app/community-page/community-page.component.scss create mode 100644 src/app/community-page/community-page.component.ts create mode 100644 src/app/community-page/community-page.module.ts create mode 100644 src/app/community-page/copyright/community-page-copyright.component.html create mode 100644 src/app/community-page/copyright/community-page-copyright.component.scss create mode 100644 src/app/community-page/copyright/community-page-copyright.component.ts create mode 100644 src/app/community-page/field-wrapper/field-wrapper.component.html create mode 100644 src/app/community-page/field-wrapper/field-wrapper.component.scss create mode 100644 src/app/community-page/field-wrapper/field-wrapper.component.ts create mode 100644 src/app/community-page/introductory-text/community-page-introductory-text.component.html create mode 100644 src/app/community-page/introductory-text/community-page-introductory-text.component.scss create mode 100644 src/app/community-page/introductory-text/community-page-introductory-text.component.ts create mode 100644 src/app/community-page/license/community-page-license.component.html create mode 100644 src/app/community-page/license/community-page-license.component.scss create mode 100644 src/app/community-page/license/community-page-license.component.ts create mode 100644 src/app/community-page/logo/community-page-logo.component.html create mode 100644 src/app/community-page/logo/community-page-logo.component.scss create mode 100644 src/app/community-page/logo/community-page-logo.component.ts create mode 100644 src/app/community-page/name/community-page-name.component.html create mode 100644 src/app/community-page/name/community-page-name.component.scss create mode 100644 src/app/community-page/name/community-page-name.component.ts create mode 100644 src/app/community-page/news/community-page-news.component.html create mode 100644 src/app/community-page/news/community-page-news.component.scss create mode 100644 src/app/community-page/news/community-page-news.component.ts create mode 100644 src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.html create mode 100644 src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.scss create mode 100644 src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts 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..28425e48fe --- /dev/null +++ b/src/app/community-page/community-page.component.html @@ -0,0 +1,17 @@ +
+ + + + + + + + + + + +
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..cfca9659ba --- /dev/null +++ b/src/app/community-page/community-page.component.ts @@ -0,0 +1,35 @@ +import { Component, 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"; + +@Component({ + selector: 'ds-community-page', + styleUrls: ['./community-page.component.css'], + templateUrl: './community-page.component.html', +}) +export class CommunityPageComponent implements OnInit { + communityData: RemoteData; + logoData: RemoteData; + + 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.communityData.payload + .subscribe(community => this.logoData = community.logo); + }); + } + + universalInit() { + } +} 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..f8fb2c57b3 --- /dev/null +++ b/src/app/community-page/community-page.module.ts @@ -0,0 +1,37 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule } from "@angular/router"; + +import { TranslateModule } from "@ngx-translate/core"; + +import { CommunityPageComponent } from './community-page.component'; +import { FieldWrapperComponent } from './field-wrapper/field-wrapper.component'; +import { CommunityPageNameComponent } from './name/community-page-name.component'; +import { CommunityPageLogoComponent } from './logo/community-page-logo.component'; +import { CommunityPageIntroductoryTextComponent } from './introductory-text/community-page-introductory-text.component'; +import { CommunityPageNewsComponent } from './news/community-page-news.component'; +import { CommunityPageCopyrightComponent } from './copyright/community-page-copyright.component'; +import { CommunityPageLicenseComponent } from './license/community-page-license.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, + ], + declarations: [ + CommunityPageComponent, + FieldWrapperComponent, + CommunityPageNameComponent, + CommunityPageLogoComponent, + CommunityPageIntroductoryTextComponent, + CommunityPageNewsComponent, + CommunityPageCopyrightComponent, + CommunityPageLicenseComponent, + CommunityPageSubCollectionListComponent, + ] +}) +export class CommunityPageModule { } diff --git a/src/app/community-page/copyright/community-page-copyright.component.html b/src/app/community-page/copyright/community-page-copyright.component.html new file mode 100644 index 0000000000..987f3cb64a --- /dev/null +++ b/src/app/community-page/copyright/community-page-copyright.component.html @@ -0,0 +1,3 @@ + +

+
\ No newline at end of file diff --git a/src/app/community-page/copyright/community-page-copyright.component.scss b/src/app/community-page/copyright/community-page-copyright.component.scss new file mode 100644 index 0000000000..ad84b72f8c --- /dev/null +++ b/src/app/community-page/copyright/community-page-copyright.component.scss @@ -0,0 +1 @@ +@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/copyright/community-page-copyright.component.ts b/src/app/community-page/copyright/community-page-copyright.component.ts new file mode 100644 index 0000000000..1639f57db2 --- /dev/null +++ b/src/app/community-page/copyright/community-page-copyright.component.ts @@ -0,0 +1,11 @@ +import { Component, Input } from '@angular/core'; + + +@Component({ + selector: 'ds-community-page-copyright', + styleUrls: ['./community-page-copyright.component.css'], + templateUrl: './community-page-copyright.component.html', +}) +export class CommunityPageCopyrightComponent { + @Input() copyrightText: String; +} diff --git a/src/app/community-page/field-wrapper/field-wrapper.component.html b/src/app/community-page/field-wrapper/field-wrapper.component.html new file mode 100644 index 0000000000..67e482efa0 --- /dev/null +++ b/src/app/community-page/field-wrapper/field-wrapper.component.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/src/app/community-page/field-wrapper/field-wrapper.component.scss b/src/app/community-page/field-wrapper/field-wrapper.component.scss new file mode 100644 index 0000000000..ad84b72f8c --- /dev/null +++ b/src/app/community-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/community-page/field-wrapper/field-wrapper.component.ts b/src/app/community-page/field-wrapper/field-wrapper.component.ts new file mode 100644 index 0000000000..c8420661ea --- /dev/null +++ b/src/app/community-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/community-page/introductory-text/community-page-introductory-text.component.html b/src/app/community-page/introductory-text/community-page-introductory-text.component.html new file mode 100644 index 0000000000..8c1f89544a --- /dev/null +++ b/src/app/community-page/introductory-text/community-page-introductory-text.component.html @@ -0,0 +1,3 @@ + +

+
\ No newline at end of file diff --git a/src/app/community-page/introductory-text/community-page-introductory-text.component.scss b/src/app/community-page/introductory-text/community-page-introductory-text.component.scss new file mode 100644 index 0000000000..ad84b72f8c --- /dev/null +++ b/src/app/community-page/introductory-text/community-page-introductory-text.component.scss @@ -0,0 +1 @@ +@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/introductory-text/community-page-introductory-text.component.ts b/src/app/community-page/introductory-text/community-page-introductory-text.component.ts new file mode 100644 index 0000000000..beee2df466 --- /dev/null +++ b/src/app/community-page/introductory-text/community-page-introductory-text.component.ts @@ -0,0 +1,11 @@ +import { Component, Input } from '@angular/core'; + + +@Component({ + selector: 'ds-community-page-introductory-text', + styleUrls: ['./community-page-introductory-text.component.css'], + templateUrl: './community-page-introductory-text.component.html', +}) +export class CommunityPageIntroductoryTextComponent { + @Input() introductoryText: String; +} diff --git a/src/app/community-page/license/community-page-license.component.html b/src/app/community-page/license/community-page-license.component.html new file mode 100644 index 0000000000..7bea146194 --- /dev/null +++ b/src/app/community-page/license/community-page-license.component.html @@ -0,0 +1,4 @@ + +

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

+

{{ license }}

+
\ No newline at end of file diff --git a/src/app/community-page/license/community-page-license.component.scss b/src/app/community-page/license/community-page-license.component.scss new file mode 100644 index 0000000000..ad84b72f8c --- /dev/null +++ b/src/app/community-page/license/community-page-license.component.scss @@ -0,0 +1 @@ +@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/license/community-page-license.component.ts b/src/app/community-page/license/community-page-license.component.ts new file mode 100644 index 0000000000..cf3e8e0661 --- /dev/null +++ b/src/app/community-page/license/community-page-license.component.ts @@ -0,0 +1,11 @@ +import { Component, Input } from '@angular/core'; + + +@Component({ + selector: 'ds-community-page-license', + styleUrls: ['./community-page-license.component.css'], + templateUrl: './community-page-license.component.html', +}) +export class CommunityPageLicenseComponent { + @Input() license: String; +} diff --git a/src/app/community-page/logo/community-page-logo.component.html b/src/app/community-page/logo/community-page-logo.component.html new file mode 100644 index 0000000000..d5ef5d6311 --- /dev/null +++ b/src/app/community-page/logo/community-page-logo.component.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/app/community-page/logo/community-page-logo.component.scss b/src/app/community-page/logo/community-page-logo.component.scss new file mode 100644 index 0000000000..ad84b72f8c --- /dev/null +++ b/src/app/community-page/logo/community-page-logo.component.scss @@ -0,0 +1 @@ +@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/logo/community-page-logo.component.ts b/src/app/community-page/logo/community-page-logo.component.ts new file mode 100644 index 0000000000..3610932745 --- /dev/null +++ b/src/app/community-page/logo/community-page-logo.component.ts @@ -0,0 +1,13 @@ +import { Component, Input } from '@angular/core'; + +import { Bitstream } from "../../core/shared/bitstream.model"; + + +@Component({ + selector: 'ds-community-page-logo', + styleUrls: ['./community-page-logo.component.css'], + templateUrl: './community-page-logo.component.html', +}) +export class CommunityPageLogoComponent { + @Input() logo: Bitstream; +} diff --git a/src/app/community-page/name/community-page-name.component.html b/src/app/community-page/name/community-page-name.component.html new file mode 100644 index 0000000000..21f1f65331 --- /dev/null +++ b/src/app/community-page/name/community-page-name.component.html @@ -0,0 +1 @@ +

{{ name }}

\ No newline at end of file diff --git a/src/app/community-page/name/community-page-name.component.scss b/src/app/community-page/name/community-page-name.component.scss new file mode 100644 index 0000000000..ad84b72f8c --- /dev/null +++ b/src/app/community-page/name/community-page-name.component.scss @@ -0,0 +1 @@ +@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/name/community-page-name.component.ts b/src/app/community-page/name/community-page-name.component.ts new file mode 100644 index 0000000000..f2cbded07c --- /dev/null +++ b/src/app/community-page/name/community-page-name.component.ts @@ -0,0 +1,11 @@ +import { Component, Input } from '@angular/core'; + + +@Component({ + selector: 'ds-community-page-name', + styleUrls: ['./community-page-name.component.css'], + templateUrl: './community-page-name.component.html', +}) +export class CommunityPageNameComponent { + @Input() name: String; +} diff --git a/src/app/community-page/news/community-page-news.component.html b/src/app/community-page/news/community-page-news.component.html new file mode 100644 index 0000000000..bce01dd378 --- /dev/null +++ b/src/app/community-page/news/community-page-news.component.html @@ -0,0 +1,4 @@ + +

{{ 'community.page.news' | translate }}

+

+
\ No newline at end of file diff --git a/src/app/community-page/news/community-page-news.component.scss b/src/app/community-page/news/community-page-news.component.scss new file mode 100644 index 0000000000..ad84b72f8c --- /dev/null +++ b/src/app/community-page/news/community-page-news.component.scss @@ -0,0 +1 @@ +@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/news/community-page-news.component.ts b/src/app/community-page/news/community-page-news.component.ts new file mode 100644 index 0000000000..b978d41a55 --- /dev/null +++ b/src/app/community-page/news/community-page-news.component.ts @@ -0,0 +1,11 @@ +import { Component, Input } from '@angular/core'; + + +@Component({ + selector: 'ds-community-page-news', + styleUrls: ['./community-page-news.component.css'], + templateUrl: './community-page-news.component.html', +}) +export class CommunityPageNewsComponent { + @Input() sidebarText: String; +} 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/community-page/sub-collection-list/community-page-sub-collection-list.component.scss b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.scss new file mode 100644 index 0000000000..ad84b72f8c --- /dev/null +++ b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.scss @@ -0,0 +1 @@ +@import '../../../styles/variables.scss'; \ No newline at end of file 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(); + } +} From 3ad3df75689333b29b6969e6a5f296d7410c3c08 Mon Sep 17 00:00:00 2001 From: Christian Scheible Date: Tue, 13 Jun 2017 10:02:49 +0200 Subject: [PATCH 2/5] =?UTF-8?q?Refactored=20community=20and=20collection?= =?UTF-8?q?=20pages=20to=20use=20a=20shared=20component=20for=20most=20of?= =?UTF-8?q?=20the=20content.=20This=20PR=20connect=E2=80=99s=20to=20#89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/i18n/en.json | 9 +++++ src/app/app.module.ts | 2 + .../collection-page.component.html | 33 +++++++++++------ .../collection-page/collection-page.module.ts | 10 +---- .../collection-page-copyright.component.html | 3 -- .../collection-page-copyright.component.ts | 11 ------ ...tion-page-introductory-text.component.html | 3 -- ...tion-page-introductory-text.component.scss | 1 - ...ection-page-introductory-text.component.ts | 11 ------ .../collection-page-license.component.html | 4 -- .../collection-page-license.component.scss | 1 - .../collection-page-license.component.ts | 11 ------ .../news/collection-page-news.component.html | 4 -- .../news/collection-page-news.component.scss | 1 - .../news/collection-page-news.component.ts | 11 ------ .../community-page.component.html | 33 +++++++++++------ .../community-page/community-page.module.ts | 10 +---- .../community-page-copyright.component.html | 3 -- .../community-page-copyright.component.scss | 1 - .../community-page-copyright.component.ts | 11 ------ ...nity-page-introductory-text.component.html | 3 -- ...nity-page-introductory-text.component.scss | 1 - ...munity-page-introductory-text.component.ts | 11 ------ .../community-page-license.component.html | 4 -- .../community-page-license.component.scss | 1 - .../community-page-license.component.ts | 11 ------ .../news/community-page-news.component.html | 4 -- .../news/community-page-news.component.scss | 1 - .../news/community-page-news.component.ts | 11 ------ .../models/normalized-community.model.ts | 2 + ...content-with-optional-title.component.html | 5 +++ ...ontent-with-optional-title.component.scss} | 0 .../content-with-optional-title.component.ts | 37 +++++++++++++++++++ src/app/shared/shared.module.ts | 4 +- src/backend/communities.ts | 3 +- src/server.routes.ts | 2 +- 36 files changed, 107 insertions(+), 166 deletions(-) delete mode 100644 src/app/collection-page/copyright/collection-page-copyright.component.html delete mode 100644 src/app/collection-page/copyright/collection-page-copyright.component.ts delete mode 100644 src/app/collection-page/introductory-text/collection-page-introductory-text.component.html delete mode 100644 src/app/collection-page/introductory-text/collection-page-introductory-text.component.scss delete mode 100644 src/app/collection-page/introductory-text/collection-page-introductory-text.component.ts delete mode 100644 src/app/collection-page/license/collection-page-license.component.html delete mode 100644 src/app/collection-page/license/collection-page-license.component.scss delete mode 100644 src/app/collection-page/license/collection-page-license.component.ts delete mode 100644 src/app/collection-page/news/collection-page-news.component.html delete mode 100644 src/app/collection-page/news/collection-page-news.component.scss delete mode 100644 src/app/collection-page/news/collection-page-news.component.ts delete mode 100644 src/app/community-page/copyright/community-page-copyright.component.html delete mode 100644 src/app/community-page/copyright/community-page-copyright.component.scss delete mode 100644 src/app/community-page/copyright/community-page-copyright.component.ts delete mode 100644 src/app/community-page/introductory-text/community-page-introductory-text.component.html delete mode 100644 src/app/community-page/introductory-text/community-page-introductory-text.component.scss delete mode 100644 src/app/community-page/introductory-text/community-page-introductory-text.component.ts delete mode 100644 src/app/community-page/license/community-page-license.component.html delete mode 100644 src/app/community-page/license/community-page-license.component.scss delete mode 100644 src/app/community-page/license/community-page-license.component.ts delete mode 100644 src/app/community-page/news/community-page-news.component.html delete mode 100644 src/app/community-page/news/community-page-news.component.scss delete mode 100644 src/app/community-page/news/community-page-news.component.ts create mode 100644 src/app/shared/content-with-optional-title/content-with-optional-title.component.html rename src/app/{collection-page/copyright/collection-page-copyright.component.scss => shared/content-with-optional-title/content-with-optional-title.component.scss} (100%) create mode 100644 src/app/shared/content-with-optional-title/content-with-optional-title.component.ts 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..cfa4ef4dee 100644 --- a/src/app/collection-page/collection-page.component.html +++ b/src/app/collection-page/collection-page.component.html @@ -1,16 +1,25 @@
- - - - - - - - + + + + + + + + > + + + > +
diff --git a/src/app/collection-page/collection-page.module.ts b/src/app/collection-page/collection-page.module.ts index 9b204cb0bb..1065d237df 100644 --- a/src/app/collection-page/collection-page.module.ts +++ b/src/app/collection-page/collection-page.module.ts @@ -3,14 +3,11 @@ 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 +15,13 @@ 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/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.scss b/src/app/collection-page/introductory-text/collection-page-introductory-text.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/collection-page/introductory-text/collection-page-introductory-text.component.scss +++ /dev/null @@ -1 +0,0 @@ -@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 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.scss b/src/app/collection-page/license/collection-page-license.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/collection-page/license/collection-page-license.component.scss +++ /dev/null @@ -1 +0,0 @@ -@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 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/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.component.html b/src/app/community-page/community-page.component.html index 28425e48fe..d01130a006 100644 --- a/src/app/community-page/community-page.component.html +++ b/src/app/community-page/community-page.component.html @@ -1,17 +1,26 @@
- - - - - - - - + + + + + + + + + + + +
diff --git a/src/app/community-page/community-page.module.ts b/src/app/community-page/community-page.module.ts index f8fb2c57b3..043b5ca47a 100644 --- a/src/app/community-page/community-page.module.ts +++ b/src/app/community-page/community-page.module.ts @@ -4,14 +4,11 @@ import { RouterModule } from "@angular/router"; import { TranslateModule } from "@ngx-translate/core"; +import { SharedModule } from '../shared/shared.module'; import { CommunityPageComponent } from './community-page.component'; import { FieldWrapperComponent } from './field-wrapper/field-wrapper.component'; import { CommunityPageNameComponent } from './name/community-page-name.component'; import { CommunityPageLogoComponent } from './logo/community-page-logo.component'; -import { CommunityPageIntroductoryTextComponent } from './introductory-text/community-page-introductory-text.component'; -import { CommunityPageNewsComponent } from './news/community-page-news.component'; -import { CommunityPageCopyrightComponent } from './copyright/community-page-copyright.component'; -import { CommunityPageLicenseComponent } from './license/community-page-license.component'; import { CommunityPageSubCollectionListComponent } from './sub-collection-list/community-page-sub-collection-list.component'; import { CommunityPageRoutingModule } from './community-page-routing.module'; @@ -21,16 +18,13 @@ import { CommunityPageRoutingModule } from './community-page-routing.module'; CommonModule, TranslateModule, RouterModule, + SharedModule, ], declarations: [ CommunityPageComponent, FieldWrapperComponent, CommunityPageNameComponent, CommunityPageLogoComponent, - CommunityPageIntroductoryTextComponent, - CommunityPageNewsComponent, - CommunityPageCopyrightComponent, - CommunityPageLicenseComponent, CommunityPageSubCollectionListComponent, ] }) diff --git a/src/app/community-page/copyright/community-page-copyright.component.html b/src/app/community-page/copyright/community-page-copyright.component.html deleted file mode 100644 index 987f3cb64a..0000000000 --- a/src/app/community-page/copyright/community-page-copyright.component.html +++ /dev/null @@ -1,3 +0,0 @@ - -

-
\ No newline at end of file diff --git a/src/app/community-page/copyright/community-page-copyright.component.scss b/src/app/community-page/copyright/community-page-copyright.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/community-page/copyright/community-page-copyright.component.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/copyright/community-page-copyright.component.ts b/src/app/community-page/copyright/community-page-copyright.component.ts deleted file mode 100644 index 1639f57db2..0000000000 --- a/src/app/community-page/copyright/community-page-copyright.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from '@angular/core'; - - -@Component({ - selector: 'ds-community-page-copyright', - styleUrls: ['./community-page-copyright.component.css'], - templateUrl: './community-page-copyright.component.html', -}) -export class CommunityPageCopyrightComponent { - @Input() copyrightText: String; -} diff --git a/src/app/community-page/introductory-text/community-page-introductory-text.component.html b/src/app/community-page/introductory-text/community-page-introductory-text.component.html deleted file mode 100644 index 8c1f89544a..0000000000 --- a/src/app/community-page/introductory-text/community-page-introductory-text.component.html +++ /dev/null @@ -1,3 +0,0 @@ - -

-
\ No newline at end of file diff --git a/src/app/community-page/introductory-text/community-page-introductory-text.component.scss b/src/app/community-page/introductory-text/community-page-introductory-text.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/community-page/introductory-text/community-page-introductory-text.component.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/introductory-text/community-page-introductory-text.component.ts b/src/app/community-page/introductory-text/community-page-introductory-text.component.ts deleted file mode 100644 index beee2df466..0000000000 --- a/src/app/community-page/introductory-text/community-page-introductory-text.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from '@angular/core'; - - -@Component({ - selector: 'ds-community-page-introductory-text', - styleUrls: ['./community-page-introductory-text.component.css'], - templateUrl: './community-page-introductory-text.component.html', -}) -export class CommunityPageIntroductoryTextComponent { - @Input() introductoryText: String; -} diff --git a/src/app/community-page/license/community-page-license.component.html b/src/app/community-page/license/community-page-license.component.html deleted file mode 100644 index 7bea146194..0000000000 --- a/src/app/community-page/license/community-page-license.component.html +++ /dev/null @@ -1,4 +0,0 @@ - -

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

-

{{ license }}

-
\ No newline at end of file diff --git a/src/app/community-page/license/community-page-license.component.scss b/src/app/community-page/license/community-page-license.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/community-page/license/community-page-license.component.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/license/community-page-license.component.ts b/src/app/community-page/license/community-page-license.component.ts deleted file mode 100644 index cf3e8e0661..0000000000 --- a/src/app/community-page/license/community-page-license.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from '@angular/core'; - - -@Component({ - selector: 'ds-community-page-license', - styleUrls: ['./community-page-license.component.css'], - templateUrl: './community-page-license.component.html', -}) -export class CommunityPageLicenseComponent { - @Input() license: String; -} diff --git a/src/app/community-page/news/community-page-news.component.html b/src/app/community-page/news/community-page-news.component.html deleted file mode 100644 index bce01dd378..0000000000 --- a/src/app/community-page/news/community-page-news.component.html +++ /dev/null @@ -1,4 +0,0 @@ - -

{{ 'community.page.news' | translate }}

-

-
\ No newline at end of file diff --git a/src/app/community-page/news/community-page-news.component.scss b/src/app/community-page/news/community-page-news.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/community-page/news/community-page-news.component.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/news/community-page-news.component.ts b/src/app/community-page/news/community-page-news.component.ts deleted file mode 100644 index b978d41a55..0000000000 --- a/src/app/community-page/news/community-page-news.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from '@angular/core'; - - -@Component({ - selector: 'ds-community-page-news', - styleUrls: ['./community-page-news.component.css'], - templateUrl: './community-page-news.component.html', -}) -export class CommunityPageNewsComponent { - @Input() sidebarText: String; -} diff --git a/src/app/core/cache/models/normalized-community.model.ts b/src/app/core/cache/models/normalized-community.model.ts index 774abcc979..e691f30fec 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(NormalizedDSOType.NormalizedBitstream) logo: string; /** diff --git a/src/app/shared/content-with-optional-title/content-with-optional-title.component.html b/src/app/shared/content-with-optional-title/content-with-optional-title.component.html new file mode 100644 index 0000000000..67c49496ae --- /dev/null +++ b/src/app/shared/content-with-optional-title/content-with-optional-title.component.html @@ -0,0 +1,5 @@ +
+

{{ title | translate }}

+

+

{{content}}

+
\ No newline at end of file diff --git a/src/app/collection-page/copyright/collection-page-copyright.component.scss b/src/app/shared/content-with-optional-title/content-with-optional-title.component.scss similarity index 100% rename from src/app/collection-page/copyright/collection-page-copyright.component.scss rename to src/app/shared/content-with-optional-title/content-with-optional-title.component.scss diff --git a/src/app/shared/content-with-optional-title/content-with-optional-title.component.ts b/src/app/shared/content-with-optional-title/content-with-optional-title.component.ts new file mode 100644 index 0000000000..a838f548d8 --- /dev/null +++ b/src/app/shared/content-with-optional-title/content-with-optional-title.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-content-with-optional-title', + styleUrls: ['./content-with-optional-title.component.css'], + templateUrl: './content-with-optional-title.component.html' +}) +export class ContentWithOptionalTitleComponent { + + // 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/shared/shared.module.ts b/src/app/shared/shared.module.ts index 6f93a0b86e..285f1087bd 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -14,6 +14,7 @@ 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 { ContentWithOptionalTitleComponent } from "./content-with-optional-title/content-with-optional-title.component"; const MODULES = [ // Do NOT include UniversalModule, HttpModule, or JsonpModule here @@ -35,7 +36,8 @@ const PIPES = [ const COMPONENTS = [ // put shared components here PaginationComponent, - ThumbnailComponent + ThumbnailComponent, + ContentWithOptionalTitleComponent ]; const PROVIDERS = [ diff --git a/src/backend/communities.ts b/src/backend/communities.ts index 940f6c72d5..02f474f66b 100644 --- a/src/backend/communities.ts +++ b/src/backend/communities.ts @@ -38,7 +38,8 @@ export const COMMUNITIES = [ }, "collections": [ { "href": "/collections/5179" } - ] + ], + "logo": { "href": "/bitstreams/4688" } } }, { 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', '**' ]; From 90840d949bea45ad8c8e5a879d96d52a89b132e8 Mon Sep 17 00:00:00 2001 From: Christian Scheible Date: Tue, 13 Jun 2017 14:35:57 +0200 Subject: [PATCH 3/5] Refactored collection/community logo and name as shared components. --- .../collection-page.component.html | 9 +++++++-- .../collection-page/collection-page.module.ts | 4 ---- .../logo/collection-page-logo.component.html | 3 --- .../logo/collection-page-logo.component.ts | 13 ------------- .../name/collection-page-name.component.ts | 11 ----------- .../community-page/community-page.component.html | 16 ++++++++-------- src/app/community-page/community-page.module.ts | 4 ---- .../logo/community-page-logo.component.html | 3 --- .../logo/community-page-logo.component.scss | 1 - .../logo/community-page-logo.component.ts | 13 ------------- .../name/community-page-name.component.html | 1 - .../name/community-page-name.component.scss | 1 - .../name/community-page-name.component.ts | 11 ----------- .../content-with-optional-title.component.html | 4 ++-- src/app/shared/dso-logo/dso-logo.component.html | 3 +++ .../dso-logo/dso-logo.component.scss} | 0 src/app/shared/dso-logo/dso-logo.component.ts | 15 +++++++++++++++ .../dso-name/dso-name.component.html} | 0 .../dso-name/dso-name.component.scss} | 0 src/app/shared/dso-name/dso-name.component.ts | 11 +++++++++++ src/app/shared/shared.module.ts | 6 +++++- 21 files changed, 51 insertions(+), 78 deletions(-) delete mode 100644 src/app/collection-page/logo/collection-page-logo.component.html delete mode 100644 src/app/collection-page/logo/collection-page-logo.component.ts delete mode 100644 src/app/collection-page/name/collection-page-name.component.ts delete mode 100644 src/app/community-page/logo/community-page-logo.component.html delete mode 100644 src/app/community-page/logo/community-page-logo.component.scss delete mode 100644 src/app/community-page/logo/community-page-logo.component.ts delete mode 100644 src/app/community-page/name/community-page-name.component.html delete mode 100644 src/app/community-page/name/community-page-name.component.scss delete mode 100644 src/app/community-page/name/community-page-name.component.ts create mode 100644 src/app/shared/dso-logo/dso-logo.component.html rename src/app/{collection-page/logo/collection-page-logo.component.scss => shared/dso-logo/dso-logo.component.scss} (100%) create mode 100644 src/app/shared/dso-logo/dso-logo.component.ts rename src/app/{collection-page/name/collection-page-name.component.html => shared/dso-name/dso-name.component.html} (100%) rename src/app/{collection-page/name/collection-page-name.component.scss => shared/dso-name/dso-name.component.scss} (100%) create mode 100644 src/app/shared/dso-name/dso-name.component.ts diff --git a/src/app/collection-page/collection-page.component.html b/src/app/collection-page/collection-page.component.html index cfa4ef4dee..02fc1fd9b7 100644 --- a/src/app/collection-page/collection-page.component.html +++ b/src/app/collection-page/collection-page.component.html @@ -1,6 +1,11 @@
- - + + + + + - Collection logo - \ 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.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/community-page/community-page.component.html b/src/app/community-page/community-page.component.html index d01130a006..4fc21b07df 100644 --- a/src/app/community-page/community-page.component.html +++ b/src/app/community-page/community-page.component.html @@ -1,6 +1,11 @@
- - + + + + + - - - - +
diff --git a/src/app/community-page/community-page.module.ts b/src/app/community-page/community-page.module.ts index 043b5ca47a..0d6db23d32 100644 --- a/src/app/community-page/community-page.module.ts +++ b/src/app/community-page/community-page.module.ts @@ -7,8 +7,6 @@ import { TranslateModule } from "@ngx-translate/core"; import { SharedModule } from '../shared/shared.module'; import { CommunityPageComponent } from './community-page.component'; import { FieldWrapperComponent } from './field-wrapper/field-wrapper.component'; -import { CommunityPageNameComponent } from './name/community-page-name.component'; -import { CommunityPageLogoComponent } from './logo/community-page-logo.component'; import { CommunityPageSubCollectionListComponent } from './sub-collection-list/community-page-sub-collection-list.component'; import { CommunityPageRoutingModule } from './community-page-routing.module'; @@ -23,8 +21,6 @@ import { CommunityPageRoutingModule } from './community-page-routing.module'; declarations: [ CommunityPageComponent, FieldWrapperComponent, - CommunityPageNameComponent, - CommunityPageLogoComponent, CommunityPageSubCollectionListComponent, ] }) diff --git a/src/app/community-page/logo/community-page-logo.component.html b/src/app/community-page/logo/community-page-logo.component.html deleted file mode 100644 index d5ef5d6311..0000000000 --- a/src/app/community-page/logo/community-page-logo.component.html +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/src/app/community-page/logo/community-page-logo.component.scss b/src/app/community-page/logo/community-page-logo.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/community-page/logo/community-page-logo.component.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/logo/community-page-logo.component.ts b/src/app/community-page/logo/community-page-logo.component.ts deleted file mode 100644 index 3610932745..0000000000 --- a/src/app/community-page/logo/community-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-community-page-logo', - styleUrls: ['./community-page-logo.component.css'], - templateUrl: './community-page-logo.component.html', -}) -export class CommunityPageLogoComponent { - @Input() logo: Bitstream; -} diff --git a/src/app/community-page/name/community-page-name.component.html b/src/app/community-page/name/community-page-name.component.html deleted file mode 100644 index 21f1f65331..0000000000 --- a/src/app/community-page/name/community-page-name.component.html +++ /dev/null @@ -1 +0,0 @@ -

{{ name }}

\ No newline at end of file diff --git a/src/app/community-page/name/community-page-name.component.scss b/src/app/community-page/name/community-page-name.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/community-page/name/community-page-name.component.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/community-page/name/community-page-name.component.ts b/src/app/community-page/name/community-page-name.component.ts deleted file mode 100644 index f2cbded07c..0000000000 --- a/src/app/community-page/name/community-page-name.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from '@angular/core'; - - -@Component({ - selector: 'ds-community-page-name', - styleUrls: ['./community-page-name.component.css'], - templateUrl: './community-page-name.component.html', -}) -export class CommunityPageNameComponent { - @Input() name: String; -} diff --git a/src/app/shared/content-with-optional-title/content-with-optional-title.component.html b/src/app/shared/content-with-optional-title/content-with-optional-title.component.html index 67c49496ae..4a0be8cfc7 100644 --- a/src/app/shared/content-with-optional-title/content-with-optional-title.component.html +++ b/src/app/shared/content-with-optional-title/content-with-optional-title.component.html @@ -1,5 +1,5 @@

{{ title | translate }}

-

-

{{content}}

+
+
{{content}}
\ No newline at end of file diff --git a/src/app/shared/dso-logo/dso-logo.component.html b/src/app/shared/dso-logo/dso-logo.component.html new file mode 100644 index 0000000000..81769c3c0f --- /dev/null +++ b/src/app/shared/dso-logo/dso-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/shared/dso-logo/dso-logo.component.scss similarity index 100% rename from src/app/collection-page/logo/collection-page-logo.component.scss rename to src/app/shared/dso-logo/dso-logo.component.scss diff --git a/src/app/shared/dso-logo/dso-logo.component.ts b/src/app/shared/dso-logo/dso-logo.component.ts new file mode 100644 index 0000000000..fc41315415 --- /dev/null +++ b/src/app/shared/dso-logo/dso-logo.component.ts @@ -0,0 +1,15 @@ +import { Component, Input } from '@angular/core'; + +import { Bitstream } from "../../core/shared/bitstream.model"; + + +@Component({ + selector: 'ds-dso-logo', + styleUrls: ['./dso-logo.component.css'], + templateUrl: './dso-logo.component.html', +}) +export class DsoLogoComponent { + @Input() logo: Bitstream; + + @Input() alternateText: string; +} \ No newline at end of file diff --git a/src/app/collection-page/name/collection-page-name.component.html b/src/app/shared/dso-name/dso-name.component.html similarity index 100% rename from src/app/collection-page/name/collection-page-name.component.html rename to src/app/shared/dso-name/dso-name.component.html diff --git a/src/app/collection-page/name/collection-page-name.component.scss b/src/app/shared/dso-name/dso-name.component.scss similarity index 100% rename from src/app/collection-page/name/collection-page-name.component.scss rename to src/app/shared/dso-name/dso-name.component.scss diff --git a/src/app/shared/dso-name/dso-name.component.ts b/src/app/shared/dso-name/dso-name.component.ts new file mode 100644 index 0000000000..7f88e3189e --- /dev/null +++ b/src/app/shared/dso-name/dso-name.component.ts @@ -0,0 +1,11 @@ +import { Component, Input } from '@angular/core'; + + +@Component({ + selector: 'ds-dso-name', + styleUrls: ['./dso-name.component.css'], + templateUrl: './dso-name.component.html', +}) +export class DsoNameComponent { + @Input() name: String; +} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 285f1087bd..338fb5fe5d 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -15,6 +15,8 @@ import { SafeUrlPipe } from "./utils/safe-url-pipe"; import { HostWindowService } from "./host-window.service"; import { NativeWindowFactory, NativeWindowService } from "./window.service"; import { ContentWithOptionalTitleComponent } from "./content-with-optional-title/content-with-optional-title.component"; +import { DsoNameComponent } from "./dso-name/dso-name.component"; +import { DsoLogoComponent } from "./dso-logo/dso-logo.component"; const MODULES = [ // Do NOT include UniversalModule, HttpModule, or JsonpModule here @@ -37,7 +39,9 @@ const COMPONENTS = [ // put shared components here PaginationComponent, ThumbnailComponent, - ContentWithOptionalTitleComponent + ContentWithOptionalTitleComponent, + DsoNameComponent, + DsoLogoComponent ]; const PROVIDERS = [ From ac7b2775e4065e0de99e2f8e0bf481e8124afb1b Mon Sep 17 00:00:00 2001 From: Christian Scheible Date: Tue, 13 Jun 2017 15:41:38 +0200 Subject: [PATCH 4/5] Renamed Collection/Community shared components --- .../collection-page.component.html | 24 ++++++++++--------- .../collection-page/collection-page.module.ts | 2 -- .../field-wrapper.component.html | 3 --- .../field-wrapper/field-wrapper.component.ts | 11 --------- .../community-page.component.html | 18 +++++++------- .../community-page/community-page.module.ts | 2 -- .../field-wrapper.component.html | 3 --- .../field-wrapper/field-wrapper.component.ts | 11 --------- .../comcol-page-content.component.html} | 0 .../comcol-page-content.component.scss} | 0 .../comcol-page-content.component.ts} | 8 +++---- .../comcol-page-header.component.html} | 0 .../comcol-page-header.component.scss} | 0 .../comcol-page-header.component.ts | 11 +++++++++ .../comcol-page-logo.component.html} | 0 .../comcol-page-logo.component.scss} | 0 .../comcol-page-logo.component.ts} | 8 +++---- .../shared/dso-logo/dso-logo.component.scss | 1 - .../shared/dso-name/dso-name.component.scss | 1 - src/app/shared/dso-name/dso-name.component.ts | 11 --------- src/app/shared/shared.module.ts | 12 +++++----- 21 files changed, 47 insertions(+), 79 deletions(-) delete mode 100644 src/app/collection-page/field-wrapper/field-wrapper.component.html delete mode 100644 src/app/collection-page/field-wrapper/field-wrapper.component.ts delete mode 100644 src/app/community-page/field-wrapper/field-wrapper.component.html delete mode 100644 src/app/community-page/field-wrapper/field-wrapper.component.ts rename src/app/shared/{content-with-optional-title/content-with-optional-title.component.html => comcol-page-content/comcol-page-content.component.html} (100%) rename src/app/{collection-page/field-wrapper/field-wrapper.component.scss => shared/comcol-page-content/comcol-page-content.component.scss} (100%) rename src/app/shared/{content-with-optional-title/content-with-optional-title.component.ts => comcol-page-content/comcol-page-content.component.ts} (73%) rename src/app/shared/{dso-name/dso-name.component.html => comcol-page-header/comcol-page-header.component.html} (100%) rename src/app/{community-page/field-wrapper/field-wrapper.component.scss => shared/comcol-page-header/comcol-page-header.component.scss} (100%) create mode 100644 src/app/shared/comcol-page-header/comcol-page-header.component.ts rename src/app/shared/{dso-logo/dso-logo.component.html => comcol-page-logo/comcol-page-logo.component.html} (100%) rename src/app/shared/{content-with-optional-title/content-with-optional-title.component.scss => comcol-page-logo/comcol-page-logo.component.scss} (100%) rename src/app/shared/{dso-logo/dso-logo.component.ts => comcol-page-logo/comcol-page-logo.component.ts} (52%) delete mode 100644 src/app/shared/dso-logo/dso-logo.component.scss delete mode 100644 src/app/shared/dso-name/dso-name.component.scss delete mode 100644 src/app/shared/dso-name/dso-name.component.ts diff --git a/src/app/collection-page/collection-page.component.html b/src/app/collection-page/collection-page.component.html index 02fc1fd9b7..f8bfdbc5de 100644 --- a/src/app/collection-page/collection-page.component.html +++ b/src/app/collection-page/collection-page.component.html @@ -1,30 +1,32 @@
- + + - - + - - + - - + - > - + - > - +
diff --git a/src/app/collection-page/collection-page.module.ts b/src/app/collection-page/collection-page.module.ts index 76e3128871..0dfe33fd5a 100644 --- a/src/app/collection-page/collection-page.module.ts +++ b/src/app/collection-page/collection-page.module.ts @@ -5,7 +5,6 @@ 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 { CollectionPageRoutingModule } from './collection-page-routing.module'; @NgModule({ @@ -17,7 +16,6 @@ import { CollectionPageRoutingModule } from './collection-page-routing.module'; ], declarations: [ CollectionPageComponent, - FieldWrapperComponent, ] }) export class CollectionPageModule { } 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/community-page/community-page.component.html b/src/app/community-page/community-page.component.html index 4fc21b07df..83f6a54033 100644 --- a/src/app/community-page/community-page.component.html +++ b/src/app/community-page/community-page.component.html @@ -1,26 +1,26 @@
- + - - + - - + - - + - - +
diff --git a/src/app/community-page/community-page.module.ts b/src/app/community-page/community-page.module.ts index 0d6db23d32..1410e786b7 100644 --- a/src/app/community-page/community-page.module.ts +++ b/src/app/community-page/community-page.module.ts @@ -6,7 +6,6 @@ import { TranslateModule } from "@ngx-translate/core"; import { SharedModule } from '../shared/shared.module'; import { CommunityPageComponent } from './community-page.component'; -import { FieldWrapperComponent } from './field-wrapper/field-wrapper.component'; import { CommunityPageSubCollectionListComponent } from './sub-collection-list/community-page-sub-collection-list.component'; import { CommunityPageRoutingModule } from './community-page-routing.module'; @@ -20,7 +19,6 @@ import { CommunityPageRoutingModule } from './community-page-routing.module'; ], declarations: [ CommunityPageComponent, - FieldWrapperComponent, CommunityPageSubCollectionListComponent, ] }) diff --git a/src/app/community-page/field-wrapper/field-wrapper.component.html b/src/app/community-page/field-wrapper/field-wrapper.component.html deleted file mode 100644 index 67e482efa0..0000000000 --- a/src/app/community-page/field-wrapper/field-wrapper.component.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ No newline at end of file diff --git a/src/app/community-page/field-wrapper/field-wrapper.component.ts b/src/app/community-page/field-wrapper/field-wrapper.component.ts deleted file mode 100644 index c8420661ea..0000000000 --- a/src/app/community-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/shared/content-with-optional-title/content-with-optional-title.component.html b/src/app/shared/comcol-page-content/comcol-page-content.component.html similarity index 100% rename from src/app/shared/content-with-optional-title/content-with-optional-title.component.html rename to src/app/shared/comcol-page-content/comcol-page-content.component.html 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/content-with-optional-title/content-with-optional-title.component.ts b/src/app/shared/comcol-page-content/comcol-page-content.component.ts similarity index 73% rename from src/app/shared/content-with-optional-title/content-with-optional-title.component.ts rename to src/app/shared/comcol-page-content/comcol-page-content.component.ts index a838f548d8..da679d31b2 100644 --- a/src/app/shared/content-with-optional-title/content-with-optional-title.component.ts +++ b/src/app/shared/comcol-page-content/comcol-page-content.component.ts @@ -8,11 +8,11 @@ import { Component, Input } from '@angular/core'; */ @Component({ - selector: 'ds-content-with-optional-title', - styleUrls: ['./content-with-optional-title.component.css'], - templateUrl: './content-with-optional-title.component.html' + selector: 'ds-comcol-page-content', + styleUrls: ['./comcol-page-content.component.css'], + templateUrl: './comcol-page-content.component.html' }) -export class ContentWithOptionalTitleComponent { +export class ComcolPageContentComponent { // Optional title @Input() title: string; diff --git a/src/app/shared/dso-name/dso-name.component.html b/src/app/shared/comcol-page-header/comcol-page-header.component.html similarity index 100% rename from src/app/shared/dso-name/dso-name.component.html rename to src/app/shared/comcol-page-header/comcol-page-header.component.html diff --git a/src/app/community-page/field-wrapper/field-wrapper.component.scss b/src/app/shared/comcol-page-header/comcol-page-header.component.scss similarity index 100% rename from src/app/community-page/field-wrapper/field-wrapper.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/dso-logo/dso-logo.component.html b/src/app/shared/comcol-page-logo/comcol-page-logo.component.html similarity index 100% rename from src/app/shared/dso-logo/dso-logo.component.html rename to src/app/shared/comcol-page-logo/comcol-page-logo.component.html diff --git a/src/app/shared/content-with-optional-title/content-with-optional-title.component.scss b/src/app/shared/comcol-page-logo/comcol-page-logo.component.scss similarity index 100% rename from src/app/shared/content-with-optional-title/content-with-optional-title.component.scss rename to src/app/shared/comcol-page-logo/comcol-page-logo.component.scss diff --git a/src/app/shared/dso-logo/dso-logo.component.ts b/src/app/shared/comcol-page-logo/comcol-page-logo.component.ts similarity index 52% rename from src/app/shared/dso-logo/dso-logo.component.ts rename to src/app/shared/comcol-page-logo/comcol-page-logo.component.ts index fc41315415..87239e3a11 100644 --- a/src/app/shared/dso-logo/dso-logo.component.ts +++ b/src/app/shared/comcol-page-logo/comcol-page-logo.component.ts @@ -4,11 +4,11 @@ import { Bitstream } from "../../core/shared/bitstream.model"; @Component({ - selector: 'ds-dso-logo', - styleUrls: ['./dso-logo.component.css'], - templateUrl: './dso-logo.component.html', + selector: 'ds-comcol-page-logo', + styleUrls: ['./comcol-page-logo.component.css'], + templateUrl: './comcol-page-logo.component.html', }) -export class DsoLogoComponent { +export class ComcolPageLogoComponent { @Input() logo: Bitstream; @Input() alternateText: string; diff --git a/src/app/shared/dso-logo/dso-logo.component.scss b/src/app/shared/dso-logo/dso-logo.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/shared/dso-logo/dso-logo.component.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/shared/dso-name/dso-name.component.scss b/src/app/shared/dso-name/dso-name.component.scss deleted file mode 100644 index ad84b72f8c..0000000000 --- a/src/app/shared/dso-name/dso-name.component.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../styles/variables.scss'; \ No newline at end of file diff --git a/src/app/shared/dso-name/dso-name.component.ts b/src/app/shared/dso-name/dso-name.component.ts deleted file mode 100644 index 7f88e3189e..0000000000 --- a/src/app/shared/dso-name/dso-name.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from '@angular/core'; - - -@Component({ - selector: 'ds-dso-name', - styleUrls: ['./dso-name.component.css'], - templateUrl: './dso-name.component.html', -}) -export class DsoNameComponent { - @Input() name: String; -} diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 338fb5fe5d..817ae5f26e 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -14,9 +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 { ContentWithOptionalTitleComponent } from "./content-with-optional-title/content-with-optional-title.component"; -import { DsoNameComponent } from "./dso-name/dso-name.component"; -import { DsoLogoComponent } from "./dso-logo/dso-logo.component"; +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 @@ -39,9 +39,9 @@ const COMPONENTS = [ // put shared components here PaginationComponent, ThumbnailComponent, - ContentWithOptionalTitleComponent, - DsoNameComponent, - DsoLogoComponent + ComcolPageContentComponent, + ComcolPageHeaderComponent, + ComcolPageLogoComponent ]; const PROVIDERS = [ From 8c16918728b3a0f572057b3a4dcf5de218753a9d Mon Sep 17 00:00:00 2001 From: Christian Scheible Date: Fri, 16 Jun 2017 12:34:17 +0200 Subject: [PATCH 5/5] Added unsubscribe to community logo subscription. --- .../collection-page.component.html | 4 +- .../community-page.component.html | 2 +- .../community-page.component.ts | 18 +- src/backend/communities.ts | 168 +++++++++--------- 4 files changed, 100 insertions(+), 92 deletions(-) diff --git a/src/app/collection-page/collection-page.component.html b/src/app/collection-page/collection-page.component.html index f8bfdbc5de..64520d3e84 100644 --- a/src/app/collection-page/collection-page.component.html +++ b/src/app/collection-page/collection-page.component.html @@ -22,11 +22,11 @@ > + [hasInnerHtml]="true"> > + [title]="'collection.page.license'">
diff --git a/src/app/community-page/community-page.component.html b/src/app/community-page/community-page.component.html index 83f6a54033..8a1fbdf18c 100644 --- a/src/app/community-page/community-page.component.html +++ b/src/app/community-page/community-page.component.html @@ -16,7 +16,7 @@ [content]="(communityData.payload | async)?.sidebarText" [hasInnerHtml]="true" [title]="'community.page.news'"> - + ; logoData: RemoteData; + private subs: Subscription[] = []; constructor( private communityDataService: CommunityDataService, @@ -24,12 +26,16 @@ export class CommunityPageComponent implements OnInit { ngOnInit(): void { this.route.params.subscribe((params: Params) => { - this.communityData = this.communityDataService.findById(params['id']) - this.communityData.payload - .subscribe(community => this.logoData = community.logo); + 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/backend/communities.ts b/src/backend/communities.ts index 02f474f66b..d301936cdf 100644 --- a/src/backend/communities.ts +++ b/src/backend/communities.ts @@ -1,87 +1,89 @@ -export const COMMUNITIES = [ - { - "name": "Community 1", - "handle": "10673/1", - "id": "6631", - "uuid": "83cd3281-f241-48be-9234-d876f8010d14", - "type": "community", - "metadata": [ - { - "key": "dc.description", - "value": "

This is the introductory text for the Sample Community on the DSpace Demonstration Site. It is editable by System or Community Administrators (of this Community).

\r\n

DSpace Communities may contain one or more Sub-Communities or Collections (of Items).

\r\n

This particular Community has its own logo (the DuraSpace logo).

", - "language": null - }, - { - "key": "dc.description.abstract", - "value": "This is a sample top-level community", - "language": null - }, - { - "key": "dc.description.tableofcontents", - "value": "

This is the news section for this Sample Community. System or Community Administrators (of this Community) can edit this News field.

", - "language": null - }, - { - "key": "dc.rights", - "value": "

If this Community had special copyright text to display, it would be displayed here.

", - "language": null - }, - { - "key": "dc.title", - "value": "Sample Community", - "language": null - } - ], - "_links": { - "self": { - "href": "http://dspace7.4science.it/dspace-spring-rest/api/core/community/9076bd16-e69a-48d6-9e41-0238cb40d863" - }, - "collections": [ - { "href": "/collections/5179" } +export const COMMUNITIES = { + "communities": [ + { + "name": "Community 1", + "handle": "10673/1", + "id": "6631", + "uuid": "83cd3281-f241-48be-9234-d876f8010d14", + "type": "community", + "metadata": [ + { + "key": "dc.description", + "value": "

This is the introductory text for the Sample Community on the DSpace Demonstration Site. It is editable by System or Community Administrators (of this Community).

\r\n

DSpace Communities may contain one or more Sub-Communities or Collections (of Items).

\r\n

This particular Community has its own logo (the DuraSpace logo).

", + "language": null + }, + { + "key": "dc.description.abstract", + "value": "This is a sample top-level community", + "language": null + }, + { + "key": "dc.description.tableofcontents", + "value": "

This is the news section for this Sample Community. System or Community Administrators (of this Community) can edit this News field.

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

If this Community had special copyright text to display, it would be displayed here.

", + "language": null + }, + { + "key": "dc.title", + "value": "Sample Community", + "language": null + } ], + "_links": { + "self": { + "href": "http://dspace7.4science.it/dspace-spring-rest/api/core/community/9076bd16-e69a-48d6-9e41-0238cb40d863" + }, + "collections": [ + { "href": "/collections/5179" } + ], "logo": { "href": "/bitstreams/4688" } - } - }, - { - "name": "Community 2", - "handle": "10673/2", - "id": "2365", - "uuid": "80eec4c6-70bd-4beb-b3d4-5d46c6343157", - "type": "community", - "metadata": [ - { - "key": "dc.description", - "value": "

This is the introductory text for the Sample Community on the DSpace Demonstration Site. It is editable by System or Community Administrators (of this Community).

\r\n

DSpace Communities may contain one or more Sub-Communities or Collections (of Items).

\r\n

This particular Community has its own logo (the DuraSpace logo).

", - "language": null - }, - { - "key": "dc.description.abstract", - "value": "This is a sample top-level community", - "language": null - }, - { - "key": "dc.description.tableofcontents", - "value": "

This is the news section for this Sample Community. System or Community Administrators (of this Community) can edit this News field.

", - "language": null - }, - { - "key": "dc.rights", - "value": "

If this Community had special copyright text to display, it would be displayed here.

", - "language": null - }, - { - "key": "dc.title", - "value": "Sample Community", - "language": null } - ], - "_links": { - "self": { - "href": "http://dspace7.4science.it/dspace-spring-rest/api/core/community/9076bd16-e69a-48d6-9e41-0238cb40d863" - }, - "collections": [ - { "href": "/collections/6547" } - ] + }, + { + "name": "Community 2", + "handle": "10673/2", + "id": "2365", + "uuid": "80eec4c6-70bd-4beb-b3d4-5d46c6343157", + "type": "community", + "metadata": [ + { + "key": "dc.description", + "value": "

This is the introductory text for the Sample Community on the DSpace Demonstration Site. It is editable by System or Community Administrators (of this Community).

\r\n

DSpace Communities may contain one or more Sub-Communities or Collections (of Items).

\r\n

This particular Community has its own logo (the DuraSpace logo).

", + "language": null + }, + { + "key": "dc.description.abstract", + "value": "This is a sample top-level community", + "language": null + }, + { + "key": "dc.description.tableofcontents", + "value": "

This is the news section for this Sample Community. System or Community Administrators (of this Community) can edit this News field.

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

If this Community had special copyright text to display, it would be displayed here.

", + "language": null + }, + { + "key": "dc.title", + "value": "Sample Community", + "language": null + } + ], + "_links": { + "self": { + "href": "http://dspace7.4science.it/dspace-spring-rest/api/core/community/9076bd16-e69a-48d6-9e41-0238cb40d863" + }, + "collections": [ + { "href": "/collections/6547" } + ] + } } - } -]; + ] +}; \ No newline at end of file