diff --git a/ayanova/src/views/home-search.vue b/ayanova/src/views/home-search.vue index 49b031aa..80489e23 100644 --- a/ayanova/src/views/home-search.vue +++ b/ayanova/src/views/home-search.vue @@ -36,9 +36,13 @@ - +

No results

+ - Results + + ({{ $ay.t("TooManyResults") }}) + + _.groupBy(collection, [iteratee=_.identity]) @@ -53,10 +57,6 @@ - - totalresults:{{ totalResults }} - -
results:{{ results }}
@@ -98,6 +98,7 @@ const FORM_KEY = "home-search"; const API_BASE_URL = "Search/"; const FORM_CUSTOM_TEMPLATE_KEY = "home-search"; +const MAX_RESULTS = 200; export default { created() { @@ -129,7 +130,7 @@ export default { searchPhrase: null, searchObjectType: 0, results: [], - totalResults: null, + maxResultsReturned: false, formState: { ready: false, dirty: false, @@ -167,7 +168,7 @@ export default { phrase: vm.searchPhrase, nameOnly: false, typeOnly: !!vm.searchObjectType ? vm.searchObjectType : 0, - maxResults: 200 + maxResults: MAX_RESULTS }) .then(res => { @@ -176,7 +177,9 @@ export default { window.$gz.form.setErrorBoxErrors(vm); } else { vm.results = res.data.searchResults; - vm.totalResults = res.data.totalResultsFound; + vm.maxResultsReturned = + res.data.searchResults.length == MAX_RESULTS; + //Update the form status window.$gz.form.setFormState({ vm: vm, @@ -260,7 +263,8 @@ function initForm(vm) { function fetchTranslatedText(vm) { return window.$gz.translation.fetch([ //todo: needs all object types - "Object" + "Object", + "TooManyResults" ]); }