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

(-)a/catalogue/detail.pl (+3 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');
(-)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/en/modules/catalogue/detail.tt (+7 lines)
Lines 1305-1310 Note that permanent location is a code, and location may be an authval. Link Here
1305
                }));
1305
                }));
1306
            [% END %]
1306
            [% END %]
1307
        });
1307
        });
1308
1309
        $(document).ready(function() {
1310
            var search_index = localStorage.getItem("cat_search_pulldown_selection");
1311
            var search_value = localStorage.getItem("searchbox_value");
1312
            if ( search_index ){ $('.advsearch[name="idx"]').val(search_index)};
1313
            if ( search_value ){ $('#search-form').val(search_value)};
1314
        });
1308
    </script>
1315
    </script>
1309
[% END %]
1316
[% END %]
1310
[% INCLUDE 'intranet-bottom.inc' %]
1317
[% INCLUDE 'intranet-bottom.inc' %]
(-)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
    localStorage.setItem('cat_search_pulldown_selection', $("#cat-search-block select.advsearch").val() );
332
    localStorage.setItem('searchbox_value', $("#cat-search-block #search-form").val() );
333
}

Return to bug 23475