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

(-)a/installer/data/mysql/sysprefs.sql (+3 lines)
Lines 344-349 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
344
('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'),
344
('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'),
345
('printcirculationslips','1','','If ON, enable printing circulation receipts','YesNo'),
345
('printcirculationslips','1','','If ON, enable printing circulation receipts','YesNo'),
346
('PrintNoticesMaxLines','0','','If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.','Integer'),
346
('PrintNoticesMaxLines','0','','If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.','Integer'),
347
('ProxyPageLocalIPs','',NULL,'Beginning of IP addresses considered as local (comma separated ex: "127.0.0,127.0.2")','Free'),
348
('ProxyPageContent','',NULL,'HTML content of the proxy page','TextArea'),
349
('ProxyPageTitle','',NULL,'Title of the proxy page (breadcrumb and header)','Free'),
347
('QueryAutoTruncate','1',NULL,'If ON, query truncation is enabled by default','YesNo'),
350
('QueryAutoTruncate','1',NULL,'If ON, query truncation is enabled by default','YesNo'),
348
('QueryFuzzy','1',NULL,'If ON, enables fuzzy option for searches','YesNo'),
351
('QueryFuzzy','1',NULL,'If ON, enables fuzzy option for searches','YesNo'),
349
('QueryStemming','1',NULL,'If ON, enables query stemming','YesNo'),
352
('QueryStemming','1',NULL,'If ON, enables query stemming','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+15 lines)
Lines 601-606 OPAC: Link Here
601
                  track: "Track"
601
                  track: "Track"
602
                  no: "Don't track"
602
                  no: "Don't track"
603
            - links that patrons click on
603
            - links that patrons click on
604
    Proxy page:
605
        -
606
            - "Access from IP addresses beginning with"
607
            - pref: ProxyPageLocalIPs
608
            - "do not need to be authenticated (comma separated - ex: '127.0.0,127.0.1')"
609
        -
610
            - "HTML content of your proxy page"
611
            - pref: ProxyPageContent
612
              type: textarea
613
              class: HTML
614
        -
615
            - Use
616
            - pref: ProxyPageTitle
617
              class: long
618
            - "as title of your proxy page (appears in the breadcrumb and on the top of the proxy page)"
604
619
605
    Shelf Browser:
620
    Shelf Browser:
606
        -
621
        -
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-proxypage.tt (+40 lines)
Line 0 Link Here
1
[% USE Koha %]
2
[% USE KohaDates %]
3
4
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog[% IF ProxyPageTitle %] › [% ProxyPageTitle %][% END %]
5
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% BLOCK cssinclude %][% END %]
8
</head>
9
<body id="opac-account" class="scrollto">
10
[% INCLUDE 'masthead.inc' %]
11
12
<div class="main">
13
    <ul class="breadcrumb">
14
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a></li>
15
        [% IF ( ProxyPageTitle ) %]
16
            <li> <span class="divider">&rsaquo;</span> [% ProxyPageTitle %]</li>
17
        [% END %]
18
    </ul>
19
20
    <div class="container-fluid">
21
        <div class="row-fluid">
22
            <div class="span2">
23
                <div id="navigation">
24
                    [% INCLUDE 'navigation.inc' %]
25
                </div>
26
            </div>
27
            <div class="span10">
28
                <div id="proxycontent" class="maincontent">
29
                    [% IF ( ProxyPageTitle ) %]
30
                        <h1>[% ProxyPageTitle %]</h1>
31
                    [% END %]
32
                    [% ProxyPageContent %]
33
                </div>
34
            </div> <!-- / .span10 -->
35
        </div> <!-- / .row-fluid -->
36
    </div> <!-- / .container-fluid -->
37
</div> <!-- / .main -->
38
39
[% INCLUDE 'opac-bottom.inc' %]
40
[% BLOCK jsinclude %][% END %]
(-)a/opac/opac-proxypage.pl (-1 / +54 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# Copyright Solutions inLibro inc 2014
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version .
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
21
use strict;
22
use CGI;
23
use C4::Auth;
24
use C4::Output;
25
use warnings;
26
27
my $localNetwork  = C4::Context->preference('ProxyPageLocalIPs');
28
my $userIP = $ENV{'REMOTE_ADDR'};
29
30
my $withinNetwork = 0;
31
foreach my $IPRange ( split( ',', $localNetwork ) )
32
{
33
    $withinNetwork = ( $userIP =~ /^$IPRange/ );
34
    last if $withinNetwork;
35
}
36
37
my $query = new CGI;
38
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
39
    {
40
        template_name   => "opac-proxypage.tt",
41
        query           => $query,
42
        type            => "opac",
43
        authnotrequired => $withinNetwork,
44
        flagsrequired   => { borrow => 1 },
45
        debug           => 1,
46
    }
47
);
48
49
$template->param(
50
                    ProxyPageContent => C4::Context->preference('ProxyPageContent'),
51
                    ProxyPageTitle => C4::Context->preference('ProxyPageTitle')
52
                );
53
54
output_html_with_http_headers $query, $cookie, $template->output;

Return to bug 13485