Skip to content
Snippets Groups Projects
Commit 9208aae0 authored by Art Lowel's avatar Art Lowel
Browse files

Merge branch 'master' into rest-embedded

parents 739371cb d4b7f5f9
Branches
Tags
No related merge requests found
Showing
with 184 additions and 11 deletions
......@@ -18,14 +18,16 @@ cache:
directories:
- node_modules
bundler_args: --retry 5
before_install:
- yarn run global
- travis_retry yarn run global
install:
- yarn install
- travis_retry yarn install
before_script:
- yarn run build
- travis_wait yarn run build
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
......
......@@ -4,7 +4,12 @@
"link.dspace": "DSpace software",
"link.duraspace": "DuraSpace"
},
"collection": {
"page": {
"news": "News",
"license": "License"
}
},
"item": {
"page": {
"author": "Author",
......@@ -12,24 +17,31 @@
"date": "Date",
"uri": "URI",
"files": "Files",
"collections": "Collections"
"collections": "Collections",
"filesection": {
"download": "Download",
"name": "Name:",
"format": "Format:",
"size": "Size:",
"description": "Description:"
},
"link": {
"simple": "Simple item page",
"full": "Full item page"
}
}
},
"nav": {
"home": "Home"
},
"pagination": {
"results-per-page": "Results Per Page",
"showing": {
"label" : "Now showing items ",
"label": "Now showing items ",
"detail": "{{ range }} of {{ total }}"
}
},
"title": "DSpace",
"404": {
"help": "We can't find the page you're looking for. The page may have been moved or deleted. You can use the button below to get back to the home page. ",
"page-not-found": "page not found",
......@@ -37,7 +49,6 @@
"home-page": "Take me to the home page"
}
},
"home": {
"top-level-communities": {
"head": "Communities in DSpace",
......
......@@ -9,6 +9,7 @@ import { SharedModule } from './shared/shared.module';
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 { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
......@@ -22,6 +23,7 @@ import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
SharedModule,
HomeModule,
ItemPageModule,
CollectionPageModule,
CoreModule.forRoot(),
AppRoutingModule
],
......
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CollectionPageComponent } from './collection-page.component';
@NgModule({
imports: [
RouterModule.forChild([
{ path: 'collections/:id', component: CollectionPageComponent }
])
]
})
export class CollectionPageRoutingModule { }
<div class="collection-page" *ngIf="collectionData.hasSucceeded | async">
<ds-collection-page-name [name]="(collectionData.payload | async)?.name"></ds-collection-page-name>
<ds-collection-page-logo *ngIf="logoData" [logo]="logoData.payload | async"></ds-collection-page-logo>
<ds-collection-page-introductory-text
[introductoryText]="(collectionData.payload | async)?.introductoryText">
</ds-collection-page-introductory-text>
<ds-collection-page-news
[sidebarText]="(collectionData.payload | async)?.sidebarText">
</ds-collection-page-news>
<ds-collection-page-copyright
[copyrightText]="(collectionData.payload | async)?.copyrightText">
</ds-collection-page-copyright>
<ds-collection-page-license
[license]="(collectionData.payload | async)?.license">
</ds-collection-page-license>
</div>
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() {
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TranslateModule } from "@ngx-translate/core";
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({
imports: [
CollectionPageRoutingModule,
CommonModule,
TranslateModule,
],
declarations: [
CollectionPageComponent,
FieldWrapperComponent,
CollectionPageNameComponent,
CollectionPageLogoComponent,
CollectionPageIntroductoryTextComponent,
CollectionPageNewsComponent,
CollectionPageCopyrightComponent,
CollectionPageLicenseComponent,
]
})
export class CollectionPageModule { }
<ds-field-wrapper *ngIf="copyrightText" class="collection-page-copyright">
<p [innerHtml]="copyrightText"></p>
</ds-field-wrapper>
\ No newline at end of file
@import '../../../styles/variables.scss';
\ No newline at end of file
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;
}
<div class="collection-page-field-wrapper">
<ng-content></ng-content>
</div>
\ No newline at end of file
@import '../../../styles/variables.scss';
\ No newline at end of file
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;
}
<ds-field-wrapper *ngIf="introductoryText" class="collection-page-introductory-text">
<p [innerHtml]="introductoryText"></p>
</ds-field-wrapper>
\ No newline at end of file
@import '../../../styles/variables.scss';
\ No newline at end of file
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;
}
<ds-field-wrapper *ngIf="license" class="collection-page-license">
<h2>{{ 'collection.page.license' | translate }}</h2>
<p>{{ license }}</p>
</ds-field-wrapper>
\ No newline at end of file
@import '../../../styles/variables.scss';
\ No newline at end of file
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;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment