Merge branch '460-coll-pages-revisions' into 460-coll-pages

This commit is contained in:
L. Henze
2019-09-18 13:20:07 -04:00
9 changed files with 58 additions and 26 deletions

View File

@@ -140,9 +140,10 @@
"collection.form.title": "Name",
"collection.page.browse.recent.head": "Recent Submissions",
"collection.page.browse.recent.empty": "No items to show",
"collection.page.handle": "Handle",
"collection.page.handle": "Collection Handle",
"collection.page.license": "License",
"collection.page.news": "News",
"collection.landing.head": "Submission date",
"community.create.head": "Create a Community",
"community.create.sub-head": "Create a Sub-Community for Community {{ parent }}",
@@ -160,9 +161,10 @@
"community.form.rights": "Copyright text (HTML)",
"community.form.tableofcontents": "News (HTML)",
"community.form.title": "Name",
"community.page.handle": "Handle",
"community.page.handle": "Community Handle",
"community.page.license": "License",
"community.page.news": "News",
"community.landing.head": "Subcommunities and Collections",
"community.sub-collection-list.head": "Collections of this Community",
"community.sub-community-list.head": "Communities of this Community",

View File

@@ -12,8 +12,10 @@
<ds-comcol-page-content [content]="parentContext.sidebarText" [hasInnerHtml]="true" [title]="'community.page.news'">
</ds-comcol-page-content>
<!-- Handle -->
<ds-comcol-page-content [content]="parentContext.handle" [hasInnerHtml]="true" [title]="'Handle'" >
</ds-comcol-page-content>
<ds-comcol-page-handle
[content]="parentContext.handle"
[title]="parentContext.type+'.page.handle'" >
</ds-comcol-page-handle>
<!-- Browse-By Links -->
<ds-comcol-page-browse-by [id]="parentContext.id" [contentType]="parentContext.type"></ds-comcol-page-browse-by>
</header>

View File

@@ -7,6 +7,7 @@
<!-- Collection logo -->
<ds-comcol-page-logo *ngIf="logoRD$"
[logo]="(logoRD$ | async)?.payload" [alternateText]="'Collection Logo'">
[alternateText]="'Collection Logo'">
</ds-comcol-page-logo>
<!-- Collection Name -->
<ds-comcol-page-header
@@ -24,11 +25,10 @@
[title]="'collection.page.news'">
</ds-comcol-page-content>
<!-- Handle -->
<ds-comcol-page-content
<ds-comcol-page-handle
[content]="collection.handle"
[hasInnerHtml]="true"
[title]="'collection.page.handle'" >
</ds-comcol-page-content>
</ds-comcol-page-handle>
<!-- Browse-By Links -->
<ds-comcol-page-browse-by
[id]="collection.id"
@@ -55,7 +55,7 @@
</div>
</ng-container>
<footer>
<!-- Licence -->
<!-- License -->
<ds-comcol-page-content
[content]="collection.dcLicense"
[title]="'collection.page.license'">

View File

@@ -1,12 +1,14 @@
<div class="container" *ngVar="(communityRD$ | async) as communityRD">
<div class="community-page" *ngIf="communityRD?.hasSucceeded" @fadeInOut>
<div *ngIf="communityRD?.payload; let communityPayload">
<!-- Community name -->
<ds-comcol-page-header [name]="communityPayload.name"></ds-comcol-page-header>
<!-- Community logo -->
<ds-comcol-page-logo *ngIf="logoRD$"
[logo]="(logoRD$ | async)?.payload"
[alternateText]="'Community Logo'">
<!-- Community name -->
<ds-comcol-page-header [name]="communityPayload.name"></ds-comcol-page-header>
</ds-comcol-page-logo>
<!-- Introductory text -->
<ds-comcol-page-content
@@ -25,8 +27,10 @@
[hasInnerHtml]="true">
</ds-comcol-page-content>
<!-- Handle -->
<ds-comcol-page-content [content]="communityPayload.handle" [hasInnerHtml]="true" [title]="'community.page.handle'" >
</ds-comcol-page-content>
<ds-comcol-page-handle
[content]="communityPayload.handle"
[title]="'community.page.handle'" >
</ds-comcol-page-handle>
<!-- Browse-By Links -->
<ds-comcol-page-browse-by [id]="communityPayload.id" [contentType]="communityPayload.type"></ds-comcol-page-browse-by>

View File

@@ -1,10 +1,8 @@
<h2 class="comcol-browse-label">{{'browse.comcol.head' | translate}}</h2>
<nav class="comcol-browse" aria-label="Browse Community or Collection" >
<div class="comcol-browse-label">{{'browse.comcol.head' | translate}}</div>
<div class="list-group list-group-horizontal">
<a *ngIf="contentType=='collection'" [routerLink]="['/collections/' + id ]" class="list-group-item" routerLinkActive="active">
Submission date</a>
<a *ngIf="contentType=='community'" [routerLink]="['/communities/' + id ]" class="list-group-item" routerLinkActive="active">
Subcommunities and collections</a>
<a *ngIf="contentType=='collection'" [routerLink]="['/collections/' + id ]" class="list-group-item" routerLinkActive="active">{{'collection.landing.head' | translate}}</a>
<a *ngIf="contentType=='community'" [routerLink]="['/communities/' + id ]" class="list-group-item" routerLinkActive="active" >{{'community.landing.head' | translate}}</a>
<a *ngFor="let config of types" class="list-group-item" [routerLink]="['/browse/' + config.id]" [queryParams]="{scope: id}" routerLinkActive="active">{{'browse.comcol.by.' + config.id | translate}}</a>
</div>
</nav>

View File

@@ -0,0 +1,4 @@
<div *ngIf="content" class="content-with-optional-title mb-2">
<h2 *ngIf="title">{{ title | translate }}</h2>
<div><a href="{{content}}">{{content}}</a></div>
</div>

View File

@@ -0,0 +1,20 @@
import { Component, Input } from '@angular/core';
/**
* This component renders the value of "handle"
*/
@Component({
selector: 'ds-comcol-page-handle',
styleUrls: ['./comcol-page-handle.component.scss'],
templateUrl: './comcol-page-handle.component.html'
})
export class ComcolPageHandleComponent {
// Optional title
@Input() title: string;
// The content to render. Might be html
@Input() content: string;
}

View File

@@ -36,6 +36,7 @@ import { WrapperGridElementComponent } from './object-grid/wrapper-grid-element/
import { ObjectGridComponent } from './object-grid/object-grid.component';
import { ObjectCollectionComponent } from './object-collection/object-collection.component';
import { ComcolPageContentComponent } from './comcol-page-content/comcol-page-content.component';
import { ComcolPageHandleComponent } from './comcol-page-handle/comcol-page-handle.component';
import { ComcolPageHeaderComponent } from './comcol-page-header/comcol-page-header.component';
import { ComcolPageLogoComponent } from './comcol-page-logo/comcol-page-logo.component';
import { ErrorComponent } from './error/error.component';
@@ -192,6 +193,7 @@ const COMPONENTS = [
UserMenuComponent,
ChipsComponent,
ComcolPageContentComponent,
ComcolPageHandleComponent,
ComcolPageHeaderComponent,
ComcolPageLogoComponent,
ComColFormComponent,