Description
Katrin Fischer
2014-11-12 07:14:36 UTC
Created attachment 48531 [details] [review] Bug 13238: Improve heading on vendor search when searching for all vendors Changed wording to be similar to a catalog search (ie 2 result(s) found for 'kw,wrdl: f') To test: 1) Go to Acquisitions and do an empty vendor search 2) Should now read "2 result(s) found for 'vendor: '" Sponsored-by: Catalyst IT Comment on attachment 48531 [details] [review] Bug 13238: Improve heading on vendor search when searching for all vendors Review of attachment 48531 [details] [review]: ----------------------------------------------------------------- This works, but: 2 result(s) found for 'vendor: ' still looks ugly for empty search term case, as mentioned in comment #0. ::: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ +52,4 @@ > > [% INCLUDE 'acquisitions-toolbar.inc' %] > [% UNLESS ( count == 1 ) %] > +<h1>[% count %] result(s) found for 'vendor: [% supplier %]'</h1> Perhaps an [% IF (supplier.length>0) %] ... [% ELSE % ]<h1>[% count %] result(s) found</h1>[% END %] -- Except with nicer vertical spacing? http://template-toolkit.org/docs/manual/VMethods.html#section_length (In reply to M. Tompsett from comment #2) > Comment on attachment 48531 [details] [review] [review] > > +<h1>[% count %] result(s) found for 'vendor: [% supplier %]'</h1> ... > http://template-toolkit.org/docs/manual/VMethods.html#section_length And you could even get the result/results nicer too, with a nested if/else/end. Created attachment 48912 [details] [review] Bug 13238: Improve heading on vendor search when searching for all vendors To test: 1) Go to Acquisitions and do an empty vendor search 2) Should now read "Vendor search: X result(s) found" 3) Enter a search term and search for vendor 4) Should now read "Vendor search: Y result(s) found for 'search term'" Sponsored-by: Catalyst IT Created attachment 48915 [details] [review] Bug 13238: Improve heading on vendor search when searching for all vendors To test: 1) Go to Acquisitions and do an empty vendor search 2) Should now read "Vendor search: X result(s) found" 3) Enter a search term and search for vendor 4) Should now read "Vendor search: Y result(s) found for 'search term'" Sponsored-by: Catalyst IT NOTE: two nested if/else/end's could make it result/results, as suggested in comment #3. However, this meets my understanding of the problem as defined in comment #0. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> (In reply to M. Tompsett from comment #5) > NOTE: two nested if/else/end's could make it result/results, > as suggested in comment #3. However, this meets my understanding > of the problem as defined in comment #0. OH! I didn't understand this. Will make that change now. Actually before I make that change, the search heading will never show if there is only one result. It will just show the one vendor. Therefore, it doesn't need the s in brackets because that heading will only show if there is more than one result. So I'll take the brackets out. Created attachment 48917 [details] [review] Bug 13238: Improve heading on vendor search when searching for all vendors To test: 1) Go to Acquisitions and do an empty vendor search 2) Should now read "Vendor search: X results found" 3) Enter a search term and search for vendor 4) Should now read "Vendor search: Y results found for 'search term'" Sponsored-by: Catalyst IT NOTE: two nested if/else/end's could make it result/results, as suggested in comment #3. However, this meets my understanding of the problem as defined in comment #0. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Valid point. I stand by the sign off for this string revision. Created attachment 49122 [details] [review] Bug 13238: Specific string if no results Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Katrin, could you confirm it is what you had in mind? This is looking great now! Created attachment 49351 [details] [review] Bug 13238: Improve heading on vendor search when searching for all vendors To test: 1) Go to Acquisitions and do an empty vendor search 2) Should now read "Vendor search: X results found" 3) Enter a search term and search for vendor 4) Should now read "Vendor search: Y results found for 'search term'" Sponsored-by: Catalyst IT NOTE: two nested if/else/end's could make it result/results, as suggested in comment #3. However, this meets my understanding of the problem as defined in comment #0. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 49352 [details] [review] [PASSED QA] Bug 13238: Specific string if no results Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Forgot to sign the first patch... trying again. Created attachment 49353 [details] [review] [PASSED QA] Bug 13238: Improve heading on vendor search when searching for all vendors To test: 1) Go to Acquisitions and do an empty vendor search 2) Should now read "Vendor search: X results found" 3) Enter a search term and search for vendor 4) Should now read "Vendor search: Y results found for 'search term'" Sponsored-by: Catalyst IT NOTE: two nested if/else/end's could make it result/results, as suggested in comment #3. However, this meets my understanding of the problem as defined in comment #0. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 49354 [details] [review] [PASSED QA] Bug 13238: Specific string if no results Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to Master - Should be in the May 2016 release. Thanks! |