Commit graph

129 commits

Author SHA1 Message Date
Chris Cormack
8e7b163608 Bug 6755 follow up, fixing broken POD 2011-09-23 11:33:00 +12:00
6b8be20497 Bug 6755 Problems with switching languages
This patch solves the situation that news is in another language than
the Koha interface AND makes that themelanguage routine is always called
the same way in order to prevent mixed display.

It fixes also a bug related to language preselection based on web
browser prefered language.

September 9: Adjusted with input of Frederic Demians.

Septembre 10: Avoid circular dependency, as pointed by Chris Cormack.
Templates related functions are moved from C4::Output to C4::Templates

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-23 09:47:09 +12:00
Chris Cormack
7efaafe132 Bug 6085 : Fixing the utf8 weirdness
I am not very happy with this fix, but it does mean the template are
translatable and we don't get double encoding issues with them anymore

Please test

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-11 16:01:59 +12:00
Chris Cormack
5a23a45e32 Bug 6085 : utf8 fixed for xslt, and parameters, broken for utf8 included in templates
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-11 12:58:05 +12:00
Chris Cormack
82f0fee5c8 Bug 5917 : Fixing a bug with switching languages
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-04-10 22:58:08 +12:00
Chris Cormack
d4cd05126d Bug 5917 / Bug 6085 : Fixing not being able to change language 2011-04-10 20:22:55 +12:00
Chris Cormack
76184e1db0 Merge remote branch 'kc/master' into new/enh/bug_5917
Conflicts:
	installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
2011-03-30 08:39:10 +13:00
Jared Camins-Esakov
fa7ca5c8b8 Bug 3326: Staff results still displayed &amp;
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>
2011-03-29 12:12:20 +13:00
Chris Cormack
d6b080ddd4 Bug 5917 - Switching the installer to use Template Toolkit
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-03-22 17:16:11 +13:00
51f067fcb2 For catalyst/template_test branch. There are still issues with displaying biblios.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-02-01 09:36:19 +13:00
Christopher Hall
673b62d66b now ready for testing 2010-11-18 16:55:21 +13:00
7c0e441d50 replace references to defunct info email address
Now links to Koha project website.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-25 05:18:44 -04:00
64daee5495 fix a common "developement" typo
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 14:38:38 -04:00
e7f8cc8f5e bug 4403: look in appropriate theme/lang for bib display XSL
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>
2010-05-08 18:59:41 -04:00
c9ba8c899d Merge branch 'bug2505_patches' of git://git.catalyst.net.nz/koha into to-push
* '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>
2010-04-23 07:13:37 -04:00
Cindy Murdock Ames
f9e007762c Fix ampersand problem in non-XSLT Intranet search results
Quick fix for ampersand display issue in non-xslt intranet search results,
related to bug 3326.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-22 06:17:49 -04:00
Donovan Jones
593a7d8e6a Bug 2505 - Add commented use warnings where missing in *.pm 2010-04-21 20:28:51 +12:00
Lars Wirzenius
7279f55b60 Fix FSF address in directory C4/
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-03-16 20:17:56 -04:00
Chris Cormack
87ff46ba67 Bug 3797, second part of the patch, extending output_html_with_http_headers to take a status parameter (optional)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-10 14:11:53 -05:00
8ad2c7d7ac Merge commit 'pianohacker-koha/prefs-submit' into master
Merge in Jesse Weaver's system preference editor changes.

Conflicts:
	C4/Bookfund.pm
	koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
	koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
	koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tmpl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-01-26 20:26:17 -05:00
Henri-Damien LAURENT
e3a9d21d6e Improving and bug fixing admin/aqbudgets
Adding FormatData and FormatNumber in C4::Output
Using them
Adding duplication detection for budget periods
Factorizing some code
2009-09-30 11:30:30 +02:00
Henri-Damien LAURENT
efc8f69800 C4::Output adding getlanguagecookie + other enhancements
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>
2009-09-30 11:29:23 +02:00
Jesse Weaver
fdd82e8054 Add new system preferences editor
This new editor uses data files instead of descriptions stored in the
database. It also has improved search.
2009-09-06 23:02:47 -06:00
Galen Charlton
a244ff6671 bug 2505: turn on warnings in seven modules
C4::XSLT
C4::VirtualShelves
C4::Review
C4::Output
C4::Boolean
C4::Charset
C4::Stats

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-07 20:09:16 -05:00
Galen Charlton
5375a71070 followup previous patch - remove disused $opacstylesheet
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 17:06:57 -05:00
Joe Atzberger
f35b144668 Pull the last OPAC-specific tmpl vars out of gettemplate.
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>
2009-06-05 17:03:13 -05:00
Joe Atzberger
70c6a9fdf3 Bug 3239 - Content-Script-Type and Content-Style-Type
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>
2009-05-22 08:05:48 -05:00
Pianohacker
b04f432857 New framework for AJAX services
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>
2009-05-14 07:29:18 -05:00
8246a7dce8 Bugfix 3176 - Browser selected languages are not use by OPAC
This patch uses HTTP_ACCEPT_LANGUAGE web browser variable
to select OPAC available language.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-05-11 09:13:24 -05:00
Galen Charlton
786a1aa36a bug 3161: don't display blank language chooser
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>
2009-04-27 06:54:42 -05:00
Joe Atzberger
31ef440741 Bugfix pagination_bar to work with only one param/value pair.
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:
	&nbsp;<a href="my/script?query=foobar?page=1" rel="start">&lt;&lt;</a>
and AFTER patch:
	&nbsp;<a href="my/script?query=foobar&amp;page=1" rel="start">&lt;&lt;</a>

The double "?" in QUERY_STRING are now avoided.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-10 09:11:44 -05:00
Joshua Ferraro
81ecfe67ce Fix for 2308: On-line help editing doesn't work 2008-07-08 15:22:28 -05:00
Joshua Ferraro
cff92c0fd6 Fix for 2187: http_accept_language feature not working 2008-06-20 14:09:12 -05:00
Paul POULAIN
e1261ab7df BUGFIX: the language list was calculated on opaclanguage, whatever the interface
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:46:10 -05:00
Galen Charlton
8fc6b927df kohabug 2078 - send correct Content-type for search feeds
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>
2008-06-03 05:59:54 -05:00
Joe Atzberger
6d3a490c04 is_ajax function added. pagination_bar now intelligent: it has
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-30 08:52:02 -05:00
Joe Atzberger
ec5c3d0ee2 Add AJAX output sub, EXPORT_TAGS and enable loop_context_vars for HTML::Template::Pro.
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>
2008-05-29 06:22:41 -05:00
Henri-Damien LAURENT
f59c9706a4 change in yuipath management 1/2 Noupdatedatabase.pl
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>
2008-05-12 15:46:35 -05:00
Chris
dc72b21a3f Removing extra warn
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-03 07:23:37 -06:00
Chris
7c7dbf9a68 Bugfix for Bug 1790: Theme defaults to prog if other themes fail.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-30 07:51:04 -06:00
Chris Cormack
b47e7a9be4 Fix for bug 1790 Thanks to Chris Nighswonger
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-23 21:31:10 -06:00
Paul POULAIN
eee09f39da correctly caluclate default template path for OPAC
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-22 07:20:24 -06:00
Henri-Damien LAURENT
260ec03378 BugFixing : default language was always en. Not a problem for dev purpose but would be on installation
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-17 21:01:03 -06:00
Joe Atzberger
c82636958d Output.pm - silence unconditional warn.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-14 16:45:25 -06:00
Joshua Ferraro
802b13e5f5 fix for 1754; fixing I18N BiDi, improvements to handling of language
TODO: clean up the OPAC similarly

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-10 08:32:48 -06:00
Galen Charlton
5290ec5596 test suite cleanup
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>
2008-01-08 14:08:02 -06:00
Joe Atzberger
1e4c053076 Output.pm - integrity checks prevent warns, author should judge FIXME's
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 14:04:45 -06:00
Joe Atzberger
5b426c140c Output.pm - BEGIN block VERSION and vars related to export.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 20:02:37 -06:00
Joshua Ferraro
2baca29e58 WARNING: BIG I18N PATCH, you must import the subtag_registry.sql after this upgrade to benefit from the new features ... if you don't everything will work as before.
bugfixing I18N language selection from staff and OPAC, adding BiDi
support

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:59:51 -06:00
Joshua Ferraro
c7f22f84ad additional updates to language support
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-05 02:59:47 -06:00