[Library|Trunk]

- display claims: 
	rename  property title to pageTitle -> avoid confusion with HTML tooltip
	add tooltip for claim status
- Search research results service - add check for year in most recent results
- Bottom component: update newsletter url
- Customization: initialize the colors with ligher versions for light background and form



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60916 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2021-04-19 16:28:36 +00:00
parent 81d79c99fb
commit 858b36bd0b
8 changed files with 21 additions and 13 deletions

View File

@ -1,4 +1,4 @@
<schema2jsonld *ngIf="url" [URL]="url" [name]="title" type="other"></schema2jsonld>
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
<div class="uk-width-1-1">
</div>
@ -107,8 +107,13 @@
[externalPortalUrl]=externalPortalUrl [source]="true"></claim-entity>
</div>
<div class="uk-margin-small-bottom">
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-success">available</span>
<ng-template #notAvailable><span class="uk-label uk-label-danger">pending</span></ng-template>
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-success"
[attr.uk-tooltip]="'title:<div class=\'uk-margin uk-padding-small\'>The link information is available in the portal and the APIs.</div>'"
>available
</span>
<ng-template #notAvailable><span class="uk-label uk-label-danger"
[attr.uk-tooltip]="'title:<div class=\'uk-margin uk-padding-small\'>The link information will be added in the portal and the APIs in the next content provision workflow.</div>'"
>pending</span></ng-template>
</div>
<div class="uk-margin-small-bottom"><span *ngIf="showUserEmail" class="uk-margin-right"><span class="title">Claimed by:</span>

View File

@ -30,7 +30,7 @@ declare var UIkit;
})
export class DisplayClaimsComponent {
@Input() piwikSiteId = null;
@Input() title: string = "";
@Input() pageTitle: string = "";
properties: EnvProperties;
public searchTermStream = new Subject<string>();
subscriptions: any = [];
@ -113,11 +113,11 @@ export class DisplayClaimsComponent {
this.sortOptions.push( {label:"User (asc) ", value:{ sort: "user",descending:false }})
}
var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community";
this.updateTitle(this.title);
this.updateTitle(this.pageTitle);
this.updateDescription(description);
this.updateUrl(this.url);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe());
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
}
this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {

View File

@ -24,7 +24,7 @@ import {Subscriber} from "rxjs";
[fetchId]="(fetchId=='openaire')?null:fetchId"
[communityId]="(fetchBy && fetchBy == 'Context' && fetchId && fetchId!='openaire')?fetchId:null"
[externalPortalUrl]=externalPortalUrl [claimsInfoURL]=claimsInfoURL
title="Manage links"></displayClaims>
pageTitle="Manage links"></displayClaims>
</div>
</div>
</div>

View File

@ -23,7 +23,7 @@ import {Subscriber} from "rxjs";
<div>
<displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=true [isAdmin]=false [showUserEmail]=false
[claimsInfoURL]=claimsInfoURL [communityId]=communityId
[piwikSiteId]="piwikSiteId" title="My links">
[piwikSiteId]="piwikSiteId" pageTitle="My links">
</displayClaims>
</div>
</div>

View File

@ -42,10 +42,10 @@ export class CustomizationOptions {
color: this.identity.mainColor,
},
light : {
color: CustomizationOptions.getRGBA(this.identity.mainColor,0.1),
color: CustomizationOptions.getRGBA(this.identity.mainColor,0.05),
},
form : {
color: CustomizationOptions.getRGBA(this.identity.mainColor,0.2),
color: CustomizationOptions.getRGBA(this.identity.mainColor,0.15),
}
};

View File

@ -4,7 +4,9 @@ import {properties} from "../../../environments/environment";
export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
domain = "beta.covid-19.openaire.eu"; //for testing
if(properties.environment == "development") {
domain = "beta.enermaps.openaire.eu"; //for testing
}
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
if (domain.indexOf('openaire.eu') === -1) {
return null;

View File

@ -144,6 +144,7 @@ export class SearchResearchResultsService {
url += "?format=json";
url += "&fq=" + params;
url += "&sortBy=resultdateofacceptance,descending";
url += "&fq=" + encodeURIComponent( "resultacceptanceyear <= " + (new Date()).getFullYear());
url += "&page=" + (page - 1) + "&size=" + size;
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)

View File

@ -150,7 +150,7 @@
<li><a target="_blank" href="https://www.openaire.eu/news/">News</a></li>
<li><a target="_blank" href="https://www.openaire.eu/events">Events</a></li>
<li><a target="_blank" href="https://www.openaire.eu/blogs/magazine">Blogs</a></li>
<li><a target="_blank" href="https://www.openaire.eu/newsletter/listing">Newsletters</a></li>
<li><a target="_blank" href="https://www.openaire.eu/newsletter">Newsletters</a></li>
<li><a target="_blank" href="https://www.openaire.eu/documents">Documents</a></li>
</ul>
</div>
@ -207,7 +207,7 @@
</a>
</div>
<div>
<a target="_blank" href="https://www.openaire.eu/newsletter/listing" class="el-link newsletter">
<a target="_blank" href="https://www.openaire.eu/newsletter" class="el-link newsletter">
<span class="el-title uk-margin uk-text-large">
Newsletter
<span class="el-image uk-icon">