web-remote/src/app/components/search/search.component.html

33 lines
1.2 KiB
HTML

<h3>Search</h3>
<form #searchForm="ngForm">
<mat-form-field>
<mat-select [(ngModel)]="selectedPlugin" (selectionChange)="onPluginChange($event)" name="selectedPlugin" placeholder="Search for:">
<mat-option *ngFor="let plugin of searchPlugins" name="searchPlugins" [value]="plugin.key">
{{plugin.name}}
</mat-option>
</mat-select>
</mat-form-field>
<br>
<div [hidden]="!displaySearchOptions">
<openlp-search-options></openlp-search-options>
</div>
<mat-form-field>
<input matInput [(ngModel)]="searchText" name="searchText" placeholder="Search Text" required>
</mat-form-field>
<br>
<button mat-raised-button id="searchButton" color="primary" [disabled]="!searchForm.form.valid" (click)="onSubmit()">Search</button>
</form>
<div *ngIf="searchResults">
<h3>Search Results:</h3>
<div *ngIf="!searchResults.length">
No Results matching your search were found...
</div>
<table *ngIf="searchResults.length">
<tr *ngFor="let item of searchResults">
<td>{{item[1]}}</td>
<td><button mat-button color="primary" (click)="addToService(item[0])">Add to Service</button></td>
<td><button mat-button color="accent" (click)="sendLive(item[0])">Send Live</button></td>
</tr>
</table>
</div>