openaire-library/deposit/datasets/depositBySubject.component.ts

35 lines
1.2 KiB
TypeScript
Raw Normal View History

import {Component, Input} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import { Router } from '@angular/router';
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
@Component({
selector: 'deposit-by-subject',
template: `
<div class="uk-margin-top">
<h3>Or search for domain specific repositories</h3>
<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;" />
<button class=" uk-button uk-button-default" type="submit" (click)="search()" >
Search
</button>
</form>
</div>
`
})
export class DepositBySubjectComponent {
@Input() subjectKeyword: string='';
constructor (private _router: Router) { }
public search() {
this._router.navigate( ['participate/deposit-subject-result'], { queryParams: { "q": this.subjectKeyword } } );
}
}