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

(-)a/catalogue/search.pl (-2 / +2 lines)
Lines 241-246 my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; Link Here
241
my $advancedsearchesloop = prepare_adv_search_types($types);
241
my $advancedsearchesloop = prepare_adv_search_types($types);
242
$template->param(advancedsearchesloop => $advancedsearchesloop);
242
$template->param(advancedsearchesloop => $advancedsearchesloop);
243
243
244
$template->param( searchid => scalar $cgi->param('searchid'), );
245
244
# The following should only be loaded if we're bringing up the advanced search template
246
# The following should only be loaded if we're bringing up the advanced search template
245
if ( $template_type eq 'advsearch' ) {
247
if ( $template_type eq 'advsearch' ) {
246
248
Lines 691-698 for (my $i=0;$i<@servers;$i++) { Link Here
691
} #/end of the for loop
693
} #/end of the for loop
692
#$template->param(FEDERATED_RESULTS => \@results_array);
694
#$template->param(FEDERATED_RESULTS => \@results_array);
693
695
694
$template->{'VARS'}->{'searchid'} = $cgi->param('searchid');
695
696
my $gotonumber = $cgi->param('gotoNumber');
696
my $gotonumber = $cgi->param('gotoNumber');
697
if ( $gotonumber && ( $gotonumber eq 'last' || $gotonumber eq 'first' ) ) {
697
if ( $gotonumber && ( $gotonumber eq 'last' || $gotonumber eq 'first' ) ) {
698
    $template->{'VARS'}->{'gotoNumber'} = $gotonumber;
698
    $template->{'VARS'}->{'gotoNumber'} = $gotonumber;
(-)a/cataloguing/addbiblio.pl (-1 / +1 lines)
Lines 925-931 elsif ( $op eq "delete" ) { Link Here
925
	exit;
925
	exit;
926
    }
926
    }
927
    
927
    
928
    print $input->redirect('/cgi-bin/koha/catalogue/search.pl');
928
    print $input->redirect('/cgi-bin/koha/catalogue/search.pl' . ($searchid ? "?searchid=$searchid" : ""));
929
    exit;
929
    exit;
930
    
930
    
931
} else {
931
} else {
(-)a/koha-tmpl/intranet-tmpl/js/browser.js (+10 lines)
Lines 109-113 KOHA.browser = function (searchid, biblionumber) { Link Here
109
        }
109
        }
110
    };
110
    };
111
111
112
    me.show_back_link = function () {
113
        if (current_search) {
114
            $(document).ready(function () {
115
                var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort_by=' + current_search.sort + '&searchid=' + me.searchid;
116
                $('#previous_search_link').replaceWith('<div><div class="browse-label"><a href="' + searchURL + '"><i class="fa fa-list"></i> ' + __("Go back to the results") + '</a></div></div>');
117
            });
118
        }
119
    };
120
121
112
    return me;
122
    return me;
113
};
123
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt (+10 lines)
Lines 40-45 Link Here
40
<h1>Advanced search</h1>
40
<h1>Advanced search</h1>
41
<p>
41
<p>
42
  <a href="/cgi-bin/koha/catalogue/itemsearch.pl">Go to item search</a>
42
  <a href="/cgi-bin/koha/catalogue/itemsearch.pl">Go to item search</a>
43
  [% IF searchid %]
44
      <div id="previous_search_link"></div>
45
  [% END %]
43
</p>
46
</p>
44
47
45
<!-- SEARCH BUTTONS -->
48
<!-- SEARCH BUTTONS -->
Lines 296-301 Link Here
296
299
297
[% MACRO jsinclude BLOCK %]
300
[% MACRO jsinclude BLOCK %]
298
    [% Asset.js("lib/hc-sticky.js") | $raw %]
301
    [% Asset.js("lib/hc-sticky.js") | $raw %]
302
    [% Asset.js("js/browser.js") | $raw %]
299
    <script>
303
    <script>
300
        /**
304
        /**
301
         *  Function add_field();
305
         *  Function add_field();
Lines 324-329 Link Here
324
                    document.getElementById("categoryloop").disabled=false;
328
                    document.getElementById("categoryloop").disabled=false;
325
                }
329
                }
326
            });
330
            });
331
332
            [% IF searchid %]
333
                browser = KOHA.browser('[% searchid | html %]');
334
                browser.show_back_link();
335
            [% END %]
336
327
        });
337
        });
328
    </script>
338
    </script>
329
[% END %]
339
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (+1 lines)
Lines 1217-1222 Note that permanent location is a code, and location may be an authval. Link Here
1217
    [% Asset.js("js/browser.js") | $raw %]
1217
    [% Asset.js("js/browser.js") | $raw %]
1218
    [% Asset.js("js/table_filters.js") | $raw %]
1218
    [% Asset.js("js/table_filters.js") | $raw %]
1219
    <script>
1219
    <script>
1220
        var searchid = '[% searchid | html %]';
1220
        var browser;
1221
        var browser;
1221
        browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
1222
        browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10));
1222
        browser.show();
1223
        browser.show();
(-)a/koha-tmpl/intranet-tmpl/prog/js/catalog.js (-3 / +2 lines)
Lines 44-50 function confirm_deletion(link) { Link Here
44
    }
44
    }
45
    if (is_confirmed) {
45
    if (is_confirmed) {
46
        $("#deletebiblio").unbind('click');
46
        $("#deletebiblio").unbind('click');
47
        window.location="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&amp;biblionumber=" + biblionumber;
47
        window.location="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&amp;biblionumber=" + biblionumber + (searchid ? "&amp;searchid="+searchid : "");
48
    } else {
48
    } else {
49
        return false;
49
        return false;
50
    }
50
    }
Lines 59-65 function confirm_items_deletion() { Link Here
59
        alert( MSG_DELETE_ALL_HOLDS.format(holdcount) );
59
        alert( MSG_DELETE_ALL_HOLDS.format(holdcount) );
60
    } else if ( count > 0 ) {
60
    } else if ( count > 0 ) {
61
        if( confirm( CONFIRM_DELETE_ITEMS.format(count) ) ) {
61
        if( confirm( CONFIRM_DELETE_ITEMS.format(count) ) ) {
62
            window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&amp;biblionumber=" + biblionumber;
62
            window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&amp;biblionumber=" + biblionumber + (searchid ? "&amp;searchid="+searchid : "");
63
        } else {
63
        } else {
64
            return false;
64
            return false;
65
        }
65
        }
66
- 

Return to bug 5428