Display message when errors occur whilst searching

Refs #144
This commit is contained in:
Will Abson
2016-06-07 13:34:06 +01:00
parent 11f0d08128
commit 8bdbccb138
3 changed files with 14 additions and 7 deletions

View File

@@ -1,7 +1,6 @@
<p *ngIf="searchTerm">
<p *ngIf="results.length">{{ 'SEARCH.RESULTS.SUMMARY' | translate:{numResults: results.length, searchTerm: searchTerm} }}</p>
<p *ngIf="results.length == 0">{{ 'SEARCH.RESULTS.NONE' | translate:{searchTerm: searchTerm} }}</p>
<table *ngIf="searchTerm && results.length" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width">
<p *ngIf="results && results.length">{{ 'SEARCH.RESULTS.SUMMARY' | translate:{numResults: results.length, searchTerm: searchTerm} }}</p>
<p *ngIf="results&& results.length == 0">{{ 'SEARCH.RESULTS.NONE' | translate:{searchTerm: searchTerm} }}</p>
<table *ngIf="results && results.length && searchTerm" class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width">
<thead>
<tr>
<th>
@@ -28,3 +27,4 @@
</tr>
</tbody>
</table>
<p *ngIf="errorMessage">{{ 'SEARCH.RESULTS.ERROR' | translate:{errorMessage: errorMessage} }}</p>