search.component.html 1.34 KB
Newer Older
1

Paulo's avatar
Paulo committed
2
<form [formGroup]="seachForm" (ngSubmit)="simpleSearch(seachForm.value);">
3
  <nb-card>
Paulo's avatar
Paulo committed
4
5
6
7
8
9
10
11
    <nb-card-body class="example-items-col">
      <label for="search">Search by title or description</label>  
      <input id="search" type="text" nbInput shape="round" placeholder="Search" formControlName="searchTerm">
      <span>
        <button status="info" href="#" nbButton type="submit" value="Search">
          <nb-icon icon="search-outline"></nb-icon> Search 
        </button>
      </span>
12
13
    </nb-card-body>
  </nb-card>
Administrator's avatar
Administrator committed
14
  </form>
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
38
39
40
41
  </div>
</nb-card-body>
  </nb-card>
  
  <ng-template #loading>
    Loading User...
  </ng-template>