Bugzilla – Attachment 28773 Details for
Bug 12405
Search links on callnumber fails on intranet results page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12405 - Search links on callnumber fails on intranet results page
Bug-12405---Search-links-on-callnumber-fails-on-in.patch (text/plain), 7.46 KB, created by
Fridolin Somers
on 2014-06-11 10:35:00 UTC
(
hide
)
Description:
Bug 12405 - Search links on callnumber fails on intranet results page
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2014-06-11 10:35:00 UTC
Size:
7.46 KB
patch
obsolete
>From c7915683549fe9cb69d604dfdaa374872ca2ee7d Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 11 Jun 2014 12:25:19 +0200 >Subject: [PATCH] Bug 12405 - Search links on callnumber fails on intranet > results page > >On intranet results page, the callnumber of items is a search like : >/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=[% result.itemcallnumber |url %] > >The callnumber should be URI-escaped to avoid special URI characters like & , ? ... >If the callnumber contains some CCL words or parenthesis, the search will fail, it should be wrapped with double-quotes. > >This patch adds this to catalogue/results.pl and catalogue/shelves.pl : >- uri TT filter instead of url >- adds double-quotes using there URI code %22 since its in a HTML attribute using double-quotes > >Test plan : >- Edit an item callnumber with : & ABC 123 >- Index zebraqueue >- Perform a search returning this item >- Click on the callnumber >=> Without this patch you get no result, because URL parameters are : idx=callnum&q=& ABC 123 >=> With this patch you get results >- Set syspref QueryWeightFields off (because this is no bug if on) >- Edit an item callnumber with : AB(C) AND OR >- Index zebraqueue >- Perform a search returning this item >- Click on the callnumber >=> Without this patch you get no result, because the search contains CCL words "OR" and "AND" >=> With this patch you get results >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 8 ++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 21c2866..556afbf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -505,7 +505,7 @@ var holdForPatron = function () { > [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size %][% END %]</span> [% IF ( SEARCH_RESULT.isbn ) %]<span class="results_isbn">ISBN: [% SEARCH_RESULT.isbn | replace('\s\|', ', ')%]</span>[% END %] > <span class="results_itemtype">[% SEARCH_RESULT.description %]</span> > [% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp %])</i>[% END %] >- [% IF ( SEARCH_RESULT.cn_class ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=[% SEARCH_RESULT.cn_class |url %]">[% SEARCH_RESULT.cn_class %]</a>][% END %] >+ [% IF ( SEARCH_RESULT.cn_class ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% SEARCH_RESULT.cn_class |uri %]%22">[% SEARCH_RESULT.cn_class %]</a>][% END %] > </p> > [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<p class="searchhighlightblob">[% SEARCH_RESULT.searchhighlightblob %]</p>[% END %] > >@@ -549,7 +549,7 @@ var holdForPatron = function () { > [% END %] > [% IF ( available_items_loo.branchname ) %][% available_items_loo.branchname %][% END %] > [% IF ( available_items_loo.location ) %][% available_items_loo.location %][% END %] >- [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=[% available_items_loo.itemcallnumber |url %]">[% available_items_loo.itemcallnumber %]</a>][% END %] >+ [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% available_items_loo.itemcallnumber |uri %]%22">[% available_items_loo.itemcallnumber %]</a>][% END %] > ([% available_items_loo.count %]) > [% IF item_level_itypes && available_items_loo.description %] > <br/>[% available_items_loo.description %] >@@ -571,7 +571,7 @@ var holdForPatron = function () { > [% END %] > [% IF ( onloan_items_loo.branchname ) %][% onloan_items_loo.branchname %][% END %] > [% IF ( onloan_items_loo.location ) %][% onloan_items_loo.location %][% END %] >- [% IF ( onloan_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=[% onloan_items_loo.itemcallnumber |url %]">[% onloan_items_loo.itemcallnumber %]</a>][% END %] >+ [% IF ( onloan_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% onloan_items_loo.itemcallnumber |uri %]%22">[% onloan_items_loo.itemcallnumber %]</a>][% END %] > ([% onloan_items_loo.count %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue %] long overdue[% END %]) date due: [% onloan_items_loo.due_date %] > [% IF item_level_itypes && onloan_items_loo.description %] > <br/>[% onloan_items_loo.description %] >@@ -593,7 +593,7 @@ var holdForPatron = function () { > [% END %] > [% IF ( other_items_loo.branchname ) %][% other_items_loo.branchname %][% END %] > [% IF ( other_items_loo.location ) %][% other_items_loo.location %][% END %] >- [% IF ( other_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=[% other_items_loo.itemcallnumber |url %]">[% other_items_loo.itemcallnumber %]</a>][% END %] >+ [% IF ( other_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% other_items_loo.itemcallnumber |uri %]%22">[% other_items_loo.itemcallnumber %]</a>][% END %] > [% IF ( other_items_loo.withdrawn ) %](Withdrawn)[% END %] > [% IF ( other_items_loo.itemlost ) %](Lost)[% END %] > [% IF ( other_items_loo.damaged ) %](Damaged)[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 23d815f..3fefac0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -379,7 +379,7 @@ function placeHold () { > [% FOREACH result IN itemsloo.ITEM_RESULTS %] > <li>[% result.holdingbranch %] [% IF ( result.location_intranet ) %] ([% result.location_intranet %]) [% END %] > [% IF ( result.itemcallnumber ) %] >- [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=[% result.itemcallnumber |url %]">[% result.itemcallnumber %]</a>] >+ [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% result.itemcallnumber |uri %]%22">[% result.itemcallnumber %]</a>] > [% END %] > </li> > [% END %] >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12405
:
28773
|
31496
|
31516