View | Details | Raw Unified | Return to bug 23475
Collapse All | Expand All

(-)a/catalogue/detail.pl (+13 lines)
Lines 21-26 use Modern::Perl; Link Here
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use HTML::Entities;
22
use HTML::Entities;
23
use Try::Tiny;
23
use Try::Tiny;
24
use Encode qw( decode_utf8 );
24
use C4::Auth;
25
use C4::Auth;
25
use C4::Context;
26
use C4::Context;
26
use C4::Koha;
27
use C4::Koha;
Lines 51-56 use Koha::Virtualshelves; Link Here
51
use Koha::Plugins;
52
use Koha::Plugins;
52
use Koha::SearchEngine::Search;
53
use Koha::SearchEngine::Search;
53
54
55
use URI::Escape;
56
54
my $query = CGI->new();
57
my $query = CGI->new();
55
58
56
my $analyze = $query->param('analyze');
59
my $analyze = $query->param('analyze');
Lines 115-120 if ( not defined $record ) { Link Here
115
eval { $biblio->metadata->record };
118
eval { $biblio->metadata->record };
116
$template->param( decoding_error => $@ );
119
$template->param( decoding_error => $@ );
117
120
121
if( $query->param('found1') ){
122
    if($query->cookie("cat_search_pulldown_selection")){
123
        my $ms = "ms_". Encode::decode_utf8( uri_unescape( $query->cookie("cat_search_pulldown_selection") ) );
124
        $template->param( $ms => 1);
125
    }
126
    if($query->cookie("searchbox_value")){
127
        $template->param( ms_value => Encode::decode_utf8( uri_unescape( $query->cookie("searchbox_value") ) ) );
128
    }
129
}
130
118
if($query->cookie("holdfor")){ 
131
if($query->cookie("holdfor")){ 
119
    my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") );
132
    my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") );
120
    $template->param(
133
    $template->param(
(-)a/catalogue/search.pl (-4 / +4 lines)
Lines 557-569 for (my $i=0;$i<@servers;$i++) { Link Here
557
            my $defaultview = C4::Context->preference('IntranetBiblioDefaultView');
557
            my $defaultview = C4::Context->preference('IntranetBiblioDefaultView');
558
            my $views = { C4::Search::enabled_staff_search_views };
558
            my $views = { C4::Search::enabled_staff_search_views };
559
            if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) {
559
            if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) {
560
                print $cgi->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber");
560
                print $cgi->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber&found1=1");
561
            } elsif  ($defaultview eq 'marc' && $views->{can_view_MARC}) {
561
            } elsif  ($defaultview eq 'marc' && $views->{can_view_MARC}) {
562
                print $cgi->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber");
562
                print $cgi->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber&found1=1");
563
            } elsif  ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) {
563
            } elsif  ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) {
564
                print $cgi->redirect("/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber");
564
                print $cgi->redirect("/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber&found1=1");
565
            } else {
565
            } else {
566
                print $cgi->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber");
566
                print $cgi->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber&found1=1");
567
            } 
567
            } 
568
            exit;
568
            exit;
569
        }
569
        }
(-)a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js (-1 / +7 lines)
Lines 132-137 $.fn.selectTabByID = function (tabID) { Link Here
132
    /* forms with action leading to search */
132
    /* forms with action leading to search */
133
    $("form[action*='search.pl']").submit(function(){
133
    $("form[action*='search.pl']").submit(function(){
134
        resetSearchContext();
134
        resetSearchContext();
135
        saveOrClearSimpleSearchParams();
135
    });
136
    });
136
    /* any link to launch a search except navigation links */
137
    /* any link to launch a search except navigation links */
137
    $("[href*='search.pl?']").not(".nav").not('.searchwithcontext').click(function(){
138
    $("[href*='search.pl?']").not(".nav").not('.searchwithcontext').click(function(){
Lines 324-326 function getContextBiblioNumbers() { Link Here
324
function resetSearchContext() {
325
function resetSearchContext() {
325
    setContextBiblioNumbers( new Array() );
326
    setContextBiblioNumbers( new Array() );
326
}
327
}
327
- 
328
329
function saveOrClearSimpleSearchParams() {
330
    // Simple masthead search - pass value for display on details page
331
    $.cookie('cat_search_pulldown_selection', $("#cat-search-block select.advsearch").val() );
332
    $.cookie('searchbox_value', $("#cat-search-block #search-form").val() );
333
}

Return to bug 23475