Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-privacy.tt
Marc Véron 6246f2c700 Bug 12162 - Add class="branchcode" to body tag to make OPAC CSS-styleable per branch
This patch adds a branch sepecific class to all OPAC pages.

Example:
If not logged in, opac-main.pl displays:
<body ID="opac-main" class="branch-default" >
If logged in at branch FFL, it displays:
<body ID="opac-main" class="branch-FFL" >

If you log in, opac-user.pl should display
<body ID="opac-user" class="branch-FFL scrollto" >

To test:
1)
Apply patch.

2)
Add to syspref OPACUserCSS something highly visible, e.g. for branch FFL:
.branch-FFL {
background-color: yellow;
border: 10px solid red;
}

3)
Go to OPAC and login in with a user with home branch FFL

4)
Verify that colors change as appropriate.

5)
Log out. Verify that colors display as before or as defined in class branch-default in OPACUserCSS

6)
Display patch in patch diff view, verify that ids and classes in body tag are consistent with params bodyid and bodyclass in INCLUDE line

7)
Search for regressions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-23 15:39:31 -03:00

87 lines
5.7 KiB
Text

[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your privacy management
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-privacy' %]
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Your privacy management</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div id="navigation">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
</div>
</div>
<div class="span10">
<div id="userprivacy">
<h3>Your privacy management</h3>
[% IF ( deleted ) %]
<div class="alert alert-success">Your reading history has been deleted.</div>
[% ELSIF ( err_history_not_deleted ) %]
<div class="alert">The deletion of your reading history failed, because there is a problem with the configuration of this feature. Please help to fix the system by informing your library of this error.</div>
[% END %]
[% IF ( privacy_updated ) %]
<div class="alert alert-success">Your privacy rules have been updated.</div>
[% END %]
[% IF ( Ask_data ) %]
<p>We take great care in protecting your privacy. On this screen, you can define how long we keep your reading history.</p>
<p>Your options are: <p>
<ul id="opac-privacy-options-list">
<li class="privacy0">Forever: keep my reading history without limit. This is the option for users who want to keep track of what they are reading.</li>
<li class="privacy1">Default: keep my reading history according to local laws. This is the default option : the library will keep your reading history for the duration permitted by local laws.</li>
<li class="privacy2">Never: Delete my reading history immediately. This will delete all record of the item that was checked-out upon check-in.</li>
</ul>
<p id="note1">Please note that information on any book still checked-out must be kept by the library no matter which privacy option you choose.</p>
<p id="note2">Please also note that the library staff can't update these values for you: it's your privacy!</p>
<form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-update-form">
<input type="hidden" name="op" value="update_privacy" />
<fieldset>
<label for="privacy">Please choose your privacy rule:</label>
<div class="input-append">
<select name="privacy" id="privacy">
[% IF ( privacy0 ) %]
<option value="0" selected="selected" class="privacy0">Forever</option>
[% ELSE %]
<option value="0" class="privacy0">Forever</option>
[% END %]
[% IF ( privacy1 ) %]
<option value="1" selected="selected" class="privacy1">Default</option>
[% ELSE %]
<option value="1" class="privacy1">Default</option>
[% END %]
[% IF ( privacy2 ) %]
<option value="2" selected="selected" class="privacy2">Never</option>
[% ELSE %]
<option value="2" class="privacy2">Never</option>
[% END %]
</select>
<button type="Submit" class="btn">Submit</button>
</div>
</fieldset>
</form>
<h2>Immediate deletion</h2>
<form action="/cgi-bin/koha/opac-privacy.pl" method="post" id="opac-privacy-delete-form">
<input type="hidden" name="op" value="delete_record" />
<p>Whatever your privacy rule you choose, you can delete all your reading history immediately by clicking here. <b>BE CAREFUL</b>. Once you've confirmed the deletion, no one can retrieve the list!</p>
<input type="submit" value="Immediate deletion" class="btn btn-danger" onclick="return confirmDelete(MSG_CONFIRM_AGAIN);" />
</form>
[% END # / IF Ask_data %]
</div> <!-- / .userprivacy -->
</div> <!-- / .span10 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %][% END %]