34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import {Component, Input} from '@angular/core';
|
|
import {Observable} from 'rxjs/Observable';
|
|
import { Router } from '@angular/router';
|
|
|
|
|
|
|
|
@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: { "subject": this.subjectKeyword } } );
|
|
}
|
|
}
|