Commit graph

208 commits

Author SHA1 Message Date
4e64ea8870 Bug 11277: fix errors with search facet links in Bootstrap theme
This patch fixes the following rwo errors:

  1. When selecting 'show more' above a facet, the advanced search page
     is displayed.
  2. When restricting search on a library facet, all the biblio records
     of this library are returned.

The patch fixes the way URL are encoded with TT filter. See:

http://search.cpan.org/~abw/Template-Toolkit-2.25/lib/Template/Manual/Filters.pod#url

Signed-off-by: Liz Rea <liz@catalyst.net.nz>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works nicely. Tests done:
- 'More' link on facets redirects to advanced search before applying
  the patch. After appyling the link works correctly.
- In my tests, the facet links themselves worked nicely, limiting the
  search as expected.
- Availability search works ok for me with patch applied.
- Also made sure to click on some links containing diacritcts (German
  umlauts).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-15 18:55:39 +00:00
Mathieu Saby
a290309daf Bug 11189: Rename "Print" label in UNIMARC advanced search
"Print" label for search on the 106 field is not correct in UNIMARC
advanced search:

- 106 field can be used for non printed ressources (manuscript...)
- "Print" is ambiguous for translation tool, as it can be understood as
  a verb or a noun.

The official label for 106 field is "Type of form".  The offical label
for 106$a subfield is "Medium designator".

I think "Physical presentation" is the best way to describe the content
of 106$a in a user understandable label.

Test plan :

Check the "Print" label is replaced with "Physical presentation" in OPAC
(prog theme and Bootstrap theme) and Staff Advanced Search

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

OK for me. Make sense for UNIMARC users.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: replace a tab with 4 spaces.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-08 16:48:42 +00:00
77c19db26f Bug 11142 - Update Bootstrap theme's place hold form to match the new version in prog
The update to the prog theme's place hold page (Bug 10836) happened
after the Bootstrap theme's place hold form had already been converted,
so it lags behind. This patch applies the changes made to prog to Bootstrap.

To test, switch to the Bootstrap theme and follow the test plan from Bug
10836:

Place single and multiple holds under various conditions:

- Items which are not available to be place on hold
- With OpacHoldNotes on and off
- With OPACItemHolds on and off
- With OPACAllowHoldDateInFuture on and off
- With IndependentBranches on and off
- With JavaScript disabled

Test setting hold notes, holding specific copies, and setting hold start
dates. When setting a hold start date and hold expiration date, the two
datepickers should work together to prevent invalid date combinations
(dates after today, expiration dates which precede the start date).

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors. Works as described, very well.

Tested all situations, all syspref, and without JavaScript.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:58:51 +00:00
832608f1fa Bug 11057: Bootstrap theme: fix display of active language in language chooser
There is a problem with how an active single language is styled, making
the alignment look incorrect. This patch amends the markup and the CSS
to make it look better. This patch does not address the position of the
language menu.

To test you must have at least one additional single translation
installed. Apply the patch, refresh the page, and confirm that the
display of the active language is improved.

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

Improved view of current language. No koha-qa errors.

1) Downloaded a couple of xx-YY-bootstrap.po from
http://translate.koha-community.org/projects/314
2) Installed sample languages
3) Enable them and opaclanguagesdisplay
4) Checked correct alignment of selected language

Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The selected language has not a padding, contrary to others.
Not perfect but it fixes the descripted behavior.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-23 17:32:57 +00:00
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
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
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