search.component.html 2.15 KB
Newer Older
1

Paulo's avatar
Paulo committed
2
  <!--<nb-card>
Paulo's avatar
Paulo committed
3
    <nb-card-body class="example-items-col">
Paulo's avatar
Paulo committed
4
      <form [formGroup]="searchForm">
Paulo's avatar
Paulo committed
5
      <label for="search">Search by title or description</label>  
Paulo's avatar
Paulo committed
6
      <input id="search" type="text" nbInput shape="round"  placeholder="Search" formControlName="searchTerm">
Paulo's avatar
Paulo committed
7
      <span>
Paulo's avatar
Paulo committed
8
        <button status="info" href="#" nbButton type="submit" (click)="simpleSearch()" value="Search">
Paulo's avatar
Paulo committed
9
10
11
          <nb-icon icon="search-outline"></nb-icon> Search 
        </button>
      </span>
Paulo's avatar
Paulo committed
12
    </form>
13
14
    </nb-card-body>
  </nb-card>
Paulo's avatar
Paulo committed
15
16
17
  
  <nb-card>
  <nb-card-body>
Administrator's avatar
Administrator committed
18

Paulo's avatar
Paulo committed
19
20
  <div *ngIf="results.length > 0" class="w3-container">
    <p>Found {{results.length}} entries for search term {{seachTerm}}</p>
Paulo's avatar
Paulo committed
21
22
    <table class="w3-table-all w3-card-4">    
      <thead>    
23
        <th style="text-align: center;">Uri (DOI)</th>    
24
25
        <th style="text-align: center;">Title</th>    
        <th style="text-align: center;">Description</th>    
Paulo's avatar
Paulo committed
26
      </thead>    
Paulo's avatar
Paulo committed
27
28
29
30
31
32
      <tbody >
        <tr *ngFor="let result of results">
          <td><a href="{{result.uri.value}}" target="blank">{{result.uri.value}}</a></td>   
          <td>{{result.title.value}}</td>    
          <td>{{result.description.value.substr(0,250)}}</td>    
        </tr>    
Paulo's avatar
Paulo committed
33
    </tbody>
Administrator's avatar
Administrator committed
34
    </table>    
Paulo's avatar
Paulo committed
35
36
37
  </div>
</nb-card-body>
  </nb-card>
Paulo's avatar
Paulo committed
38
39
40
41
42
43
-->
  
<form class="form-inline "[formGroup]="searchForm">
    <input class="form-control" type="text" placeholder="Search" aria-label="Search" formControlName="searchTerm">
    <button type="submit" (click)="simpleSearch()">Search</button>
  </form>
Paulo's avatar
Paulo committed
44
  
Paulo's avatar
Paulo committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  
  <div *ngIf="results.length > 0" class="w3-container">    
    <table class="w3-table-all w3-card-4">    
      <thead>    
        <th style="text-align: center;">Uri (DOI)</th>    
        <th style="text-align: center;">Title</th>    
        <th style="text-align: center;">Description</th>    
      </thead>    
      <tbody>
        <tr *ngFor="let item of results">     
          <td><a href="{{item.uri.value}}" target="blank">{{item.uri.value}}</a></td>   
          <td>{{item.title.value}}</td>    
          <td>{{item.description.value.substr(0,250) }}... </td>    
      </tr>    
    </tbody>
    </table>    
  </div>