Bug 8883: 'opacsmallimage' doesn't work in ccsr theme

This patch makes it possible to customize the CCSR theme using the
opacsmallimage system preference. It also enables the LibraryName
preference for opacsmallimage alt text.

To test, set the opacsmallimage preference and switch to the CCSR
theme. Your custom image should appear. Set the LibraryName preference
and confirm that the alt attribute of the custom logo changes
accordingly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

This patch works correctly, although it lacked a description and test
plan, which I have added. I would have used IF instead of UNLESS because
to me that seems more readable, but it's not a deal-breaker.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
Martin Renvoize 2012-12-31 13:07:02 +00:00 committed by Chris Cormack
parent 37d3810b49
commit 20de00b218
1 changed files with 12 additions and 0 deletions

View File

@ -77,7 +77,19 @@
<div id="opac-main-search" class="yui-g">
<a class="logo" href="/cgi-bin/koha/opac-main.pl">
[% UNLESS ( opacsmallimage ) %]
[% UNLESS ( LibraryName ) %]
<img src="/opac-tmpl/ccsr/images/logo-koha.png" alt="Koha Online Catalog" />
[% ELSE %]
<img src="/opac-tmpl/ccsr/images/logo-koha.png" alt="[% LibraryName %] Online Catalog" />
[% END %]
[% ELSE %]
[% UNLESS ( LibraryName ) %]
<img src="[% opacsmallimage %]" alt="Koha Online Catalog" />
[% ELSE %]
<img src="[% opacsmallimage %]" alt="[% LibraryName %] Online Catalog" />
[% END %]
[% END %]
</a>
<div id="fluid">