In certain circumstances, ampersands would not be displayed properly in the
Staff client search results. This patch fixes that by ensuring that all the
doubled ampersands that Zebra inserts in XML indexing mode are replaced by the
correct single ampersand entity.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Note: approach used can be described as a hack at best; the current
language should probably become a session attribute.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
* 'bug2505_patches' of git://git.catalyst.net.nz/koha: (24 commits)
Bug 2505 - use strict and warnings in sax_parser_test
Bug 2505 - enable warnings for link_bibs_to_authorities
Bug 2505 - add strict and warnings to perlmodule_ls
Bug 2505 - add strict and warnings to check_sysprefs
Bug 2505 - Add commented use warnings where missing in *.t
Bug 2505 - Add commented use warnings where missing in *.pm
Bug 2505 - Add commented use warnings where missing in the cataloguing/ directory
Bug 2505 - Add commented use warnings where missing in the misc/ directory
Bug 2505 - Add commented use warnings where missing in the tools/ directory
Bug 2505 - Add commented use warnings where missing in the installer/ directory
Bug 2505 - Add commented use warnings where missing in the rotating_collections/ directory
Bug 2505 - Add commented use warnings where missing in the C4/ directory
Bug 2505 - Add commented use warnings where missing in the serials/ directory
Bug 2505 - Add commented use warnings where missing in the catalogue/ directory
Bug 2505 - Add commented use warnings where missing in the sms/ directory
Bug 2505 - Add commented use warnings where missing in the opac/ directory
Bug 2505 - Add commented use warnings where missing in the virtualshelves/ directory
Bug 2505 - Add commented use warnings where missing in the suggestion/ directory
Bug 2505 - Add commented use warnings where missing in the admin/ directory
Bug 2505 - Add commented use warnings where missing in the circ/ directory
...
Conflicts:
C4/Auth_with_cas.pm
acqui/supplier.pl
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
required for language stemming management
Adding also some filters for NSB NSE characters
Now, get_template can be used even when query->cookie not set
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
These don't belong every template, only on OPAC:
~ opacstylesheet
~ opaccolorstylesheet
~ opacsmallimage
The latter 2 were already being populated in C4::Auth anyway.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This adds headers to define the default script and style languages.
Please note that this output isn't 100% canonical from CGI yet, but
that is due to a bug in CGI:
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3243
So either CGI will perfect it's output, or we can switch to using
HTTP::Headers. The latter may be desirable anyway, since then we
would not need a CGI $query argument at all.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This adds two new C4 modules, C4::Service and ::Output::JSONStream, and
makes important modifications to C4::Output. The first two are a basic
framework for JSON-based AJAX services and a simple JSON output wrapper,
respectively. C4::Output has been slightly refactored, with a new
function, output_with_http_headers, that supports different
content-types. output_html_with_http_headers still exists, and the three
pages affected by this change have been refactored to support it.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch uses HTTP_ACCEPT_LANGUAGE web browser variable
to select OPAC available language.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
If more than one translation is installed but only one is active, a blank div
is displayed at the bottom of all pages in the intranet (and in the OPAC if the
opacchangelanguages system preference is ON), taking a bit of vertical real
estate needlessly.
Changed so that <div> for the language chooser is output
only if there is more than one enabled language.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
A valid test of this patch is this command:
perl -MC4::Output -e 'print pagination_bar("my/script?query=foobar",5,2,"page"),"\n";'
The output before patch begins:
<a href="my/script?query=foobar?page=1" rel="start"><<</a>
and AFTER patch:
<a href="my/script?query=foobar&page=1" rel="start"><<</a>
The double "?" in QUERY_STRING are now avoided.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
OPAC search RSS and ATOM feeds now have the correct
Content-type sent - "application/rss+xml" and "application/atom+xml",
respectively.
As part of this patch, added an optional fourth parameter
to C4::Output::output_html_with_http_headers to specify
the content type. If that parameter is now supplied, or if
the value of the parameter does not contain at least a "/",
the default type of "text/html" is returned.
No documentation changes.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The loop_context_vars will be very useful in display. They are:
__first__, __last__, __inner__, __odd__, __counter__.
Note: apparently __even__ does not exist, so instead use something like:
<!-- TMPL_UNLESS NAME="__odd__" -->
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
now yuipath is added in C4::Output and uses themelang
In my opinion, all the general variables that are used in output should get in C4::Output (since there is theme lang computed.)
rather than in C4::Auth
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Many of the tests were failing or putting warnings
because a valid systempreferences table is
usaully absent by the time 'make test' is run.
Fortunately, only a few modules try to invoke
C4::Context->preference during module initialization,
so added to the test suite override_context_prefs.pm,
which replaces preference() with a sub to return
testing values for three variables: 'dateformat',
'marcflavour', and 'LibraryName'.
Also fixed bug in t/Boolean.t
With this patch and the patch to move the DB-dependent
tests off to the side for the moment, 'make test'
now runs cleanly, at least on Debian.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
the modules/ directory is now in opac as well as in intranet.
non english languages were unreachable without this patch.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
After experiencing this for myself I've decided to just
add them by default, if we want to wrap in a syspref at some
point we can.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
until the modules/structure has been ported to OPAC, this quick hack make the theme/language determination work for both OPAC & intranet
Signed-off-by: Chris Cormack <crc@liblime.com>
Output.pm: sanatizing variable names
ran perl -pi~ -e 's/\/includes\/calendar\//\/lib\/calendar\//' * in every staff template dir
Signed-off-by: Chris Cormack <crc@liblime.com>
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
Uses a complete new ZEBRA Indexing.
ZEBRA is now XML and comprises of a KOHA meta record. Explanatory notes will be on koha-devel
Fixes UTF8 problems
Fixes bug with authorities
SQL database major changes.
Separate biblioograaphic and holdings records. Biblioitems table depreceated
etc. etc.
Wait for explanatory document on koha-devel
template.
improved: C4::Output::pagination_bar builds an HTML pagination bar with no
language dependency. This function hugely simplifies templates and offers a
standard pagination method. This function also improves preformances.
if this parameter is defined, the url is used instead of the default one.
So, you can have your own stylesheet somewhere, and use it instead of the official Koha one.
If checkauth() detects a permission problem (e.g., in untemplated scripts),
this is necessary for the code (that displays the error message) to run
(otherwise Perl dies with a very cryptic, confusing error message)
auto-replaces theme and lang template variable.
This is useful if you have images in your template :
<img src="/<TMPL_VAR name="theme">/<TMPL_VAR name="lang">/images/picture.gif>
or
<img src="/<TMPL_VAR name="theme">/images/picture.gif>
in the case of a non-language dependant image.
Before this fix, gettemplate only replaced a variable called themelang, which was useful for language dependant images, but didn't work with theme-only images.
Note the previous behaviour is still activated (ie : themelang still works)
the api in pod-auth.pm has "type => 'opac' "parameter.
If called from intranet, should be type => 'intranet'.
Output.pm checked for type existed, and not it's value. Now, Output compares checks for type value.
If type='intranet', then the intranet template is called, else it's an opac template.
Finlay, please validate this commit.