[Library | Trunk]: 1. Contact us css changes. 2. Search for monitor. 3. Landing for monitor
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59007 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
1b576e5a40
commit
d07a30b5ca
|
@ -5,36 +5,36 @@
|
|||
<div class="uk-margin-small uk-width-1-1 uk-text-danger uk-text-bold uk-margin-remove-bottom">
|
||||
*Required fields
|
||||
</div>
|
||||
<div *ngIf="contactForm.get('name')" class="uk-width-1-2@s uk-margin-small-top">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom">
|
||||
<div *ngIf="contactForm.get('name')" class="uk-width-1-2@s uk-margin-top">
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">
|
||||
Name <span class="uk-text-danger uk-text-bold">*</span>
|
||||
</h5>
|
||||
<input class="uk-input" type="text" placeholder="Your name" formControlName="name"
|
||||
[class.uk-form-danger]="contactForm.get('name').invalid && contactForm.get('name').touched">
|
||||
</div>
|
||||
<div *ngIf="contactForm.get('surname')" class="uk-width-1-2@s uk-margin-small-top">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom">
|
||||
<div *ngIf="contactForm.get('surname')" class="uk-width-1-2@s uk-margin-top">
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">
|
||||
Surname <span class="uk-text-danger uk-text-bold">*</span>
|
||||
</h5>
|
||||
<input class="uk-input" type="text" placeholder="Your surname" formControlName="surname"
|
||||
[class.uk-form-danger]="contactForm.get('surname').invalid && contactForm.get('surname').touched">
|
||||
</div>
|
||||
<div *ngIf="contactForm.get('email')" class="uk-width-1-2@s uk-margin-small-top">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom">
|
||||
<div *ngIf="contactForm.get('email')" class="uk-width-1-2@s uk-margin-top">
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">
|
||||
Email <span class="uk-text-danger uk-text-bold">*</span>
|
||||
</h5>
|
||||
<input class="uk-input" type="text" placeholder="Preferably your work email" formControlName="email"
|
||||
[class.uk-form-danger]="contactForm.get('email').invalid && contactForm.get('email').touched">
|
||||
</div>
|
||||
<div *ngIf="contactForm.get('job')" class="uk-width-1-2@s uk-margin-small-top">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom">
|
||||
<div *ngIf="contactForm.get('job')" class="uk-width-1-2@s uk-margin-top">
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">
|
||||
Job Title <span class="uk-text-danger uk-text-bold">*</span>
|
||||
</h5>
|
||||
<input class="uk-input" type="text" placeholder="Your job title" formControlName="job"
|
||||
[class.uk-form-danger]="contactForm.get('job').invalid && contactForm.get('job').touched">
|
||||
</div>
|
||||
<div *ngIf="contactForm.get('affiliation')" class="uk-width-1-2@s uk-margin-small-top">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom">
|
||||
<div *ngIf="contactForm.get('affiliation')" class="uk-width-1-2@s uk-margin-top">
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">
|
||||
Affiliation <span class="uk-text-danger uk-text-bold">*</span>
|
||||
</h5>
|
||||
<input class="uk-input" type="text" placeholder="Your affiliation" formControlName="affiliation"
|
||||
|
@ -42,22 +42,18 @@
|
|||
</div>
|
||||
<div *ngIf="contactForm.get('community')" class="uk-width-1-2@s uk-margin-top">
|
||||
<div class="uk-width-1-1">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom uk-text-nowrap">Research Community or Infrastructure <span class="uk-text-danger uk-text-bold">*</span></h5>
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom uk-text-nowrap">Research Community or Infrastructure <span class="uk-text-danger uk-text-bold">*</span></h5>
|
||||
</div>
|
||||
<input class="uk-input uk-width-1" type="text" placeholder="Your community name" formControlName="community"
|
||||
[class.uk-form-danger]="contactForm.get('community').invalid && contactForm.get('community').touched">
|
||||
</div>
|
||||
<div *ngIf="contactForm.get('organization')" class="uk-width-1-2@s uk-margin-top">
|
||||
<div class="uk-width-1-1">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom">Organization<span class="uk-text-danger uk-text-bold">*</span></h5>
|
||||
</div>
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">Organization<span class="uk-text-danger uk-text-bold">*</span></h5>
|
||||
<input class="uk-input uk-width-1-1" type="text" placeholder="Your organization" formControlName="organization"
|
||||
[class.uk-form-danger]="contactForm.get('organization').invalid && contactForm.get('organization').touched">
|
||||
</div>
|
||||
<div *ngIf="contactForm.get('organizationType')" class="uk-width-1-2@s uk-margin-top">
|
||||
<div class="uk-width-1-1">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom">Organization Type<span class="uk-text-danger uk-text-bold">*</span></h5>
|
||||
</div>
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">Organization Type<span class="uk-text-danger uk-text-bold">*</span></h5>
|
||||
<input type="text" class="uk-input uk-width-1-1" placeholder="Your Organization Type" formControlName="organizationType"
|
||||
[class.uk-form-danger]="contactForm.get('organizationType').invalid && contactForm.get('organizationType').touched"
|
||||
[matAutocomplete]="auto">
|
||||
|
@ -68,14 +64,12 @@
|
|||
</mat-autocomplete>
|
||||
</div>
|
||||
<div *ngIf="contactForm.get('subject')" class="uk-width-1-1@s uk-margin-top">
|
||||
<div class="uk-width-1-1">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom">Subject<span class="uk-text-danger uk-text-bold">*</span></h5>
|
||||
</div>
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">Subject<span class="uk-text-danger uk-text-bold">*</span></h5>
|
||||
<input class="uk-input uk-width-1-1" type="text" placeholder="Your subject" formControlName="subject"
|
||||
[class.uk-form-danger]="contactForm.get('subject').invalid && contactForm.get('subject').touched">
|
||||
</div>
|
||||
<div *ngIf="contactForm.get('message')" class="uk-width-1-1 uk-margin-top">
|
||||
<h5 class="uk-text-bold uk-margin-remove-bottom">
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">
|
||||
Message <span class="uk-text-danger uk-text-bold">*</span>
|
||||
</h5>
|
||||
<textarea rows="4" class="uk-textarea" placeholder="Your message" formControlName="message"
|
||||
|
|
|
@ -140,15 +140,19 @@ export class HtmlProjectReportComponent {
|
|||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
if(this.communityId) {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
if(this.communityId) {
|
||||
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
|
|
@ -185,15 +185,19 @@ export class OrganizationComponent {
|
|||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
if(this.communityId) {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
if(this.communityId) {
|
||||
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -228,15 +228,19 @@ export class ProjectComponent {
|
|||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
if(this.communityId) {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
if(this.communityId) {
|
||||
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getDynamicContent(type: string) {
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
<span *ngFor="let id of item.ids">
|
||||
[<a *ngIf="id.type !== 'openaire'" href="{{getReferenceUrl(id)}}"
|
||||
target="_blank">{{getReferenceIdName(id)}}</a>
|
||||
<a *ngIf="id.type === 'openaire'" [routerLink]="'/search/result'"
|
||||
<a *ngIf="id.type === 'openaire'" [routerLink]="properties.searchLinkToResult.split('?')[0]"
|
||||
[queryParams]="{id: id.value}"
|
||||
target="_blank">OpenAIRE</a>]
|
||||
</span>
|
||||
|
|
|
@ -17,6 +17,7 @@ import {RelationResult, ResultPreview} from "../../utils/result-preview/result-p
|
|||
import {IndexInfoService} from "../../utils/indexInfo.service";
|
||||
import {FormBuilder, FormGroup} from "@angular/forms";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -25,7 +26,7 @@ import {StringUtils} from "../../utils/string-utils.class";
|
|||
})
|
||||
export class ResultLandingComponent {
|
||||
@Input() type: string = "publication";
|
||||
@Input() piwikSiteId = null;
|
||||
@Input() piwikSiteId = properties.piwikSiteId;
|
||||
@Input() communityId = null;
|
||||
@ViewChild('linkModal') linkModal;
|
||||
@ViewChild('citeModal') citeModal;
|
||||
|
@ -50,9 +51,9 @@ export class ResultLandingComponent {
|
|||
|
||||
public thresholdDescription: number = 670;
|
||||
public showNumDescription: number = 670;
|
||||
|
||||
|
||||
public citeThisClicked: boolean;
|
||||
|
||||
|
||||
// Metrics tab variables
|
||||
public metricsClicked: boolean;
|
||||
public hasAltMetrics: boolean = false;
|
||||
|
@ -89,7 +90,7 @@ export class ResultLandingComponent {
|
|||
sub: any;
|
||||
piwiksub: any;
|
||||
infoSub: any;
|
||||
properties: EnvProperties;
|
||||
properties: EnvProperties = properties;
|
||||
public indexUpdateDate: Date;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
@ -116,89 +117,89 @@ export class ResultLandingComponent {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
if (typeof document !== 'undefined') {
|
||||
this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => {
|
||||
if (lastIndexUpdate) {
|
||||
this.indexUpdateDate = new Date(lastIndexUpdate);
|
||||
} else if (this.properties.lastIndexUpdate) {
|
||||
this.indexUpdateDate = new Date(this.properties.lastIndexUpdate);
|
||||
}
|
||||
});
|
||||
if (typeof document !== 'undefined') {
|
||||
this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => {
|
||||
if (lastIndexUpdate) {
|
||||
this.indexUpdateDate = new Date(lastIndexUpdate);
|
||||
} else if (this.properties.lastIndexUpdate) {
|
||||
this.indexUpdateDate = new Date(this.properties.lastIndexUpdate);
|
||||
}
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
this.updateUrl(data.envSpecific.baseLink + this._router.url);
|
||||
this.sub = this.route.queryParams.subscribe(data => {
|
||||
this.resultLandingInfo = null;
|
||||
if (this.type == "publication") {
|
||||
this.updateTitle("Publication");
|
||||
this.linkToLandingPage = this.properties.searchLinkToPublication;
|
||||
this.linkToSearchPage = this.properties.searchLinkToPublications;
|
||||
this.id = data['articleId'];
|
||||
this.title = "Publication";
|
||||
} else if (this.type == "dataset") {
|
||||
this.updateTitle("Dataset");
|
||||
this.linkToLandingPage = this.properties.searchLinkToDataset;
|
||||
this.linkToSearchPage = this.properties.searchLinkToDatasets;
|
||||
this.id = data['datasetId'];
|
||||
this.title = "Research Data";
|
||||
} else if (this.type == "software") {
|
||||
this.updateTitle("Software");
|
||||
this.linkToLandingPage = this.properties.searchLinkToSoftware;
|
||||
this.linkToSearchPage = this.properties.searchLinkToSoftwareLanding;
|
||||
this.id = data['softwareId'];
|
||||
this.title = "Software";
|
||||
} else if (this.type == "orp") {
|
||||
this.updateTitle("Other Research Product");
|
||||
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
||||
this.linkToSearchPage = this.properties.searchLinkToOrps;
|
||||
this.id = data['orpId'];
|
||||
this.title = "Other Research Product";
|
||||
} else if (this.type == "result") {
|
||||
this.id = data["id"];
|
||||
this.updateTitle("Research Result");
|
||||
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
||||
this.linkToSearchPage = this.properties.searchLinkToResults;
|
||||
this.title = "Research Result";
|
||||
}
|
||||
this.updateDescription("");
|
||||
|
||||
this.metricsClicked = false;
|
||||
|
||||
if (this.id && StringUtils.isOpenAIREID(this.id)) {
|
||||
this.getProvenanceVocabularyAndResultLandingInfo();
|
||||
} else {
|
||||
this.showLoading = false;
|
||||
|
||||
this._router.navigate(['/error'], {
|
||||
queryParams: {
|
||||
"page": this._location.path(true),
|
||||
"page_type": this.type
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.viewsFrameUrl = this.properties.framesAPIURL + 'merge.php?com=query&data=[{"query":"resRepoViews", "resTitle":"' + this.id + '", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":80,"sort":"xaxis","xStyle":{"r":-30,"s":"6","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true&persistent=false';
|
||||
this.downloadsFrameUrl = this.properties.framesAPIURL + 'merge.php?com=query&data=[{"query":"resRepoDownloads", "resTitle":"' + this.id + '", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":80,"sort":"xaxis","xStyle":{"r":-30,"s":"6","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true&persistent=false';
|
||||
|
||||
this.scroll();
|
||||
});
|
||||
});
|
||||
}
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
this.updateUrl(this.properties.baseLink + this._router.url);
|
||||
this.sub = this.route.queryParams.subscribe(data => {
|
||||
this.resultLandingInfo = null;
|
||||
if (this.type == "publication") {
|
||||
this.updateTitle("Publication");
|
||||
this.linkToLandingPage = this.properties.searchLinkToPublication;
|
||||
this.linkToSearchPage = this.properties.searchLinkToPublications;
|
||||
this.id = data['articleId'];
|
||||
this.title = "Publication";
|
||||
} else if (this.type == "dataset") {
|
||||
this.updateTitle("Dataset");
|
||||
this.linkToLandingPage = this.properties.searchLinkToDataset;
|
||||
this.linkToSearchPage = this.properties.searchLinkToDatasets;
|
||||
this.id = data['datasetId'];
|
||||
this.title = "Research Data";
|
||||
} else if (this.type == "software") {
|
||||
this.updateTitle("Software");
|
||||
this.linkToLandingPage = this.properties.searchLinkToSoftware;
|
||||
this.linkToSearchPage = this.properties.searchLinkToSoftwareLanding;
|
||||
this.id = data['softwareId'];
|
||||
this.title = "Software";
|
||||
} else if (this.type == "orp") {
|
||||
this.updateTitle("Other Research Product");
|
||||
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
||||
this.linkToSearchPage = this.properties.searchLinkToOrps;
|
||||
this.id = data['orpId'];
|
||||
this.title = "Other Research Product";
|
||||
} else if (this.type == "result") {
|
||||
this.id = data["id"];
|
||||
this.updateTitle("Research Result");
|
||||
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
||||
this.linkToSearchPage = this.properties.searchLinkToResults;
|
||||
this.title = "Research Result";
|
||||
}
|
||||
this.updateDescription("");
|
||||
|
||||
this.metricsClicked = false;
|
||||
|
||||
if (this.id && StringUtils.isOpenAIREID(this.id)) {
|
||||
this.getProvenanceVocabularyAndResultLandingInfo();
|
||||
} else {
|
||||
this.showLoading = false;
|
||||
|
||||
this._router.navigate(['/error'], {
|
||||
queryParams: {
|
||||
"page": this._location.path(true),
|
||||
"page_type": this.type
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.viewsFrameUrl = this.properties.framesAPIURL + 'merge.php?com=query&data=[{"query":"resRepoViews", "resTitle":"' + this.id + '", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":80,"sort":"xaxis","xStyle":{"r":-30,"s":"6","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly views"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true&persistent=false';
|
||||
this.downloadsFrameUrl = this.properties.framesAPIURL + 'merge.php?com=query&data=[{"query":"resRepoDownloads", "resTitle":"' + this.id + '", "table":"","fields":[{"fld":"sum","agg":"sum","type":"column","yaxis":1,"c":false}],"xaxis":{"name":"month","agg":"sum"},"group":" ","color":"","type":"chart","size":80,"sort":"xaxis","xStyle":{"r":-30,"s":"6","l":"-","ft":"-","wt":"-"},"title":"","subtitle":"","xaxistitle":"Repository","yaxisheaders":["Monthly downloads"],"generalxaxis":"","theme":0,"in":[],"filters":[{"name":"","values":[""],"to":"-1"}]}]&info_types=["column"]&stacking=normal&steps=false&fontFamily=Courier&spacing=[5,0,0,0]&style=[{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"rgba(0, 0, 0, 1)","size":"18"},{"color":"000000","size":""},{"color":"000000","size":""}]&backgroundColor=rgba(255,255,255,1)&colors[]=rgba(67, 67, 72, 1)&colors[]=rgba(144, 237, 125, 1)&colors[]=rgba(247, 163, 92, 1)&colors[]=rgba(128, 133, 233, 1)&colors[]=rgba(241, 92, 128, 1)&colors[]=rgba(228, 211, 84, 1)&colors[]=rgba(43, 144, 143, 1)&colors[]=rgba(244, 91, 91, 1)&colors[]=rgba(145, 232, 225, 1)&xlinew=0&ylinew=1&legends=true&tooltips=true&persistent=false';
|
||||
|
||||
this.scroll();
|
||||
});
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
});
|
||||
if (this.communityId) {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
});
|
||||
if (this.communityId) {
|
||||
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
@ -253,7 +254,7 @@ export class ResultLandingComponent {
|
|||
this.showLoading = true;
|
||||
|
||||
this.resultLandingInfo = null;
|
||||
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
this._resultLaningService.getProvenanceActionVocabulary(this.properties).subscribe(
|
||||
provenanceActionVocabulary => {
|
||||
|
@ -270,17 +271,17 @@ export class ResultLandingComponent {
|
|||
}
|
||||
|
||||
private setActiveTab() {
|
||||
if(this.hasPrimaryInfo || this.hasSecondaryInfo) {
|
||||
if (this.hasPrimaryInfo || this.hasSecondaryInfo) {
|
||||
this.activeTab = 'summary';
|
||||
} else if(this.resultLandingInfo.references && this.resultLandingInfo.references.length > 0) {
|
||||
} else if (this.resultLandingInfo.references && this.resultLandingInfo.references.length > 0) {
|
||||
this.activeTab = 'references';
|
||||
} else if((this.resultLandingInfo.supplementaryResearchResults && this.resultLandingInfo.supplementaryResearchResults.length > 0) ||
|
||||
(this.resultLandingInfo.supplementedByResearchResults && this.resultLandingInfo.supplementedByResearchResults.length > 0)) {
|
||||
} else if ((this.resultLandingInfo.supplementaryResearchResults && this.resultLandingInfo.supplementaryResearchResults.length > 0) ||
|
||||
(this.resultLandingInfo.supplementedByResearchResults && this.resultLandingInfo.supplementedByResearchResults.length > 0)) {
|
||||
this.activeTab = 'supplementary';
|
||||
} else if((this.resultLandingInfo.relatedResearchResults && this.resultLandingInfo.relatedResearchResults.length > 0) ||
|
||||
} else if ((this.resultLandingInfo.relatedResearchResults && this.resultLandingInfo.relatedResearchResults.length > 0) ||
|
||||
(this.resultLandingInfo.similarResearchResults && this.resultLandingInfo.similarResearchResults.length > 0)) {
|
||||
this.activeTab = 'related';
|
||||
} else if(this.resultLandingInfo.bioentities && this.bioentitiesNum > 0) {
|
||||
} else if (this.resultLandingInfo.bioentities && this.bioentitiesNum > 0) {
|
||||
this.activeTab = 'bioentities';
|
||||
}
|
||||
}
|
||||
|
@ -334,7 +335,7 @@ export class ResultLandingComponent {
|
|||
});
|
||||
}
|
||||
this.bioentitiesNum = bioentitiesNum;
|
||||
if(typeof document !== 'undefined') {
|
||||
if (typeof document !== 'undefined') {
|
||||
if (this.resultLandingInfo.identifiers != undefined && this.resultLandingInfo.identifiers.has('doi')) {
|
||||
this.doi = this.resultLandingInfo.identifiers.get('doi')[0];
|
||||
this.metricsService.hasAltMetrics(this.properties.altMetricsAPIURL, this.doi).subscribe(hasAltMetrics => {
|
||||
|
@ -507,7 +508,7 @@ export class ResultLandingComponent {
|
|||
public getResultPreview(result: RelationResult): ResultPreview {
|
||||
return ResultPreview.relationResultConvert(result, this.relation);
|
||||
}
|
||||
|
||||
|
||||
updateUrlWithType() {
|
||||
this.type = this.resultLandingInfo.resultType;
|
||||
if (this.type == "publication") {
|
||||
|
|
|
@ -9,56 +9,58 @@ import {SearchCustomFilter, SearchUtilsClass} from './searchUtils/searchUtils.cl
|
|||
import {EnvProperties} from '../utils/properties/env-properties';
|
||||
import {NewSearchPageComponent} from "./searchUtils/newSearchPage.component";
|
||||
import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'search-research-results',
|
||||
template: `
|
||||
template: `
|
||||
<new-search-page
|
||||
pageTitle="{{(simpleView?'':'Advanced ')}} Search for {{ getEntityName(resultType, true, true) | titlecase }}"
|
||||
[entityType]="resultType"
|
||||
[type]="getEntityName(resultType, true, true)"
|
||||
[results]="results"
|
||||
[searchUtils]="searchUtils"
|
||||
[fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields"
|
||||
[csvParams]="csvParams" [csvPath]="getEntityName(resultType, true, false)"
|
||||
[simpleSearchLink]="simpleSearchLink" [advancedSearchLink]="advancedSearchLink"
|
||||
[disableForms]="disableForms"
|
||||
[loadPaging]="loadPaging"
|
||||
[oldTotalResults]="oldTotalResults"
|
||||
[openaireLink]=openaireLink
|
||||
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
||||
searchFormClass="publicationsSearchForm"
|
||||
[filters]="filters" [quickFilter]="quickFilter"
|
||||
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
||||
[simpleView]="simpleView" formPlaceholderText="Search by title, author, abstract, DOI, orcid..."
|
||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [showBreadcrumb]="showBreadcrumb" [showAdvancedSearchLink]="showAdvancedSearchLink"
|
||||
pageTitle="{{(simpleView?'':'Advanced ')}} Search for {{ getEntityName(resultType, true, true) | titlecase }}"
|
||||
[entityType]="resultType"
|
||||
[type]="getEntityName(resultType, true, true)"
|
||||
[results]="results"
|
||||
[searchUtils]="searchUtils"
|
||||
[fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields"
|
||||
[csvParams]="csvParams" [csvPath]="getEntityName(resultType, true, false)"
|
||||
[simpleSearchLink]="simpleSearchLink" [advancedSearchLink]="advancedSearchLink"
|
||||
[disableForms]="disableForms"
|
||||
[loadPaging]="loadPaging"
|
||||
[oldTotalResults]="oldTotalResults"
|
||||
[openaireLink]=openaireLink
|
||||
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
|
||||
searchFormClass="publicationsSearchForm"
|
||||
[filters]="filters" [quickFilter]="quickFilter"
|
||||
[rangeFilters]="rangeFilters" [rangeFields]="rangeFields"
|
||||
[simpleView]="simpleView" formPlaceholderText="Search by title, author, abstract, DOI, orcid..."
|
||||
[includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [showBreadcrumb]="showBreadcrumb"
|
||||
[showAdvancedSearchLink]="showAdvancedSearchLink"
|
||||
>
|
||||
</new-search-page>
|
||||
|
||||
|
||||
`
|
||||
})
|
||||
|
||||
export class SearchResearchResultsComponent {
|
||||
@Input() resultType: string = "result";
|
||||
|
||||
|
||||
@Input() simpleSearchLink: string = "";
|
||||
advancedSearchLink: string = "";
|
||||
|
||||
|
||||
private errorCodes: ErrorCodes;
|
||||
private errorMessages: ErrorMessagesComponent;
|
||||
@Input() piwikSiteId = null;
|
||||
@Input() piwikSiteId = properties.piwikSiteId;
|
||||
@Input() hasPrefix: boolean = true;
|
||||
public results = [];
|
||||
public filters = [];
|
||||
public rangeFilters: RangeFilter[] = [];
|
||||
|
||||
|
||||
public searchUtils: SearchUtilsClass = new SearchUtilsClass();
|
||||
public searchFields: SearchFields = new SearchFields();
|
||||
|
||||
|
||||
public fieldIds: string[] = this.searchFields.RESULT_ADVANCED_FIELDS;
|
||||
public fieldIdsMap = this.searchFields.RESULT_FIELDS;
|
||||
public rangeFields:string[][] = this.searchFields.RESULT_RANGE_FIELDS;
|
||||
public rangeFields: string[][] = this.searchFields.RESULT_RANGE_FIELDS;
|
||||
public selectedFields: AdvancedField[] = [];
|
||||
public resourcesQuery = "((oaftype exact result) and (resulttypeid exact " + this.resultType + "))";
|
||||
public csvParams: string;
|
||||
|
@ -69,7 +71,7 @@ export class SearchResearchResultsComponent {
|
|||
@Input() customFilter: SearchCustomFilter = null;
|
||||
public pagingLimit: number = 0;
|
||||
public isPiwikEnabled;
|
||||
properties: EnvProperties;
|
||||
properties: EnvProperties = properties;
|
||||
public refineFields: string[] = this.searchFields.RESULT_REFINE_FIELDS;
|
||||
@ViewChild(NewSearchPageComponent) searchPage: NewSearchPageComponent;
|
||||
@Input() simpleView: boolean = true;
|
||||
|
@ -80,32 +82,29 @@ export class SearchResearchResultsComponent {
|
|||
value: "Open Access"
|
||||
};
|
||||
@Input() includeOnlyResultsAndFilter: boolean = false;
|
||||
@Input() showBreadcrumb:boolean = false;
|
||||
@Input() showBreadcrumb: boolean = false;
|
||||
@Output() searchPageUpdates = new EventEmitter();
|
||||
@Input() showAdvancedSearchLink:boolean = true;
|
||||
subs: any[]=[];
|
||||
@Input() showAdvancedSearchLink: boolean = true;
|
||||
subs: any[] = [];
|
||||
|
||||
constructor(private route: ActivatedRoute, private _searchResearchResultsService: SearchResearchResultsService) {
|
||||
this.results = [];
|
||||
this.errorCodes = new ErrorCodes();
|
||||
this.errorMessages = new ErrorMessagesComponent();
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
//TODO add checks about which result types are enabled!
|
||||
this.subs.push(this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.pagingLimit = data.envSpecific.pagingLimit;
|
||||
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;
|
||||
|
||||
if (!this.simpleSearchLink) {
|
||||
this.simpleSearchLink = this.properties.searchLinkToResults;
|
||||
}
|
||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedResults;
|
||||
this.searchUtils.baseUrl = (this.simpleView) ? this.simpleSearchLink : this.advancedSearchLink;
|
||||
|
||||
}));
|
||||
|
||||
this.pagingLimit = this.properties.pagingLimit;
|
||||
this.isPiwikEnabled = this.properties.enablePiwikTrack;
|
||||
|
||||
if (!this.simpleSearchLink) {
|
||||
this.simpleSearchLink = this.properties.searchLinkToResults;
|
||||
}
|
||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedResults;
|
||||
this.searchUtils.baseUrl = (this.simpleView) ? this.simpleSearchLink : this.advancedSearchLink;
|
||||
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
var firstLoad = true;
|
||||
this.subs.push(this.route.queryParams.subscribe(params => {
|
||||
|
@ -117,11 +116,11 @@ export class SearchResearchResultsComponent {
|
|||
var refine = true;
|
||||
if (this.searchUtils.page != ((params['page'] === undefined) ? 1 : +params['page']) && this.filters && !firstLoad) {
|
||||
refine = false;
|
||||
|
||||
|
||||
}
|
||||
let page = (params['page'] === undefined) ? 1 : +params['page'];
|
||||
this.searchUtils.page = (page <= 0) ? 1 : page;
|
||||
|
||||
|
||||
this.searchUtils.size = (params['size'] === undefined) ? 10 : +params['size'];
|
||||
if (this.searchUtils.size != 5 && this.searchUtils.size != 10 && this.searchUtils.size != 20 && this.searchUtils.size != 50) {
|
||||
this.searchUtils.size = 10;
|
||||
|
@ -131,18 +130,18 @@ export class SearchResearchResultsComponent {
|
|||
this.searchUtils.sortBy = "";
|
||||
}
|
||||
this.selectedFields = [];
|
||||
this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields, this.rangeFields, this.fieldIdsMap,this.customFilter,params, this.resultType, this.quickFilter);
|
||||
this._getResults(this.searchPage.getSearchAPIQueryForAdvancedSearhFields(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy, refine, this.searchPage.getSearchAPIQueryForRangeFields(params)+this.searchPage.getSearchAPIQueryForRefineFields(params, firstLoad));
|
||||
this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields, this.rangeFields, this.fieldIdsMap, this.customFilter, params, this.resultType, this.quickFilter);
|
||||
this._getResults(this.searchPage.getSearchAPIQueryForAdvancedSearhFields(), this.searchUtils.page, this.searchUtils.size, this.searchUtils.sortBy, refine, this.searchPage.getSearchAPIQueryForRangeFields(params) + this.searchPage.getSearchAPIQueryForRefineFields(params, firstLoad));
|
||||
firstLoad = false;
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
ngOnDestroy() {
|
||||
for(let sub of this.subs){
|
||||
for (let sub of this.subs) {
|
||||
sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public _getResults(parameters: string, page: number, size: number, sortBy: string, refine: boolean, refineFieldsFilterQuery = null) {
|
||||
if (page > this.pagingLimit) {
|
||||
size = 0;
|
||||
|
@ -153,77 +152,77 @@ export class SearchResearchResultsComponent {
|
|||
// } else {
|
||||
// this.csvParams = "&fq=" + this.resourcesQuery;
|
||||
// }
|
||||
this.csvParams = (parameters ? ("&fq=("+parameters) : "") + (parameters ? ")" : "");
|
||||
this.csvParams = (parameters ? ("&fq=(" + parameters) : "") + (parameters ? ")" : "");
|
||||
this.csvParams += (refineFieldsFilterQuery ? refineFieldsFilterQuery : "");
|
||||
|
||||
|
||||
this.searchUtils.status = this.errorCodes.LOADING;
|
||||
this.disableForms = true;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms,searchUtils: this.searchUtils});
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, searchUtils: this.searchUtils});
|
||||
this.results = [];
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.subs.push(this._searchResearchResultsService.advancedSearchResults(this.resultType, parameters, page, size, sortBy, this.properties, (refine) ? this.searchPage.getRefineFieldsQuery() : null, this.searchPage.getFields(), refineFieldsFilterQuery)
|
||||
.subscribe(
|
||||
data => {
|
||||
this.searchUtils.totalResults = data[0];
|
||||
this.results = data[1];
|
||||
if (refine) {
|
||||
this.filters = this.searchPage.prepareFiltersToShow(data[2],this.searchUtils.totalResults);
|
||||
this.rangeFilters = this.searchPage.prepareRangeFiltersToShow();
|
||||
} else {
|
||||
this.searchPage.buildPageURLParameters(this.filters, this.rangeFilters, false);
|
||||
}
|
||||
|
||||
this.searchUtils.status = this.errorCodes.DONE;
|
||||
if (this.searchUtils.totalResults == 0) {
|
||||
this.searchUtils.status = this.errorCodes.NONE;
|
||||
}
|
||||
this.disableForms = false;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, searchUtils: this.searchUtils})
|
||||
|
||||
if (this.searchUtils.status == this.errorCodes.DONE) {
|
||||
// Page out of limit!!!
|
||||
let totalPages: any = this.searchUtils.totalResults / (this.searchUtils.size);
|
||||
if (!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
data => {
|
||||
this.searchUtils.totalResults = data[0];
|
||||
this.results = data[1];
|
||||
if (refine) {
|
||||
this.filters = this.searchPage.prepareFiltersToShow(data[2], this.searchUtils.totalResults);
|
||||
this.rangeFilters = this.searchPage.prepareRangeFiltersToShow();
|
||||
} else {
|
||||
this.searchPage.buildPageURLParameters(this.filters, this.rangeFilters, false);
|
||||
}
|
||||
if (totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = this.errorCodes.OUT_OF_BOUND;
|
||||
|
||||
this.searchUtils.status = this.errorCodes.DONE;
|
||||
if (this.searchUtils.totalResults == 0) {
|
||||
this.searchUtils.status = this.errorCodes.NONE;
|
||||
}
|
||||
this.disableForms = false;
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, searchUtils: this.searchUtils})
|
||||
|
||||
if (this.searchUtils.status == this.errorCodes.DONE) {
|
||||
// Page out of limit!!!
|
||||
let totalPages: any = this.searchUtils.totalResults / (this.searchUtils.size);
|
||||
if (!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if (totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = this.errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
}
|
||||
},
|
||||
err => {
|
||||
this.handleError("Error getting " + this.getEntityName(this.resultType, true, true), err);
|
||||
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
||||
this.searchUtils.totalResults = null;
|
||||
//TODO check erros (service not available, bad request)
|
||||
// if( ){
|
||||
// this.searchUtils.status = ErrorCodes.ERROR;
|
||||
// }
|
||||
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
//this.searchUtils.status = errorCodes.NOT_AVAILABLE;
|
||||
/*if(err.status == '404') {
|
||||
this.searchUtils.status = this.errorCodes.NOT_FOUND;
|
||||
} else if(err.status == '500') {
|
||||
this.searchUtils.status = this.errorCodes.ERROR;
|
||||
} else {
|
||||
this.searchUtils.status = this.errorCodes.NOT_AVAILABLE;
|
||||
}*/
|
||||
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, searchUtils: this.searchUtils})
|
||||
|
||||
}
|
||||
},
|
||||
err => {
|
||||
this.handleError("Error getting " + this.getEntityName(this.resultType, true, true), err);
|
||||
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
|
||||
this.searchUtils.totalResults = null;
|
||||
//TODO check erros (service not available, bad request)
|
||||
// if( ){
|
||||
// this.searchUtils.status = ErrorCodes.ERROR;
|
||||
// }
|
||||
//var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
//this.searchUtils.status = errorCodes.NOT_AVAILABLE;
|
||||
/*if(err.status == '404') {
|
||||
this.searchUtils.status = this.errorCodes.NOT_FOUND;
|
||||
} else if(err.status == '500') {
|
||||
this.searchUtils.status = this.errorCodes.ERROR;
|
||||
} else {
|
||||
this.searchUtils.status = this.errorCodes.NOT_AVAILABLE;
|
||||
}*/
|
||||
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
this.searchPageUpdates.emit({disableForms: this.disableForms, searchUtils: this.searchUtils})
|
||||
|
||||
}
|
||||
));
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private handleError(message: string, error) {
|
||||
console.error(this.getEntityName(this.resultType, true, true) + " advanced Search Page: " + message, error);
|
||||
}
|
||||
|
||||
|
||||
public getEntityName(entityType: string, plural: boolean, full: boolean): string {
|
||||
if (entityType == "publication") {
|
||||
return "publication" + (plural ? "s" : "");
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
|
||||
<div *ngIf="simpleView">
|
||||
<form class=" uk-margin-medium-bottom uk-margin-top ">
|
||||
<div class="uk-grid uk-margin-small-left">
|
||||
<div class="uk-grid uk-margin-small-left uk-flex" [class.uk-flex-center]="entityType != 'community' && entityType !== 'stakeholder'">
|
||||
<div
|
||||
[class]="((entitiesSelection)?'':'uk-width-small@s')+' uk-margin-small-top uk-padding-remove-left'">
|
||||
<entities-selection *ngIf="entitiesSelection" [simpleView]="true" [currentEntity]="entityType"
|
||||
|
|
|
@ -6,27 +6,29 @@ import {ConfigurationService} from "../../utils/configuration/configuration.serv
|
|||
import {Router} from "@angular/router";
|
||||
import {LoginErrorCodes} from "../../login/utils/guardHelper.class";
|
||||
import {MatSelect} from "@angular/material";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'entities-selection',
|
||||
template: `
|
||||
<span *ngIf="!disableSelect" class=" entitiesSelection portal-box uk-text-small clickable" style="" (click)="open()" >
|
||||
<mat-select *ngIf="show>1 && selectedEntity && !disableSelect && !onlyresults" [(value)]="selectedEntity"
|
||||
(valueChange)="entityChanged()" [disableOptionCentering]="true" [panelClass]="matPanelClass" >
|
||||
<mat-option
|
||||
*ngIf="simpleView && (show)>1 && !(this.customFilter && this.customFilter.queryFieldName=='communityId' )"
|
||||
value="all">All content
|
||||
<span *ngIf="!disableSelect && show>1 && selectedEntity"
|
||||
class=" entitiesSelection portal-box uk-text-small clickable" style=""
|
||||
(click)="open()">
|
||||
<mat-select *ngIf="!onlyresults" [(value)]="selectedEntity"
|
||||
(valueChange)="entityChanged()" [disableOptionCentering]="true" [panelClass]="matPanelClass">
|
||||
<mat-option *ngIf="simpleView && showAll"
|
||||
value="all">All content
|
||||
</mat-option>
|
||||
<mat-option *ngIf="showResearchOutcomes" value="result">Research outcomes</mat-option>
|
||||
<mat-option *ngIf="showProjects" value="project">Projects</mat-option>
|
||||
<mat-option *ngIf="showDataProviders" value="dataprovider">Content providers</mat-option>
|
||||
<mat-option *ngIf="showOrganizations" value="organization">Organizations</mat-option>
|
||||
</mat-select>
|
||||
<mat-select *ngIf="onlyresults && show>1 && selectedEntity " [(value)]="selectedEntity"
|
||||
(valueChange)="entityChanged()" [disableOptionCentering]="true" [panelClass]="matPanelClass" >
|
||||
<mat-select *ngIf="onlyresults" [(value)]="selectedEntity"
|
||||
(valueChange)="entityChanged()" [disableOptionCentering]="true" [panelClass]="matPanelClass">
|
||||
<mat-option
|
||||
*ngIf="simpleView && (show)>1 && !(this.customFilter && this.customFilter.queryFieldName=='communityId' )"
|
||||
value="all">All research outcomes
|
||||
*ngIf="simpleView && showAll"
|
||||
value="all">All research outcomes
|
||||
</mat-option>
|
||||
<mat-option *ngIf="showPublications" value="publications">Publications</mat-option>
|
||||
<mat-option *ngIf="showDatasets" value="datasets">Datasets</mat-option>
|
||||
|
@ -35,7 +37,7 @@ import {MatSelect} from "@angular/material";
|
|||
</mat-select>
|
||||
|
||||
</span>
|
||||
<span *ngIf=" currentEntity && disableSelect" class="entitiesSelection portal-box uk-text-small " style="">
|
||||
<span *ngIf="currentEntity && disableSelect" class="entitiesSelection portal-box uk-text-small " style="">
|
||||
<div>
|
||||
<span *ngIf="currentEntity=='all'">{{onlyresults ? 'All research outcomes' : 'All content'}}</span>
|
||||
<span *ngIf="currentEntity=='result'">Research outcomes</span>
|
||||
|
@ -48,27 +50,27 @@ import {MatSelect} from "@angular/material";
|
|||
<span *ngIf="currentEntity=='other'">Other Research products</span>
|
||||
</div>
|
||||
</span>
|
||||
<!--<span *ngIf="onlyresults && !disableSelect">
|
||||
<select *ngIf="show" [(ngModel)]="selectedEntity" class="uk-select uk-width-auto portal-box uk-text-small" (ngModelChange)="entityChanged()" >
|
||||
<option
|
||||
*ngIf="simpleView && (show)>1 && !(this.customFilter && this.customFilter.queryFieldName=='communityId' )"
|
||||
value="all">All research outcomes
|
||||
</option>
|
||||
<option *ngIf="showPublications" value="publications">Publications</option>
|
||||
<option *ngIf="showDatasets" value="datasets">Datasets</option>
|
||||
<option *ngIf="showSoftware" value="software">Software</option>
|
||||
<option *ngIf="showOther" value="other">Other Research products</option>
|
||||
</select>
|
||||
</span>-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!--<span *ngIf="onlyresults && !disableSelect">
|
||||
<select *ngIf="show" [(ngModel)]="selectedEntity" class="uk-select uk-width-auto portal-box uk-text-small" (ngModelChange)="entityChanged()" >
|
||||
<option
|
||||
*ngIf="simpleView && (show)>1 && !(this.customFilter && this.customFilter.queryFieldName=='communityId' )"
|
||||
value="all">All research outcomes
|
||||
</option>
|
||||
<option *ngIf="showPublications" value="publications">Publications</option>
|
||||
<option *ngIf="showDatasets" value="datasets">Datasets</option>
|
||||
<option *ngIf="showSoftware" value="software">Software</option>
|
||||
<option *ngIf="showOther" value="other">Other Research products</option>
|
||||
</select>
|
||||
</span>-->
|
||||
|
||||
|
||||
|
||||
|
||||
`
|
||||
})
|
||||
|
||||
export class EntitiesSelectionComponent {
|
||||
|
||||
|
||||
showResearchOutcomes: boolean = false;
|
||||
showPublications: boolean = false;
|
||||
showDatasets: boolean = false;
|
||||
|
@ -77,6 +79,7 @@ export class EntitiesSelectionComponent {
|
|||
showProjects: boolean = false;
|
||||
showDataProviders: boolean = false;
|
||||
showOrganizations: boolean = false;
|
||||
showAll: boolean = true;
|
||||
@Input() properties: EnvProperties;
|
||||
@Input() customFilter: SearchCustomFilter = null;
|
||||
@Input() @Output() selectedEntity = "Research Outcomes";
|
||||
|
@ -85,63 +88,97 @@ export class EntitiesSelectionComponent {
|
|||
@Input() onChangeNavigate: boolean = true;
|
||||
@Output() selectionChange = new EventEmitter();
|
||||
@Input() onlyresults: boolean = false;
|
||||
@Input() matPanelClass="matSelectionPanel";
|
||||
@Input() disableSelect:boolean=false;
|
||||
@Input() matPanelClass = "matSelectionPanel";
|
||||
@Input() disableSelect: boolean = false;
|
||||
show = 0;
|
||||
@ViewChild(MatSelect)matSelect:MatSelect;
|
||||
|
||||
@ViewChild(MatSelect) matSelect: MatSelect;
|
||||
|
||||
constructor(private _fb: FormBuilder, private config: ConfigurationService, private router: Router) {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.show = 0;
|
||||
if (this.properties) {
|
||||
// console.log(this.customFilter)
|
||||
this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => {
|
||||
let showEntity = {};
|
||||
let showPage = {};
|
||||
for (let i = 0; i < data['entities'].length; i++) {
|
||||
|
||||
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
|
||||
}
|
||||
for (let i = 0; i < data['pages'].length; i++) {
|
||||
showPage["" + data['pages'][i]["route"] + ""] = data['pages'][i]["isEnabled"];
|
||||
}
|
||||
this.showResearchOutcomes = showPage[this.properties.searchLinkToResults] && (showEntity["publication"] || showEntity["dataset"] || showEntity["software"] || showEntity["orp"]);
|
||||
this.showPublications = showPage[this.properties.searchLinkToResults] && showEntity["publication"];
|
||||
this.showDatasets = showPage[this.properties.searchLinkToResults] && showEntity["dataset"];
|
||||
this.showSoftware = showPage[this.properties.searchLinkToResults] && showEntity["software"];
|
||||
this.showOther = showPage[this.properties.searchLinkToResults] && showEntity["orp"];
|
||||
this.showProjects = showPage[this.properties.searchLinkToProjects] && showEntity["project"];
|
||||
this.showOrganizations = showPage[this.properties.searchLinkToOrganizations] && showEntity["organization"];
|
||||
this.showDataProviders = showPage[this.properties.searchLinkToDataProviders] && showEntity["datasource"];
|
||||
|
||||
if (this.customFilter && this.customFilter.queryFieldName == "communityId") {
|
||||
this.showOrganizations = false;
|
||||
if(!this.simpleView){
|
||||
this.showProjects = false;
|
||||
this.showDataProviders = false;
|
||||
if((this.customFilter && this.customFilter.queryFieldName == "communityId") && this.properties.adminToolsCommunity !== "monitor") {
|
||||
this.showAll = false;
|
||||
this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => {
|
||||
let showEntity = {};
|
||||
let showPage = {};
|
||||
for (let i = 0; i < data['entities'].length; i++) {
|
||||
|
||||
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
|
||||
}
|
||||
}
|
||||
if(this.showResearchOutcomes){
|
||||
this.show++;
|
||||
}
|
||||
if(this.showDataProviders){
|
||||
this.show++;
|
||||
}
|
||||
if(this.showOrganizations){
|
||||
this.show++;
|
||||
}
|
||||
if(this.showProjects){
|
||||
this.show++;
|
||||
}
|
||||
if(this.show ==1){
|
||||
this.disableSelect = true;
|
||||
}
|
||||
});
|
||||
for (let i = 0; i < data['pages'].length; i++) {
|
||||
showPage["" + data['pages'][i]["route"] + ""] = data['pages'][i]["isEnabled"];
|
||||
}
|
||||
this.showResearchOutcomes = showPage[this.properties.searchLinkToResults] && (showEntity["publication"] || showEntity["dataset"] || showEntity["software"] || showEntity["orp"]);
|
||||
this.showPublications = showPage[this.properties.searchLinkToResults] && showEntity["publication"];
|
||||
this.showDatasets = showPage[this.properties.searchLinkToResults] && showEntity["dataset"];
|
||||
this.showSoftware = showPage[this.properties.searchLinkToResults] && showEntity["software"];
|
||||
this.showOther = showPage[this.properties.searchLinkToResults] && showEntity["orp"];
|
||||
this.showProjects = showPage[this.properties.searchLinkToProjects] && showEntity["project"];
|
||||
this.showOrganizations = showPage[this.properties.searchLinkToOrganizations] && showEntity["organization"];
|
||||
this.showDataProviders = showPage[this.properties.searchLinkToDataProviders] && showEntity["datasource"];
|
||||
if (this.customFilter && this.customFilter.queryFieldName == "communityId") {
|
||||
this.showOrganizations = false;
|
||||
if (!this.simpleView) {
|
||||
this.showProjects = false;
|
||||
this.showDataProviders = false;
|
||||
}
|
||||
}
|
||||
if (this.showResearchOutcomes) {
|
||||
this.show++;
|
||||
}
|
||||
if (this.showDataProviders) {
|
||||
this.show++;
|
||||
}
|
||||
if (this.showOrganizations) {
|
||||
this.show++;
|
||||
}
|
||||
if (this.showProjects) {
|
||||
this.show++;
|
||||
}
|
||||
if (this.show == 1) {
|
||||
this.disableSelect = true;
|
||||
}
|
||||
});
|
||||
} else if((this.customFilter && this.customFilter.queryFieldName == "communityId") && this.properties.adminToolsCommunity === "monitor") {
|
||||
this.show = 1;
|
||||
this.disableSelect = true;
|
||||
} else if(this.customFilter && (this.customFilter.queryFieldName == "relfunderid" || this.customFilter.queryFieldName == "funderid")) {
|
||||
this.showResearchOutcomes = true;
|
||||
this.showPublications = true;
|
||||
this.showDatasets = true;
|
||||
this.showSoftware = true;
|
||||
this.showOther = true;
|
||||
this.showProjects = true;
|
||||
this.showAll = false;
|
||||
this.show = 2;
|
||||
} else if(this.customFilter && this.customFilter.queryFieldName == "relorganizationid") {
|
||||
this.showResearchOutcomes = true;
|
||||
this.showPublications = true;
|
||||
this.showDatasets = true;
|
||||
this.showSoftware = true;
|
||||
this.showOther = true;
|
||||
this.showProjects = true;
|
||||
this.showDataProviders = true;
|
||||
this.showAll = false;
|
||||
this.show = 3;
|
||||
} else {
|
||||
this.showResearchOutcomes = true;
|
||||
this.showPublications = true;
|
||||
this.showDatasets = true;
|
||||
this.showSoftware = true;
|
||||
this.showOther = true;
|
||||
this.showProjects = true;
|
||||
this.showOrganizations = true;
|
||||
this.showDataProviders = true;
|
||||
this.showAll = false;
|
||||
this.show = 4;
|
||||
}
|
||||
}
|
||||
this.selectedEntity = this.currentEntity;
|
||||
this.selectionChange.emit({
|
||||
|
@ -150,10 +187,9 @@ export class EntitiesSelectionComponent {
|
|||
advancedUrl: this.getUrl(false)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
entityChanged() {
|
||||
|
||||
if (!this.simpleView || this.onChangeNavigate) {
|
||||
this.router.navigate([this.getUrl(this.simpleView)]);
|
||||
} else {
|
||||
|
@ -163,12 +199,12 @@ export class EntitiesSelectionComponent {
|
|||
advancedUrl: this.getUrl(false)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
getUrl(simpleView: boolean) {
|
||||
let url = "";
|
||||
if(!this.onlyresults) {
|
||||
if (!this.onlyresults) {
|
||||
if (this.selectedEntity == "all") {
|
||||
url = (simpleView ? "/search/find/" : null);
|
||||
} else if (this.selectedEntity == "result") {
|
||||
|
@ -180,20 +216,22 @@ export class EntitiesSelectionComponent {
|
|||
} else if (this.selectedEntity == "organization") {
|
||||
url = (simpleView ? this.properties.searchLinkToOrganizations : this.properties.searchLinkToAdvancedOrganizations);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
url = (simpleView ? this.properties.searchLinkToResults : this.properties.searchLinkToAdvancedResults);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
toggle(){
|
||||
if(this.matSelect) {
|
||||
|
||||
toggle() {
|
||||
if (this.matSelect) {
|
||||
this.matSelect.toggle();
|
||||
}
|
||||
}
|
||||
open(){
|
||||
if(this.matSelect && !this.matSelect.focused) {
|
||||
|
||||
open() {
|
||||
if (this.matSelect && !this.matSelect.focused) {
|
||||
this.matSelect.open();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
[showAdvancedSearchLink]="showAdvancedSearchLink" [customFilter]="customFilter"
|
||||
>
|
||||
</advanced-search-form>
|
||||
<div *ngIf="entityType === 'community' ||entityType === 'stakeholder' " class="uk-position-center-right">
|
||||
<div *ngIf="entityType === 'community' || entityType === 'stakeholder' " class="uk-position-center-right uk-visible@m">
|
||||
<img src="assets/common-assets/common/search.png" class="uk-align-center" width="141" height="171">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -148,21 +148,22 @@ export class NewSearchPageComponent {
|
|||
}else if(!this.simpleView && this.advancedSearchLink) {
|
||||
this.breadcrumbs.push({name: "Advanced Search", route: null});
|
||||
}
|
||||
console.log(this.filters)
|
||||
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this.properties, (this.customFilter) ? this.customFilter.valueId : null, this.router.url).subscribe(contents => {
|
||||
|
||||
this.pageContents = contents;
|
||||
})
|
||||
if((this.customFilter && this.customFilter.queryFieldName == "communityId") && this.properties.adminToolsCommunity !== "monitor") {
|
||||
this.helper.getPageHelpContents(this.properties, (this.customFilter) ? this.customFilter.valueId : this.properties.adminToolsCommunity, this.router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this.properties, (this.customFilter) ? this.customFilter.valueId : null, this.router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
if((this.customFilter && this.customFilter.queryFieldName == "communityId") && this.properties.adminToolsCommunity !== "monitor") {
|
||||
this.helper.getDivHelpContents(this.properties, (this.customFilter) ? this.customFilter.valueId : this.properties.adminToolsCommunity, this.router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
|
|
@ -155,17 +155,31 @@ export class QuickSelectionsComponent implements OnChanges {
|
|||
this.setFormValues();
|
||||
}
|
||||
if(this.properties) {
|
||||
this.config.getCommunityInformation(this.properties, this.properties.adminToolsCommunity).subscribe(data => {
|
||||
var showEntity = {};
|
||||
for (var i = 0; i < data['entities'].length; i++) {
|
||||
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
|
||||
}
|
||||
this.showPublications = showEntity["publication"];
|
||||
this.showDatasets = showEntity["dataset"];
|
||||
this.showSoftware = showEntity["software"];
|
||||
this.showOrp = showEntity["orp"];
|
||||
this.showEntities = this.showPublications || this.showDatasets || this.showSoftware || this.showOrp;
|
||||
});
|
||||
if(this.properties.adminToolsCommunity !== "monitor") {
|
||||
this.config.getCommunityInformation(this.properties, this.properties.adminToolsCommunity).subscribe(data => {
|
||||
var showEntity = {};
|
||||
for (var i = 0; i < data['entities'].length; i++) {
|
||||
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
|
||||
}
|
||||
this.showPublications = showEntity["publication"];
|
||||
this.showDatasets = showEntity["dataset"];
|
||||
this.showSoftware = showEntity["software"];
|
||||
this.showOrp = showEntity["orp"];
|
||||
this.showEntities = this.showPublications || this.showDatasets || this.showSoftware || this.showOrp;
|
||||
}, error => {
|
||||
this.showPublications = true;
|
||||
this.showDatasets = true;
|
||||
this.showSoftware = true;
|
||||
this.showOrp = true;
|
||||
this.showEntities = true;
|
||||
});
|
||||
} else {
|
||||
this.showPublications = true;
|
||||
this.showDatasets = true;
|
||||
this.showSoftware = true;
|
||||
this.showOrp = true;
|
||||
this.showEntities = true;
|
||||
}
|
||||
}
|
||||
this.resultTypesObs = this.clicks.pipe(
|
||||
debounceTime(this.delayTime)
|
||||
|
|
|
@ -1,234 +1,318 @@
|
|||
<div *ngIf="showMenu">
|
||||
<div *ngIf="properties.environment =='beta' || properties.environment =='development'"
|
||||
class="uk-visible@m" >
|
||||
class="uk-visible@m">
|
||||
<a [routerLink]="logoRoute" [href]="logoUrl"><img class="large-beta-indication"
|
||||
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
|
||||
alt="BETA">
|
||||
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
|
||||
alt="BETA">
|
||||
</a>
|
||||
</div>
|
||||
<div class="tm-header-mobile uk-hidden@m">
|
||||
<nav class="uk-navbar-container uk-navbar" uk-navbar="">
|
||||
<div *ngIf="properties.environment =='beta' || properties.environment =='development'"
|
||||
class="uk-position-top-left">
|
||||
<img class="small-beta-indication" [src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')" alt="BETA">
|
||||
</div>
|
||||
<!-- class="uk-navbar-right"--> <!-- if we want to revert the menu - put it on the right -->
|
||||
<div *ngIf="!onlyTop || userMenu" class="uk-navbar-left">
|
||||
<a class="uk-navbar-toggle" href="#tm-mobile" uk-toggle="" style="z-index:1000;">
|
||||
<div uk-navbar-toggle-icon="" class="uk-navbar-toggle-icon uk-icon custom-navbar-toggle-icon"> </div>
|
||||
</a>
|
||||
<a *ngIf="community && !homeurl" class="uk-navbar-item uk-logo" [href]="'https://'+(properties.environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank">
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName" class="uk-margin-left uk-text-large">
|
||||
{{community.name}} </div>
|
||||
</a>
|
||||
<a *ngIf="community && homeurl" class="uk-navbar-item uk-logo" routerLinkActive="uk-link" routerLink="/" >
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName" class="uk-margin-left uk-text-large">
|
||||
{{community.name}} </div>
|
||||
</a>
|
||||
<div *ngIf="enableSearch && isEnabled([searchRoute], showPage)"
|
||||
class=" uk-width-large ">
|
||||
<search-bar [searchPlaceHolder]="searchPlaceHolder"
|
||||
<div class="tm-header-mobile uk-hidden@m">
|
||||
<nav class="uk-navbar-container uk-navbar" uk-navbar="">
|
||||
<div *ngIf="properties.environment =='beta' || properties.environment =='development'"
|
||||
class="uk-position-top-left">
|
||||
<img class="small-beta-indication"
|
||||
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
|
||||
alt="BETA">
|
||||
</div>
|
||||
<!-- class="uk-navbar-right"--> <!-- if we want to revert the menu - put it on the right -->
|
||||
<div *ngIf="!onlyTop || userMenu" class="uk-navbar-left">
|
||||
<a class="uk-navbar-toggle" href="#tm-mobile" uk-toggle="" style="z-index:1000;">
|
||||
<div uk-navbar-toggle-icon="" class="uk-navbar-toggle-icon uk-icon custom-navbar-toggle-icon"></div>
|
||||
</a>
|
||||
<a *ngIf="community && !homeurl" class="uk-navbar-item uk-logo"
|
||||
[href]="'https://'+(properties.environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank">
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"
|
||||
[alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName"
|
||||
class="uk-margin-left uk-text-large">
|
||||
{{community.name}} </div>
|
||||
</a>
|
||||
<a *ngIf="community && homeurl" class="uk-navbar-item uk-logo" routerLinkActive="uk-link" routerLink="/">
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"
|
||||
[alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName"
|
||||
class="uk-margin-left uk-text-large">
|
||||
{{community.name}} </div>
|
||||
</a>
|
||||
<div *ngIf="enableSearch && isEnabled([searchRoute], showPage)"
|
||||
class=" uk-width-large ">
|
||||
<search-bar [searchPlaceHolder]="searchPlaceHolder"
|
||||
[searchRoute]="searchRoute" [properties]="properties" [communityId]="communityId"></search-bar>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-navbar-center">
|
||||
<a *ngIf="!community" class="uk-navbar-item uk-logo" routerLinkActive="uk-link" routerLink="/" >
|
||||
<img src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
|
||||
</a>
|
||||
|
||||
<a *ngIf="!community" class="uk-navbar-item uk-logo"
|
||||
routerLinkActive="uk-link" routerLink="/">
|
||||
<img src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
|
||||
</a>
|
||||
</div>
|
||||
<!--div class="uk-navbar-right uk-margin-xlarge-top">
|
||||
<user-mini></user-mini>
|
||||
</div-->
|
||||
</nav>
|
||||
<!-- uk-offcanvas="flip: true"--> <!-- if we want to revert the menu - put it on the right -->
|
||||
<div id="tm-mobile" uk-offcanvas="" mode="slide" overlay="" class="uk-offcanvas uk-hidden@m" style="z-index:10000;" >
|
||||
</nav>
|
||||
<!-- uk-offcanvas="flip: true"--> <!-- if we want to revert the menu - put it on the right -->
|
||||
<div id="tm-mobile" uk-offcanvas="" mode="slide" overlay="" class="uk-offcanvas uk-hidden@m" style="z-index:10000;">
|
||||
<div class="uk-offcanvas-bar">
|
||||
<button class="uk-offcanvas-close uk-close uk-icon" type="button" uk-close=""></button>
|
||||
<div class="uk-child-width-1-1 uk-grid" uk-grid="">
|
||||
<div>
|
||||
<div class="uk-panel" id="module-0">
|
||||
<ul class="uk-nav uk-nav-default">
|
||||
<li *ngIf="portal != 'usage-statistics'" class="uk-nav-header uk-parent" >
|
||||
Dashboards
|
||||
<button class="uk-offcanvas-close uk-close uk-icon" type="button" uk-close=""></button>
|
||||
<div class="uk-child-width-1-1 uk-grid" uk-grid="">
|
||||
<div>
|
||||
<div class="uk-panel" id="module-0">
|
||||
<ul class="uk-nav uk-nav-default">
|
||||
<li *ngIf="portal != 'usage-statistics' && !stakeholder" class="uk-nav-header uk-parent">
|
||||
Dashboards
|
||||
<ul class="uk-nav-sub">
|
||||
<li *ngIf="portal!='explore'"><a
|
||||
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development' ?'beta.':'')+'explore.openaire.eu'"
|
||||
target="_blank" class="uk-heading-bullet explore-heading-bullet">EXPLORE</a></li>
|
||||
<li *ngIf="portal!='provide'"><a
|
||||
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'provide.openaire.eu'"
|
||||
target="_blank" class="uk-heading-bullet provide-heading-bullet">PROVIDE</a></li>
|
||||
<li *ngIf="portal!='connect'"><a
|
||||
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'connect.openaire.eu'"
|
||||
target="_blank" class="uk-heading-bullet connect-heading-bullet">CONNECT</a></li>
|
||||
<li *ngIf="portal!='monitor'"><a [href]="'https://'+(properties.environment =='beta' ||
|
||||
properties.environment =='development'?'beta.':'')+'monitor.openaire.eu'" target="_blank"
|
||||
class="uk-heading-bullet monitor-heading-bullet">MONITOR</a></li>
|
||||
<li *ngIf="portal!='develop'"><a href="https://develop.openaire.eu" target="_blank"
|
||||
class="uk-heading-bullet develop-heading-bullet">DEVELOP</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<ng-container *ngIf="!onlyTop">
|
||||
<ng-container *ngFor="let menu of menuItems">
|
||||
<li class="uk-nav-header uk-parent " *ngIf="showHomeMenuItem && getCurrentRoute()!='/'">
|
||||
<a routerLinkActive="uk-link" routerLink="/">Home</a>
|
||||
</li>
|
||||
<li class="uk-nav-header uk-parent"
|
||||
*ngIf="isAtleastOneEnabled(menu.rootItem.entitiesRequired,showEntity) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)">
|
||||
<!--a routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a-->
|
||||
<a *ngIf="menu.rootItem.route.length > 0 && isEnabled([menu.rootItem.route], showPage) || !menu.rootItem.routeRequired "
|
||||
routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}"
|
||||
[queryParams]=menu.rootItem.params
|
||||
class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a>
|
||||
<a *ngIf="menu.rootItem.route.length == 0 && menu.rootItem.url.length > 0"
|
||||
routerLinkActive="uk-link" href="{{menu.rootItem.url}}" target="_blank"
|
||||
class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a>
|
||||
<a *ngIf="(menu.rootItem.route.length == 0 && menu.rootItem.url.length == 0) || (menu.rootItem.route.length >0 && menu.rootItem.routeRequired && !isEnabled([menu.rootItem.route], showPage) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage))"
|
||||
class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a>
|
||||
|
||||
<ul class="uk-nav-sub">
|
||||
<li *ngIf="portal!='explore'"><a [href]="'https://'+(properties.environment =='beta' || properties.environment =='development' ?'beta.':'')+'explore.openaire.eu'" target="_blank" class="uk-heading-bullet explore-heading-bullet">EXPLORE</a></li>
|
||||
<li *ngIf="portal!='provide'"><a [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'provide.openaire.eu'" target="_blank" class="uk-heading-bullet provide-heading-bullet">PROVIDE</a></li>
|
||||
<li *ngIf="portal!='connect'"><a [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'connect.openaire.eu'" target="_blank" class="uk-heading-bullet connect-heading-bullet">CONNECT</a></li>
|
||||
<li *ngIf="portal!='monitor'"><a [href]="'https://'+(properties.environment =='beta' ||
|
||||
properties.environment =='development'?'beta.':'')+'monitor.openaire.eu'" target="_blank" class="uk-heading-bullet monitor-heading-bullet">MONITOR</a></li>
|
||||
<li *ngIf="portal!='develop'"><a href="https://develop.openaire.eu" target="_blank" class="uk-heading-bullet develop-heading-bullet">DEVELOP</a></li>
|
||||
<ng-container *ngFor="let submenu of menu.items">
|
||||
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)">
|
||||
<a *ngIf="submenu.route.length > 0" routerLinkActive="uk-link"
|
||||
routerLink="{{submenu.route}}" [queryParams]=submenu.params
|
||||
class="uk-offcanvas-close custom-offcanvas-close">{{submenu.title}}</a>
|
||||
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0" routerLinkActive="uk-link"
|
||||
href="{{submenu.url}}" target="_blank"
|
||||
class="uk-offcanvas-close custom-offcanvas-close">{{submenu.title}}</a>
|
||||
|
||||
</li>
|
||||
<li *ngIf="submenu.route.length == 0 && submenu.url.length == 0 && isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)"
|
||||
class="uk-nav-header">{{submenu.title}}</li>
|
||||
</ng-container>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<ng-container *ngIf="!onlyTop" >
|
||||
<ng-container *ngFor="let menu of menuItems">
|
||||
<li class="uk-nav-header uk-parent " *ngIf="showHomeMenuItem && getCurrentRoute()!='/'">
|
||||
<a routerLinkActive="uk-link" routerLink="/">Home</a>
|
||||
</li>
|
||||
<li class="uk-nav-header uk-parent" *ngIf="isAtleastOneEnabled(menu.rootItem.entitiesRequired,showEntity) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)">
|
||||
<!--a routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a-->
|
||||
<a *ngIf="menu.rootItem.route.length > 0 && isEnabled([menu.rootItem.route], showPage) || !menu.rootItem.routeRequired " routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a>
|
||||
<a *ngIf="menu.rootItem.route.length == 0 && menu.rootItem.url.length > 0" routerLinkActive="uk-link" href="{{menu.rootItem.url}}" target="_blank" class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a>
|
||||
<a *ngIf="(menu.rootItem.route.length == 0 && menu.rootItem.url.length == 0) || (menu.rootItem.route.length >0 && menu.rootItem.routeRequired && !isEnabled([menu.rootItem.route], showPage) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage))" class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a>
|
||||
|
||||
<ul class="uk-nav-sub">
|
||||
<ng-container *ngFor="let submenu of menu.items">
|
||||
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)">
|
||||
<a *ngIf="submenu.route.length > 0" routerLinkActive="uk-link" routerLink="{{submenu.route}}" [queryParams]=submenu.params class="uk-offcanvas-close custom-offcanvas-close">{{submenu.title}}</a>
|
||||
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0" routerLinkActive="uk-link" href="{{submenu.url}}" target="_blank" class="uk-offcanvas-close custom-offcanvas-close">{{submenu.title}}</a>
|
||||
|
||||
</li>
|
||||
<li *ngIf="submenu.route.length == 0 && submenu.url.length == 0 && isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)" class="uk-nav-header">{{submenu.title}}</li>
|
||||
</ng-container>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="userMenu">
|
||||
<user-mini [user]="user" mobileView=true [redirectUrl]="(communityId && communityId !== 'connect')?null:properties.afterLoginRedirectLink" [userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl [logOutUrl]=properties.logoutUrl [cookieDomain]=properties.cookieDomain></user-mini>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="userMenu">
|
||||
<user-mini [user]="user" mobileView=true
|
||||
[redirectUrl]="(communityId && communityId !== 'connect')?null:properties.afterLoginRedirectLink"
|
||||
[userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl
|
||||
[logOutUrl]=properties.logoutUrl [cookieDomain]=properties.cookieDomain></user-mini>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="specialAnnouncementContent" class="uk-hidden@m" [innerHTML]="specialAnnouncementContent">
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="specialAnnouncementContent" class="uk-hidden@m" [innerHTML]="specialAnnouncementContent">
|
||||
|
||||
</div>
|
||||
<div *ngIf="!community && portal != 'connect-admin' && portal != 'usage-statistics'" class="tm-toolbar custom-{{portal}}-toolbar uk-visible@m">
|
||||
<div class="uk-container uk-flex uk-flex-middle uk-container-expand">
|
||||
</div>
|
||||
<div *ngIf="!community && !stakeholder && portal != 'connect-admin' && portal != 'usage-statistics'"
|
||||
class="tm-toolbar custom-{{portal}}-toolbar uk-visible@m">
|
||||
<div class="uk-container uk-flex uk-flex-middle uk-container-expand">
|
||||
<div class="uk-margin-auto-left">
|
||||
<div class="uk-grid-medium uk-child-width-auto uk-flex-middle uk-grid uk-grid-stack" uk-grid="margin: uk-margin-small-top">
|
||||
<div class="uk-first-column">
|
||||
<div class="uk-panel inner" id="module-119">
|
||||
<ul class="uk-subnav uk-subnav-line">
|
||||
<li ><a [href]="'https://'+(properties.environment =='beta'?'beta':'www')+'.openaire.eu'" target="_blank" class="home-icon"><span class="uk-responsive-height" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 20 20" height="20px" id="Layer_1" version="1.1" viewBox="0 0 48 48" width="20px" xml:space="preserve"><path id="home" clip-rule="evenodd" d="M44.715,23.711c-0.381,0.382-1,0.382-1.381,0l-8.939-8.938 c-0.064-0.051-0.119-0.106-0.17-0.171l-3.83-3.829c-0.064-0.051-0.119-0.106-0.17-0.171L24,4.377L4.667,23.711 c-0.381,0.382-1,0.382-1.381,0c-0.381-0.381-0.381-1,0-1.381L23.191,2.425c0.031-0.047,0.053-0.101,0.094-0.144 C23.482,2.085,23.742,1.994,24,2c0.258-0.006,0.518,0.084,0.715,0.281c0.043,0.042,0.062,0.096,0.096,0.144L30,7.616V4.997 c0,0,0,0,0,0c0-0.552,0.447-1,1-1h4c0.277,0,0.527,0.112,0.707,0.293C35.889,4.471,36,4.721,36,4.997v8.619l8.715,8.714 C45.096,22.711,45.096,23.33,44.715,23.711z M34,5.997h-2v3.619l2,2V5.997z M10,21.997c0.552,0,1,0.448,1,1v19c0,1.105,0.896,2,2,2 h6l0,0v-13c0-0.553,0.447-1,1-1h8c0.553,0,1,0.447,1,1v13l0,0h6c1.105,0,2-0.895,2-2v-19c0-0.552,0.447-1,1-1s1,0.448,1,1v19 c0,2.209-1.791,4-4,4H13c-2.209,0-4-1.791-4-4v-19C9,22.444,9.448,21.997,10,21.997z M27,43.996v-12h-6v12l0,0H27L27,43.996z" fill-rule="evenodd" fill="#fff"/></svg>
|
||||
<div class="uk-grid-medium uk-child-width-auto uk-flex-middle uk-grid uk-grid-stack"
|
||||
uk-grid="margin: uk-margin-small-top">
|
||||
<div class="uk-first-column">
|
||||
<div class="uk-panel inner" id="module-119">
|
||||
<ul class="uk-subnav uk-subnav-line">
|
||||
<li><a [href]="'https://'+(properties.environment =='beta'?'beta':'www')+'.openaire.eu'" target="_blank"
|
||||
class="home-icon"><span class="uk-responsive-height">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
enable-background="new 0 0 20 20" height="20px" id="Layer_1" version="1.1"
|
||||
viewBox="0 0 48 48" width="20px" xml:space="preserve"><path id="home" clip-rule="evenodd" d="M44.715,23.711c-0.381,0.382-1,0.382-1.381,0l-8.939-8.938 c-0.064-0.051-0.119-0.106-0.17-0.171l-3.83-3.829c-0.064-0.051-0.119-0.106-0.17-0.171L24,4.377L4.667,23.711 c-0.381,0.382-1,0.382-1.381,0c-0.381-0.381-0.381-1,0-1.381L23.191,2.425c0.031-0.047,0.053-0.101,0.094-0.144 C23.482,2.085,23.742,1.994,24,2c0.258-0.006,0.518,0.084,0.715,0.281c0.043,0.042,0.062,0.096,0.096,0.144L30,7.616V4.997 c0,0,0,0,0,0c0-0.552,0.447-1,1-1h4c0.277,0,0.527,0.112,0.707,0.293C35.889,4.471,36,4.721,36,4.997v8.619l8.715,8.714 C45.096,22.711,45.096,23.33,44.715,23.711z M34,5.997h-2v3.619l2,2V5.997z M10,21.997c0.552,0,1,0.448,1,1v19c0,1.105,0.896,2,2,2 h6l0,0v-13c0-0.553,0.447-1,1-1h8c0.553,0,1,0.447,1,1v13l0,0h6c1.105,0,2-0.895,2-2v-19c0-0.552,0.447-1,1-1s1,0.448,1,1v19 c0,2.209-1.791,4-4,4H13c-2.209,0-4-1.791-4-4v-19C9,22.444,9.448,21.997,10,21.997z M27,43.996v-12h-6v12l0,0H27L27,43.996z" fill-rule="evenodd" fill="#fff"/></svg>
|
||||
</span></a></li>
|
||||
<li [class]="(portal=='explore')?'custom-'+portal+'-li':''"><a [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'explore.openaire.eu'" title="Search in OA. Link your research">Explore</a></li>
|
||||
<li [class]="(portal=='provide')?'custom-'+portal+'-li':''"><a [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'provide.openaire.eu'" target="_blank" title="Content Provider Dashboard">Provide</a></li>
|
||||
<li [class]="(portal=='connect'||portal=='connect-admin')?'custom-'+portal+'-li':''"><a [href]="'https://'+(properties.environment =='beta' || properties.environment =='development' ?'beta.':'')+'connect.openaire.eu'" target="_blank" title="Research Community Dashboard">Connect</a></li>
|
||||
<li [class]="(portal=='monitor')?'custom-'+portal+'-li':''"><a
|
||||
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'monitor.openaire.eu'" target="_blank" title="Monitoring Dashboard">Monitor</a></li>
|
||||
<li [class]="(portal=='develop')?'custom-'+portal+'-li':''"><a href="https://develop.openaire.eu" target="_blank" title="APIs">Develop</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<li [class]="(portal=='explore')?'custom-'+portal+'-li':''"><a
|
||||
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'explore.openaire.eu'"
|
||||
title="Search in OA. Link your research">Explore</a></li>
|
||||
<li [class]="(portal=='provide')?'custom-'+portal+'-li':''"><a
|
||||
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'provide.openaire.eu'"
|
||||
target="_blank" title="Content Provider Dashboard">Provide</a></li>
|
||||
<li [class]="(portal=='connect'||portal=='connect-admin')?'custom-'+portal+'-li':''"><a
|
||||
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development' ?'beta.':'')+'connect.openaire.eu'"
|
||||
target="_blank" title="Research Community Dashboard">Connect</a></li>
|
||||
<li [class]="(portal=='monitor')?'custom-'+portal+'-li':''"><a
|
||||
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'monitor.openaire.eu'"
|
||||
target="_blank" title="Monitoring Dashboard">Monitor</a></li>
|
||||
<li [class]="(portal=='develop')?'custom-'+portal+'-li':''"><a href="https://develop.openaire.eu"
|
||||
target="_blank" title="APIs">Develop</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="specialAnnouncementContent" class="uk-visible@m" [innerHTML]="specialAnnouncementContent">
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="specialAnnouncementContent" class="uk-visible@m" [innerHTML]="specialAnnouncementContent">
|
||||
|
||||
</div>
|
||||
<div class="tm-header uk-visible@m tm-header-transparent" uk-header="">
|
||||
<div id="stickyNavbar" [class]="'uk-navbar-container uk-sticky uk-navbar-transparent '+portal+'-menu'" uk-sticky="" media="768" cls-active="uk-active uk-navbar-sticky" animation="uk-animation-slide-top" top=".tm-header + [class*="uk-section"]" cls-inactive="uk-navbar-transparent" style="">
|
||||
<div *ngIf="properties.environment =='beta' || properties.environment =='development'"
|
||||
class=" uk-visible@m" >
|
||||
<img class="beta-indication-sticky" [src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')" alt="BETA">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tm-header uk-visible@m tm-header-transparent" uk-header="">
|
||||
<div id="stickyNavbar" [class]="'uk-navbar-container uk-sticky uk-navbar-transparent '+portal+'-menu'" uk-sticky=""
|
||||
media="768" cls-active="uk-active uk-navbar-sticky" animation="uk-animation-slide-top"
|
||||
top=".tm-header + [class*="uk-section"]" cls-inactive="uk-navbar-transparent" style="">
|
||||
<div *ngIf="properties.environment =='beta' || properties.environment =='development'">
|
||||
<img class="beta-indication-sticky"
|
||||
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
|
||||
alt="BETA">
|
||||
</div>
|
||||
<div class="uk-container uk-container-expand">
|
||||
<nav class="uk-navbar" uk-navbar="{"align":"left"}">
|
||||
<div *ngIf="showLogo" class="uk-navbar-left uk-visible@l ">
|
||||
<a *ngIf="!community" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
|
||||
<img src="{{logoPath}}logo-large-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
|
||||
</a>
|
||||
<nav class="uk-navbar" uk-navbar="{"align":"left"}">
|
||||
<div *ngIf="showLogo" class="uk-navbar-left uk-visible@l">
|
||||
<a *ngIf="!community" routerLinkActive="uk-link" routerLink="/"
|
||||
class="uk-logo uk-navbar-item">
|
||||
<img src="{{logoPath}}logo-large-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
|
||||
</a>
|
||||
<a *ngIf="community && homeurl" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
|
||||
|
||||
<a *ngIf="community && homeurl" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"
|
||||
[alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName"
|
||||
class="uk-margin-left uk-text-large"> {{community.name}} </div>
|
||||
</a>
|
||||
<a *ngIf="community && !homeurl"
|
||||
[href]="'https://'+(properties.environment =='beta'?'beta.':'')+community.id+'.openaire.eu'"
|
||||
target="_blank" class="uk-logo uk-navbar-item">
|
||||
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName" class="uk-margin-left uk-text-large"> {{community.name}} </div>
|
||||
</a>
|
||||
<a *ngIf="community && !homeurl" [href]="'https://'+(properties.environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item">
|
||||
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName"
|
||||
class="uk-margin-left uk-text-large"> {{community.name}} </div>
|
||||
</a>
|
||||
|
||||
<div *ngIf="enableSearch && isEnabled([searchRoute], showPage)"
|
||||
class=" uk-margin-left uk-width-xlarge ">
|
||||
<search-bar [searchPlaceHolder]="searchPlaceHolder"
|
||||
[searchRoute]="searchRoute" [properties]="properties" [communityId]="communityId"></search-bar>
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"
|
||||
[alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName"
|
||||
class="uk-margin-left uk-text-large"> {{community.name}} </div>
|
||||
</a>
|
||||
<span *ngIf="stakeholder" class="uk-navbar-item uk-flex uk-flex-middle">
|
||||
<div *ngIf="stakeholder.logoUrl">
|
||||
<img [src]="stakeholder.logoUrl" alt="OpenAIRE" style="max-height: 40px">
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="showLogo" class="uk-navbar-left uk-visible@m uk-hidden@l ">
|
||||
<a *ngIf="!community" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
|
||||
<img src="{{logoPath}}logo-small-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
|
||||
</a>
|
||||
<a *ngIf="community && homeurl" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName"
|
||||
class="uk-margin-left uk-text-large"> {{community.name}} </div>
|
||||
</a>
|
||||
<a *ngIf="community && !homeurl" [href]="'https://'+(properties.environment =='beta'?'beta.':'')+community.id+'.openaire.eu'" target="_blank" class="uk-logo uk-navbar-item">
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}" [alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName"
|
||||
class="uk-margin-left uk-text-large"> {{community.name}} </div>
|
||||
</a>
|
||||
<div *ngIf="enableSearch && isEnabled([searchRoute], showPage)"
|
||||
class="uk-width-large ">
|
||||
<search-bar [searchPlaceHolder]="searchPlaceHolder"
|
||||
[searchRoute]="searchRoute" [properties]="properties" [communityId]="communityId" ></search-bar>
|
||||
<div class="uk-margin-left uk-text-large">
|
||||
{{stakeholder.name}}
|
||||
</div>
|
||||
</span>
|
||||
<div *ngIf="enableSearch && isEnabled([searchRoute], showPage)"
|
||||
class=" uk-margin-left uk-width-xlarge ">
|
||||
<search-bar [searchPlaceHolder]="searchPlaceHolder"
|
||||
[searchRoute]="searchRoute" [properties]="properties"
|
||||
[communityId]="communityId"></search-bar>
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="!onlyTop" class="uk-navbar-center"> -->
|
||||
<div *ngIf="!onlyTop" class="uk-navbar-right uk-position-top-right">
|
||||
<ul [class]="'uk-navbar-nav'+(!userMenu?' uk-margin-right':'')">
|
||||
<li class="uk-parent" *ngIf="showHomeMenuItem && getCurrentRoute()!='/'">
|
||||
<a routerLinkActive="uk-link" routerLink="/">Home</a>
|
||||
</li>
|
||||
<ng-container *ngFor="let menu of menuItems">
|
||||
<li [class]="(isTheActiveMenu(menu)?'uk-active':'')+' uk-parent'"
|
||||
*ngIf="isAtleastOneEnabled(menu.rootItem.entitiesRequired,showEntity) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)">
|
||||
<!--a routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="" aria-expanded="false">{{menu.rootItem.title}}</a-->
|
||||
<a *ngIf="menu.rootItem.route.length > 0 && (isEnabled([menu.rootItem.route], showPage) || !menu.rootItem.routeRequired )" routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params > {{menu.rootItem.title}}</a>
|
||||
<a *ngIf="menu.rootItem.route.length == 0 && menu.rootItem.url.length > 0" routerLinkActive="uk-link" href="{{menu.rootItem.url}}" target="_blank" aria-expanded="false">{{menu.rootItem.title}}</a>
|
||||
<a *ngIf="(menu.rootItem.route.length == 0 && menu.rootItem.url.length == 0) || ( menu.rootItem.route.length >0 && menu.rootItem.routeRequired && !isEnabled([menu.rootItem.route], showPage) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)) " class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a>
|
||||
</div>
|
||||
<div *ngIf="showLogo" class="uk-navbar-left uk-visible@m uk-hidden@l">
|
||||
<a *ngIf="!community" routerLinkActive="uk-link" routerLink="/"
|
||||
class="uk-logo uk-navbar-item">
|
||||
<img src="{{logoPath}}logo-large-{{portal}}.png" alt="OpenAIRE" class="uk-responsive-height">
|
||||
</a>
|
||||
<span *ngIf="stakeholder" class="uk-navbar-item uk-flex uk-flex-middle" style="max-width: 50vw">
|
||||
<div *ngIf="stakeholder.logoUrl">
|
||||
<img [src]="stakeholder.logoUrl" alt="OpenAIRE" style="max-height: 40px">
|
||||
</div>
|
||||
<div class="uk-margin-left uk-text-large">
|
||||
{{stakeholder.name}}
|
||||
</div>
|
||||
</span>
|
||||
<a *ngIf="community && homeurl" routerLinkActive="uk-link" routerLink="/" class="uk-logo uk-navbar-item">
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"
|
||||
[alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName"
|
||||
class="uk-margin-left uk-text-large"> {{community.name}} </div>
|
||||
</a>
|
||||
<a *ngIf="community && !homeurl"
|
||||
[href]="'https://'+(properties.environment =='beta'?'beta.':'')+community.id+'.openaire.eu'"
|
||||
target="_blank" class="uk-logo uk-navbar-item">
|
||||
<img *ngIf="community.logoUrl && community.logoUrl.length > 0" src="{{community.logoUrl}}"
|
||||
[alt]=community.name class="uk-responsive-height">
|
||||
<div *ngIf="!community.logoUrl || community.logoUrl.length == 0 || showCommunityName"
|
||||
class="uk-margin-left uk-text-large"> {{community.name}} </div>
|
||||
</a>
|
||||
<div *ngIf="enableSearch && isEnabled([searchRoute], showPage)"
|
||||
class="uk-width-large ">
|
||||
<search-bar [searchPlaceHolder]="searchPlaceHolder"
|
||||
[searchRoute]="searchRoute" [properties]="properties"
|
||||
[communityId]="communityId"></search-bar>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div *ngIf="!onlyTop" class="uk-navbar-center"> -->
|
||||
<div *ngIf="!onlyTop" class="uk-navbar-right uk-position-top-right">
|
||||
<ul [class]="'uk-navbar-nav'+(!userMenu?' uk-margin-right':'')">
|
||||
<li class="uk-parent" *ngIf="showHomeMenuItem && getCurrentRoute()!='/'">
|
||||
<a routerLinkActive="uk-link" routerLink="/">Home</a>
|
||||
</li>
|
||||
<ng-container *ngFor="let menu of menuItems">
|
||||
<li [class]="(isTheActiveMenu(menu)?'uk-active':'')+' uk-parent'"
|
||||
*ngIf="isAtleastOneEnabled(menu.rootItem.entitiesRequired,showEntity) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)">
|
||||
<!--a routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="" aria-expanded="false">{{menu.rootItem.title}}</a-->
|
||||
<a *ngIf="menu.rootItem.route.length > 0 && (isEnabled([menu.rootItem.route], showPage) || !menu.rootItem.routeRequired )"
|
||||
routerLinkActive="uk-link" routerLink="{{menu.rootItem.route}}"
|
||||
[queryParams]=menu.rootItem.params> {{menu.rootItem.title}}</a>
|
||||
<a *ngIf="menu.rootItem.route.length == 0 && menu.rootItem.url.length > 0" routerLinkActive="uk-link"
|
||||
href="{{menu.rootItem.url}}" target="_blank" aria-expanded="false">{{menu.rootItem.title}}</a>
|
||||
<a *ngIf="(menu.rootItem.route.length == 0 && menu.rootItem.url.length == 0) || ( menu.rootItem.route.length >0 && menu.rootItem.routeRequired && !isEnabled([menu.rootItem.route], showPage) && isAtleastOneEnabled(menu.rootItem.routeRequired, showPage)) "
|
||||
class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a>
|
||||
|
||||
|
||||
<div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left" style="top: 80px; left: 0px;" id="{{menu.rootItem.id}}" (click)="onClick(menu.rootItem.id)">
|
||||
<div class="uk-navbar-dropdown-grid uk-child-width-1-1 uk-grid uk-grid-stack" uk-grid="">
|
||||
<div class="uk-first-column uk-height-max-medium uk-overflow-auto">
|
||||
<ul class="uk-nav uk-navbar-dropdown-nav">
|
||||
<ng-container *ngFor="let submenu of menu.items">
|
||||
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)">
|
||||
<a *ngIf="submenu.route.length > 0" routerLinkActive="uk-link" routerLink="{{submenu.route}}" [queryParams]=submenu.params >{{submenu.title}}</a>
|
||||
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0" routerLinkActive="uk-link" href="{{submenu.url}}" target="_blank">{{submenu.title}}</a>
|
||||
</li>
|
||||
<li *ngIf="submenu.route.length == 0 && submenu.url.length == 0 && isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)" class="uk-nav-header">{{submenu.title}}</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left"
|
||||
style="top: 80px; left: 0px;" id="{{menu.rootItem.id}}" (click)="onClick(menu.rootItem.id)">
|
||||
<div class="uk-navbar-dropdown-grid uk-child-width-1-1 uk-grid uk-grid-stack" uk-grid="">
|
||||
<div class="uk-first-column uk-height-max-medium uk-overflow-auto">
|
||||
<ul class="uk-nav uk-navbar-dropdown-nav">
|
||||
<ng-container *ngFor="let submenu of menu.items">
|
||||
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)">
|
||||
<a *ngIf="submenu.route.length > 0" routerLinkActive="uk-link"
|
||||
routerLink="{{submenu.route}}" [queryParams]=submenu.params>{{submenu.title}}</a>
|
||||
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0" routerLinkActive="uk-link"
|
||||
href="{{submenu.url}}" target="_blank">{{submenu.title}}</a>
|
||||
</li>
|
||||
<li *ngIf="submenu.route.length == 0 && submenu.url.length == 0 && isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)"
|
||||
class="uk-nav-header">{{submenu.title}}</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</ng-container>
|
||||
</li>
|
||||
</ng-container>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
<!-- </div> -->
|
||||
<!-- <div *ngIf="userMenu" class="uk-navbar-right"> -->
|
||||
<!-- <div *ngIf="userMenu" class="uk-navbar-right"> -->
|
||||
<user-mini *ngIf="userMenu" [user]="user"
|
||||
[redirectUrl]="(communityId && communityId !== 'connect')?null:properties.afterLoginRedirectLink"
|
||||
[userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl [logOutUrl]=properties.logoutUrl [cookieDomain]=properties.cookieDomain></user-mini>
|
||||
<user-mini *ngIf="userMenu" [user]="user"
|
||||
[redirectUrl]="(communityId && communityId !== 'connect')?null:properties.afterLoginRedirectLink"
|
||||
[userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl [logOutUrl]=properties.logoutUrl
|
||||
[cookieDomain]=properties.cookieDomain></user-mini>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical">
|
||||
<div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid uk-grid-stack" uk-grid="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical">
|
||||
<div
|
||||
class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid uk-grid-stack"
|
||||
uk-grid="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,6 +4,7 @@ import {Session, User} from '../login/utils/helper.class';
|
|||
import {ConfigurationService} from '../utils/configuration/configuration.service';
|
||||
import {MenuItem, RootMenuItem} from './menu';
|
||||
import {EnvProperties} from '../utils/properties/env-properties';
|
||||
import {Stakeholder} from "../monitor/entities/stakeholder";
|
||||
|
||||
@Component({
|
||||
selector: 'navbar',
|
||||
|
@ -16,6 +17,7 @@ export class NavigationBarComponent {
|
|||
@Input() userMenu: boolean = true;
|
||||
@Input() showHomeMenuItem: boolean = false;
|
||||
@Input() communityId;
|
||||
@Input() stakeholder: Stakeholder;
|
||||
@Input() showCommunityName: boolean = false;
|
||||
@Input() userMenuItems: MenuItem[];
|
||||
@Input() menuItems: RootMenuItem [];
|
||||
|
|
|
@ -68,6 +68,7 @@ export interface EnvProperties {
|
|||
baseLink?: string;
|
||||
baseOpenaireLink?: string;
|
||||
afterLoginRedirectLink?: string;
|
||||
searchLinkToResult?: string;
|
||||
searchLinkToPublication?: string;
|
||||
searchLinkToProject?: string;
|
||||
searchLinkToDataProvider?: string;
|
||||
|
@ -77,6 +78,7 @@ export interface EnvProperties {
|
|||
searchLinkToOrganization?: string;
|
||||
//Search pages
|
||||
searchLinkToCommunities?: string;
|
||||
searchLinkToStakeholders?: string;
|
||||
searchLinkToPublications?: string;
|
||||
searchLinkToDataProviders?: string;
|
||||
searchLinkToProjects?: string;
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
</div>
|
||||
<!-- Title -->
|
||||
<div class="uk-margin-small-bottom">
|
||||
<div class="uk-h5 uk-margin-remove">
|
||||
<h5 class="uk-margin-remove">
|
||||
<a *ngIf="result.id && !(result.resultType == 'dataprovider' && result.compatibilityUNKNOWN) "
|
||||
(click)="onClick()" [queryParams]="routerHelper.createQueryParam(urlParam,result.id)"
|
||||
routerLink="/search/{{(result.resultType?result.resultType:'result')}}" class="uk-link uk-width-expand">
|
||||
[routerLink]="url" class="uk-link uk-width-expand">
|
||||
<div *ngIf="(result.title) || result.acronym">
|
||||
<span *ngIf="result.acronym">
|
||||
{{result.acronym}}
|
||||
</span>
|
||||
<span *ngIf="result.acronym">
|
||||
{{result.acronym}}
|
||||
</span>
|
||||
<span *ngIf="result.acronym && (result.title)"> (</span>
|
||||
<span *ngIf="result.title" [innerHTML]="result.title"></span>
|
||||
<span *ngIf="result.acronym && result.title">)</span>
|
||||
|
@ -48,7 +48,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<hr *ngIf="result.websiteURL && promoteWebsiteURL">
|
||||
</div>
|
||||
</h5>
|
||||
<!-- Authors -->
|
||||
<div *ngIf="result.authors">
|
||||
<showAuthors [authors]="result.authors" [authorsLimit]=10 [modal]="modal" [showAll]=false></showAuthors>
|
||||
|
|
|
@ -3,6 +3,7 @@ import {ResultPreview} from "./result-preview";
|
|||
import {EnvProperties} from "../properties/env-properties";
|
||||
import {RouterHelper} from "../routerHelper.class";
|
||||
import {AlertModal} from "../modal/alert";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'result-preview',
|
||||
|
@ -17,25 +18,34 @@ export class ResultPreviewComponent implements OnInit{
|
|||
@Input() promoteWebsiteURL: boolean = false;
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
public urlParam: string;
|
||||
public url: string;
|
||||
public beforeTitle: string[] = [];
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.result.resultType === "publication") {
|
||||
this.urlParam = "articleId";
|
||||
this.url = properties.searchLinkToPublication.split('?')[0];
|
||||
} else if (this.result.resultType === "dataset") {
|
||||
this.urlParam = "datasetId";
|
||||
this.url = properties.searchLinkToDataset.split('?')[0];
|
||||
} else if (this.result.resultType === "software") {
|
||||
this.urlParam = "softwareId";
|
||||
this.url = properties.searchLinkToSoftwareLanding.split('?')[0];
|
||||
} else if (this.result.resultType === "other") {
|
||||
this.urlParam = "orpId";
|
||||
this.url = properties.searchLinkToOrp.split('?')[0];
|
||||
} else if (this.result.resultType == "project") {
|
||||
this.urlParam = "projectId";
|
||||
this.url = properties.searchLinkToProject.split('?')[0];
|
||||
} else if (this.result.resultType == "organization") {
|
||||
this.urlParam = "organizationId";
|
||||
this.url = properties.searchLinkToOrganization.split('?')[0];
|
||||
} else if (this.result.resultType == "dataprovider") {
|
||||
this.urlParam = "datasourceId";
|
||||
this.url = properties.searchLinkToDataProvider.split('?')[0];
|
||||
} else {
|
||||
this.urlParam = "id";
|
||||
this.url = properties.searchLinkToResult.split('?')[0];
|
||||
}
|
||||
this.initBeforeTitle();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue