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

(-)a/C4/Auth.pm (-1 / +1 lines)
Lines 373-379 sub get_template_and_user { Link Here
373
        $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
373
        $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
374
        $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
374
        $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
375
        # clean up the busc param in the session if the page is not opac-detail
375
        # clean up the busc param in the session if the page is not opac-detail
376
        if ($in->{'template_name'} =~ /opac-(.+)\.(?:tt|tmpl)$/ && $1 !~ /^(?:MARC|ISBD)?detail$/) {
376
        if (C4::Context->preference("OpacBrowseResults") && $in->{'template_name'} =~ /opac-(.+)\.(?:tt|tmpl)$/ && $1 !~ /^(?:MARC|ISBD)?detail$/) {
377
            my $sessionSearch = get_session($sessionID || $in->{'query'}->cookie("CGISESSID"));
377
            my $sessionSearch = get_session($sessionID || $in->{'query'}->cookie("CGISESSID"));
378
            $sessionSearch->clear(["busc"]) if ($sessionSearch->param("busc"));
378
            $sessionSearch->clear(["busc"]) if ($sessionSearch->param("busc"));
379
        }
379
        }
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 360-362 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
360
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('SocialNetworks','1','Enable/Disable social networks links in opac detail pages','','YesNo');
360
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('SocialNetworks','1','Enable/Disable social networks links in opac detail pages','','YesNo');
361
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');
361
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');
362
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoResumeSuspendedHolds',  '1', NULL ,  'Allow suspended holds to be automatically resumed by a set date.',  'YesNo');
362
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoResumeSuspendedHolds',  '1', NULL ,  'Allow suspended holds to be automatically resumed by a set date.',  'YesNo');
363
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');
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +11 lines)
Lines 5090-5096 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5090
$DBversion = "3.07.00.041";
5090
$DBversion = "3.07.00.041";
5091
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
5091
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
5092
    $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')");
5092
    $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')");
5093
    print "Upgrade to $DBversion done (Add System Preferences SubscriptionDuplicateDroppedInput)\n";
5093
    print "Upgrade to $DBversion done (Add system preference SubscriptionDuplicateDroppedInput)\n";
5094
    SetVersion($DBversion);
5094
    SetVersion($DBversion);
5095
}
5095
}
5096
5096
Lines 5159-5164 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5159
    SetVersion($DBversion);
5159
    SetVersion($DBversion);
5160
}
5160
}
5161
5161
5162
5163
$DBversion = "3.07.00.XXX";
5164
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5165
    $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')");
5166
    print "Upgrade to $DBversion done (Add system preference OpacBrowseResults ))\n";
5167
    SetVersion($DBversion);
5168
}
5169
5170
5171
5162
=head1 FUNCTIONS
5172
=head1 FUNCTIONS
5163
5173
5164
=head2 DropAllForeignKeys($table)
5174
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+8 lines)
Lines 315-320 OPAC: Link Here
315
                  yes: Enable
315
                  yes: Enable
316
                  no: Disable
316
                  no: Disable
317
            - social network links in opac detail pages
317
            - social network links in opac detail pages
318
        -
319
            - pref: OpacBrowseResults
320
              default: 1
321
              choices:
322
                  yes: Enable
323
                  no: Disable
324
            - browsing and paging search results from the OPAC detail page.
325
318
    Policy:
326
    Policy:
319
        -
327
        -
320
            - pref: singleBranchMode
328
            - pref: singleBranchMode
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-6 / +9 lines)
Lines 11-17 Link Here
11
[% END %]
11
[% END %]
12
<script type="text/JavaScript" language="JavaScript">
12
<script type="text/JavaScript" language="JavaScript">
13
//<![CDATA[
13
//<![CDATA[
14
    [% IF ( busc ) %]
14
15
    [% IF ( OpacBrowseResults && busc ) %]
15
        var arrPagination = new Array();
16
        var arrPagination = new Array();
16
        var pag_index_ini = [% indexPag %];
17
        var pag_index_ini = [% indexPag %];
17
        [% IF ( listResults ) %]
18
        [% IF ( listResults ) %]
Lines 55-61 Link Here
55
        [% END %]
56
        [% END %]
56
	[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
57
	[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
57
        $(".tagbutton").click(KOHA.Tags.add_tag_button);[% END %][% END %][% END %]
58
        $(".tagbutton").click(KOHA.Tags.add_tag_button);[% END %][% END %][% END %]
58
        [% IF ( busc ) %]
59
60
61
    [% IF ( OpacBrowseResults && busc ) %]
59
        if (arrPagination.length > 0) {
62
        if (arrPagination.length > 0) {
60
            renderPagIndexList(pag_index_ini, $("#listResults"));
63
            renderPagIndexList(pag_index_ini, $("#listResults"));
61
        }
64
        }
Lines 80-93 Link Here
80
            var navigation = $(".pagination");
83
            var navigation = $(".pagination");
81
            navigation.hide();
84
            navigation.hide();
82
        });
85
        });
83
        [% END %]
86
    [% END %]
84
87
85
        $(".branch-info-tooltip-trigger").tooltip({delay: 100, position: "top right"});
88
        $(".branch-info-tooltip-trigger").tooltip({delay: 100, position: "top right"});
86
});
89
});
87
90
88
91
89
[% IF ( busc ) %]
92
[% IF ( OpacBrowseResults && busc ) %]
90
91
var timeoutRFW;
93
var timeoutRFW;
92
var totalPagItemList = 10;
94
var totalPagItemList = 10;
93
95
Lines 1078-1084 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1078
1080
1079
<div class="yui-u">
1081
<div class="yui-u">
1080
<div id="ulactioncontainer" class="container">
1082
<div id="ulactioncontainer" class="container">
1081
[% IF ( busc ) %]
1083
1084
[% IF ( OpacBrowseResults && busc ) %]
1082
    <div class="nav_results">
1085
    <div class="nav_results">
1083
        <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>
1086
        <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>
1084
        <ul class="pg_menu clearfix">
1087
        <ul class="pg_menu clearfix">
(-)a/opac/opac-detail.pl (-1 / +4 lines)
Lines 94-101 if (C4::Context->preference("OPACXSLTDetailsDisplay") ) { Link Here
94
    $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "OPACXSLTDetailsDisplay" ) );
94
    $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "OPACXSLTDetailsDisplay" ) );
95
}
95
}
96
96
97
my $OpacBrowseResults = C4::Context->preference("OpacBrowseResults");
98
$template->{VARS}->{'OpacBrowseResults'} = $OpacBrowseResults;
97
99
98
# We look for the busc param to build the simple paging from the search
100
# We look for the busc param to build the simple paging from the search
101
if ($OpacBrowseResults) {
99
my $session = get_session($query->cookie("CGISESSID"));
102
my $session = get_session($query->cookie("CGISESSID"));
100
my %paging = (previous => {}, next => {});
103
my %paging = (previous => {}, next => {});
101
if ($session->param('busc')) {
104
if ($session->param('busc')) {
Lines 375-380 if ($session->param('busc')) { Link Here
375
    $template->param('listResults' => \@listResults) if (@listResults);
378
    $template->param('listResults' => \@listResults) if (@listResults);
376
    $template->param('indexPag' => 1 + $offset, 'totalPag' => $arrParamsBusc{'total'}, 'indexPagEnd' => scalar(@arrBiblios) + $offset);
379
    $template->param('indexPag' => 1 + $offset, 'totalPag' => $arrParamsBusc{'total'}, 'indexPagEnd' => scalar(@arrBiblios) + $offset);
377
}
380
}
381
}
378
382
379
383
380
384
381
- 

Return to bug 7935