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

(-)a/installer/data/mysql/atomicupdate/Bug13485_RestrictedSitesPage.sql (+4 lines)
Line 0 Link Here
1
INSERT INTO systempreferences (variable,value,options,explanation,type)
2
VALUES ('RestrictedPageLocalIPs','',NULL,'Beginning of IP addresses considered as local (comma separated ex: \"127.0.0,127.0.2\")','Free'),
3
('RestrictedPageContent','',NULL,'HTML content of the restricted page','TextArea'),
4
('RestrictedPageTitle','',NULL,'Title of the restricted  page (breadcrumb and header)','Free')
(-)a/installer/data/mysql/sysprefs.sql (-3 / +3 lines)
Lines 344-352 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'),
350
('QueryAutoTruncate','1',NULL,'If ON, query truncation is enabled by default','YesNo'),
347
('QueryAutoTruncate','1',NULL,'If ON, query truncation is enabled by default','YesNo'),
351
('QueryFuzzy','1',NULL,'If ON, enables fuzzy option for searches','YesNo'),
348
('QueryFuzzy','1',NULL,'If ON, enables fuzzy option for searches','YesNo'),
352
('QueryStemming','1',NULL,'If ON, enables query stemming','YesNo'),
349
('QueryStemming','1',NULL,'If ON, enables query stemming','YesNo'),
Lines 365-370 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
365
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
362
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
366
('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'),
363
('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'),
367
('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'),
364
('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'),
365
('RestrictedPageLocalIPs','',NULL,'Beginning of IP addresses considered as local (comma separated ex: "127.0.0,127.0.2")','Free'),
366
('RestrictedPageContent','',NULL,'HTML content of the restricted page','TextArea'),
367
('RestrictedPageTitle','',NULL,'Title of the restricted page (breadcrumb and header)','Free'),
368
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
368
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
369
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
369
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
370
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
370
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-6 / +6 lines)
Lines 601-621 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:
604
    Restricted page:
605
        -
605
        -
606
            - "Access from IP addresses beginning with"
606
            - "Access from IP addresses beginning with"
607
            - pref: ProxyPageLocalIPs
607
            - pref: RestrictedPageLocalIPs
608
            - "do not need to be authenticated (comma separated - ex: '127.0.0,127.0.1')"
608
            - "do not need to be authenticated (comma separated - ex: '127.0.0,127.0.1')"
609
        -
609
        -
610
            - "HTML content of your proxy page"
610
            - "HTML content of your restricted page"
611
            - pref: ProxyPageContent
611
            - pref: RestrictedPageContent
612
              type: textarea
612
              type: textarea
613
              class: HTML
613
              class: HTML
614
        -
614
        -
615
            - Use
615
            - Use
616
            - pref: ProxyPageTitle
616
            - pref: RestrictedPageTitle
617
              class: long
617
              class: long
618
            - "as title of your proxy page (appears in the breadcrumb and on the top of the proxy page)"
618
            - "as title of your restricted page (appears in the breadcrumb and on the top of the restricted page)"
619
619
620
    Shelf Browser:
620
    Shelf Browser:
621
        -
621
        -
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-proxypage.tt (-9 / +19 lines)
Lines 1-8 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
3
4
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog[% IF ProxyPageTitle %] › [% ProxyPageTitle %][% END %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
5
<title>
6
    [% IF ( LibraryNameTitle ) %]
7
        [% LibraryNameTitle %]
8
    [% ELSE %]
9
        Koha online
10
    [% END %]
11
    catalog
12
    [% IF RestrictedPageTitle %]
13
        &rsaquo; [% RestrictedPageTitle %]
14
    [% END %]
15
</title>
6
[% INCLUDE 'doc-head-close.inc' %]
16
[% INCLUDE 'doc-head-close.inc' %]
7
[% BLOCK cssinclude %][% END %]
17
[% BLOCK cssinclude %][% END %]
8
</head>
18
</head>
Lines 12-19 Link Here
12
<div class="main">
22
<div class="main">
13
    <ul class="breadcrumb">
23
    <ul class="breadcrumb">
14
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a></li>
24
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a></li>
15
        [% IF ( ProxyPageTitle ) %]
25
        [% IF ( RestrictedPageTitle ) %]
16
            <li> <span class="divider">&rsaquo;</span> [% ProxyPageTitle %]</li>
26
            <li> <span class="divider">&rsaquo;</span> [% RestrictedPageTitle %]</li>
17
        [% END %]
27
        [% END %]
18
    </ul>
28
    </ul>
19
29
Lines 25-35 Link Here
25
                </div>
35
                </div>
26
            </div>
36
            </div>
27
            <div class="span10">
37
            <div class="span10">
28
                <div id="proxycontent" class="maincontent">
38
                <div id="restrictedcontent" class="maincontent">
29
                    [% IF ( ProxyPageTitle ) %]
39
                    [% IF ( RestrictedPageTitle ) %]
30
                        <h1>[% ProxyPageTitle %]</h1>
40
                        <h1>[% RestrictedPageTitle %]</h1>
31
                    [% END %]
41
                    [% END %]
32
                    [% ProxyPageContent %]
42
                    [% RestrictedPageContent %]
33
                </div>
43
                </div>
34
            </div> <!-- / .span10 -->
44
            </div> <!-- / .span10 -->
35
        </div> <!-- / .row-fluid -->
45
        </div> <!-- / .row-fluid -->
Lines 37-40 Link Here
37
</div> <!-- / .main -->
47
</div> <!-- / .main -->
38
48
39
[% INCLUDE 'opac-bottom.inc' %]
49
[% INCLUDE 'opac-bottom.inc' %]
40
[% BLOCK jsinclude %][% END %]
50
[% BLOCK jsinclude %][% END %]
(-)a/opac/opac-proxypage.pl (-5 / +4 lines)
Lines 23-29 use CGI; Link Here
23
use C4::Auth;
23
use C4::Auth;
24
use C4::Output;
24
use C4::Output;
25
25
26
my $localNetwork  = C4::Context->preference('ProxyPageLocalIPs');
26
my $localNetwork  = C4::Context->preference('RestrictedPageLocalIPs');
27
my $userIP = $ENV{'REMOTE_ADDR'};
27
my $userIP = $ENV{'REMOTE_ADDR'};
28
28
29
my $withinNetwork = 0;
29
my $withinNetwork = 0;
Lines 36-42 foreach my $IPRange ( split( ',', $localNetwork ) ) Link Here
36
my $query = new CGI;
36
my $query = new CGI;
37
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
37
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
38
    {
38
    {
39
        template_name   => "opac-proxypage.tt",
39
        template_name   => "opac-restrictedpage.tt",
40
        query           => $query,
40
        query           => $query,
41
        type            => "opac",
41
        type            => "opac",
42
        authnotrequired => $withinNetwork,
42
        authnotrequired => $withinNetwork,
Lines 46-53 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
46
);
46
);
47
47
48
$template->param(
48
$template->param(
49
                    ProxyPageContent => C4::Context->preference('ProxyPageContent'),
49
                    RestrictedPageContent => C4::Context->preference('RestrictedPageContent'),
50
                    ProxyPageTitle => C4::Context->preference('ProxyPageTitle')
50
                    RestrictedPageTitle => C4::Context->preference('RestrictedPageTitle')
51
                );
51
                );
52
52
53
output_html_with_http_headers $query, $cookie, $template->output;
53
output_html_with_http_headers $query, $cookie, $template->output;
54
- 

Return to bug 13485