$LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
$LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
# clean up the busc param in the session if the page is not opac-detail
- if ($in->{'template_name'} =~ /opac-(.+)\.(?:tt|tmpl)$/ && $1 !~ /^(?:MARC|ISBD)?detail$/) {
+ if (C4::Context->preference("OpacBrowseResults") && $in->{'template_name'} =~ /opac-(.+)\.(?:tt|tmpl)$/ && $1 !~ /^(?:MARC|ISBD)?detail$/) {
my $sessionSearch = get_session($sessionID || $in->{'query'}->cookie("CGISESSID"));
$sessionSearch->clear(["busc"]) if ($sessionSearch->param("busc"));
}
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('SubscriptionDuplicateDroppedInput','','','List of fields which must not be rewritten when a subscription is duplicated (Separated by pipe |)','Free');
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoResumeSuspendedHolds', '1', NULL , 'Allow suspended holds to be automatically resumed by a set date.', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacStarRatings','all',NULL,'disable|all|details','Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo');
$DBversion = "3.07.00.041";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('SubscriptionDuplicateDroppedInput','','','List of fields which must not be rewritten when a subscription is duplicated (Separated by pipe |)','Free')");
- print "Upgrade to $DBversion done (Add System Preferences SubscriptionDuplicateDroppedInput)\n";
+ print "Upgrade to $DBversion done (Add system preference SubscriptionDuplicateDroppedInput)\n";
SetVersion($DBversion);
}
SetVersion($DBversion);
}
+$DBversion = "3.07.00.049";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo')");
+ print "Upgrade to $DBversion done (Add system preference OpacBrowseResults ))\n";
+ SetVersion($DBversion);
+}
+
=head1 FUNCTIONS
yes: Enable
no: Disable
- social network links in opac detail pages
+ -
+ - pref: OpacBrowseResults
+ default: 1
+ choices:
+ yes: Enable
+ no: Disable
+ - browsing and paging search results from the OPAC detail page.
+
Policy:
-
- pref: singleBranchMode
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
- [% IF ( busc ) %]
+
+ [% IF ( OpacBrowseResults && busc ) %]
var arrPagination = new Array();
var pag_index_ini = [% indexPag %];
[% IF ( listResults ) %]
[% END %]
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
$(".tagbutton").click(KOHA.Tags.add_tag_button);[% END %][% END %][% END %]
- [% IF ( busc ) %]
+
+
+ [% IF ( OpacBrowseResults && busc ) %]
if (arrPagination.length > 0) {
renderPagIndexList(pag_index_ini, $("#listResults"));
}
var navigation = $(".pagination");
navigation.hide();
});
- [% END %]
+ [% END %]
$(".branch-info-tooltip-trigger").tooltip({delay: 100, position: "top right"});
});
-[% IF ( busc ) %]
-
+[% IF ( OpacBrowseResults && busc ) %]
var timeoutRFW;
var totalPagItemList = 10;
<div class="yui-u">
<div id="ulactioncontainer" class="container">
-[% IF ( busc ) %]
+
+[% IF ( OpacBrowseResults && busc ) %]
<div class="nav_results">
<div class="l_Results">[% IF ( listResults ) %]<a href="#" id="a_listResults" title="Show pagination list ([% indexPag %]-[% indexPagEnd %] / [% totalPag %])">Browse results</a>[% ELSE %]<span>Browse results</span>[% END %]</div>
<ul class="pg_menu clearfix">
$template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "OPACXSLTDetailsDisplay" ) );
}
+my $OpacBrowseResults = C4::Context->preference("OpacBrowseResults");
+$template->{VARS}->{'OpacBrowseResults'} = $OpacBrowseResults;
# We look for the busc param to build the simple paging from the search
+if ($OpacBrowseResults) {
my $session = get_session($query->cookie("CGISESSID"));
my %paging = (previous => {}, next => {});
if ($session->param('busc')) {
$template->param('listResults' => \@listResults) if (@listResults);
$template->param('indexPag' => 1 + $offset, 'totalPag' => $arrParamsBusc{'total'}, 'indexPagEnd' => scalar(@arrBiblios) + $offset);
}
+}