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

(-)a/catalogue/search.pl (-2 / +2 lines)
Lines 287-292 my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; Link Here
287
my $advancedsearchesloop = prepare_adv_search_types($types);
287
my $advancedsearchesloop = prepare_adv_search_types($types);
288
$template->param(advancedsearchesloop => $advancedsearchesloop);
288
$template->param(advancedsearchesloop => $advancedsearchesloop);
289
289
290
$template->param( searchid => scalar $cgi->param('searchid'), );
291
290
# The following should only be loaded if we're bringing up the advanced search template
292
# The following should only be loaded if we're bringing up the advanced search template
291
if ( $template_type eq 'advsearch' ) {
293
if ( $template_type eq 'advsearch' ) {
292
294
Lines 737-744 for (my $i=0;$i<@servers;$i++) { Link Here
737
} #/end of the for loop
739
} #/end of the for loop
738
#$template->param(FEDERATED_RESULTS => \@results_array);
740
#$template->param(FEDERATED_RESULTS => \@results_array);
739
741
740
$template->{'VARS'}->{'searchid'} = $cgi->param('searchid');
741
742
my $gotonumber = $cgi->param('gotoNumber');
742
my $gotonumber = $cgi->param('gotoNumber');
743
if ( $gotonumber && ( $gotonumber eq 'last' || $gotonumber eq 'first' ) ) {
743
if ( $gotonumber && ( $gotonumber eq 'last' || $gotonumber eq 'first' ) ) {
744
    $template->{'VARS'}->{'gotoNumber'} = $gotonumber;
744
    $template->{'VARS'}->{'gotoNumber'} = $gotonumber;
(-)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