[Trunk | Library]: Fix and add when missing: schema2jsonld, canonincal url, meta tags, piwik call.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56840 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2019-08-02 14:55:32 +00:00
parent 3d79e469ef
commit 30bc39aa22
30 changed files with 210 additions and 85 deletions

View File

@ -1,4 +1,4 @@
<schema2jsonld *ngIf="url" [URL]="url" name="Manage links" type="other"></schema2jsonld>
<schema2jsonld *ngIf="url" [URL]="url" [name]="title" type="other"></schema2jsonld>
<div class="uk-width-1-1">
</div>

View File

@ -14,6 +14,8 @@ import {IndexInfoService} from "../../../utils/indexInfo.service";
import {ClaimDBRecord} from "../claimHelper.class";
import {Dates} from "../../../utils/string-utils.class";
import {HelperService} from "../../../utils/helper/helper.service";
import {Meta, Title} from "@angular/platform-browser";
import {PiwikService} from "../../../utils/piwik/piwik.service";
@Component({
@ -23,6 +25,10 @@ import {HelperService} from "../../../utils/helper/helper.service";
})
export class DisplayClaimsComponent {
@Input() piwikSiteId = null;
@Input() title: string = "";
piwiksub:any;
properties: EnvProperties;
public searchTermStream = new Subject<string>();
sub: any;
@ -77,6 +83,7 @@ export class DisplayClaimsComponent {
public pageContents = null;
constructor(private _claimService: ClaimsService, private route: ActivatedRoute, private _router: Router, private location: Location,
private _meta: Meta, private _title: Title, private _piwikService:PiwikService,
private seoService: SEOService, private indexInfoService:IndexInfoService, private helper: HelperService) {
}
@ -85,6 +92,16 @@ export class DisplayClaimsComponent {
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.url = data.envSpecific.baseLink + this._router.url;
var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community";
this.updateTitle(this.title);
this.updateDescription(description);
this.updateUrl(this.url);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe();
}
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
});
@ -92,7 +109,7 @@ export class DisplayClaimsComponent {
this.lastIndexDate = res;
});
this.sub = this.route.queryParams.subscribe(params => {
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url, false);
this.seoService.createLinkForCanonicalURL(this.url, false);
if (this.myClaims) {
this.fetchBy = "User";
@ -132,6 +149,9 @@ export class DisplayClaimsComponent {
ngOnDestroy() {
this.sub.unsubscribe();
if(this.piwiksub){
this.piwiksub.unsubscribe();
}
//this.searchTermStreamSub.unsubscribe();
}
@ -587,4 +607,21 @@ export class DisplayClaimsComponent {
}
return totalPages;
}
private updateDescription(description:string) {
this._meta.updateTag({content:description},"name='description'");
this._meta.updateTag({content:description},"property='og:description'");
}
private updateTitle(title:string) {
var _prefix ="";
if(!this.communityId) {
_prefix ="OpenAIRE | ";
}
var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
this._title.setTitle(_title);
this._meta.updateTag({content:_title},"property='og:title'");
}
private updateUrl(url:string) {
this._meta.updateTag({content:url},"property='og:url'");
}
}

View File

@ -12,11 +12,13 @@ import {HelperModule} from '../../../utils/helper/helper.module';
import {Schema2jsonldModule} from '../../../sharedComponents/schema2jsonld/schema2jsonld.module';
import { SEOServiceModule } from '../../../sharedComponents/SEO/SEOService.module';
import {IndexInfoServiceModule} from "../../../utils/indexInfoService.module";
import {PiwikServiceModule} from "../../../utils/piwik/piwikService.module";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule, ClaimServiceModule, LoadingModalModule, AlertModalModule,
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule, IndexInfoServiceModule
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule, PiwikServiceModule,
IndexInfoServiceModule
],
declarations: [

View File

@ -1,5 +1,6 @@
<linking-generic *ngIf="validInput" [localStoragePrefix]="localStoragePrefix" [results]="results" [sources]="sources"
[communityId]="communityId" [inlineEntity]="inlineEntity" [showOptions]="showOptions">
[communityId]="communityId" [inlineEntity]="inlineEntity" [showOptions]="showOptions"
[piwikSiteId]="piwikSiteId" title="Direct Linking">
</linking-generic>
<div *ngIf="!validInput" id="tm-main" class=" uk-section uk-margin-small-top tm-middle">
@ -14,7 +15,7 @@
<div class="uk-grid helper-grid">
<div class="uk-width-expand">
<div *ngIf="validInput != null && !validInput" class="uk-alert uk-alert-warning"
role="alert">No valid arguments provided in order to start linking openAIRE entities.
role="alert">No valid arguments provided in order to start linking OpenAIRE entities.
</div>
</div>

View File

@ -9,7 +9,6 @@ import {SearchPublicationsService} from '../../services/searchPublications.servi
import {SearchDatasetsService} from '../../services/searchDatasets.service';
import {SearchSoftwareService} from '../../services/searchSoftware.service';
import {SearchOrpsService} from '../../services/searchOrps.service';
import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {LinkingGenericComponent} from "../linking/linkingGeneric.component";
import {ClaimResultSearchFormComponent} from "../claim-utils/claimResultSearchForm.component";
@ -19,6 +18,8 @@ import {ClaimResultSearchFormComponent} from "../claim-utils/claimResultSearchFo
templateUrl: 'directLinking.component.html'
})
export class DirectLinkingComponent {
@Input() piwikSiteId = null;
@ViewChild(LinkingGenericComponent) linking: LinkingGenericComponent;
results: ClaimEntity[] = [];
@ -40,22 +41,13 @@ export class DirectLinkingComponent {
localStoragePrefix: string = "";
constructor(private _router: Router, private route: ActivatedRoute,private entitySearch:EntitiesSearchService,
private publicationsSearch: SearchPublicationsService, private datasetsSearch: SearchDatasetsService,
private softwareSearch: SearchSoftwareService, private ORPSearch: SearchOrpsService,
private _meta: Meta, private _title: Title, private seoService: SEOService) {
let title = "OpenAIRE | Direct Linking";
this._meta.updateTag({content: title}, "property='og:title'");
this._title.setTitle(title);
private softwareSearch: SearchSoftwareService, private ORPSearch: SearchOrpsService) {
}
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
let url = data.envSpecific.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url, false);
});
this.sub = this.route.queryParams.subscribe(params => {

View File

@ -10,6 +10,7 @@ import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {AlertModal} from "../../utils/modal/alert";
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {HelperService} from "../../utils/helper/helper.service";
import {PiwikService} from "../../utils/piwik/piwik.service";
declare var UIkit:any;
@ -19,6 +20,10 @@ declare var UIkit:any;
})
export class LinkingGenericComponent {
@Input() piwikSiteId = null;
@Input() title: string = null;
piwiksub:any;
@Input() communityId:string= null;
sourceType:string;
targetType:string;
@ -43,14 +48,8 @@ export class LinkingGenericComponent {
constructor (private _router: Router, private route: ActivatedRoute, private entitySearch:EntitiesSearchService,
private publicationsSearch:SearchPublicationsService, private datasetsSearch:SearchDatasetsService,
private _meta: Meta, private _title: Title,
private seoService: SEOService, private helper: HelperService ) {
let title = "OpenAIRE | Linking";
this._meta.updateTag({content:title},"property='og:title'");
this._title.setTitle(title);
private _meta: Meta, private _title: Title, private _piwikService:PiwikService,
private seoService: SEOService, private helper: HelperService ) {
}
ngOnInit() {
this.showOptions.show = 'source';
@ -63,7 +62,18 @@ export class LinkingGenericComponent {
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.url = data.envSpecific.baseLink+this._router.url;
this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url, false);
var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community";
this.updateTitle(this.title);
this.updateDescription(description);
this.updateUrl(this.url);
this.seoService.createLinkForCanonicalURL(this.url, false);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe();
}
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
this.pageContents = contents;
})
@ -81,6 +91,12 @@ export class LinkingGenericComponent {
}
}
ngOnDestroy() {
if(this.piwiksub){
this.piwiksub.unsubscribe();
}
}
openSelectionModal() {
this.alert.cancelButton = false;
this.alert.okButton = false;
@ -105,6 +121,23 @@ export class LinkingGenericComponent {
}
scrollUp(){
HelperFunctions.scroll();
}
private updateDescription(description:string) {
this._meta.updateTag({content:description},"name='description'");
this._meta.updateTag({content:description},"property='og:description'");
}
private updateTitle(title:string) {
var _prefix ="";
if(!this.communityId) {
_prefix ="OpenAIRE | ";
}
var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
this._title.setTitle(_title);
this._meta.updateTag({content:_title},"property='og:title'");
}
private updateUrl(url:string) {
this._meta.updateTag({content:url},"property='og:url'");
}
}

View File

@ -20,6 +20,7 @@ import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {MetadataPreviewModule} from './selected/metadataPreview.module';
import {ClaimEntitiesMetadataModule} from "./selected/ClaimEntitiesMetadata.module";
import {AlertModalModule} from '../../utils/modal/alertModal.module';
import {PiwikServiceModule} from "../../utils/piwik/piwikService.module";
@NgModule({
imports: [
@ -27,7 +28,8 @@ import {AlertModalModule} from '../../utils/modal/alertModal.module';
SelectedPublicationsModule,
StartOverModule,
ClaimContextSearchFormModule, ClaimProjectsSearchFormModule, BulkClaimModule, ClaimResultSearchFormModule,
HelperModule, Schema2jsonldModule, SEOServiceModule, MetadataPreviewModule, ClaimEntitiesMetadataModule, AlertModalModule
HelperModule, Schema2jsonldModule, SEOServiceModule, MetadataPreviewModule, ClaimEntitiesMetadataModule, AlertModalModule,
PiwikServiceModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
declarations: [

View File

@ -17,9 +17,10 @@ import {Meta, Title} from '@angular/platform-browser';
Manage your links in OpenAIRE
</div>
<div>
<displayClaims [enableDelete]=true [myClaims]=true [isAdmin]=false [showUserEmail]=false
[claimsInfoURL]=claimsInfoURL [communityId]=communityId
></displayClaims>
<displayClaims [enableDelete]=true [myClaims]=true [isAdmin]=false [showUserEmail]=false
[claimsInfoURL]=claimsInfoURL [communityId]=communityId
[piwikSiteId]="piwikSiteId" title="My links">
</displayClaims>
</div>
</div>
</div>
@ -31,15 +32,10 @@ import {Meta, Title} from '@angular/platform-browser';
export class MyClaimsComponent {
@Input() claimsInfoURL: string;
@Input() communityId:string;
constructor(private _meta: Meta, private _title: Title) {
let title = "OpenAIRE | My links";
@Input() piwikSiteId = null;
this._meta.updateTag({content: title}, "property='og:title'");
this._title.setTitle(title);
}
constructor() {}
ngOnInit() {
}
ngOnInit() {}
}

View File

@ -5,10 +5,14 @@ import {ActivatedRoute, Router} from "@angular/router";
import {PiwikService} from "../utils/piwik/piwik.service";
import {HelperService} from "../utils/helper/helper.service";
import {RouterHelper} from "../utils/routerHelper.class";
import {SEOService} from "../sharedComponents/SEO/SEO.service";
import {Meta, Title} from "@angular/platform-browser";
@Component({
selector: 'deposit-first-page',
template: `
<schema2jsonld *ngIf="url" [URL]="url" [name]="title" type="other"></schema2jsonld>
<div class="uk-section uk-padding-remove-bottom uk-padding-remove-top">
<div class="communityPanelBackground uk-margin-top uk-padding-small">
<div class="uk-align-center uk-container uk-container-large uk-margin-large-top uk-margin-large-bottom">
@ -147,6 +151,9 @@ import {RouterHelper} from "../utils/routerHelper.class";
})
export class DepositFirstPageComponent {
public url: string = null;
public title: string = "Deposit your research - Learn How";
@Input() public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
@Input() piwikSiteId = null;
piwiksub:any;
@ -164,13 +171,24 @@ export class DepositFirstPageComponent {
constructor (private route: ActivatedRoute, private _piwikService:PiwikService,
private helper: HelperService,
private _router: Router) {}
private _router: Router,
private _meta: Meta, private _title: Title,
private seoService: SEOService) {
}
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.url = this.properties.baseLink+this._router.url;
this.seoService.createLinkForCanonicalURL(this.url, false);
var description = "Openaire, Zenodo, repositories, open access, content provider, compatibility, deposit";
this.updateTitle(this.title);
this.updateDescription(description);
this.updateUrl(this.url);
this.depositRoute = this.properties.depositSearchPage;
//this.getDivContents();
this.getPageContents();
@ -185,7 +203,7 @@ export class DepositFirstPageComponent {
}
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.properties, "Deposit your research (first page)", this.piwikSiteId).subscribe();
this.piwiksub = this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe();
}
});
}
@ -207,4 +225,21 @@ export class DepositFirstPageComponent {
this.piwiksub.unsubscribe();
}
}
private updateDescription(description:string) {
this._meta.updateTag({content:description},"name='description'");
this._meta.updateTag({content:description},"property='og:description'");
}
private updateTitle(title:string) {
var _prefix ="";
if(!this.communityId) {
_prefix ="OpenAIRE | ";
}
var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
this._title.setTitle(_title);
this._meta.updateTag({content:_title},"property='og:title'");
}
private updateUrl(url:string) {
this._meta.updateTag({content:url},"property='og:url'");
}
}

View File

@ -6,11 +6,10 @@ import {ErrorCodes} from '../utils/properties/errorCodes';
import {ErrorMessagesComponent} from '../utils/errorMessages.component';
import {SearchFields} from '../utils/properties/searchFields';
import {SearchPageComponent } from '../searchPages/searchUtils/searchPage.component';
import {SearchCustomFilter, SearchUtilsClass} from '../searchPages/searchUtils/searchUtils.class';
import {SearchUtilsClass} from '../searchPages/searchUtils/searchUtils.class';
import {EnvProperties} from '../utils/properties/env-properties';
import {StringUtils} from "../utils/string-utils.class";
import {ZenodoInformationClass} from "./utils/zenodoInformation.class";
import {PiwikService} from "../utils/piwik/piwik.service";
import {RouterHelper} from "../utils/routerHelper.class";
@Component({
@ -30,7 +29,7 @@ import {RouterHelper} from "../utils/routerHelper.class";
</div>
</div>
</div>
<search-page pageTitle="Search Content Providers"
<search-page pageTitle="Deposit Browse & Search repositories" [hasPrefix]=false
formPlaceholderText = "Search for Content Providers"
type="content providers" entityType="dataprovider" [(filters)] = "filters"
[(results)] = "results" [(searchUtils)] = "searchUtils" [baseUrl] = "baseUrl"
@ -53,8 +52,6 @@ export class SearchDataprovidersToDepositComponent {
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
@Input() piwikSiteId = null;
piwiksub:any;
@Input() customFilter:SearchCustomFilter= null;
public results =[];
public filters =[];
public totalResults:number = 0 ;
@ -83,8 +80,7 @@ export class SearchDataprovidersToDepositComponent {
depositLearnHowPage: string = null;
public routerHelper:RouterHelper = new RouterHelper();
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService,
private _piwikService:PiwikService) {
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService) {
this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent();
this.searchUtils.status = this.errorCodes.LOADING;
@ -98,10 +94,6 @@ export class SearchDataprovidersToDepositComponent {
this.depositLearnHowPage = this.properties.depositLearnHowPage;
this.baseUrl = this.properties.depositSearchPage;
this.pagingLimit = this.properties.pagingLimit;
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.properties, "Deposit search page)", this.piwikSiteId).subscribe();
}
});
this.searchPage.refineFields = this.refineFields;
this.searchPage.fieldIdsMap = this.fieldIdsMap;
@ -126,7 +118,6 @@ export class SearchDataprovidersToDepositComponent {
if(this.searchUtils.size != 5 && this.searchUtils.size != 10 && this.searchUtils.size != 20 && this.searchUtils.size != 50) {
this.searchUtils.size = 5;
}
this.searchPage.customFilter = this.customFilter;
this.searchPage.usedBy = "deposit";
var queryParameters = this.searchPage.getQueryParametersFromUrl(params);
this._getResults(queryParameters, refine, this.searchUtils.page, this.searchUtils.size);
@ -140,10 +131,6 @@ export class SearchDataprovidersToDepositComponent {
if(this.subResults){
this.subResults.unsubscribe();
}
if(this.piwiksub){
this.piwiksub.unsubscribe();
}
}
public getResults(keyword:string,refine:boolean, page: number, size: number){

View File

@ -12,13 +12,11 @@ import {SearchFormModule} from '../searchPages/searchUtils/searchForm.module';
import {SearchPageModule} from '../searchPages/searchUtils/searchPage.module';
import {FreeGuard} from'../login/freeGuard.guard';
import {IsRouteEnabled} from '../error/isRouteEnabled.guard';
import {PiwikServiceModule} from "../utils/piwik/piwikService.module";
@NgModule({
imports: [
CommonModule, FormsModule,
RouterModule,
PiwikServiceModule,
DataProvidersServiceModule,
SearchFormModule, SearchResultsModule, SearchPageModule

View File

@ -235,7 +235,10 @@ export class DataProviderComponent {
}
private updateTitle(title: string) {
var _prefix = "OpenAIRE | ";
var _prefix = "";
if(this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");

View File

@ -210,7 +210,10 @@ export class DatasetComponent {
}
private updateTitle(title: string) {
var _prefix = "OpenAIRE | ";
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");

View File

@ -289,7 +289,10 @@ export class HtmlProjectReportComponent {
}
private updateTitle(title: string) {
var _prefix = "OpenAIRE | ";
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");

View File

@ -487,7 +487,10 @@ export class OrganizationComponent {
}
private updateTitle(title: string) {
var _prefix = "OpenAIRE | ";
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");

View File

@ -196,7 +196,10 @@ export class OrpComponent {
}
private updateTitle(title: string) {
var _prefix = "OpenAIRE | ";
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");

View File

@ -488,7 +488,10 @@ export class ProjectComponent {
}
private updateTitle(title: string) {
var _prefix = "OpenAIRE | ";
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");

View File

@ -272,10 +272,13 @@ export class PublicationComponent {
}
private updateTitle(title: string) {
var _prefix = "OpenAIRE | ";
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(title);
this._meta.updateTag({content: title}, "property='og:title'");
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");
}
private updateUrl(url: string) {

View File

@ -203,7 +203,10 @@ export class SoftwareComponent {
}
private updateTitle(title: string) {
var _prefix = "OpenAIRE | ";
var _prefix = "";
if(!this.communityId) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");

View File

@ -24,7 +24,8 @@ import{EnvProperties} from '../../utils/properties/env-properties';
[csvParams]="csvParams" csvPath="datasets" simpleSearchLink="/search/find/datasets"
[disableForms]="disableForms"
[loadPaging]="loadPaging"
[oldTotalResults]="oldTotalResults" [piwikSiteId]=piwikSiteId
[oldTotalResults]="oldTotalResults"
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
searchFormClass="datasetsSearchForm"
[(sort)]=sort >
</advanced-search-page>
@ -37,6 +38,7 @@ export class AdvancedSearchDatasetsComponent {
private errorMessages: ErrorMessagesComponent;
properties:EnvProperties;
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
@Input() customFilter:SearchCustomFilter= null;
public results =[];

View File

@ -24,7 +24,8 @@ import{EnvProperties} from '../../utils/properties/env-properties';
[csvParams]="csvParams" csvPath="other" simpleSearchLink="/search/find/other"
[disableForms]="disableForms"
[loadPaging]="loadPaging"
[oldTotalResults]="oldTotalResults" [piwikSiteId]=piwikSiteId
[oldTotalResults]="oldTotalResults"
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
searchFormClass="orpsSearchForm"
[(sort)]=sort >
</advanced-search-page>
@ -36,7 +37,8 @@ export class AdvancedSearchOrpsComponent {
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
properties:EnvProperties;
@Input() piwikSiteId = null;
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
@Input() customFilter:SearchCustomFilter= null;
public results =[];

View File

@ -26,7 +26,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
[loadPaging]="loadPaging"
[oldTotalResults]="oldTotalResults"
[(openaireLink)]=openaireLink
[piwikSiteId]=piwikSiteId
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
searchFormClass="publicationsSearchForm"
[(sort)]=sort >
</advanced-search-page>
@ -36,7 +36,8 @@ import{EnvProperties} from '../../utils/properties/env-properties';
export class AdvancedSearchPublicationsComponent {
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
@Input() piwikSiteId = null;
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
public results =[];
public filters =[];

View File

@ -24,7 +24,8 @@ import{EnvProperties} from '../../utils/properties/env-properties';
[csvParams]="csvParams" csvPath="software" simpleSearchLink="/search/find/software"
[disableForms]="disableForms"
[loadPaging]="loadPaging"
[oldTotalResults]="oldTotalResults" [piwikSiteId]=piwikSiteId
[oldTotalResults]="oldTotalResults"
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
searchFormClass="softwareSearchForm"
[(sort)]=sort >
</advanced-search-page>
@ -35,7 +36,8 @@ import{EnvProperties} from '../../utils/properties/env-properties';
export class AdvancedSearchSoftwareComponent {
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
@Input() piwikSiteId = null;
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
@Input() customFilter:SearchCustomFilter= null;
public results =[];
public filters =[];

View File

@ -21,6 +21,7 @@ import {HelperService} from "../../utils/helper/helper.service";
})
export class AdvancedSearchPageComponent {
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
@Input() pageTitle = "";
@Input() results = [];
@Input() type;
@ -89,10 +90,9 @@ export class AdvancedSearchPageComponent {
}
});
var title = "Advanced search " + this.pageTitle;
var description = "Openaire, search, repositories, open access, type, content provider, funder, project, " + this.pageTitle;
this.updateTitle(title);
this.updateTitle(this.pageTitle);
this.updateDescription(description);
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
@ -128,7 +128,10 @@ export class AdvancedSearchPageComponent {
}
updateTitle(title: string) {
var _prefix = "OpenAIRE | ";
var _prefix = "";
if(this.hasPrefix) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");

View File

@ -147,7 +147,7 @@ export class SearchPageComponent {
updateTitle(title:string) {
let _title: string;
if(this.hasPrefix) {
if(this.hasPrefix && !this.customFilter) {
let _prefix ="OpenAIRE | ";
_title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
} else {

View File

@ -39,6 +39,7 @@ import { SEOService } from '../../sharedComponents/SEO/SEO.service';
})
export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
@Input() pageTitle = "";
@Input() results;
@Input() filters = [];
@ -165,7 +166,10 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
this._meta.updateTag({content:description},"property='og:description'");
}
updateTitle(title:string) {
var _prefix ="OpenAIRE | ";
var _prefix: string = "";
if(this.hasPrefix) {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
this._title.setTitle(_title);
this._meta.updateTag({content:_title},"property='og:title'");

View File

@ -30,7 +30,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
'communityPanelBackground' : 'datasetsSearchForm'"
[(openaireLink)]=openaireLink
[(advancedSearchParameters)]=advancedSearchParameters
[piwikSiteId]=piwikSiteId
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
[(sort)]=sort >
</search-page>
<!--[(sortBy)]="sortBy"-->
@ -40,7 +40,8 @@ import{EnvProperties} from '../../utils/properties/env-properties';
export class SearchDatasetsComponent {
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
@Input() piwikSiteId = null;
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
public results =[];
public filters: Filter[] =[];
// public totalResults:number = 0 ;

View File

@ -30,7 +30,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
'communityPanelBackground' : 'orpsSearchForm'"
[(openaireLink)]=openaireLink
[(advancedSearchParameters)]=advancedSearchParameters
[piwikSiteId]=piwikSiteId
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
[(sort)]=sort >
</search-page>
`
@ -40,6 +40,7 @@ export class SearchOrpsComponent {
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
public results =[];
public filters: Filter[] =[];
public baseUrl:string;

View File

@ -31,7 +31,7 @@ import {EnvProperties} from '../../utils/properties/env-properties';
'communityPanelBackground' : 'publicationsSearchForm'"
[(openaireLink)]=openaireLink
[(advancedSearchParameters)]=advancedSearchParameters
[piwikSiteId]=piwikSiteId
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
[(sort)]=sort >
</search-page>
@ -41,7 +41,8 @@ import {EnvProperties} from '../../utils/properties/env-properties';
export class SearchPublicationsComponent {
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
@Input() piwikSiteId = null;
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
public results =[];
public filters =[];
public searchUtils:SearchUtilsClass = new SearchUtilsClass();

View File

@ -30,7 +30,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
'communityPanelBackground' : 'softwareSearchForm'"
[(openaireLink)]=openaireLink
[(advancedSearchParameters)]=advancedSearchParameters
[piwikSiteId]=piwikSiteId
[piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix"
[(sort)]=sort >
</search-page>
`
@ -43,6 +43,7 @@ export class SearchSoftwareComponent {
@Input() customFilter:SearchCustomFilter= null;
@Input() advancedSearchParameters ;
@Input() piwikSiteId = null;
@Input() hasPrefix: boolean = true;
public results =[];
public filters: Filter[] =[];
// public totalResults:number = 0 ;