Commit graph

137 commits

Author SHA1 Message Date
7b09ce3a22 Bug 6679 - [SIGNED-OFF] fix 3 perlcritic violations in C4/Output.pm
"return" statement with explicit "undef" at line 128, column 74.  See page 199 of PBP.  (Severity: 5)
Subroutine prototypes used at line 270, column 1.  See page 194 of PBP.  (Severity: 5)
Subroutine prototypes used at line 308, column 1.  See page 194 of PBP.  (Severity: 5)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2012-09-20 12:01:38 +02:00
Jared Camins-Esakov
33113e69c0 Bug 8622: Fix theme fallback
This patch does the following:
1) Enables fallback for includes between different themes and different
   languages (with the exact same precedence as for .tt files)
2) Enable fallback for XSLT files between different themes and different
   languages (again, same precedence)
3) Change the semantics of the TT [% themelang %] variable so that it always
   refers to the preferred theme and language, rather than the fallback
   theme/language. As a result, all themes must include all javascript,
   css and image resources they use.

Note that these changes actually have no impact whatsoever on an
installation where the default (prog) themes are in use.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-05 11:39:14 +02:00
Jonathan Druart
a6c93961b1 Bug 7302: Export basketgroup as CSV
Adds new action export for basketgroup.
This action is available only if your basketgroup is closed.
This export generates a csv file with order informations.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested together with bug 5356.
2012-07-24 18:22:06 +02:00
Chris Cormack
509d673f10 Bug 7941 : Fix version numbers in modules
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 17:29:38 +02:00
7eef4c8c70 Bug 5668 - Star ratings in the opac
patch applied to commit eb3dc448d2

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Turned on star ratings in the opac on details and results
Searched for titles - saw the stars
Clicked on a title
Clicked on the stars
Clicked on the stars to change my rating
Logged out
Tried to click on stars
Logged in as different user
Rated items that were rated already and saw average change
Changed preference to show only on detail and repeated tests
Changed preference to now show stars

All above tests passed. Signing off.

Rebased 3-19-12 by Ian Walls

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-10 14:40:49 +02:00
D Ruth Bavousett
bbfaf8264c Bug 7535: ampersands not showing properly in non-XSLT OPAC
Jared's fix for Bug 3326 fixed this in the staff client, but not the OPAC; moving this one line fixes it
both places.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
This can be replicated by indexing with -x
OPACXSLTResults must be set to "normally"
Reproduced original bug with rebuild-zebra.pl -x -b -w -r -v -v
Patch corrects the issue, does not change intranet behavior.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-21 15:45:11 +01:00
d785d9d57d Bug 6098 Followup -- doesn't replace NSB/NSE by space
On any page, NSB/NSE characters are replaced by space in Output.pm. It isn't a
good thing:

  - It isn't necessary since Zebra indexer handle properly those characters as
    delimiter.
  - It isn't necessary for display since XSL file already do that.
  - It isn't efficient since a regex is done on every whole page sent by Koha,
    not only on biblio record part.
  - It removes an information that librarian want to keep in their biblio
    records: any record edited in Koha loose its NSB/NSE characters.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-13 11:21:48 +01:00
Ian Walls
c70ff88205 Bug 2616: Remove unnecessary 'use HTML::Template' calls
Removes deprecated calls to HTML::Template or HTML::Template::Pro from:
C4/Output.pm
catalogue/export.pl
reports/issues_by_borrower_category.plugin
reports/itemtypes.plugin

Only remaining calls are in misc/cronjobs/rss/rss.pl, misc/cronjobs/smsoverdues.pl,
and t/test_template.pl.  These scripts still legitimately depend on H:T:P

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:34:05 +01:00
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