[Trunk | Connect]: Add properties 'depositLearnHowPage' and 'depositSearchPage' and use properties for urls.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56817 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
e97d04f6c3
commit
687385f5b4
|
@ -108,7 +108,9 @@
|
|||
"widgetLink" : "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
|
||||
"claimsInformationLink": "https://beta.openaire.eu/linking",
|
||||
|
||||
"shareInZenodoPage": "/participate/deposit/zenodo?communityId=",
|
||||
"depositLearnHowPage": "/participate/deposit/learn-how",
|
||||
"depositSearchPage": "/participate/deposit/search",
|
||||
"shareInZenodoPage": "/participate/deposit/zenodo",
|
||||
|
||||
"reCaptchaSiteKey": "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P",
|
||||
|
||||
|
|
|
@ -45,13 +45,13 @@
|
|||
uk-scrollspy="cls: uk-animation-fade; target: > div > .uk-card; delay: 450; repeat: false">
|
||||
|
||||
<div
|
||||
*ngIf="publicationTotal != null && publicationTotal > 0 && isEntityEnabled('publication') && isRouteEnabled('/search/find/publications')"
|
||||
*ngIf="publicationTotal != null && publicationTotal > 0 && isEntityEnabled('publication') && isRouteEnabled(searchLinkToPublications)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/publications"><span
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToPublications"><span
|
||||
class="uk-text-bold uk-h5">{{publicationTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">publications</p></a>
|
||||
</div>
|
||||
|
@ -59,26 +59,26 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="researchDataTotal != null && researchDataTotal > 0 && isEntityEnabled('dataset') && isRouteEnabled('/search/find/datasets')"
|
||||
*ngIf="researchDataTotal != null && researchDataTotal > 0 && isEntityEnabled('dataset') && isRouteEnabled(searchLinkToDatasets)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/datasets"><span
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToDatasets"><span
|
||||
class="uk-text-bold uk-h5">{{researchDataTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">research data</p></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
*ngIf="softwareTotal != null && softwareTotal > 0 && isEntityEnabled('software') && isRouteEnabled('/search/find/software')"
|
||||
*ngIf="softwareTotal != null && softwareTotal > 0 && isEntityEnabled('software') && isRouteEnabled(searchLinkToSoftware)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/software"><span
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToSoftware"><span
|
||||
class="uk-text-bold uk-h5">{{softwareTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">software</p></a>
|
||||
</div>
|
||||
|
@ -86,13 +86,13 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="orpTotal != null && orpTotal > 0 && isEntityEnabled('orp') && isRouteEnabled('/search/find/other')"
|
||||
*ngIf="orpTotal != null && orpTotal > 0 && isEntityEnabled('orp') && isRouteEnabled(searchLinkToOrps)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/other"><span
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToOrps"><span
|
||||
class="uk-text-bold uk-h5">{{orpTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">other products</p></a>
|
||||
</div>
|
||||
|
@ -101,13 +101,13 @@
|
|||
|
||||
|
||||
<div
|
||||
*ngIf="projectTotal != null && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled('/search/find/projects')"
|
||||
*ngIf="projectTotal != null && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/projects"><span
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToProjects"><span
|
||||
class="uk-text-bold uk-h5">{{projectTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">projects</p></a>
|
||||
</div>
|
||||
|
@ -115,13 +115,13 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="contentProviderTotal != null && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled('/search/find/dataproviders')"
|
||||
*ngIf="contentProviderTotal != null && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders)"
|
||||
class="uk-padding-remove-left">
|
||||
<div
|
||||
class="uk-card uk-card-default uk-card-body uk-padding-remove uk-margin-small-right uk-height-1-1 uk-margin-bottom ">
|
||||
<div class="uk-margin-top uk-margin-bottom">
|
||||
<a class="uk-margin-auto-vertical uk-margin-auto" [queryParams]=params
|
||||
routerLinkActive="router-link-active" routerLink="/search/find/dataproviders"><span
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToDataProviders"><span
|
||||
class="uk-text-bold uk-h5">{{contentProviderTotal|number}}</span>
|
||||
<p class="uk-text-small uk-margin-remove">content providers</p></a>
|
||||
</div>
|
||||
|
@ -136,7 +136,7 @@
|
|||
<span *ngFor="let subject of community.subjects.slice(0,4) let i=index">
|
||||
<span *ngIf="subject != ''" class="uk-label uk-margin-small-bottom">
|
||||
<a [queryParams]="{subject:createParams(subject), sb: 'and'}"
|
||||
routerLinkActive="router-link-active" routerLink="/search/advanced/publications">
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToAdvancedPublications">
|
||||
{{subject}}
|
||||
</a>
|
||||
</span>{{" "}}
|
||||
|
@ -145,7 +145,7 @@
|
|||
<span *ngFor="let subject of community.subjects.slice(4) let i=index">
|
||||
<span *ngIf="subject != ''" class="uk-label uk-margin-small-bottom">
|
||||
<a [queryParams]="{subject:createParams(subject), sb: 'and'}"
|
||||
routerLinkActive="router-link-active" routerLink="/search/advanced/publications">
|
||||
routerLinkActive="router-link-active" [routerLink]="searchLinkToAdvancedPublications">
|
||||
{{subject}}
|
||||
</a>
|
||||
</span> {{" "}}
|
||||
|
@ -489,9 +489,9 @@
|
|||
<div *ngIf="community.date != null"><span
|
||||
class="lowOpacityColor">Created</span> {{community.date | date:'dd-MM-yyyy'}}</div>
|
||||
<subscribe *ngIf="communityId != null" [communityId]="communityId" showNumbers=true class=""></subscribe>
|
||||
<div *ngIf=" isRouteEnabled('/participate/share-zenodo')" class="">
|
||||
<div *ngIf=" isRouteEnabled(shareInZenodoPage)" class="">
|
||||
<span class="lowOpacityColor">Related Zenodo communities </span>
|
||||
<a [queryParams]=params routerLinkActive="router-link-active" routerLink="/participate/share-zenodo">
|
||||
<a [queryParams]=params routerLinkActive="router-link-active" [routerLink]="shareInZenodoPage">
|
||||
<span>
|
||||
{{zenodoCommunityIdS.length + ((masterZenodoCommunity) ? 1 : 0)}}</span>
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
|
|||
import {SearchCommunityDataprovidersService} from "../openaireLibrary/connect/contentProviders/searchDataproviders.service";
|
||||
import {SearchCommunityProjectsService} from "../openaireLibrary/connect/projects/searchProjects.service";
|
||||
import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
|
||||
import {RouterHelper} from "../openaireLibrary/utils/routerHelper.class";
|
||||
|
||||
@Component({
|
||||
selector: 'community',
|
||||
|
@ -64,6 +65,16 @@ export class CommunityComponent {
|
|||
public activeTab = "publication";
|
||||
public show: string = 'overview';
|
||||
|
||||
searchLinkToPublications: string = null;
|
||||
searchLinkToDatasets: string = null;
|
||||
searchLinkToSoftware: string = null;
|
||||
searchLinkToOrps: string = null;
|
||||
searchLinkToProjects: string = null;
|
||||
searchLinkToDataProviders: string = null;
|
||||
searchLinkToAdvancedPublications: string = null;
|
||||
shareInZenodoPage: string = null;
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
||||
constructor(
|
||||
private element: ElementRef,
|
||||
private route: ActivatedRoute,
|
||||
|
@ -93,6 +104,14 @@ export class CommunityComponent {
|
|||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.searchLinkToPublications = this.properties.searchLinkToPublications;
|
||||
this.searchLinkToDatasets = this.properties.searchLinkToDatasets;
|
||||
this.searchLinkToSoftware = this.properties.searchLinkToSoftware;
|
||||
this.searchLinkToOrps = this.properties.searchLinkToOrps;
|
||||
this.searchLinkToProjects = this.properties.searchLinkToProjects;
|
||||
this.searchLinkToDataProviders = this.properties.searchLinkToDataProviders;
|
||||
this.searchLinkToAdvancedPublications = this.properties.searchLinkToAdvancedPublications;
|
||||
this.shareInZenodoPage = this.properties.shareInZenodoPage;
|
||||
var url = data.envSpecific.baseLink + this._router.url;
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ export class OpenaireDepositComponent {
|
|||
community => {
|
||||
let masterZenodoCommunityId = community.zenodoCommunity;
|
||||
if (masterZenodoCommunityId) {
|
||||
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage+communityId;
|
||||
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage;
|
||||
} else {
|
||||
this.zenodoInformation.url = this.properties.zenodo;
|
||||
this.zenodoInformation.name = "Zenodo";
|
||||
|
|
|
@ -15,7 +15,7 @@ import {FetchZenodoInformation} from './utils/fetchZenodoInformation.class';
|
|||
@Component({
|
||||
selector: 'openaire-search-deposit',
|
||||
template: `
|
||||
<search-dataproviders [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation"></search-dataproviders>
|
||||
<search-dataproviders [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation" [communityId]="communityId"></search-dataproviders>
|
||||
`
|
||||
})
|
||||
|
||||
|
@ -25,6 +25,7 @@ export class OpenaireSearchDataprovidersToDepositComponent {
|
|||
fetchZenodoInformation: FetchZenodoInformation;
|
||||
|
||||
piwikSiteId = null;
|
||||
communityId: string = null;
|
||||
|
||||
constructor ( private route: ActivatedRoute,
|
||||
private _ΖenodoCommunitieService: ZenodoCommunitiesService,
|
||||
|
@ -37,29 +38,28 @@ export class OpenaireSearchDataprovidersToDepositComponent {
|
|||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.route.queryParams.subscribe(params => {
|
||||
let communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
if(!communityId) {
|
||||
communityId = params['communityId'];
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
if(!this.communityId) {
|
||||
this.communityId = params['communityId'];
|
||||
}
|
||||
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[this.communityId];
|
||||
|
||||
if(communityId) {
|
||||
if(this.communityId) {
|
||||
|
||||
if (communityId != null && communityId != '') {
|
||||
if (this.communityId != '') {
|
||||
|
||||
this._communityService.getCommunity(this.properties, this.properties.communityAPI+communityId).subscribe (
|
||||
this._communityService.getCommunity(this.properties, this.properties.communityAPI+this.communityId).subscribe (
|
||||
community => {
|
||||
var community = community;
|
||||
var masterZenodoCommunityId = community.zenodoCommunity;
|
||||
let masterZenodoCommunityId = community.zenodoCommunity;
|
||||
if (masterZenodoCommunityId) {
|
||||
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage+communityId;
|
||||
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage;
|
||||
} else {
|
||||
this.zenodoInformation.url = this.properties.zenodo;
|
||||
this.zenodoInformation.name = "Zenodo";
|
||||
} },
|
||||
error => {
|
||||
this.handleError("Error getting community with id: "+communityId, error);
|
||||
this.handleError("Error getting community with id: "+this.communityId, error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,8 @@ export class FetchZenodoInformation {
|
|||
var CommunityIds = result;
|
||||
var totalResults = CommunityIds.length;
|
||||
if(totalResults > 0) {
|
||||
zenodoInformation.shareInZenodoUrl = properties.shareInZenodoPage+communityId;
|
||||
zenodoInformation.shareInZenodoUrl = properties.shareInZenodoPage;
|
||||
console.info(zenodoInformation.shareInZenodoUrl);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
<div class="communityPanelBackground uk-margin-top uk-padding-small">
|
||||
<div class="uk-container uk-container-large uk-margin-top uk-margin-bottom">
|
||||
<ul class="uk-breadcrumb">
|
||||
<li><a class="breadcrumb" routerLinkActive="router-link-active" routerLink="/participate/deposit/learn-how">Deposit</a></li>
|
||||
<li><a class="breadcrumb" routerLinkActive="router-link-active" routerLink="{{depositLearnHowPage}}"
|
||||
[queryParams]="properties.environment!='development'?{}:routerHelper.createQueryParam('communityId',communityId)">
|
||||
Deposit
|
||||
</a></li>
|
||||
<li><span class="active">Deposit in Zenodo</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -12,6 +12,7 @@ import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/se
|
|||
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
|
||||
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
||||
import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
|
||||
import {RouterHelper} from "../../openaireLibrary/utils/routerHelper.class";
|
||||
|
||||
@Component({
|
||||
selector: 'share-in-zenodo',
|
||||
|
@ -38,7 +39,8 @@ export class ShareInZenodoComponent {
|
|||
zenodoSearchUtils: SearchUtilsClass = new SearchUtilsClass();
|
||||
errorCodes: ErrorCodes = new ErrorCodes();
|
||||
depositLink = "https://zenodo.org/deposit/new?c=";
|
||||
|
||||
depositLearnHowPage: string = null;
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
|
@ -64,6 +66,7 @@ export class ShareInZenodoComponent {
|
|||
if (!this.communityId) {
|
||||
this.communityId = params['communityId'];
|
||||
}
|
||||
this.depositLearnHowPage = this.properties.depositLearnHowPage;
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
if (this.communityId) {
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
|
||||
|
||||
"adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
|
||||
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools",
|
||||
|
||||
"adminToolsCommunity" :"connect",
|
||||
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
|
||||
|
@ -111,7 +111,9 @@
|
|||
"widgetLink" : "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
|
||||
"claimsInformationLink": "https://beta.openaire.eu/linking",
|
||||
|
||||
"shareInZenodoPage": "/participate/deposit/zenodo?communityId=",
|
||||
"depositLearnHowPage": "/participate/deposit/learn-how",
|
||||
"depositSearchPage": "/participate/deposit/search",
|
||||
"shareInZenodoPage": "/participate/deposit/zenodo",
|
||||
|
||||
"reCaptchaSiteKey": "6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu",
|
||||
|
||||
|
|
Loading…
Reference in New Issue