Claims:
use "externalPortalUrl" property for admin claims where the current portal that shows the claims is not the same with the portal with the linking and the landing pages in display entities use the "externalPortalUrl" property if available and add href instead of router use environment property in order to create "externalPortalUrl" git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54666 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
a2fed50ea1
commit
2a4b7173fe
|
@ -153,8 +153,8 @@
|
|||
<tr *ngFor="let claim of claims " >
|
||||
<td *ngIf="enableDelete"><input [id]="claim.id" type="checkbox" (click)="select(claim,$event)" [ngModel]="isSelected(claim.id)"/></td>
|
||||
<td></td>
|
||||
<td><claim-entity [entity]="claim.target" [type]="claim.targetType" [(properties)]=properties> </claim-entity></td>
|
||||
<td><claim-entity [entity]="claim.source" [type]="claim.sourceType" [(properties)]=properties> </claim-entity></td>
|
||||
<td><claim-entity [entity]="claim.target" [type]="claim.targetType" [(properties)]=properties [externalPortalUrl]=externalPortalUrl> </claim-entity></td>
|
||||
<td><claim-entity [entity]="claim.source" [type]="claim.sourceType" [(properties)]=properties [externalPortalUrl]=externalPortalUrl> </claim-entity></td>
|
||||
<td *ngIf="showUserEmail">{{claim.userMail}}</td>
|
||||
<td>{{claim.date}}</td>
|
||||
</tr>
|
||||
|
@ -165,19 +165,16 @@
|
|||
|
||||
</div>
|
||||
<div class="uk-width-1-5">
|
||||
<div class="uk-card portal-card uk-padding" *ngIf="moreClaimsURL || claimsInfoURL">
|
||||
<h6 *ngIf="moreClaimsURL.indexOf('http')==-1" class="uk-h6">
|
||||
<a class="el-content uk-link-text" [routerLink]="moreClaimsURL">Claim more links?</a>
|
||||
<div class="uk-card portal-card uk-padding" *ngIf="externalPortalUrl || claimsInfoURL">
|
||||
<h6 *ngIf="externalPortalUrl.indexOf('http')==-1" class="uk-h6">
|
||||
<a class="el-content uk-link-text" routerLink="/participate/claim">Claim more links?</a>
|
||||
</h6>
|
||||
<h6 *ngIf="moreClaimsURL.indexOf('http')!=-1" class="uk-h6">
|
||||
<a class="el-content uk-link-text" [href]="moreClaimsURL" target="_blank">Claim more links?</a>
|
||||
<h6 *ngIf="externalPortalUrl.indexOf('http')!=-1" class="uk-h6">
|
||||
<a class="el-content uk-link-text" [href]="externalPortalUrl+'/participate/claim'" target="_blank">Claim more links?</a>
|
||||
</h6>
|
||||
<h6 *ngIf="claimsInfoURL" class="uk-h6 uk-margin-small-top">
|
||||
<a class="el-content uk-link-text" [href]="claimsInfoURL" target="_blank">Learn more</a>
|
||||
</h6>
|
||||
<!-- <div *ngIf="moreClaimsURL.indexOf('http')==-1"><a [routerLink]="moreClaimsURL">Claim more links?</a></div>
|
||||
<div *ngIf="moreClaimsURL.indexOf('http')!=-1" ><a [href]="moreClaimsURL" target="_blank">Claim more links?</a></div>
|
||||
<div><a [href]="claimsInfoURL" target="_blank">Learn more</a></div> -->
|
||||
</div>
|
||||
<helper position="right" styleName=" uk-width-1-5"></helper>
|
||||
</div>
|
||||
|
|
|
@ -96,7 +96,7 @@ private seoService: SEOService) {
|
|||
navigateTo: string = "Claims";
|
||||
resultsNum: number ;
|
||||
claims: string[];
|
||||
@Input() moreClaimsURL:string;// ="/participate/claim";
|
||||
@Input() externalPortalUrl:string = null;
|
||||
@Input() claimsInfoURL:string;// ="https://www.openaire.eu/linking";
|
||||
|
||||
@ViewChild (ModalLoading) loading : ModalLoading ;
|
||||
|
|
|
@ -9,27 +9,27 @@ import{EnvProperties} from '../../../utils/properties/env-properties';
|
|||
template: `
|
||||
<div *ngIf="type == 'publication'" title="Publication">
|
||||
<span class="uk-margin-small-right uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect><polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline></svg></span>
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" [id]="entity.openaireId" param="articleId" path="/search/publication"></publication-title>
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" [id]="entity.openaireId" param="articleId" path="/search/publication" [externalPortalUrl]=externalPortalUrl></publication-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'dataset'" title="Dataset">
|
||||
<span class="uk-margin-small-right uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><ellipse fill="none" stroke="#000" cx="10" cy="4.64" rx="7.5" ry="3.14"></ellipse><path fill="none" stroke="#000" d="M17.5,8.11 C17.5,9.85 14.14,11.25 10,11.25 C5.86,11.25 2.5,9.84 2.5,8.11"></path><path fill="none" stroke="#000" d="M17.5,11.25 C17.5,12.99 14.14,14.39 10,14.39 C5.86,14.39 2.5,12.98 2.5,11.25"></path><path fill="none" stroke="#000" d="M17.49,4.64 L17.5,14.36 C17.5,16.1 14.14,17.5 10,17.5 C5.86,17.5 2.5,16.09 2.5,14.36 L2.5,4.64"></path></svg></span>
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" [id]="entity.openaireId" param="datasetId" path="/search/dataset"></publication-title>
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" [id]="entity.openaireId" param="datasetId" path="/search/dataset" [externalPortalUrl]=externalPortalUrl></publication-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'software'" title="Software">
|
||||
<span class="uk-margin-small-right uk-icon" >
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <circle fill="none" stroke="#000" cx="9.997" cy="10" r="3.31"></circle> <path fill="none" stroke="#000" d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z"></path></svg>
|
||||
</span>
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" [id]="entity.openaireId" param="softwareId" path="/search/software"></publication-title>
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" [id]="entity.openaireId" param="softwareId" path="/search/software" [externalPortalUrl]=externalPortalUrl></publication-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'other'" title="Other reserch product">
|
||||
<span class="uk-margin-small-right uk-icon" >
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polygon fill="none" stroke="#000" points="2.5,5.7 10,1.3 17.5,5.7 17.5,14.3 10,18.7 2.5,14.3"></polygon> <circle fill="none" stroke="#000" cx="10" cy="10" r="3.5"></circle></svg>
|
||||
</span>
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" [id]="entity.openaireId" param="orpId" path="/search/other" ></publication-title>
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" [id]="entity.openaireId" param="orpId" path="/search/other" [externalPortalUrl]=externalPortalUrl ></publication-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'project' " title="Project">
|
||||
<span class="uk-margin-small-right uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="5" y="2" width="10" height="1"></rect><rect x="3" y="4" width="14" height="1"></rect><rect fill="none" stroke="#000" x="1.5" y="6.5" width="17" height="11"></rect></svg></span>
|
||||
<project-title [project]="entity" [(searchLink)]=properties.searchLinkToProject></project-title>
|
||||
<project-title [project]="entity" [(searchLink)]=properties.searchLinkToProject [externalPortalUrl]=externalPortalUrl></project-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'context' " title="Concept">
|
||||
<span class="uk-margin-small-right uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="7.7" cy="8.6" r="3.5"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3"></path><path fill="none" stroke="#000" stroke-width="1.1" d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"></path></svg></span>
|
||||
|
@ -42,6 +42,7 @@ export class ClaimEntityFormatter {
|
|||
@Input() entity: string[];
|
||||
@Input() type: string;
|
||||
@Input() properties: EnvProperties;
|
||||
@Input() externalPortalUrl:string = null;
|
||||
|
||||
constructor () {}
|
||||
|
||||
|
|
|
@ -6,7 +6,10 @@ import {RouterHelper} from '../../../utils/routerHelper.class';
|
|||
@Component({
|
||||
selector: 'project-title',
|
||||
template: `
|
||||
<span class="project-title">
|
||||
<span *ngIf="externalPortalUrl" class="project-title">
|
||||
<span ><a [href] = "externalPortalUrl + '/search/project?projectId='+project['openaireId']" >{{project['name']}} ({{project['funderName']}})</a></span>
|
||||
</span>
|
||||
<span *ngIf="!externalPortalUrl" class="project-title">
|
||||
<span ><a [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" routerLinkActive="router-link-active" routerLink="/search/project" >{{project['name']}} ({{project['funderName']}})</a></span>
|
||||
</span>
|
||||
`
|
||||
|
@ -15,6 +18,7 @@ import {RouterHelper} from '../../../utils/routerHelper.class';
|
|||
export class ProjectTitleFormatter {
|
||||
@Input() project: string[];
|
||||
@Input() searchLink: string;
|
||||
@Input() externalPortalUrl:string = null;
|
||||
public url:string;
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
constructor () {}
|
||||
|
|
|
@ -6,12 +6,16 @@ import {RouterHelper} from '../../../utils/routerHelper.class';
|
|||
@Component({
|
||||
selector: 'publication-title',
|
||||
template: `
|
||||
<span class="publication-title">
|
||||
<span *ngIf="!externalPortalUrl" class="publication-title">
|
||||
|
||||
<span *ngIf="id" ><a [queryParams]="routerHelper.createQueryParam(param,id)" routerLinkActive="router-link-active" [routerLink]="path" > {{title}}</a></span>
|
||||
<!--span *ngIf="url" class="uk-margin-small-left" ><a target="_blank" href="{{url}}" >
|
||||
(<span class="custom-external custom-icon" ></span>link)</a></span-->
|
||||
</span>
|
||||
<span *ngIf="externalPortalUrl" class="publication-title">
|
||||
|
||||
<span *ngIf="id" ><a [href] = "externalPortalUrl + path+'?'+param+'='+id" > {{title}}</a></span>
|
||||
</span>
|
||||
`
|
||||
})
|
||||
|
||||
|
@ -21,6 +25,7 @@ export class PublicationTitleFormatter {
|
|||
@Input() id: string;
|
||||
@Input() param: string;
|
||||
@Input() path: string;
|
||||
@Input() externalPortalUrl:string = null;
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
constructor () {}
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ import {Observable} from 'rxjs/Observable';
|
|||
<div>
|
||||
<!--div class="uk-text-right">
|
||||
<a *ngIf="!fetchBy || fetchBy != 'Context'" routerLink="/participate/claim">Claim more links?</a>
|
||||
<a *ngIf="isConnect && fetchBy && fetchBy == 'Context' && fetchId" [href]="'https://beta.'+fetchId+'.openaire.eu/participate/claim'" target="_blank">Claim more links?</a>
|
||||
<a *ngIf="isConnect && fetchBy && fetchBy == 'Context'" [href]="externalPortalUrl+'/participate/claim'" target="_blank">Claim more links?</a>
|
||||
</div-->
|
||||
<displayClaims [enableDelete]=true [myClaims]=false [isAdmin]=true [fetchBy]= fetchBy [fetchId]=fetchId
|
||||
[communityId]="(fetchBy && fetchBy == 'Context')?fetchId:null" [moreClaimsURL]=moreClaimsURL [claimsInfoURL]=claimsInfoURL></displayClaims>
|
||||
<displayClaims [enableDelete]=true [myClaims]=false [isAdmin]=true [fetchBy]= "(fetchId=='openaire')?null:fetchBy" [fetchId]="(fetchId=='openaire')?null:fetchId"
|
||||
[communityId]="(fetchBy && fetchBy == 'Context' && fetchId && fetchId!='openaire')?fetchId:null" [externalPortalUrl]=externalPortalUrl [claimsInfoURL]=claimsInfoURL></displayClaims>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -36,7 +36,7 @@ export class ClaimsAdminComponent {
|
|||
@Input() fetchBy:string;
|
||||
@Input() fetchId:string;
|
||||
@Input() isConnect:boolean = false;
|
||||
@Input() moreClaimsURL:string;
|
||||
@Input() externalPortalUrl:string;
|
||||
@Input() claimsInfoURL:string;
|
||||
constructor ( private _meta: Meta, private _title: Title) {
|
||||
var titleConnect = "OpenAIRE Connect | Manage links ";
|
||||
|
|
Loading…
Reference in New Issue