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>
79 lines
4.1 KiB
Text
79 lines
4.1 KiB
Text
[% USE Koha %]
|
|
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Change your password
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %][% END %]
|
|
</head>
|
|
<body id="opac-passwd">
|
|
[% 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="#">Change your password</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="userpasswd">
|
|
<h3>Change your password </h3>
|
|
|
|
[% IF ( Error_messages ) %]
|
|
<div class="alert">
|
|
<h3>There was a problem with your submission</h3>
|
|
<p>
|
|
[% IF ( PassMismatch ) %]
|
|
Passwords do not match. Please re-type your new password.
|
|
[% END %]
|
|
[% IF ( ShortPass ) %]
|
|
Your new password must be at least [% minpasslen %] characters long.
|
|
[% END %]
|
|
[% IF ( WrongPass ) %]
|
|
Your current password was entered incorrectly. If this problem persists, please ask a librarian to re-set your password for you.
|
|
[% END %]
|
|
</p>
|
|
</div>
|
|
[% END # /IF Error_messages %]
|
|
|
|
[% IF ( OpacPasswordChange ) %]
|
|
[% IF ( Ask_data ) %]
|
|
<form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="post">
|
|
<fieldset>
|
|
[% UNLESS ( ShortPass ) %]<div class="alert alert-info">Your password must be at least [% minpasslen %] characters long.</div>[% END %]
|
|
<label for="Oldkey">Current password:</label> <input type="password" id="Oldkey" size="25" name="Oldkey" />
|
|
<label for="Newkey">New password:</label> <input type="password" id="Newkey" size="25" name="Newkey" />
|
|
<label for="Confirm">Re-type new password:</label> <input type="password" id="Confirm" size="25" name="Confirm" />
|
|
</fieldset>
|
|
<fieldset class="action"><input type="submit" value="Submit changes" class="btn" /> <a href="/cgi-bin/koha/opac-user.pl" class="cancel">Cancel</a></fieldset>
|
|
</form>
|
|
[% END # /IF Ask_data %]
|
|
[% ELSE %]
|
|
<div class="alert">You can't change your password.</div>
|
|
[% END # /IF OpacPasswordChange %]
|
|
|
|
[% IF ( password_updated ) %]
|
|
<div class="alert alert-success">
|
|
<h1>Password updated</h1>
|
|
Your password has been changed
|
|
</div>
|
|
<form action="/cgi-bin/koha/opac-user.pl" method="post">
|
|
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
|
|
<p><input type="submit" class="btn" value="Return to your record" /></p>
|
|
</form>
|
|
[% END # /IF password_updated %]
|
|
</div> <!-- / #userpasswd -->
|
|
</div> <!-- / .span10 -->
|
|
</div> <!-- / .row-fluid -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %][% END %]
|