Project

General

Profile

1
import {Component, Input} from '@angular/core';
2
import {Observable}       from 'rxjs/Observable';
3
import { Router } from '@angular/router';
4
import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
5

    
6

    
7

    
8
@Component({
9
    selector: 'deposit-by-subject',
10
    template: `
11
        <div class="uk-margin-top">
12

    
13
                <h3>Or search for content providers via Classifications</h3>
14

    
15
                <form class= "uk-grid">
16
                    <input type="text"  [(ngModel)]="subjectKeyword"  class="uk-margin-medium-left uk-input uk-width-1-2" name="subject" placeholder="Search for classifications..."   />
17

    
18
                    <button class=" uk-button uk-button-default"  type="submit" (click)="search()" >
19
                        Search
20
                    </button>
21
                </form>
22
        </div>
23
    `
24
})
25

    
26
export class DepositBySubjectComponent {
27
    @Input() subjectKeyword: string='';
28

    
29
    @Input() compatibility: string = '';
30
    @Input() requestFor: string = "Publications";
31

    
32
    public status: number;
33
    public errorCodes:ErrorCodes = new ErrorCodes();
34
    public selectedId: string = "";
35
    public warningMessage: string = "";
36

    
37
    constructor (private _router: Router) {
38

    
39

    
40

    
41
    }
42

    
43

    
44

    
45
    search() {
46
        this._router.navigate( ['participate/deposit-subject-result'], { queryParams: { "q": this.subjectKeyword } } );
47
    }
48

    
49

    
50
}
(1-1/10)