From 17ab0a7532a2e646f4d548ce2799b99d49202ee6 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 27 May 2009 13:10:42 -0500 Subject: [PATCH] bug 3263: Staff Search Results Interface Changes Coding by Rick Welykochy [1] Three new system preferences to enable particular bib record views in the staff interface: viewMARC viewLabeledMARC viewISBD Implements enhancement 2642. [2] New button in the regular and cataloging search results pages in the staff interface to allow the operator to redo the search against Z39.50 targets instead of the Koha database. [3] Added copyright date and edition to cataloging and Z39.50 search results. Implements enhancement 2640. Feature sponsored by MassCat. Signed-off-by: Galen Charlton --- C4/Search.pm | 96 ++++++++++++++++++- catalogue/ISBDdetail.pl | 4 +- catalogue/MARCdetail.pl | 3 + catalogue/detail.pl | 6 ++ catalogue/issuehistory.pl | 2 + catalogue/moredetail.pl | 3 + catalogue/search.pl | 29 +++++- cataloguing/addbooks.pl | 3 + cataloguing/z3950_search.pl | 2 + .../intranet-tmpl/prog/en/css/addbiblio.css | 2 +- .../prog/en/css/staff-global.css | 36 +++++++ .../prog/en/includes/biblio-view-menu.inc | 12 +++ .../prog/en/includes/cat-toolbar.inc | 31 ++++++ .../prog/en/includes/cataloging-toolbar.inc | 31 +++++- .../prog/en/modules/catalogue/results.tmpl | 47 +++++++++ .../prog/en/modules/cataloguing/addbooks.tmpl | 6 ++ .../en/modules/cataloguing/z3950_search.tmpl | 4 + reserve/request.pl | 2 + tools/viewlog.pl | 2 + 19 files changed, 314 insertions(+), 7 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 92297468d0..13f504f313 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -19,7 +19,7 @@ use strict; # use warnings; # FIXME require Exporter; use C4::Context; -use C4::Biblio; # GetMarcFromKohaField +use C4::Biblio; # GetMarcFromKohaField, GetBiblioData use C4::Koha; # getFacets use Lingua::Stem; use C4::Search::PazPar2; @@ -27,6 +27,7 @@ use XML::Simple; use C4::Dates qw(format_date); use C4::XSLT; use C4::Branch; +use URI::Escape; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); @@ -1250,6 +1251,9 @@ sub searchResults { $oldbiblio->{normalized_oclc} = GetNormalizedOCLCNumber($marcrecord,$marcflavour); $oldbiblio->{normalized_isbn} = GetNormalizedISBN(undef,$marcrecord,$marcflavour); $oldbiblio->{content_identifier_exists} = 1 if ($oldbiblio->{normalized_isbn} or $oldbiblio->{normalized_oclc} or $oldbiblio->{normalized_ean} or $oldbiblio->{normalized_upc}); + + # edition information, if any + $oldbiblio->{edition} = $oldbiblio->{editionstatement}; $oldbiblio->{description} = $itemtypes{ $oldbiblio->{itemtype} }->{description}; # Build summary if there is one (the summary is defined in the itemtypes table) # FIXME: is this used anywhere, I think it can be commented out? -- JF @@ -2109,6 +2113,96 @@ sub NZorder { } } +=head2 enabled_staff_search_views + +%hash = enabled_staff_search_views() + +This function returns a hash that contains three flags obtained from the system +preferences, used to determine whether a particular staff search results view +is enabled. + +=over 2 + +=item C + + * $hash{can_view_MARC} is true only if the MARC view is enabled + * $hash{can_view_ISBD} is true only if the ISBD view is enabled + * $hash{can_view_labeledMARC} is true only if the Labeled MARC view is enabled + +=item C + +=back + +$template->param ( C4::Search::enabled_staff_search_views ); + +=cut + +sub enabled_staff_search_views +{ + return ( + can_view_MARC => C4::Context->preference('viewMARC'), # 1 if the staff search allows the MARC view + can_view_ISBD => C4::Context->preference('viewISBD'), # 1 if the staff search allows the ISBD view + can_view_labeledMARC => C4::Context->preference('viewLabeledMARC'), # 1 if the staff search allows the Labeled MARC view + ); +} + + +=head2 z3950_search_args + +$arrayref = z3950_search_args($matchpoints) + +This function returns an array reference that contains the search parameters to be +passed to the Z39.50 search script (z3950_search.pl). The array elements +are hash refs whose keys are name, value and encvalue, and whose values are the +name of a search parameter, the value of that search parameter and the URL encoded +value of that parameter. + +The search parameter names are lccn, isbn, issn, title, author, dewey and subject. + +The search parameter values are obtained from the bibliographic record whose +data is in a hash reference in $matchpoints, as returned by Biblio::GetBiblioData(). + +If $matchpoints is a scalar, it is assumed to be an unnamed query descriptor, e.g. +a general purpose search argument. In this case, the returned array contains only +entry: the key is 'title' and the value and encvalue are derived from $matchpoints. + +If a search parameter value is undefined or empty, it is not included in the returned +array. + +The returned array reference may be passed directly to the template parameters. + +=over 2 + +=item C + + * $array containing hash refs as described above + +=item C + +=back + +$data = Biblio::GetBiblioData($bibno); +$template->param ( MYLOOP => C4::Search::z3950_search_args($data) ) + +*OR* + +$template->param ( MYLOOP => C4::Search::z3950_search_args($searchscalar) ) + +=cut + +sub z3950_search_args { + my $bibrec = shift; + $bibrec = { title => $bibrec } if !ref $bibrec; + my $array = []; + for my $field (qw/ lccn isbn issn title author dewey subject /) + { + my $encvalue = URI::Escape::uri_escape_utf8($bibrec->{$field}); + push @$array, { name=>$field, value=>$bibrec->{$field}, encvalue=>$encvalue } if defined $bibrec->{$field}; + } + return $array; +} + + END { } # module clean-up code here (global destructor) 1; diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl index d9eea6df64..b2dea4041b 100755 --- a/catalogue/ISBDdetail.pl +++ b/catalogue/ISBDdetail.pl @@ -45,7 +45,7 @@ use C4::Biblio; use C4::Items; use C4::Branch; # GetBranchDetail use C4::Serials; # CountSubscriptionFromBiblionumber - +use C4::Search; # enabled_staff_search_views #---- Internal function @@ -88,6 +88,8 @@ $template->param ( ISBD => $res, biblionumber => $biblionumber, isbdview => 1, + z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)), + C4::Search::enabled_staff_search_views, ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index f569763f80..5b209a65f6 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -55,6 +55,7 @@ use C4::Biblio; use C4::Items; use C4::Acquisition; use C4::Serials; #uses getsubscriptionsfrombiblionumber GetSubscriptionsFromBiblionumber +use C4::Search; # enabled_staff_search_views my $query = new CGI; @@ -316,6 +317,8 @@ $template->param ( popup => $popup, hide_marc => C4::Context->preference('hide_marc'), marcview => 1, + z3950_search_params => C4::Search::z3950_search_args($biblio), + C4::Search::enabled_staff_search_views, ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 649c46f6d8..a9c7f0ea6c 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -34,6 +34,7 @@ use C4::Members; use C4::Serials; use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn); use C4::External::Amazon; +use C4::Search; # enabled_staff_search_views # use Smart::Comments; @@ -195,6 +196,8 @@ $template->param( itemdata_enumchron => $itemfields{enumchron}, itemdata_copynumber => $itemfields{copynumber}, volinfo => $itemfields{enumchron} || $dat->{'serial'} , + z3950_search_params => C4::Search::z3950_search_args($dat), + C4::Search::enabled_staff_search_views, ); my @results = ( $dat, ); @@ -202,6 +205,9 @@ foreach ( keys %{$dat} ) { $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' ); } +# does not work: my %views_enabled = map { $_ => 1 } $template->query(loop => 'EnableViews'); +# method query not found?!?! + $template->param( itemloop => \@itemloop, biblionumber => $biblionumber, diff --git a/catalogue/issuehistory.pl b/catalogue/issuehistory.pl index 0a5db95ce2..8790bb5580 100755 --- a/catalogue/issuehistory.pl +++ b/catalogue/issuehistory.pl @@ -25,6 +25,7 @@ use C4::Output; use C4::Circulation; # GetBiblioIssues use C4::Biblio; # GetBiblio GetBiblioFromItemNumber use C4::Dates qw/format_date/; +use C4::Search; # enabled_staff_search_views my $query = new CGI; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( @@ -70,6 +71,7 @@ $template->param( total => scalar @$issues, issues => $issues, issuehistoryview => 1, + C4::Search::enabled_staff_search_views, ); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 6f626616f7..0b339dcc75 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -30,6 +30,7 @@ use C4::Auth; use C4::Serials; use C4::Dates qw/format_date/; use C4::Circulation; # to use itemissues +use C4::Search; # enabled_staff_search_views my $query=new CGI; @@ -119,6 +120,7 @@ foreach my $item (@items){ $template->param(count => $data->{'count'}, subscriptionsnumber => $subscriptionsnumber, subscriptiontitle => $data->{title}, + C4::Search::enabled_staff_search_views, ); $template->param(BIBITEM_DATA => \@results); $template->param(ITEM_DATA => \@items); @@ -128,6 +130,7 @@ $template->param(biblionumber => $biblionumber); $template->param(biblioitemnumber => $bi); $template->param(itemnumber => $itemnumber); $template->param(ONLY_ONE => 1) if ( $itemnumber && $count != @items ); +$template->param(z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber))); output_html_with_http_headers $query, $cookie, $template->output; diff --git a/catalogue/search.pl b/catalogue/search.pl index a5beb6d0b4..afc32a57ae 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -403,6 +403,25 @@ if ($params->{'limit-yr'}) { #FIXME: Should return a error to the user, incorect date format specified } +# convert indexes and operands to corresponding parameter names for the z3950 search +# $ %z3950p will be a hash ref if the indexes are present (advacned search), otherwise undef +my $z3950par; +my $indexes2z3950 = { + kw=>'title', au=>'author', 'au,phr'=>'author', nb=>'isbn', ns=>'issn', + 'lcn,phr'=>'dewey', su=>'subject', 'su,phr'=>'subject', + ti=>'title', 'ti,phr'=>'title', se=>'title' +}; +for (my $ii = 0; $ii < @operands; ++$ii) +{ + my $name = $indexes2z3950->{$indexes[$ii]}; + if (defined $name && defined $operands[$ii]) + { + $z3950par ||= {}; + $z3950par->{$name} = $operands[$ii] if !exists $z3950par->{$name}; + } +} + + # Params that can only have one value my $scan = $params->{'scan'}; my $count = C4::Context->preference('numSearchResults') || 20; @@ -494,10 +513,14 @@ for (my $i=0;$i<@servers;$i++) { ## If there's just one result, redirect to the detail page if ($total == 1) { my $biblionumber=@newresults[0]->{biblionumber}; - if (C4::Context->preference('IntranetBiblioDefaultView') eq 'isbd') { + my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); + my $views = { C4::Search::enabled_staff_search_views }; + if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) { print $cgi->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber"); - } elsif (C4::Context->preference('IntranetBiblioDefaultView') eq 'marc') { + } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) { print $cgi->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber"); + } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) { + print $cgi->redirect("/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber"); } else { print $cgi->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); } @@ -515,6 +538,7 @@ for (my $i=0;$i<@servers;$i++) { $template->param(query_cgi => $query_cgi); $template->param(query_desc => $query_desc); $template->param(limit_desc => $limit_desc); + $template->param (z3950_search_params => C4::Search::z3950_search_args($query_desc)); if ($query_desc || $limit_desc) { $template->param(searchdesc => 1); } @@ -580,6 +604,7 @@ for (my $i=0;$i<@servers;$i++) { # no hits else { $template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc); + $template->param (z3950_search_params => C4::Search::z3950_search_args($z3950par || $query_desc)); } diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl index 2f43feb57c..045a4eed90 100755 --- a/cataloguing/addbooks.pl +++ b/cataloguing/addbooks.pl @@ -113,6 +113,8 @@ for ( my $i = 0 ; $i <= $#resultsbr ; $i++ ) { $row_data{toggle} = $toggle; $row_data{id} = $resultsbr[$i]->{'id'}; $row_data{isbn} = $resultsbr[$i]->{'isbn'}; + $row_data{copyrightdate} = $resultsbr[$i]->{'copyrightdate'}; + $row_data{editionstatement} = $resultsbr[$i]->{'editionstatement'}; $row_data{file} = $resultsbr[$i]->{'file'}; $row_data{title} = $resultsbr[$i]->{'title'}; $row_data{author} = $resultsbr[$i]->{'author'}; @@ -123,6 +125,7 @@ $template->param( frameworkcodeloop => \@frameworkcodeloop, breeding_count => $countbr, breeding_loop => \@breeding_loop, + z3950_search_params => C4::Search::z3950_search_args($query), ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index c73b5f9e7e..6f117f48c6 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -244,6 +244,8 @@ warn "query ".$query if $DEBUG; $row_data{lccn} = $oldbiblio->{lccn}; $row_data{title} = $oldbiblio->{title}; $row_data{author} = $oldbiblio->{author}; + $row_data{date} = $oldbiblio->{copyrightdate}; + $row_data{edition} = $oldbiblio->{editionstatement}; $row_data{breedingid} = $breedingid; $row_data{biblionumber} = $biblionumber; push( @breeding_loop, \%row_data ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css index 6e0a58c869..25135ac6f5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css @@ -115,4 +115,4 @@ div.subfield_line label { } #cataloguing_additem_newitem .input_marceditor { width : auto; -} \ No newline at end of file +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 2bec4ea849..a94ee1e21b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -844,6 +844,11 @@ fieldset.rows .inputnote { background-position : center left; background-repeat : no-repeat; } +#z3950searcht table { + /* doesn't have desired effect in catalogue/results.tmpl - I'll leave this here for now but there do seem to be casscading CSS errors in this and other CSS fiels - RICKW 20081118 */ + padding: 20px; + border: none; +} #printbiblio button, #printbiblio a, #printmenuc .first-child { padding-left : 34px; background-image: url("../../img/toolbar-print.gif"); @@ -1324,6 +1329,18 @@ overflow : hidden; float : right; } +#searchheader form.fz3950 { + float : right; + font-size : 125%; + padding : 0 0 0 5em; +} + +#searchheader form.fz3950bigrpad { + float : right; + font-size : 125%; + padding : 5px 25em 0 0; +} + #search-facets ul { margin : 0; padding : .3em; @@ -1642,3 +1659,22 @@ span.permissiondesc { margin-top : .5em; padding : .5em; } + +.labeledmarc-table { + border: 0; +} + +.labeledmarc-label { + border: 0; + padding: 5; + font-size: 11pt; + color: darkblue; +} + +.labeledmarc-value { + border: 0; + padding: 5; + font-size: 10pt; + color: black; +} + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc index 3f021f9fea..e3ccc8b06b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc @@ -2,10 +2,22 @@
  • ">Normal
  • + +
  • ">MARC
  • + + + +
  • + ">Labeled MARC
  • + + +
  • ">ISBD
  • + +
  • ">Items
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index e6a26bf205..9a6d614497 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -3,6 +3,23 @@ +
    +
    + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-toolbar.inc index f1dae2d2dd..d20789e7f9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-toolbar.inc @@ -9,11 +9,12 @@ $(document).ready(function() { $("#newmenuc").empty(); yuiToolbar(); + yuiZ3950button(); }); // YUI Toolbar Functions - function yuiToolbar() { + function yuiToolbar() { new YAHOO.widget.Button("newrecord"); @@ -34,7 +35,31 @@ }); } - + /* this function open a popup to search on z3950 server. */ + function PopupZ3950() { + var strQuery = GetZ3950Terms(); + if(strQuery){ + window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber="+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes'); + } + } + /* provide Z3950 search points */ + function GetZ3950Terms(){ + var strQuery="&frameworkcode="; + + strQuery += "&" + "" + "=" + ""; + + return strQuery; + } + /* prepare DOM for Z39.50 Search Button */ + function yuiZ3950button() { + new YAHOO.widget.Button({ + id: "z3950search", + type: "button", + label: _("z39.50 Search"), + container: "newmenuc", + onclick: {fn:function(){PopupZ3950()}} + }); + } //]]> @@ -54,6 +79,8 @@ + z39.50 Search + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl index 1f4ba4e328..2fb76c3aa1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl @@ -20,12 +20,20 @@ function verify_images() { } }); } + + $(document).ready(function() { + $('#sortbyform').find("input:submit").hide(); $('#sort_by').change(function() { $('#sortbyform').submit(); }); + + $("#z3950searchc").empty(); + yuiZ3950button(); }); + + $(window).load(function() { verify_images(); }); @@ -79,6 +87,32 @@ function addToList () { window.open(url, 'Add_to_virtualshelf', 'width=500, height=400, toolbar=false, scrollbars=yes'); return false; } + +/* this function open a popup to search on z3950 server. */ +function PopupZ3950() { + var strQuery = GetZ3950Terms(); + if(strQuery){ + window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber="+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes'); + } +} +/* provide Z3950 search points */ +function GetZ3950Terms(){ + var strQuery="&frameworkcode="; + + strQuery += "&" + "" + "=" + ""; + + return strQuery; +} +/* prepare DOM for Z39.50 Search Button */ +function yuiZ3950button() { + new YAHOO.widget.Button({ + id: "z3950search", + type: "button", + label: _("z39.50 Search"), + container: "z3950searchc", + onclick: {fn:function(){PopupZ3950()}} + }); +} //]]> @@ -112,6 +146,9 @@ function addToList () {
    +
    + +
    @@ -144,6 +181,10 @@ function addToList () {

    Ignored the following common words: ""

    +
    + + +

    No results found

    @@ -155,6 +196,7 @@ function addToList () { You did not specify any search criteria.

    +
    @@ -290,6 +332,10 @@ function addToList () { No title , , + + "> + + , , "> No title @@ -328,6 +374,7 @@ function addToList () { + Edition: Description: ; , diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tmpl index e5d7af862b..ed5bd42820 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tmpl @@ -62,6 +62,8 @@ - - - + - + Edition: ; - ; @@ -125,6 +127,8 @@ Title ISBN + Date + Edition coming from preview   @@ -134,6 +138,8 @@ + + " title="MARC" rel="gb_page_center[600,500]">MARC | " title="MARC" rel="gb_page_center[600,500]">Card diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl index bfdaf34c83..4aac772ce1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl @@ -94,6 +94,8 @@ $(document).ready(function(){ Server Title Author + Date + Edition ISBN LCCN Preview @@ -106,6 +108,8 @@ $(document).ready(function(){ + + " title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card diff --git a/reserve/request.pl b/reserve/request.pl index 496962f5b4..6812d786f8 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -40,6 +40,7 @@ use C4::Koha; use C4::Circulation; use C4::Dates qw/format_date/; use C4::Members; +use C4::Search; # enabled_staff_search_views my $dbh = C4::Context->dbh; my $sth; @@ -526,6 +527,7 @@ foreach my $biblionumber (@biblionumbers) { holdsview => 1, borrower_branchname => $branches->{$borrowerinfo->{'branchcode'}}->{'branchname'}, borrower_branchcode => $borrowerinfo->{'branchcode'}, + C4::Search::enabled_staff_search_views, ); $biblioloopiter{biblionumber} = $biblionumber; diff --git a/tools/viewlog.pl b/tools/viewlog.pl index e3bdc73571..a08c73f6fe 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -30,6 +30,7 @@ use C4::Items; use C4::Branch; use C4::Debug; # use Data::Dumper; +use C4::Search; # enabled_staff_search_views use vars qw($debug $cgi_debug); @@ -98,6 +99,7 @@ $template->param( DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), dateformat => C4::Dates->new()->format(), debug => $debug, + C4::Search::enabled_staff_search_views, ); # #### This code was never really used - maybe some day some will fix it ### -- 2.39.5