diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c89277955..5c4ef16da 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,6 +1,8 @@ 7.4.0 - fix: old recurring events were not deleted when changing recurrence pattern - fix: unable to remove recurrence on events + - RFE: Search asset feedback. i.e. 'No results found' + http://www.plainblack.com/rfe/request-for-enhancement/search-asset-feedback.-i.e.-no-results-found#kH5X_YA17ZxbRvi6gx5KRA diff --git a/lib/WebGUI/Asset/Wobject/Search.pm b/lib/WebGUI/Asset/Wobject/Search.pm index 80b480f68..ee6acdd7a 100644 --- a/lib/WebGUI/Asset/Wobject/Search.pm +++ b/lib/WebGUI/Asset/Wobject/Search.pm @@ -142,6 +142,7 @@ sub view { $var{'form_footer'} = WebGUI::Form::formFooter($self->session); $var{'form_submit'} = WebGUI::Form::submit($self->session, {value=>$i18n->get("search")}); $var{'form_keywords'} = WebGUI::Form::text($self->session, {name=>"keywords", value=>$self->session->form->get("keywords")}); + $var{'no_results'} = $i18n->get("no results"); if ($self->session->form->get("doit")) { my $search = WebGUI::Search->new($self->session); my %rules = ( @@ -160,6 +161,7 @@ sub view { title=>$data->{title}, synopsis=>$data->{synopsis}, }); + $var->{results_found} = 1; } } my $p = WebGUI::Paginator->new($self->session,$self->getUrl('doit=1;keywords='.$self->session->url->escape($self->session->form->get('keywords')))); diff --git a/lib/WebGUI/Help/Asset_Search.pm b/lib/WebGUI/Help/Asset_Search.pm index 5057ad6cc..b71027571 100644 --- a/lib/WebGUI/Help/Asset_Search.pm +++ b/lib/WebGUI/Help/Asset_Search.pm @@ -93,7 +93,13 @@ our $HELP = { 'name' => 'synopsis', }, ], - } + }, + { + 'name' => 'results_found', + }, + { + 'name' => 'no_results', + }, ], related => [ { diff --git a/lib/WebGUI/i18n/English/Asset_Search.pm b/lib/WebGUI/i18n/English/Asset_Search.pm index cab2c96af..8323cce70 100644 --- a/lib/WebGUI/i18n/English/Asset_Search.pm +++ b/lib/WebGUI/i18n/English/Asset_Search.pm @@ -132,6 +132,21 @@ be useful, others may not.|, lastUpdated => 1169843465, }, + 'results_found' => { + message => q|A conditional variable that will be true if any results were found.|, + lastUpdated => 1170549116, + }, + + 'no results' => { + message => q|No results were found.|, + lastUpdated => 1170549113, + }, + + 'no_results' => { + message => q|An internationalized label for telling the user that no results were found.|, + lastUpdated => 1170549119, + }, + }; 1;