Bug 6120

Summary: Add search links in detail pages
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: OPACAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED DUPLICATE QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: PATCH-Sent (DO NOT USE) CC: chris, frederic, katrin.fischer, nengard, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6483
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch
Proposed patch (corrected)
Details page view
Proposed patch (updated)
Details page view (updated)
Proposed patch (full url)
Signed-off patch
proposed patch (passed QA)

Description Fridolin Somers 2011-04-07 14:20:36 UTC
Based on features F10 and F11 developed for Lyon 2 University by Progilone.
See http://git.progilone.com/?p=koha-lyon2.git;a=shortlog;h=F10-F11

After a search is performed, add in detail pages 3 links :

- Back to results : Leads to current search results page (same index, query and limits). Not shown if search leads directly to a detail page.

- Back to simple search : Leads to main page with header filled with current search index, query and limits (like result page).

- Back to advanced search : Leads to advanced search page.

Also adds 'focus' class to query input field in header.
Comment 1 Fridolin Somers 2011-04-07 14:22:07 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2011-04-07 15:00:32 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2011-04-07 18:22:27 UTC
This has missed the feature freeze for 3.4.0 I'm afraid, but once it is signed off it can go into master as soon as the rel_3_4_0 branch is created
Comment 4 Fridolin Somers 2011-04-08 15:19:51 UTC Comment hidden (obsolete)
Comment 5 Frédéric Demians 2011-05-13 13:00:02 UTC
This patch doesn't apply anymore on HEAD. Please rebase it.
Comment 6 Owen Leonard 2011-05-13 13:27:35 UTC
I object to the inclusion of a "back to simple search" link. Does this take you to the home page? There's a simple search form on every page. Aren't we encouraging the user to think that they must return to the home page to perform another quick search?
Comment 7 Fridolin Somers 2011-05-13 15:01:04 UTC
(In reply to comment #6)
> I object to the inclusion of a "back to simple search" link. Does this take you
> to the home page? There's a simple search form on every page. Aren't we
> encouraging the user to think that they must return to the home page to perform
> another quick search?

Not really, the link leads to home page but with search toolbar filled with previous search. So user can modify or relaunch it.

Bu the way,
I think your right, it whould be better to fill the current search in details page. So user doesn't need a link to see his current simple search.

I'll try work on it soon.

Comment 8 Fridolin Somers 2011-05-17 17:50:43 UTC Comment hidden (obsolete)
Comment 9 Fridolin Somers 2011-05-17 17:51:59 UTC
Created attachment 4151 [details]
Details page view (updated)

Details view page.
Comment 10 Fridolin Somers 2011-05-17 17:58:50 UTC
I changed the patch and reduced behavior : 

Only one link appears in actions list to come back to current search results.

Simple and advanced search can be relaunched in any page because they are in the header, no link needed.

Hope it is better.

Thanks for signing-off.
Comment 11 Owen Leonard 2011-05-17 18:32:10 UTC
I think this updated patch is a great improvement. I did notice a couple of issues with it:

1. It doesn't remember the sorting options from the advanced search page.
   If you go "back to results" it will default to a "relevance" sort.
2. If you do a search without a keyword you won't see a "back to results"
   link on the detail page for any of your results. For instance, a
   search where the user only checks an itemtype limit or a date limit.
Comment 12 Frédéric Demians 2011-05-17 19:34:12 UTC

3. If you were on multi-pages result page, and that you were on let say
   page 5, if you click on Back to results, you are redirected on the
   first page of the result page not on the 5th. The 'offset' parameter
   should be saved in session and used to generated Back to results link.
Comment 13 Fridolin Somers 2011-05-18 08:49:21 UTC
So I should store in session the entire search URL ?
Comment 14 Fridolin Somers 2011-05-27 13:17:16 UTC Comment hidden (obsolete)
Comment 15 Frédéric Demians 2011-05-27 17:16:09 UTC Comment hidden (obsolete)
Comment 16 Frédéric Demians 2011-05-27 17:17:20 UTC
Thanks Fridolyn. Point 1, 2, 3 are solved with your last patch.
Comment 17 Paul Poulain 2011-08-10 10:44:38 UTC
Created attachment 4925 [details] [review]
proposed patch (passed QA)

QA comment
* works as announced
* nice feature, graphically consistent
* no comment on code itself

Marking passed QA
Comment 18 Paul Poulain 2011-08-12 07:40:15 UTC
This patch overlap with bug 6483, that does much more. I remove the "passed QA" status, to avoid this patch being applied and causing problems to 6483.

Let's discuss of options we have (here or in koha-devel ?)
I think 6483 can be applied and this one discarded.
Comment 19 Nicole C. Engard 2011-08-12 19:19:05 UTC
If it matters, I kind of like the look of the patch for  bug 6483 better ...
Comment 20 Paul Poulain 2011-10-24 11:40:14 UTC
Updating version : This ENH could be in Koha 3.8
Comment 21 Owen Leonard 2011-10-24 12:26:48 UTC

*** This bug has been marked as a duplicate of bug 6483 ***