Implement collection home page

Shows the following fields if they exist:
* title
* logo
* introductory text
* news (also referred to as sidebarText)
* copyright text
* license

Fixes https://github.com/DSpace/dspace-angular/issues/63
This commit is contained in:
Àlex Magaz Graça
2017-04-18 14:57:01 +02:00
parent af5b721d40
commit c5d92d4e5f
33 changed files with 233 additions and 3 deletions

View File

@@ -0,0 +1,35 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';
import { Collection } from "../core/shared/collection.model";
import { Bitstream } from "../core/shared/bitstream.model";
import { RemoteData } from "../core/data/remote-data";
import { CollectionDataService } from "../core/data/collection-data.service";
@Component({
selector: 'ds-collection-page',
styleUrls: ['./collection-page.component.css'],
templateUrl: './collection-page.component.html',
})
export class CollectionPageComponent implements OnInit {
collectionData: RemoteData<Collection>;
logoData: RemoteData<Bitstream>;
constructor(
private collectionDataService: CollectionDataService,
private route: ActivatedRoute
) {
this.universalInit();
}
ngOnInit(): void {
this.route.params.subscribe((params: Params) => {
this.collectionData = this.collectionDataService.findById(params['id'])
this.collectionData.payload
.subscribe(collection => this.logoData = collection.logo);
});
}
universalInit() {
}
}