Fix search results summary when no results found

Refs #144
This commit is contained in:
Will Abson 2016-06-07 10:44:24 +01:00
parent afd2660a3e
commit 11f0d08128
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@
},
"RESULTS": {
"SUMMARY": "Found {{numResults}} results for {{searchTerm}}",
"NONE": "No results found for {{searchTerm}}",
"COLUMNS": {
"NAME": "Name",
"MODIFIED_BY": "Modified by",

View File

@ -1,4 +1,6 @@
<p *ngIf="searchTerm">{{ 'SEARCH.RESULTS.SUMMARY' | translate:{numResults: results.length, searchTerm: searchTerm} }}</p>
<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">
<thead>
<tr>