Merge remote-tracking branch 'remotes/origin/master' into notifications

This commit is contained in:
Giuseppe Digilio
2018-04-12 14:57:09 +02:00
4 changed files with 9 additions and 13 deletions

View File

@@ -63,7 +63,7 @@
"test:headless": "karma start --single-run --browsers ChromeHeadless", "test:headless": "karma start --single-run --browsers ChromeHeadless",
"test:watch": "karma start --no-single-run --auto-watch", "test:watch": "karma start --no-single-run --auto-watch",
"webdriver:start": "node node_modules/protractor/bin/webdriver-manager start --seleniumPort 4444", "webdriver:start": "node node_modules/protractor/bin/webdriver-manager start --seleniumPort 4444",
"webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone", "webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone --gecko false",
"lint": "tslint \"src/**/*.ts\" && tslint \"e2e/**/*.ts\"", "lint": "tslint \"src/**/*.ts\" && tslint \"e2e/**/*.ts\"",
"docs": "typedoc --options typedoc.json ./src/", "docs": "typedoc --options typedoc.json ./src/",
"coverage": "http-server -c-1 -o -p 9875 ./coverage" "coverage": "http-server -c-1 -o -p 9875 ./coverage"

View File

@@ -8,7 +8,7 @@
[logo]="(logoRDObs | async)?.payload" [logo]="(logoRDObs | async)?.payload"
[alternateText]="'Community Logo'"> [alternateText]="'Community Logo'">
</ds-comcol-page-logo> </ds-comcol-page-logo>
<!-- Introductionary text --> <!-- Introductory text -->
<ds-comcol-page-content <ds-comcol-page-content
[content]="communityPayload.introductoryText" [content]="communityPayload.introductoryText"
[hasInnerHtml]="true"> [hasInnerHtml]="true">
@@ -24,7 +24,7 @@
[content]="communityPayload.copyrightText" [content]="communityPayload.copyrightText"
[hasInnerHtml]="true"> [hasInnerHtml]="true">
</ds-comcol-page-content> </ds-comcol-page-content>
<ds-community-page-sub-collection-list></ds-community-page-sub-collection-list> <ds-community-page-sub-collection-list [community]="communityPayload"></ds-community-page-sub-collection-list>
</div> </div>
</div> </div>
<ds-error *ngIf="communityRD?.hasFailed" message="{{'error.community' | translate}}"></ds-error> <ds-error *ngIf="communityRD?.hasFailed" message="{{'error.community' | translate}}"></ds-error>

View File

@@ -2,7 +2,7 @@
<div *ngIf="subCollectionsRD?.hasSucceeded" @fadeIn> <div *ngIf="subCollectionsRD?.hasSucceeded" @fadeIn>
<h2>{{'community.sub-collection-list.head' | translate}}</h2> <h2>{{'community.sub-collection-list.head' | translate}}</h2>
<ul> <ul>
<li *ngFor="let collection of subCollectionsRD?.payload?.page"> <li *ngFor="let collection of subCollectionsRD?.payload">
<p> <p>
<span class="lead"><a [routerLink]="['/collections', collection.id]">{{collection.name}}</a></span><br> <span class="lead"><a [routerLink]="['/collections', collection.id]">{{collection.name}}</a></span><br>
<span class="text-muted">{{collection.shortDescription}}</span> <span class="text-muted">{{collection.shortDescription}}</span>

View File

@@ -1,10 +1,9 @@
import { Component, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
import { CollectionDataService } from '../../core/data/collection-data.service';
import { PaginatedList } from '../../core/data/paginated-list';
import { RemoteData } from '../../core/data/remote-data'; import { RemoteData } from '../../core/data/remote-data';
import { Collection } from '../../core/shared/collection.model'; import { Collection } from '../../core/shared/collection.model';
import { Community } from '../../core/shared/community.model';
import { fadeIn } from '../../shared/animations/fade'; import { fadeIn } from '../../shared/animations/fade';
@@ -15,13 +14,10 @@ import { fadeIn } from '../../shared/animations/fade';
animations:[fadeIn] animations:[fadeIn]
}) })
export class CommunityPageSubCollectionListComponent implements OnInit { export class CommunityPageSubCollectionListComponent implements OnInit {
subCollectionsRDObs: Observable<RemoteData<PaginatedList<Collection>>>; @Input() community: Community;
subCollectionsRDObs: Observable<RemoteData<Collection[]>>;
constructor(private cds: CollectionDataService) {
}
ngOnInit(): void { ngOnInit(): void {
this.subCollectionsRDObs = this.cds.findAll(); this.subCollectionsRDObs = this.community.collections;
} }
} }