Commit graph

10 commits

Author SHA1 Message Date
9d7d3085ec Bug 11060: (Bootstrap theme) fix incorrect rendering for right to left languages
The right-to-left CSS copied over from the prog theme does is not
relevant to the redesigned templates. This patch updates the OPAC's
right-to-left CSS and adds a couple of other right-to-left CSS files to
override the default Bootstrap and jQueryUI CSS.

To my eye this looks correct, but I don't speak Arabic.

To test you must have a set of right-to-left templates, like
ar-Arab, installed for the Bootstrap theme. At this time it is necessary
to download the po file to your misc/translator/po directory. Again
using ar-Arab as an example:

http://translate.koha-community.org/ar/314/ar-Arab-opac-bootstrap.po

Install the translation.

Open the OPAC, switch to that right-to-left language, and reload to
refresh the changed CSS. Confirm that it looks like right-to-left is
working.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

As far as I can tell it looks very well.
No koha-qa errors

1) Downloaded arabic bootstrap PO
2) Installed ar-Arab language, enabled on OPAC
3) Tested as anonymous user and logged in one, all pages look
well: cart, advanced search, user tabs.

I sent an email to Karam Qubsi asking his opinion.
But for me it's ok

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

I was testing this at the same time as Bernardo, so I will Pass QA on
it, instead of signing it off

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-21 18:08:08 +00:00
Galen Charlton
58d469ed4d bug 10016: munge history in SCO to discourage resubmitting user login
This patch uses history.replaceState (introduced in HTML5) to manipulate
the browser history to encourage returning to the SCO patron barcode
form if the back button is used.

Note that a side effect of this patch is that if the user uses
the help link, they will be prompted to enter their barcode
again.  It may be better to put the help inline with the rest
of the SCO forms.

To test:

[1] Start a web-based self-check session.
[2] Enter a patron barcode.
[3] Allow the self-check session to time out.
[4] Use the back button.  You should get the patron barcode
    entry form; you should not be prompted to resubmit form input.
[5] Enter a patron barcode, perform some transactions, then
    use the finish button.
[6] Next, use the back button.  You should get the patron barcode
    entry form.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-21 18:05:28 +00:00
Galen Charlton
745bcfe0a6 Bug 8368: (follow-up) port change to the Bootstrap OPAC; restore ISBN display
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-18 06:47:39 +00:00
Galen Charlton
b16cc61e8b Bug 10309: (follow-up) apply another follow-up for 10856, improve shelf browser
This patch adapts a patch by Julian Maurice to prevent the main
cover image from getting duplicated if the shelf browser
is used.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:23:44 +00:00
266305d488 Bug 10309: (follow-up) Markup fix from Bug 10566 follow-up
This patch corrects a markup error which was fixed recently in the prog
template.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Simple fix. No errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:14:15 +00:00
0956a28df3 Bug 10309: (follow-up) Add changes from Bug 8712, "and" labels in advanced search
This patch adds the changes from Bug 8712 to the new theme. Some HTML
markup errors have also been corrected. From Bug 8712:

"The "and" label not only improves the accessibility but also gives the
user an idea that the operation between multiple search fields is a
boolean "AND" by default."

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

"and" looks well on advanced search. No errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:14:02 +00:00
b0793ec34c Bug 10309: (follow-up) Update for Bug 10856, improve shelf browser
This patch updates this theme with the changes made in Bug 10856.
Because of the way JavaScript is loaded in the new theme, the JS in the
shelfbrowser include had to be moved to the opac-detail template.

Test plan from that bug:
- On a detail biblio page, click on a "Browse shelf" link.
- Play with the next and previous links.
- Deactivate Javascript (using NoScript for example) and check that you
  get the same behavior (but the page is reloaded).
- Launch the unit tests: prove t/db_dependent/ShelfBrowser.t

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No errors

Disabled JavaScript on Firefox (about:config, javascript.enable -> false)
Browse shelf works by reloading.
Unit test report success.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:13:47 +00:00
65e58f30b1 Bug 10309: (Follow-up) Applying changes from Bug 10349
This patch applies the changes from Bug 10349, Don't show empty
Descriptions/Title notes tabs in OPAC and staff.

"The descriptions/title notes tab appears on the detail page in both
staff client and OPAC even if there are no notes. This is probably a
relic of the pre-T:T days when it wasn't possible to use || in an IF.
This patch adds a check for the various variables which might trigger
the display of the tab.

To test, apply the patch and view records in the OPAC and staff client
which do and do not have title notes attached (whether that be in the
MARC record or in the biblio.notes column). In the OPAC Syndetics
content should also be tested if possible. The descriptions/title notes
tab should only appear if there is content."

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No errors

Tested on OPAC, records without notes don't show title notes tab.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:13:30 +00:00
850628743b Bug 10309: (follow-up) Updates for Bug 6594, Schema.org structured data
This patch adds the changes from Bug 6594:

"To support schema.org processors, such as Google, Bing, and Yandex,
structure our data so that it has machine-readable attributes. This pass
declares the CreativeWork sub-types as well as Product for the main
bibliographic record details, and uses the Offer type for holdings
information per the W3C Schema Bib Extend community group discussions."

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Tested against linter.structured-data.org, microdata present
No errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:13:14 +00:00
eb92d94be1 Bug 10309 - New OPAC theme based on Bootstrap
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>
2013-10-14 23:13:05 +00:00