Revision 60158
Added by Argiro Kokogiannaki almost 4 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/result/resultLanding.component.ts | ||
---|---|---|
319 | 319 |
if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) { |
320 | 320 |
this.getOpenCitations(); |
321 | 321 |
} |
322 |
if(this.resultLandingInfo.underCurationMessage && this.properties == "production"){ |
|
323 |
//set noindex for newly added records |
|
324 |
this._meta.updateTag({content: 'noindex'}, "name='robots'"); |
|
325 |
} |
|
322 |
this.addNoIndexFilter(); |
|
326 | 323 |
if (this.resultLandingInfo.title) { |
327 | 324 |
this.updateTitle(this.resultLandingInfo.title); |
328 | 325 |
this.updateDescription((this.resultLandingInfo.description ? (this.resultLandingInfo.description) : ("," + this.resultLandingInfo.title))); |
... | ... | |
573 | 570 |
this.citeModal.alertTitle = "Cite this " + this.getTypeName() + " to"; |
574 | 571 |
this.citeModal.open(); |
575 | 572 |
} |
573 |
addNoIndexFilter() { |
|
574 |
try { |
|
575 |
if(this.properties.environment != "production") { |
|
576 |
return ; |
|
577 |
}else { |
|
578 |
let addFilter = !(!this.resultLandingInfo.underCurationMessage && |
|
579 |
((this.resultLandingInfo.fundedByProjects && this.resultLandingInfo.fundedByProjects.length > 0) |
|
580 |
|| this.resultLandingInfo.journal |
|
581 |
|| (this.resultLandingInfo.otherSubjects && this.resultLandingInfo.otherSubjects.size > 0) |
|
582 |
|| (this.resultLandingInfo.classifiedSubjects && this.resultLandingInfo.classifiedSubjects.size > 0) |
|
583 |
|| (this.resultLandingInfo.organizations && this.resultLandingInfo.organizations.length > 0) |
|
584 |
|| this.resultLandingInfo.bioentities || (this.resultLandingInfo.references && this.resultLandingInfo.references.length > 0) |
|
585 |
|| (this.resultLandingInfo.relatedResearchResults && this.resultLandingInfo.relatedResearchResults.length > 0) |
|
586 |
|| (this.resultLandingInfo.similarResearchResults && this.resultLandingInfo.similarResearchResults.length > 0) |
|
587 |
|| (this.resultLandingInfo.supplementaryResearchResults && this.resultLandingInfo.supplementaryResearchResults.length > 0) |
|
588 |
|| (this.resultLandingInfo.supplementedByResearchResults && this.resultLandingInfo.supplementedByResearchResults.length > 0) |
|
589 |
)); |
|
590 |
if(addFilter) { |
|
591 |
this._meta.updateTag({content: 'noindex'}, "name='robots'"); |
|
592 |
} |
|
593 |
} |
|
594 |
} catch (e) { |
|
595 |
console.error("Error in passNoIndexFilter()", this.resultLandingInfo.relcanId, e); |
|
596 |
return false; |
|
597 |
} |
|
598 |
} |
|
576 | 599 |
} |
Also available in: Unified diff
[Library | trunk]
result landing: updates on method and filtering rules for noindex tag