Owen Leonard
eb92d94be1
The goal of this theme is to provide a fully-responsive OPAC which offers a high level of functionality across multiple devices with varied viewport sizes. Its style is based on the CCSR theme, with elements of the Bootstrap framework providing default styling of buttons, menus, modals, etc. The Bootstrap grid is used everywhere, but Bootstrap's default responsive breakpoints have been expanded to allow for better flexibility for our needs. All non-translation-depended files are in the root directory of this new theme: css, images, itemtypeimg, js, less, and lib. Languages.pm has been modified to ignore the new directories when parsing the theme language directories. This theme introduces the use of LESS (http://lesscss.org/) to build CSS. Three LESS files can be found in the "less" directory: mixins.less, opac.less, and responsive.less. These three files are compiled into one CSS file for production: opac.css. "Base" theme styles are found in opac.less. A few "mixins" (http://lesscss.org/#-mixins) are found in mixins.less. Any CSS which is conditional on specific media queries is found in responsive.less. At the template level some general sturctural changes have been made. For the most part JavaScript is now at the end of each template as is recommended for performance reasons. JavaScript formerly in doc-head-close.inc is now in opac-bottom.inc. In order to be able to maintain this structure and accommodate page-specific scripts at the same time the use of BLOCK and PROCESS are added. By default opac-bottom.inc will PROCESS a "jsinclude" block: [% PROCESS jsinclude %] Each page template in the theme must contain this block, even if it is empty: [% BLOCK jsinclude %][% END %] Pages which require that page-specific JavaScript be inserted can add it to the jsinclude block and it will appear correctly at the bottom of the rendered page. The same is true for page-specific CSS. Each page contains a cssinclude block: [% BLOCK cssinclude %][% END %] ...which is processed in doc-head-close.inc: [% PROCESS cssinclude %] Using these methods helps us maintain a strict separation of CSS links and blocks (at the top of each page) and JavaScript (at the bottom). A few exceptions are made for some JavaScript which must be processed sooner: respond.js (https://github.com/scottjehl/Respond, conditionally applied to Internet Explorer versions < 9 to allow for layout responsiveness), the _() function required for JS translatability, and Modernizr (http://modernizr.com/, a script which detects browser features and allows us to conditionally load JavaScript based on available features--or lack thereof). Another new JavaScript dependency in this theme is enquire.js (http://wicky.nillia.ms/enquire.js/), which lets us trigger JavaScript events based on viewport size. I have made an effort to re-indent the templates in a sane way, eliminating trailing spaces and tabs. However, I have not wrapped lines at a specific line length. In order to improve template legibility I have also tried to insert comments indicating the origin of closing tags like <div> or template directives like [% END %]: </div> <!-- / .container-fluid --> [% END # / IF ( OpacBrowseResults && busc ) %] TESTING Proper testing of this theme is no easy task: Every template has been touched. Each page should work reasonable well at a variety of screen dimensions. Pages should be tested under many conditions which are controlled by toggling OPAC system preferences on and off. A variety of devices, platforms, and browsers should be tested. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
87 lines
5.7 KiB
Text
87 lines
5.7 KiB
Text
[% USE Koha %]
|
|
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your privacy management
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %][% END %]
|
|
</head>
|
|
<body id="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">›</span></li>
|
|
<li><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]</a> <span class="divider">›</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 %]
|