... wraps the OPAC (whether JSPAC or TPAC).
You don't really need this when in OPAC view, because the OPAC page
itself will have a link that does the same thing. However, if you're
browsing through records in a search result set one at a time in some
other view, say the MARC view, then this button can come in handy.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
"[% ctx.prev_rec_url || '' %]",
"[% ctx.next_rec_url || '' %]",
"[% mkurl(ctx.first_search_record, {page => 0}) %]",
- "[% mkurl(ctx.last_search_record, {page => POSIX.floor(ctx.hit_count / ctx.page_size)}) %]"
+ "[% mkurl(ctx.last_search_record, {page => POSIX.floor(ctx.hit_count / ctx.page_size)}) %]",
+ "[% mkurl(ctx.opac_root _ '/results', {}, ['expand','cnoffset']) %]"
);
</script>
[% END %]
}
}
-function rdetail_next_prev_actions(index, count, prev, next, start, end) {
- /* we get the relative URL from the template: recid?query_args...
+function rdetail_next_prev_actions(index, count, prev, next, start, end, results) {
+ /* we mostly get the relative URL from the template: recid?query_args...
replace the recid and args on location.href to get the new URL */
- function fullurl(url) { return location.href.replace(/\/\d+\??.*/, '/' + url); }
+ function fullurl(url) {
+ if (url.match(/eg\/opac\/results/)) {
+ return location.href.replace(/eg\/opac\/.+$/, url);
+ } else {
+ return location.href.replace(/\/\d+\??.*/, '/' + url);
+ }
+ }
if (index > 0) {
if(prev)
window.rdetailEnd = function() { location.href = fullurl(end); }
}
+ window.rdetailBackToResults = function() { location.href = fullurl(results); };
+
ol = window.onload;
window.onload = function() {
if(ol) ol();
<!ENTITY staff.cat.opac.menu.label "Actions for this Record">
<!ENTITY staff.cat.opac.opac_view.accesskey "O">
<!ENTITY staff.cat.opac.opac_view.label "OPAC View">
+<!ENTITY staff.cat.opac.record_back_to_results.accesskey "H">
+<!ENTITY staff.cat.opac.record_back_to_results.label "Search Results">
<!ENTITY staff.cat.opac.record_end.accesskey "E">
<!ENTITY staff.cat.opac.record_end.label "End">
<!ENTITY staff.cat.opac.record_next.accesskey "N">
var rdetailNext = null;
var rdetailStart = null;
var rdetailEnd = null;
+var rdetailBackToResults = null;
var mfhdDetails = [];
var orgHiding = false;
rdetailNext = function() { _rdetailNav(nextRecord); };
rdetailEnd = function() { _rdetailNav(cachedRecords.ids[cachedRecords.ids.length-1]); };
}
+ rdetailBackToResults = function() { location.href = prevRResults(); };
runEvt('rdetail', 'nextPrevDrawn', i, cachedRecords.ids.length);
}
}
);
- g.f_record_start = null; g.f_record_prev = null; g.f_record_next = null; g.f_record_end = null;
+ g.f_record_start = null; g.f_record_prev = null;
+ g.f_record_next = null; g.f_record_end = null;
+ g.f_record_back_to_results = null;
$('record_start').disabled = true; $('record_next').disabled = true;
$('record_prev').disabled = true; $('record_end').disabled = true;
+ $('record_back_to_results').disabled = true;
$('record_pos').setAttribute('value','');
win.attachEvt("rdetail", "nextPrevDrawn",
}
$('record_end').disabled = false;
}
+ if (win.rdetailBackToResults) {
+ g.f_record_back_to_results = function() {
+ g.view_override = g.view;
+ win.rdetailBackToResults();
+ if (g.view != "opac") {
+ set_opac();
+ opac_wrapper_set_help_context();
+ }
+ }
+ $('record_back_to_results').disabled = false;
+ }
}
);
<button id="record_next" accesskey="&staff.cat.opac.record_next.accesskey;" label="&staff.cat.opac.record_next.label;" oncommand="if (g.f_record_next) g.f_record_next();"/>
<button id="record_end" accesskey="&staff.cat.opac.record_end.accesskey;" label="&staff.cat.opac.record_end.label;" oncommand="if (g.f_record_end) g.f_record_end();"/>
<spacer flex="1"/>
+ <button id="record_back_to_results" accesskey="&staff.cat.opac.record_back_to_results.accesskey;" label="&staff.cat.opac.record_back_to_results.label;" oncommand="if (g.f_record_back_to_results) g.f_record_back_to_results();"/>
+ <spacer flex="3"/>
<menubar>
<menu label="&staff.cat.opac.menu.label;" accesskey="&staff.cat.opac.menu.accesskey;">
<menupopup>