Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
import {Component, Input} from '@angular/core';
|
|
|
|
import {Router, ActivatedRoute} from '@angular/router';
|
|
|
|
import {Title, Meta} from '@angular/platform-browser';
|
|
|
|
|
2019-06-03 15:20:36 +02:00
|
|
|
import {Observable} from 'rxjs';
|
Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
|
|
|
|
import {EnvProperties} from '../../utils/properties/env-properties';
|
2017-12-19 13:53:46 +01:00
|
|
|
|
Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
import {PiwikService} from '../../utils/piwik/piwik.service';
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'deposit-by-subject',
|
|
|
|
template: `
|
2018-06-11 10:20:32 +02:00
|
|
|
<div class="uk-margin-large-top">
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2018-10-03 16:12:42 +02:00
|
|
|
<h5>Or search for domain specific repositories</h5>
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
<form class= "uk-grid">
|
|
|
|
<input type="text" [(ngModel)]="subjectKeyword" class="uk-margin-medium-left uk-padding-remove-left uk-input" name="subject" placeholder="Type keywords (e.g Biology, Natural sciences, Social Sciences, Engineering Sciences... )" style="width: 580px;" />
|
|
|
|
|
2018-10-03 16:12:42 +02:00
|
|
|
<button class=" uk-button portal-button" type="submit" (click)="search()" >
|
2017-12-19 13:53:46 +01:00
|
|
|
Search
|
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
`
|
|
|
|
})
|
|
|
|
|
|
|
|
export class DepositBySubjectComponent {
|
|
|
|
@Input() subjectKeyword: string='';
|
2018-04-11 10:59:01 +02:00
|
|
|
@Input() piwikSiteId = null;
|
|
|
|
properties:EnvProperties;
|
Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
|
|
|
|
constructor (private _router: Router,private route: ActivatedRoute,
|
|
|
|
private _meta: Meta, private _title: Title,
|
|
|
|
private _piwikService: PiwikService) { }
|
2018-04-11 10:59:01 +02:00
|
|
|
ngOnInit() {
|
|
|
|
this.route.data
|
|
|
|
.subscribe((data: { envSpecific: EnvProperties }) => {
|
|
|
|
this.properties = data.envSpecific;
|
|
|
|
|
Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
var title = "Deposit by Subjects";
|
|
|
|
var description = "Openaire, repositories, open access, content provider, compatibility, organization, deposit by subject"
|
|
|
|
var url = data.envSpecific.baseLink+this._router.url;
|
|
|
|
|
|
|
|
this._title.setTitle(title);
|
|
|
|
this._meta.updateTag({content:title},"property='og:title'");
|
|
|
|
this._meta.updateTag({content:description},"name='description'");
|
|
|
|
this._meta.updateTag({content:description},"property='og:description'");
|
|
|
|
this._meta.updateTag({content:url},"property='og:url'");
|
2018-06-11 10:20:32 +02:00
|
|
|
|
2018-04-11 10:59:01 +02:00
|
|
|
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
|
|
|
|
this._piwikService.trackView(this.properties, "Deposit by subjects" , this.piwikSiteId).subscribe();
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2018-04-11 10:59:01 +02:00
|
|
|
}
|
2017-12-19 13:53:46 +01:00
|
|
|
public search() {
|
2018-02-05 14:14:59 +01:00
|
|
|
this._router.navigate( ['participate/deposit-subject-result'], { queryParams: { "subject": this.subjectKeyword } } );
|
2017-12-19 13:53:46 +01:00
|
|
|
}
|
|
|
|
}
|