[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 0c3135c78913e9e55417012b5e84bb8f276c1c6f
Evergreen Git
git at git.evergreen-ils.org
Mon Apr 30 14:32:40 EDT 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_3_0 has been updated
via 0c3135c78913e9e55417012b5e84bb8f276c1c6f (commit)
from 3896f1ec89970c8e8e2e984b38558558977b8810 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0c3135c78913e9e55417012b5e84bb8f276c1c6f
Author: Dan Pearl <dpearl at cwmars.org>
Date: Fri Mar 2 13:37:43 2018 -0500
LP173259 - Array error appears in search box while placing hold after advanced search
The place-hold code assumed it was not in "_adv" parameter mode. This
assumption was faulty. Now, the link generated for Place Hold will
translate the argument list to the single-line format that Place Hold
expected, when necessary.
Testing procedure:
Set holds for all the following items, observing that the searchbox in
the searchbar is not blank and does not contain ARRAY(xxx).
Basic Search / Place Hold
Basic Search / Record Detail / Place Hold
Advanced Search with a plain search term / Place Hold
Advanced Search with a plain search term / Record Detail / Place Hold
Advanced Search with a fancy (multiline) search term / Place Hold
Advanced Search with a fancy (multiline) search term / Record Detail / Place Hold
Signed-off-by: Dan Pearl <dpearl at cwmars.org>
Signed-off-by: Jason Stephenson <jason at sigio.com>
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index 5ab8e9a..35bb430 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -56,25 +56,40 @@
IF rec.mmr_id;
IF rec.mr_constituent_count > 1;
# metarecords link to record list page
- record_url = mkurl(ctx.opac_root _ '/results',
- {metarecord => rec.mmr_id}, ['page']);
+ record_url_path = ctx.opac_root _ '/results';
+ add_parms = {metarecord => rec.mmr_id};
+ del_parms = ['page'];
ELSE;
# for MR, bre_id refers to the master and in
# this case, only, record
- record_url = mkurl(ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0, { badges => rec.badges.join(',') });
+ record_url_path = ctx.opac_root _ '/record/' _ attrs.mr_constituent_ids.0;
+ add_parms = { badges => rec.badges.join(',') };
+ del_parms = [];
END;
hold_type = 'M';
ELSE;
- record_url = mkurl(ctx.opac_root _ '/record/' _ rec.bre_id, { badges => rec.badges.join(',') });
+ record_url_path = ctx.opac_root _ '/record/' _ rec.bre_id;
+ add_parms = { badges => rec.badges.join(',') };
+ del_parms = [];
hold_type = 'T';
END;
- -%]
+
+ IF is_advanced;
+ # Do not pass "advanced params" to result detail code.
+ # Instead, pass the scrubed query in one-line form
+ del_parms = del_parms.merge(['query', 'bool',
+ 'qtype', 'contains', '_adv']);
+ add_parms.import(
+ {query => ctx.naive_query_scrub(ctx.user_query)} );
+ END;
+ %]
<tr class="result_table_row">
<td class="results_row_count" name="results_row_count">[%
result_count; result_count = result_count + 1
%].</td>
<td class='result_table_pic_header'>
- <a href="[% record_url %]"><img alt="[% l('Book cover') %]"
+ <a href="[% mkurl(record_url_path, add_parms, del_parms); %]">
+ <img alt="[% l('Book cover') %]"
name='item_jacket' class='result_table_pic' width="55"
src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/r/[% rec.bre_id | uri %]' /></a><br />
</td>
@@ -386,10 +401,25 @@ END;
&& (ctx.holds_block.enabled != 'true' || attrs.org_copy_counts.$search_ou.available == 0)
)
%]
+
+ [% del_parms = ['tag','subfield','term','_special',
+ 'sort','page'];
+ add_parms = {hold_target => rec.id,
+ hold_type => hold_type,
+ hold_source_page => mkurl()};
+
+ IF is_advanced;
+ # Do not pass "advanced params" to hold code
+ # Instead, pass the scrubed query in one-line form
+ del_parms = del_parms.merge(['query', 'bool',
+ 'qtype', 'contains', '_adv']);
+ add_parms.import(
+ {query => ctx.naive_query_scrub(ctx.user_query)});
+ END; %]
+
<div class="results_aux_utils place_hold"><a
href="[% mkurl(ctx.opac_root _ '/place_hold',
- {hold_target => rec.id, hold_type => hold_type,
- hold_source_page => mkurl()}, ['tag','subfield','term','_special','sort','page']) %]"
+ add_parms, del_parms) %]"
[% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
class="no-dec" rel="nofollow" vocab=""><img
src="[% ctx.media_prefix %]/images/green_check.png[% ctx.cache_key %]"
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/templates/opac/parts/result/table.tt2 | 46 ++++++++++++++++---
1 files changed, 38 insertions(+), 8 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list