[Trunk|Connect]: Add help texts in curators and share in Zenodo pages, missed on previous commit.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56647 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
84d0608a9d
commit
f389b2bd44
|
@ -1,9 +1,10 @@
|
|||
<ng-container *ngIf="main else child">
|
||||
<div class="image-front-topbar uk-section-default uk-position-relative" uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}" tm-header-transparent="light">
|
||||
<div style=" min-height: 650px;" class="uk-section uk-padding-remove-bottom uk-flex uk-flex-middle">
|
||||
<div class="uk-margin-top uk-align-center">
|
||||
<div class="uk-margin-large-top uk-align-center">
|
||||
<div class="uk-section uk-section-small">
|
||||
<div class="uk-container uk-container-small">
|
||||
<div class="uk-container">
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
<div *ngIf="showLoading" class="uk-margin-large">
|
||||
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><span class="loading-gif uk-align-center" ></span></div>
|
||||
</div>
|
||||
|
@ -63,6 +64,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,10 +2,11 @@ import {Component, Input} from '@angular/core';
|
|||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {CuratorService} from "../openaireLibrary/connect/curators/curator.service";
|
||||
import {Curator} from "../openaireLibrary/utils/entities/CuratorInfo";
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {CommunitiesService} from "../openaireLibrary/connect/communities/communities.service";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
|
||||
@Component({
|
||||
selector: 'curators',
|
||||
|
@ -26,10 +27,14 @@ export class CuratorsComponent {
|
|||
public maxCharacters = 500;
|
||||
|
||||
public properties: EnvProperties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
constructor (private route: ActivatedRoute,
|
||||
private curatorsService: CuratorService,
|
||||
private communitiesService: CommunitiesService) {}
|
||||
private communitiesService: CommunitiesService,
|
||||
private _router: Router,
|
||||
private helper: HelperService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
|
@ -53,7 +58,8 @@ export class CuratorsComponent {
|
|||
if(!this.communityId) {
|
||||
this.communityId = data['communityId'];
|
||||
}
|
||||
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
this.communitiesService.getCommunities(this.properties,
|
||||
this.properties.communityAPI + this.communityId).subscribe(community => {
|
||||
this.managers = community[0].managers;
|
||||
|
@ -74,6 +80,18 @@ export class CuratorsComponent {
|
|||
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public toggle(index: number) {
|
||||
this.showMore[index] = !this.showMore[index];
|
||||
}
|
||||
|
|
|
@ -7,11 +7,12 @@ import {CuratorsComponent} from './curators.component';
|
|||
import {CuratorService} from "../openaireLibrary/connect/curators/curator.service";
|
||||
import {CuratorsRoutingModule} from "./curators-routing.module";
|
||||
import {AffiliationsModule} from "../affiliations/affiliations.module";
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
CuratorsRoutingModule, AffiliationsModule
|
||||
CuratorsRoutingModule, AffiliationsModule, HelperModule
|
||||
],
|
||||
declarations: [
|
||||
CuratorsComponent
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
</div>
|
||||
|
||||
<div class=" uk-section uk-margin-small-top tm-middle uk-container uk-container-large" id="tm-main">
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
<div class="uk-container uk-container-large uk-margin-bottom">
|
||||
<div class="uk-h2">
|
||||
<span class="uk-text-bold">Deposit</span> in Zenodo
|
||||
|
@ -115,4 +116,5 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
|
||||
</div>
|
||||
|
|
|
@ -11,6 +11,7 @@ import {CommunityInfo} from '../../openaireLibrary/connect/community/communityIn
|
|||
import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
|
||||
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
|
||||
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
||||
import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
|
||||
|
||||
@Component({
|
||||
selector: 'share-in-zenodo',
|
||||
|
@ -20,6 +21,8 @@ export class ShareInZenodoComponent {
|
|||
properties: EnvProperties;
|
||||
private communityId: string = null;
|
||||
private community: CommunityInfo = null;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
|
||||
// public warningMessage = "";
|
||||
|
@ -37,8 +40,14 @@ export class ShareInZenodoComponent {
|
|||
depositLink = "https://zenodo.org/deposit/new?c=";
|
||||
|
||||
|
||||
constructor(private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta, private _title: Title, private _ΖenodoCommunitieService: ZenodoCommunitiesService, private _communityService: CommunityService, private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService) {
|
||||
constructor(private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private _ΖenodoCommunitieService: ZenodoCommunitiesService,
|
||||
private _communityService: CommunityService,
|
||||
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService,
|
||||
private helper: HelperService) {
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
|
@ -51,11 +60,12 @@ export class ShareInZenodoComponent {
|
|||
this.updateDescription("Zenodo, repository, deposit, share");
|
||||
this.properties = data.envSpecific;
|
||||
this.route.queryParams.subscribe(params => {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
if(!this.communityId) {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
if (!this.communityId) {
|
||||
this.communityId = params['communityId'];
|
||||
}
|
||||
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
if (this.communityId) {
|
||||
|
||||
if (this.communityId != null && this.communityId != '') {
|
||||
|
@ -74,11 +84,6 @@ export class ShareInZenodoComponent {
|
|||
|
||||
},
|
||||
error => {
|
||||
// var emptyCommunity:ZenodoCommunityInfo = new ZenodoCommunityInfo();
|
||||
// emptyCommunity.id = this.masterZenodoCommunityId;
|
||||
// emptyCommunity.title = this.masterZenodoCommunityId;
|
||||
// this.masterZenodoCommunity = emptyCommunity;
|
||||
//console.error("Master Zenodo community'"+this.masterZenodoCommunityId+"' couldn't be loaded");
|
||||
this.handleError("Error getting Master Zenodo community with id: " + this.masterZenodoCommunityId, error);
|
||||
|
||||
}
|
||||
|
@ -139,6 +144,18 @@ export class ShareInZenodoComponent {
|
|||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
getZenodoCommunityById(zenodoid, openaireId) {
|
||||
this._ΖenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + zenodoid, openaireId).subscribe(
|
||||
result => {
|
||||
|
|
|
@ -12,11 +12,12 @@ import {SearchZenodoCommunitiesServiceModule} from '../../openaireLibrary/connec
|
|||
|
||||
import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {HelperModule} from "../../openaireLibrary/utils/helper/helper.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,ShareInZenodoRoutingModule, ZenodoCommunitiesServiceModule, SearchZenodoCommunitiesServiceModule,
|
||||
RouterModule
|
||||
RouterModule, HelperModule
|
||||
],
|
||||
declarations: [
|
||||
ShareInZenodoComponent
|
||||
|
|
Loading…
Reference in New Issue