switched back to communities

This commit is contained in:
Art Lowel
2017-06-21 17:01:45 +02:00
parent 5e2bcc5f8f
commit 0dfe19af51
5 changed files with 16 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
import { Component, OnInit, ChangeDetectorRef } from '@angular/core';
import { RemoteData } from "../../core/data/remote-data";
import { ItemDataService } from "../../core/data/item-data.service";
import { Item } from "../../core/shared/item.model";
import { CommunityDataService } from "../../core/data/community-data.service";
import { Community } from "../../core/shared/community.model";
import { PaginationComponentOptions } from "../../shared/pagination/pagination-component-options.model";
import { SortOptions, SortDirection } from "../../core/cache/models/sort-options.model";
@@ -11,12 +11,12 @@ import { SortOptions, SortDirection } from "../../core/cache/models/sort-options
templateUrl: './top-level-community-list.component.html'
})
export class TopLevelCommunityListComponent implements OnInit {
topLevelCommunities: RemoteData<Item[]>;
topLevelCommunities: RemoteData<Community[]>;
config : PaginationComponentOptions;
sortConfig : SortOptions;
constructor(
private cds: ItemDataService,
private cds: CommunityDataService,
private ref: ChangeDetectorRef
) {
this.universalInit();

View File

@@ -1,6 +1,6 @@
<a [routerLink]="['/collections/' + collection.id]">
<a [routerLink]="['/collections/' + collection.id]" class="lead">
{{collection.name}}
</a>
<div *ngIf="collection.findMetadata('dc.description')">
{{collection.findMetadata("dc.description")}}
<div *ngIf="collection.shortDescription" class="text-muted">
{{collection.shortDescription}}
</div>

View File

@@ -1,6 +1,6 @@
<a [routerLink]="['/communities/' + community.id]">
<a [routerLink]="['/communities/' + community.id]" class="lead">
{{community.name}}
</a>
<div *ngIf="community.findMetadata('dc.description')">
{{community.findMetadata("dc.description")}}
<div *ngIf="community.shortDescription" class="text-muted">
{{community.shortDescription}}
</div>

View File

@@ -1,7 +1,7 @@
<a [routerLink]="['/items/' + item.id]">
<a [routerLink]="['/items/' + item.id]" class="lead">
{{item.findMetadata("dc.title")}}
</a>
<div>
<div class="text-muted">
<span *ngIf="item.filterMetadata(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']);" class="item-list-authors">
<span *ngFor="let authorMd of item.filterMetadata(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']); let last=last;">{{authorMd.value}}
<span *ngIf="!last">; </span>

View File

@@ -7,7 +7,7 @@
(pageSizeChange)="onPageSizeChange($event)"
(sortDirectionChange)="onSortDirectionChange($event)"
(sortFieldChange)="onSortDirectionChange($event)">
<ul *ngIf="objects.hasSucceeded | async" class="list-unstyled">
<ul *ngIf="objects.hasSucceeded | async"> <!--class="list-unstyled"-->
<li *ngFor="let object of (objects.payload | async) | paginate: { itemsPerPage: (pageInfo | async)?.elementsPerPage, currentPage: (pageInfo | async)?.currentPage, totalItems: (pageInfo | async)?.totalElements }">
<ds-object-list-element [object]="object"></ds-object-list-element>
</li>