Bug 13238 - Improve heading on vendor search when searching for all vendors
Summary: Improve heading on vendor search when searching for all vendors
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-12 07:14 UTC by Katrin Fischer
Modified: 2016-12-05 21:27 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13238: Improve heading on vendor search when searching for all vendors (1.24 KB, patch)
2016-03-02 00:38 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 13238: Improve heading on vendor search when searching for all vendors (1.41 KB, patch)
2016-03-10 03:17 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 13238: Improve heading on vendor search when searching for all vendors (1.63 KB, patch)
2016-03-10 03:32 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 13238: Improve heading on vendor search when searching for all vendors (1.63 KB, patch)
2016-03-10 03:41 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 13238: Specific string if no results (1.15 KB, patch)
2016-03-14 16:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13238: Improve heading on vendor search when searching for all vendors (1.62 KB, patch)
2016-03-20 21:36 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 13238: Specific string if no results (1.21 KB, patch)
2016-03-20 21:37 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 13238: Improve heading on vendor search when searching for all vendors (1.69 KB, patch)
2016-03-20 21:40 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 13238: Specific string if no results (1.21 KB, patch)
2016-03-20 21:40 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2014-11-12 07:14:36 UTC
When searching for all vendors by doing an empty search, the page states:

You searched on vendor , 3 results found

I think we could make this look a bit nicer checking for the empty search term.
Comment 1 Aleisha Amohia 2016-03-02 00:38:54 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2016-03-10 02:01:52 UTC
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
Comment 3 Mark Tompsett 2016-03-10 02:04:10 UTC
(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.
Comment 4 Aleisha Amohia 2016-03-10 03:17:25 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2016-03-10 03:32:32 UTC Comment hidden (obsolete)
Comment 6 Aleisha Amohia 2016-03-10 03:37:37 UTC
(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.
Comment 7 Aleisha Amohia 2016-03-10 03:40:37 UTC
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.
Comment 8 Aleisha Amohia 2016-03-10 03:41:49 UTC Comment hidden (obsolete)
Comment 9 Mark Tompsett 2016-03-11 21:32:24 UTC
Valid point. I stand by the sign off for this string revision.
Comment 10 Jonathan Druart 2016-03-14 16:42:19 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2016-03-14 16:42:41 UTC
Katrin, could you confirm it is what you had in mind?
Comment 12 Katrin Fischer 2016-03-20 21:35:55 UTC
This is looking great now!
Comment 13 Katrin Fischer 2016-03-20 21:36:51 UTC Comment hidden (obsolete)
Comment 14 Katrin Fischer 2016-03-20 21:37:21 UTC Comment hidden (obsolete)
Comment 15 Katrin Fischer 2016-03-20 21:39:12 UTC
Forgot to sign the first patch... trying again.
Comment 16 Katrin Fischer 2016-03-20 21:40:11 UTC
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>
Comment 17 Katrin Fischer 2016-03-20 21:40:44 UTC
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>
Comment 18 Brendan Gallagher 2016-03-23 23:07:06 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!