koha.git
10 years agoBug 11628: add missing staffaccess permission to French userflags.sql file
Sophie Meynieux [Tue, 28 Jan 2014 16:16:18 +0000 (17:16 +0100)]
Bug 11628: add missing staffaccess permission to French userflags.sql file

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This permission exists in other installer files (for all other languages).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1b08f924513daadaff1258659e17d5caf0a53ea4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11748 - Remove unused jquery.uitablefilter.js plugin
Owen Leonard [Wed, 12 Feb 2014 14:49:57 +0000 (09:49 -0500)]
Bug 11748 - Remove unused jquery.uitablefilter.js plugin

This patch removes a jQuery plugin which was added for use with the old
tablesorter plugin. Since the tablesorter plugin has been removed and
replaced with DataTables this plugin can also be removed.

To test, apply the patch and search for instances of the plugin:

grep -r -l "jquery.uitablefilter.js" *

There should be no results.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 42b71b87cc21ff69072116c7e42b02ad1f85932b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11757: remove dependency on POE
Galen Charlton [Fri, 14 Feb 2014 00:24:56 +0000 (00:24 +0000)]
Bug 11757: remove dependency on POE

The last use of the POE family of Perl modules went away with
the removal of zebraqueue_daemon.pl per bug 9001.  Consequently,
this patch removes POE as a dependency.

To test:

[1] Verify that "git grep POE" and "git grep libpoe" report
    nothing.
[2] Verify that koha_perl_deps.pl -a does not report POE
    as a dependency.
[3] (extra credit) verify that Debian packages can be built
    that do not list libpoe-perl as a dependency.

This patch also updates some distro-specific installation
instructions and scripts, but makes no representations about
whether those instructions currently work.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b67dac81cceaab356486001292cff40977682fff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11735 - Use new DataTables include in calendar template
Owen Leonard [Mon, 10 Feb 2014 17:59:07 +0000 (12:59 -0500)]
Bug 11735 - Use new DataTables include in calendar template

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
calendar template and corrects some table sorting configuration errors.

To test you should have multiple calendar entries in various categories
of holiday: Unique holidays, repeating yearly holidays, repeating weekly
holidays, and exceptions. Sorting of date columns should work regardless
of your dateformat system preference.

Signed-off-by: merlissia <manuelimel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: Day of week is not correctly sorted: Sundays, Mondays, Thursdays.
But it is not a regression. It is caused by the ugly way to display
weekdays (document.write).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ef65eee25e2946adf20650d61781363f735058b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11739 - Use new DataTables include in notices template
Owen Leonard [Mon, 10 Feb 2014 20:07:52 +0000 (15:07 -0500)]
Bug 11739 - Use new DataTables include in notices template

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
Notices & Slips page.

To test, view the Notices & Slips page (tools/letter.pl). Confirm that
the table of notices is sorted correctly.

Signed-off-by: merlissia <manuelimel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 26696e3b299ff9ca96d7a834a172f6534ef952d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11737: (follow-up) remove extra fnReloadAjax.js
Jonathan Druart [Tue, 11 Feb 2014 09:28:23 +0000 (10:28 +0100)]
Bug 11737: (follow-up) remove extra fnReloadAjax.js

the file dataTables.fnReloadAjax.js exists in the interface and
themelang directories.
It is only used in quotes.tt.
So the unused one can be removed.

test plan:
git grep fnReloadAjax.js
should return only 1 ref (quotes.tt)

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e0d7d998c2025fdb8ed1caf4303f754e05164c97)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11737 - Use new DataTables include in quotes management template
Owen Leonard [Mon, 10 Feb 2014 19:30:26 +0000 (14:30 -0500)]
Bug 11737 - Use new DataTables include in quotes management template

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
quotes management page.

To test you should have a multiple quotes in your database. Apply the
patch and view the quotes manager page (tools/quotes.pl). Confirm that
table sorting works correctly.

Signed-off-by: merlissia <manuelimel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 326ccb57ce8c537630b117bc92bd49ca4947c52b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11652: ensure that merging authority records corrects biblios
Janusz Kaczmarek [Fri, 31 Jan 2014 15:12:10 +0000 (16:12 +0100)]
Bug 11652: ensure that merging authority records corrects biblios

When merging authority records in librarian interface biblio records
linked to deleted authority are not being corrected (i.e. have still
old heading and orpaned link in $9).

Test plan:
1. Have two authorities in the catalogue, linked to biblio records.
2. Merge them with the new merge facility (cf. Bug 5202).
3. Have a look a the biblio record(s) previously linked to the removed
   authority. It should still have the old heading AND orpaned authority
   link in $9.

4. Apply the patch.
5. Refresh the test records (or use another set).
6. Repeat 1-3. Headings should be refreshed and the correct authid link
   should be in $9 now.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Note: new record count on the authority record will show
      after reindexing.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0070a7f6afb30b6f7ae8bc0eb073a4c39e0f783a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11704: Make */svc/report print the correct headers
Tomas Cohen Arazi [Thu, 6 Feb 2014 20:30:24 +0000 (17:30 -0300)]
Bug 11704: Make */svc/report print the correct headers

To test:
1 - Go through the first comments instructions to reproduce
    and verify the bug is present (OPAC and STAFF)
2 - Apply the patch
3 - Repeat step 1 and notice
   * characters are not broken anymore
   * the header is correct
4 - Sign off

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit aace5d436dbab1f13e2e1c06d0b4ed5f1ec13ced)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11670 - Remove sorting from patron lists action columns
Owen Leonard [Mon, 3 Feb 2014 17:03:14 +0000 (12:03 -0500)]
Bug 11670 - Remove sorting from patron lists action columns

The list of patron lists has sortable columns for the add, edit, and
delete buttons. These columns should not be sortable. This patch removes
sorting.

This patch also adds the "btn-mini" class to the in-table buttons to
make the table more compact.

To test you must have existing patron lists. Apply the patch and
navigate to Tools -> Patron lists. The columns containing the add, edit,
and delete buttons should not be sortable. Other columns should sort
correctly.

---------------------------------------------------------------------

Created to patron lists and confirmed the collums 'add patrons', 'edit'
and 'delete' are no longer sortable. Column 'Name' and 'Patrons in list'
are still sortable. The size of buttons are smaller.
I also agree this is an improvement.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9ac83cdaafb267e1a76aa957b86b7e7b8955d819)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11721 - Use new DataTables include in suggestions template
Owen Leonard [Fri, 7 Feb 2014 21:02:06 +0000 (16:02 -0500)]
Bug 11721 - Use new DataTables include in suggestions template

This patch modifies the template for the suggestions page to use
the new DataTables include. This simplifies the inclusion of assets and
updates to the latest DataTables version.

Sorting is now configured to exclude articles when sorting the title
column.

To test, apply the patch and view the suggestions page (Acquisitions ->
Suggestions). Sorting of suggestions should work correctly.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Note: the columsn fund and status are not sortable/searchable
before and after applying the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2f379f3fa78ea12c3955addfa733fb8d8cdb0c2b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11687: remove disused script statecollection.pl
Jonathan Druart [Wed, 5 Feb 2014 09:39:26 +0000 (10:39 +0100)]
Bug 11687: remove disused script statecollection.pl

It can be removed.

Test plan:
  git grep statecollection
returns no occurrence.

Signed-off-by: Holger Meissner <h.meissner.82@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b2d08f8359c187f92e1df46ad29b83852fb03079)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11631: Make i18n toolchain ignore useless strings
Pasi Kallinen [Thu, 24 Apr 2014 08:01:52 +0000 (11:01 +0300)]
Bug 11631: Make i18n toolchain ignore useless strings

This patch removes several types of strings from the
PO files that cannot be usefully translated, including
ones that consist entirely of punctuation and/or HTML entities.

Test:
1) Update PO files of some lang, xx-YY-*po
cd misc/translator
perl translate update xx-YY
2) Do it again, just in case
3) rm po/xx-YY*po~
4) Extract all msgid's, sorted
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-pre
5) Apply the patch
6) Repeat 1-3
7) Repeat 4 again, other file
cat po/xx-YY*po | egrep "^msgid" | sort | uniq > xx-YY-post
8) Do a diff, inspect results, only strings with %s and \s
diff xx-YY-pre xx-YY-post | less

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, 380 strings less to 'translate'
No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c2295530401f53653386ff07a43c668a6a574d65)

10 years agoBug 11616: (follow-up) remove tablesorter CSS
Galen Charlton [Fri, 31 Jan 2014 15:30:29 +0000 (15:30 +0000)]
Bug 11616: (follow-up) remove tablesorter CSS

This patch removes CSS rules that applied only to use of the
jQuery tablesorter plugin, which is now gone.

To test:

[1] Verify that git grep -l headerSort does not turn up
    any results.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1a5da08342182c739f2f5b790038c6ff04c748ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11616: remove jQuery tablesorter plugin
Jonathan Druart [Mon, 27 Jan 2014 11:22:21 +0000 (12:22 +0100)]
Bug 11616: remove jQuery tablesorter plugin

DataTables has replaced the tablesorter plugin for client-side sorting
of tables in Koha.  There is no table using this plugin, so this patch
removes it and remaining references to it.

REVISED TEST PLAN
-----------------
1) Apply the patch
2) Home -> Koha administration -> Authorized values
3) Change the 'Show category:' drop down value, and play with
    the sorting of columns.
   -- should sort as expected.
4) Search the catalogue -> look for a biblio with high circulation
5) Click one of the name links.
6) Click the Items tab on the left.
7) Scroll down and click the (View item's checkout history)
    link in the History area.
   -- There was no sorting prior to the patch, so afterwards
      it should display the same.
8) git grep -i tablesorter
   -- Only a reference in staff-global.css and release texts.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 166720982e59a929aac9191d89af57a57545ff15)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11415: DBRev 3.14.06.001
Fridolin Somers [Fri, 16 May 2014 10:36:16 +0000 (12:36 +0200)]
Bug 11415: DBRev 3.14.06.001

10 years agoBug 11415 (QA Followup) fix whitespace
Kyle M Hall [Fri, 10 Jan 2014 14:15:25 +0000 (09:15 -0500)]
Bug 11415 (QA Followup) fix whitespace

This patch also fixes a JavaScript syntax error if the
SelfCheckReceiptPrompt system preference is off.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6254f5f07ab84ef7d6b6518d8f39bde9987a92e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11415: Add syspref to toggle SCO receipt printing
JaTara Barnes [Sun, 5 Jan 2014 06:33:31 +0000 (00:33 -0600)]
Bug 11415: Add syspref to toggle SCO receipt printing

This patch adds the SelfCheckReceiptPrompt to control
whether receipts are automatically printed when a patron
finishes a SCO session.  This is on by default during
new installations and upgrades.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9cc3b69a0cf1adfc7c50c25ef6d57c2e027e8950)

Conflicts:
installer/data/mysql/updatedatabase.pl

10 years agoBug 10611: (follow-up) cache DBMS driver code in context object
Galen Charlton [Mon, 10 Mar 2014 22:48:03 +0000 (22:48 +0000)]
Bug 10611: (follow-up) cache DBMS driver code in context object

Rather than use a package-level variable, use an object-level
one.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7d39b3c72ea2422b09e3411bef974d87aecdabf9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
C4/Context.pm

10 years agoBug 10611: Use mysql_auto_reconnect instead of ping
Jonathan Druart [Tue, 16 Jul 2013 09:53:47 +0000 (11:53 +0200)]
Bug 10611: Use mysql_auto_reconnect instead of ping

DBD::Mysql provides a mysql_auto_reconnect flag. Using it avoids
the time required to do a $dbh->ping().

Benchmarks:

use Modern::Perl;
use C4::Context;
for ( 1 .. 1000 ) {
    $dbh = C4::Context->dbh;
}

* without this patch on a local DB:
perl t.pl  0,49s user 0,02s system 98% cpu 0,525 total
* without this patch on a remote DB:
perl t.pl  0,52s user 0,05s system 1% cpu 37,358 total
* with this patch on a local DB:
perl t.pl  0,46s user 0,04s system 99% cpu 0,509 total
* with this patch on a remote DB:
perl t.pl  0,49s user 0,02s system 56% cpu 0,892 total

Testing the auto reconnect:
use Modern::Perl;
use C4::Context;
my $ping = $dbh->ping;
say $ping;
$dbh->disconnect;
$ping = $dbh->ping;
say $ping;

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Real improvement. No koha-qa errors

prove t/db_dependent/Circulation_issuingrules.t produces no error
prove t/db_dependent/Context.t produces no error

Test
1) dumped Koha DB, load it on a non-local server
2) run sample script whit and without patch, local and remote

use Modern::Perl;
use C4::Context;
for ( 1 .. 100000 ) {
    my $dbh = C4::Context->dbh;
}

Main difference I note is with remote server
a) without patch
real    0m16.357s
user    0m2.592s
sys     0m2.132s

b) with patch
real    0m0.259s
user    0m0.240s
sys     0m0.012s

I think this could be good for DBs placed on
remote servers

Bug 10611: add a "new" parameter to C4::Context->dbh

When dbh->disconnect is called and the mysql_auto_reconnect flag is set,
the dbh is not recreated: the old one is used.

Adding a new flag, we can now force the C4::Context->dbh method to
return a new dbh.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 10611: Followup: remove useless calls to dbh->disconnect

These 3 calls to disconnect are done at the end of the script, they are
useless.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4ae3665ad8afb5d283d989c4622a91690e1c4f8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
C4/Context.pm

10 years agoBug 11636 - make it possible to remove patrons from patron list during add process
Owen Leonard [Wed, 29 Jan 2014 17:17:09 +0000 (12:17 -0500)]
Bug 11636 - make it possible to remove patrons from patron list during add process

If your patrons have card numbers with leading zeroes this causes
problems removing patron entries during the process of adding patrons to
an existing list. This patch refactors the relevant JavaScript to
correct the problem and to remove inline "onclick" from generated HTML.

This patch also includes a fix for Bug 11632 - Untranslatable string
"Remove" in patron lists.

To test:

1. If necessary, create or modify a patron to have a card number
   with leading zeroes.
2. Go to Tools -> Patron lists.
3. Click "Add patrons" on an existing list.
4. Perform a patron search and choose one of the results.
5. Click the "remove" link next to the patron name which was just added.
   Nothing will happen.
6. Apply the patch and test again. The "remove" link should now work.

To test the fix for Bug 11632, after applying the patch run "translate
update [language code]" and confirm that the "Remove" string is listed
in the updated po file for patron_lists/list.tt.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f3d5887870bad581e312b40bd474b38b5788122d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11663: fix display of holding tab in Bootstap OPAC when opacbookbag syspref is...
Frédéric Demians [Sat, 1 Feb 2014 08:49:38 +0000 (09:49 +0100)]
Bug 11663: fix display of holding tab in Bootstap OPAC when opacbookbag syspref is disabled

Bootstap theme opac holding tab is improperly displayed when opacbookbag
syspref is disabled, and virtualshelf is enabled. This is due to the
fact that in this situation basket.js is loaded (for virtual shelves),
but some JS variables are not defined in template since opacbookbag is
disabled.

To reproduce this bug:

- Choose bootstrap OPAC theme
- Enable virtualsheves syspref
- Disable opacbookbag syspref
- Open a biblio record in OPAC detail page
- You will observe that items holding tabs are not displayed as tabs but
  as a bulleted list

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and all tests.
Confirmed display problem exists without the patch and is solved by it.
Ideally we would avoid having the cart messages in the template when
the feature is deactivated, but this is ok for now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e3c203aebb939af63aefc81f77474adc0234ca4c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11493: Revert "Bug 6869 Batch item modification fails whit accented characters"
Jonathan Druart [Wed, 5 Mar 2014 12:44:49 +0000 (13:44 +0100)]
Bug 11493: Revert "Bug 6869 Batch item modification fails whit accented characters"

This reverts commit c9905750e53e2e1615842ac696d5eeb0a8ac07fc.

Test plan:
1/ Open a bib record with more than 1 item ,
2/ Select all items
3/ Chose Modify selected items
4/ put you "ق ك و" in notes
5/ Verify the items have been updated correctly
6/ put you "éàç" in notes
7/ Verify the items have been updated correctly
8/ put you "ق ك و éàç" in notes
9/ Verify the items have been updated correctly

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed bug on master and that the patch fixes it.
Passes all tests and the QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e55d89be20acb58deb45a30c113bf0f07170fd33)

10 years agoBug 11608: Delete unused commented lines in template
Jonathan Druart [Fri, 24 Jan 2014 15:07:08 +0000 (16:07 +0100)]
Bug 11608: Delete unused commented lines in template

On the way, these lines are commented and can be deleted safely.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Removes an HTML comment with unused code.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fb8e159daad8556832d45c9581e32b76aee02e1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11608: Remove the word 'library' from funds list
Nicole C. Engard [Fri, 24 Jan 2014 14:34:27 +0000 (08:34 -0600)]
Bug 11608: Remove the word 'library' from funds list

The list of funds on the main acq page shows the library's name
followed by the word 'library'. I don't think this word is necessary
as most libraries have the word 'library' in their names. Even
if they don't they probably just want their library name to show
without extra words.

To test:

* Visit the acquisitions module before applying
* See the library's name + 'library' above the funds list
* Apply patch
* Look again at funds list and 'library' should be gone

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: remove a space

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b865e1a024331fbbb76570f84afc9302a7340f7d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: (follow-up) remove some tabs
Galen Charlton [Fri, 11 Apr 2014 17:51:50 +0000 (17:51 +0000)]
Bug 11563: (follow-up) remove some tabs

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c16cadf21656e6c1796c7eac28db33ead02cf59d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: (follow-up) improve selector for adding noEnterSubmit to select elements
Jonathan Druart [Tue, 25 Mar 2014 08:30:14 +0000 (09:30 +0100)]
Bug 11563: (follow-up) improve selector for adding noEnterSubmit to select elements

Test plan:
To test on modified pages:
- Press enter when cursor is on input or select and verify the form is not
submitted.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2aafa78f08c60797e47cbe790cef1f1899a5297d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: (follow-up) add noEnterSubmit class to pulldowns
Kyle M Hall [Fri, 7 Mar 2014 14:05:31 +0000 (09:05 -0500)]
Bug 11563: (follow-up) add noEnterSubmit class to pulldowns

When using Chrome on Mac OS X, form submits are triggered by hitting
enter when focused on a select. This is not an issue with any other
combination of browser and operating system that I am aware of.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit db3d4a0d7d2b97a021be1464a99b8084c31b62cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: (follow-up) change .live() to .on()
Kyle M Hall [Wed, 26 Feb 2014 17:51:11 +0000 (12:51 -0500)]
Bug 11563: (follow-up) change .live() to .on()

The jquery event handler .live() has been deprecated. It is recommended
that .on() be used instead.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1226f901cef989915ee68e7ac7d1b1acf9fba91c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11563: restore preventing the enter key from submitting several forms
Fridolin Somers [Tue, 25 Feb 2014 11:13:13 +0000 (12:13 +0100)]
Bug 11563: restore preventing the enter key from submitting several forms

Several forms that take patron or item barcodes as input stopped
preventing the enter key (which is often sent by barcode scanners)
from submitting the form.

The code binding the CSS class noEnterSubmit to the handler preventing
submission when hitting the enter key was no longer triggered.  This is
because this class is added using JavaScript in $(document).ready() and
the keypress event listerning is also set using $(document).ready().

This patch corrects by using JQuery live() with will set event handlers
for HTML generated with JavaScript.

Also sets noEnterSubmit to use the checkEnter(e) function, as that has
broader browser compatibility.  Also corrects a small bug, for IE,
window.event must be used, not event alone.

Test plan :
- Flush browser cache (Crtl+F5) to update js files
- Go to patron creation : members/memberentrygen.tt
- Type a text in all mandatory inputs
- Type some caracters in a non mandatory input
- Press Enter key
=> Without patch : the form is submitted
=> With patch : the form is not submitted
- Try to set several lines in a textarea
=> It works (checks that in this case enter key is allowed)
- Test other pages usign noEnterSubmit class :
cataloguing/additem.tt
course_reserves/course.tt
members/mancredit.tt
members/maninvoice.tt
patron_lists/list.tt

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested in Firefox and Chromium.
Passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e5ab2203745d7c70e1c4d2f54cea967710a88b96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11369: (follow-up) generate searchid in browser.js
Fridolin Somers [Wed, 26 Feb 2014 16:14:04 +0000 (17:14 +0100)]
Bug 11369: (follow-up) generate searchid in browser.js

The search browser feature uses nearly only the browser.js file.
That is why I propose to move the searchid generation from search.pl
to browser.js.
We then use Date.getTime() to use current timestamp as searchid,
prefixed by 'scs_' like before.

Test by using test plan of main patch :
Too many search cursor cookies overflow HTTP-header size, when
making multiple searches in the staff client

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Tested the browse functionality in staff by using the different
options (back to results, next, previous, etc) and the batch
modifications for items. An old cookie can cause a Javascript error,
but after restarting the browser/deleting cookies it all works
correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c4f17650132c9b74aa56c40a3a2bec2bdbc4477e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11369: (follow-up) Correct usage of me.searchid in browser.js
Fridolin Somers [Wed, 26 Feb 2014 16:03:13 +0000 (17:03 +0100)]
Bug 11369: (follow-up) Correct usage of me.searchid in browser.js

In browser.js, at creation of browser, the searchid is transmited to
JS object into me.searchid.
To be consistant, me.searchid should always be use, never searchid alone.
In browseRecords function, setting searchid as parameter is useless
because it is defined in me.searchid.

Test with test plan of Bug 10404

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 98edbf00cc10c908820eb1126a176ed12a04300d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11369: fix issue that can cause staff client searches to stop working
Olli-Antti Kivilahti [Wed, 11 Dec 2013 12:28:53 +0000 (14:28 +0200)]
Bug 11369: fix issue that can cause staff client searches to stop working

This patch fixes an issue where too many search cursor cookies overflow
the HTTP-header size after making multiple searches in the staff client.

To replicate this issue, make multiple searches in catalogue/search.pl.
50+ Should be enough to cause the HTTP-request header to overgrow.
One can verify this issue by observing the searchCookie growth in
browser's stored cookies.

-------------
- TEST PLAN -
-------------

Keep making searches.
One should never have more than 10 searchCookies. Browser might display
only 9, because for some reason the newest js-generated cookie is not
included in Firefox's cookies listing.

------------
- DRAWBACK -
------------

Removing these cookies disables the search cursor for traversing search
results (next/previous) for the removed cookie. This maybe be problematic
in some cases,
(for ex when multiple search tabs need to be open and they need to be
 traversed)
One easy solution is to grow the amount of stored searchCookies from 10 to
20, but 10 is chosen so there will be plenty of room for other cookies as
well.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0cada7a323db7f9871b67a07e3343642543b64e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11369 - Updating the jquery.cookie.js-plugin
Olli-Antti Kivilahti [Tue, 10 Dec 2013 17:12:01 +0000 (19:12 +0200)]
Bug 11369 - Updating the jquery.cookie.js-plugin

The current jquery.cookie-plugin crashes when trying to fetch
all cookies using $.cookie();
Downloaded the newest plugin version and minified it.
Now works as intended.

Encountered an issue with the plugin now returning null when
no cookies are found, and applied a fix in browser.js.

-------------
- Test plan -
-------------
Plugin is used in browser.js and batchMod.js so testing both

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 35bec75d66637bd3c4cff499ed7fb534b8d09f35)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11290: fix display of patron home page for certain translations
Chris Cormack [Fri, 22 Nov 2013 22:04:00 +0000 (11:04 +1300)]
Bug 11290: fix display of patron home page for certain translations

To test
1) In a fresh Koha, generate translation into XX
2) Select XX for the staff interface (i.e. enable it, and choose it)
3) Go to the Patrons page
4) Everything looks fine
5) In the admin page, create a patron category with any non-ASCII
   character.
6) Go back to the Patrons page, everything is broken
7) Apply patch
8) regenerate translation
9) Go back to the Patrons page, everything looks fine
10) Switch to english it still looks fine

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Tried with ru-RU and fixes the problem.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Problem is also visible on untranslated templates changing
one of the sample category descriptions to include diacritics.

[RM note: I wasn't able to reproduce this on an unstranslated
 template -- I tried using Arabic, Cyrllic, and Spanish characters]

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3e1b781adc253722209e46385fb3248ae8d668f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoIncrement version for 3.14.6 release v3.14.06
Fridolin Somers [Wed, 30 Apr 2014 15:19:33 +0000 (17:19 +0200)]
Increment version for 3.14.6 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoMerge remote-tracking branch 'translator/3.14.06-release' into 3.14.x
Fridolin Somers [Wed, 30 Apr 2014 15:15:54 +0000 (17:15 +0200)]
Merge remote-tracking branch 'translator/3.14.06-release' into 3.14.x

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoUpdate release notes for 3.14.6 release
Fridolin Somers [Wed, 30 Apr 2014 15:13:52 +0000 (17:13 +0200)]
Update release notes for 3.14.6 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11619: (follow-up) fix QueryParser.t
Galen Charlton [Tue, 4 Feb 2014 18:44:07 +0000 (18:44 +0000)]
Bug 11619: (follow-up) fix QueryParser.t

The previous patch did not account for the change
in the number of indexes, and thus caused one
of the tests to fail.

To test:

[1] Verify that prove -v t/QueryParser.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 547ebaece0bcd24857cecd6c95d8a5c1c41ce222)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11619: remove duplicate key in QueryParser config
Marcel de Rooy [Mon, 27 Jan 2014 12:50:01 +0000 (13:50 +0100)]
Bug 11619: remove duplicate key in QueryParser config

Corrects a double entry for language in yaml file.
Language should have been language-original.

Test plan:
Check that you have language-original in your zebra install.
Specifically, this index should cover MARC21 041$h.
Enable QueryParser and search for a record with this index.
Note that this patch does not enable searching on this
index without QueryParser. This is true for many more indexes
in record.abs that are not included in the getIndexes routine.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described - make sure you are testing with a current
indexing configuration.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3424f0d84a1622c502aeb376450cad5b74f0cea1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11572: ensure that running Z39.50 search from staff search results detects ISBN
“ByWater [Thu, 16 Jan 2014 20:00:40 +0000 (15:00 -0500)]
Bug 11572: ensure that running Z39.50 search from staff search results detects ISBN

In Koha 3.8, if a standard catalog search was performed and the user
clicked the Z39.50 search button, the search string would automatically
be placed in the isbn field for the Z39.50 search form.
Changes to the code have since broken this functionality.

Test Plan:
1) From mainpage.pl, use "Search the catalog" to search for the string
   "9781570672835"
2) Click the Z39.50 Search button
3) Note the string is placed in the title field
4) Apply this patch
5) Repeat steps 1-2
6) Note the string is placed in the isbn field

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested old and new ISBN with and without hyphens.
Also tested some other keyword searches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Note that the behavior will be a bit odd if you do a 'replace via
Z39.50' from a bib record whose title happens to be an ISBN, but
this scenario seems unlikely enough to ignore.

(cherry picked from commit 7f6f3b924e5bc9343bb475a1add714923a025913)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11246: remove reference to fields 780 and 785 in UNIMARC XSLT files for Bootstrap...
Mathieu Saby [Wed, 13 Nov 2013 18:56:10 +0000 (19:56 +0100)]
Bug 11246: remove reference to fields 780 and 785 in UNIMARC XSLT files for Bootstrap OPAC

Another fix, 10465, removed fields 780 and 785 from a unimarc xslt file.
This cleanup is needed for bootstrap too

To test : in a UNIMARC Koha, with Bootstrap theme OPAC
1. Be sure that OPACXSLTDetailsDisplay , OPACXSLTResultsDisplay sysprefs
   are set to "default"
2. Apply the patch
3. Search some records in OPAC : the list view and the detail view
   should be exacty the same as before you apply the patch.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changes are consistent with changes done earlier on the prog theme.
Checked that the detail pages and results still display correctly
for UNIMARC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 684143a529cb556236f46d1d2a8ef05908c0b2f9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11655: koha-translate --list no longer shows 'en'
Tomas Cohen Arazi [Fri, 31 Jan 2014 19:52:15 +0000 (16:52 -0300)]
Bug 11655: koha-translate --list no longer shows 'en'

'en' is not a translation and it doesn't make any sense to return it as
part of the installed translations or the available ones.

It becomes relevant to remove it as users upgrading their installed
translations end up grepping the output to remove 'en' like in:

for lang in $(koha-translate --list | grep -v -x -e 'en') ; do
  koha-translate --update $lang
done

instead of simply issuing the koha-translate --list command.

To test:
- Run
  ./koha-translate --list
  ./koha-translate --list --available
=> It shouldn't return 'en' in the result list.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6aa021896827e846e58f88a8c5387df122688c53)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12134: ensure that patrons are not restricted even when the last restriction...
Kyle M Hall [Thu, 24 Apr 2014 15:23:05 +0000 (11:23 -0400)]
Bug 12134: ensure that patrons are not restricted even when the last restriction has expired

Test Plan:
1) Add a manual restriction to a patron and wait until the
   expiration date of the restriction has passed.  This can be
   simulated by modifying borrowers.debarred for a borrower and
   setting the date in the past.
2) Try to check out an item to that patron
3) Note you cannot
4) Apply this patch
5) Repeat step 2
6) Note you can now check out items the patron

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 35a94f6423ee851668047075dbc153dc3aa13606)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12134: (follow-up) fix one of the IsDebarred() tests
Galen Charlton [Mon, 28 Apr 2014 17:05:19 +0000 (17:05 +0000)]
Bug 12134: (follow-up) fix one of the IsDebarred() tests

- pass valid ISO date to the debar-date-in-future test
- correctly verify that patron is restricted

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2f5e9df121508fe32e5109621224d1ebbc8c388c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12134: (follow-up) add more unit tests to reflect the change in IsDebarred
Jonathan Druart [Fri, 25 Apr 2014 10:48:42 +0000 (12:48 +0200)]
Bug 12134: (follow-up) add more unit tests to reflect the change in IsDebarred

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c2d0a49defbc739469be61c33061d6819feb7b69)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12134: Add unit tests to reflect the change in IsDebarred
Jonathan Druart [Thu, 24 Apr 2014 15:36:44 +0000 (17:36 +0200)]
Bug 12134: Add unit tests to reflect the change in IsDebarred

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9f1f7da8ac205b2d642aa7986a9ac26b1a8614e1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoTranslation updates for 3.14.06 release
Bernardo Gonzalez Kriegel [Wed, 30 Apr 2014 11:35:44 +0000 (08:35 -0300)]
Translation updates for 3.14.06 release

New languages:
    Kinyarwanda from Rwanda - rw-RW
    Swahili from Kenya - sw-KY

Renames:
    Thai from th-THA to th-TH

10 years agoBug 11513: (follow-up) format enrollment end date consistently
Galen Charlton [Fri, 31 Jan 2014 16:21:05 +0000 (16:21 +0000)]
Bug 11513: (follow-up) format enrollment end date consistently

The previous patch added use of the KohaDates TT plugin, so this
patch makes sure that it gets used to format the display of all
occurrences of the enrollment end date.

To test:

[1] Create a patron category with a fixed end date.
[2] Bring up the list of all categories and verify that the date
    is displayed based on the dateformat value.
[3] Delete the category, and verify that the confirmation dialog
    formats the date correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6b6377316eb49d94476e9442728389cc4c9297ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11513: fix log warning noise in patron category editor
Mark Tompsett [Fri, 10 Jan 2014 05:06:21 +0000 (00:06 -0500)]
Bug 11513: fix log warning noise in patron category editor

Just going to the patron categories page triggered errors.
Running through all the plain options also triggered other
warnings. This fix silences them.

Discovered tabs I had not corrected by running qa test tool.

Some errors which I could not trigger were also fixed, such
as line 248 shown by Merllissia Manueli.

TEST PLAN
---------
 1) Log in to staff client
 2) Click 'Administration'
 3) Click 'Patron categories'
 4) Click '+ New category'
 5) Enter a dummy category and click 'Save'
 6) Click 'Edit' for the dummy category.
 7) Change a value and click 'Save'
 8) Click 'Delete' for the dummy category.
 9) Confirm to delete.
10) Review error log, several new warnings
11) Apply patch
12) Run the koha qa test tool.
13) Click 'Home'
14) Click 'Administration'
15) Click 'Patron categories'
16) Click '+ New category'
17) Enter a dummy category and click 'Save'
18) Click 'Edit' for the dummy category.
19) Change a value and click 'Save'
20) Click 'Delete' for the dummy category.
21) Confirm to delete.
22) Review error log, no new warnings

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Followed test plan, saw no errors in the log after applying the patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested various dates and enrollment periods with different settings of
dateformat pref. Works as advertised. No warnings.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2870c6bd851e967d08d9e4613095ebdfdb8a4c01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11314: (follow-up) make another "All" translatable
Galen Charlton [Sun, 26 Jan 2014 15:39:27 +0000 (15:39 +0000)]
Bug 11314: (follow-up) make another "All" translatable

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 23e05042357a9c4fbceb15f0e07c3316b7ff6d86)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11314: (follow-up) make "All" translatable
Jonathan Druart [Fri, 24 Jan 2014 14:24:20 +0000 (15:24 +0100)]
Bug 11314: (follow-up) make "All" translatable

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fb9f7afc77769a9ecb55aae6e74fa8f6600fe2a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11314: restore ability to see only 5 entries on parcel.pl
Kyle M Hall [Wed, 27 Nov 2013 17:40:11 +0000 (12:40 -0500)]
Bug 11314: restore ability to see only 5 entries on parcel.pl

Bug 9130 removed the ability to limit the tables on parcel.pl to 5 rows,
as well as the "sticky" feature. It is trivial to restore this
functionality. These datatables are already using bStateSave, so are
they are "sticky" already. The only part left is to enable the
ability to limit the table to 5 rows at a time.

Test Plan:
1) Apply this patch
2) Browse to parcel.pl
3) Note the default rows count is still 10
4) Note the option to limit the row count to 5

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Double-checked that the "sticky" feature is still in place thanks
to bStateSave.

I didn't notice a difference due to iDisplayLength being added, but
the extra option of "5" to the list is there.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2bb4f4b42b3e3dfc7bc4233d16888d953625025b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11313: supply empty value in mandatory comboboxs in MARC record editors
Fridolyn SOMERS [Wed, 27 Nov 2013 15:40:09 +0000 (16:40 +0100)]
Bug 11313: supply empty value in mandatory comboboxs in MARC record editors

In biblio (or authority) record editing or creation, Bug 3727 added
an empty value to combobox for subfields using itemtype authorized values,
which is mandatory and does not have a default value. This to avoid
selecting arbitrarily the first value of the combobox.

This patch extends this behavior to normal authorized values like CCODE,
COUNTRY ...

Also, when record already exists and has a defined value for the subfield
this value will be selected in combobox so there is no need for an empty
value.

Test plan :
- In a biblio framework, set a subfield mandatory and using itemtypes
  authorised values
- Set a default value for this subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the first empty value is selected
- Go to biblio framework and set a default value for the subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the default value is selected
   and there is no empty value
- Select an other value and save the record
- Edit this record
=> You see the subfield with a combobox, the saved value is selected and
   there is no empty value

Perform same tests with a normal authorized values categorie (instead of
  itemtypes).
Perform same tests with with authority creation/edition
Perform same tests with a normal authorized values categorie and authority
  creation/edition

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Fridolyn: I had a lot of difficulty understanding your test plan,
especially since the second line should not be in the test plan
(since if there is a default value, no empty value should appear).

Perhaps it would be useful to use more whitespace to separate
steps and the things for which a tester should check.

Also, it might be useful to specify what testers should check for
before and after applying the patch, so that they're sure that the
behaviour has been corrected.

In any case, the patch works! Certainly a helpful addition.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

1) Adding a bibliographic record
Subfield is mandatory, no default value:
- adding record: no value is preselected, empty value exists
- editing record: saved value is shown,  empty value exists
Subfield is mandatory, defined default value:
- adding record: default is preselected, no empty value
- editing record: saved value is shown, no empty value exists
Subfield is not mandatory, defined default value:
- adding record: default is preselected, empty value exists
- editing record: saved value is shown, emtpy value exists
Subfield is not mandatory, no default value:
- adding record: empty value is preselected
- editing record: saved value is shown, empty value exists

2) Adding an authority record
Repeating tests from above.
- Subfield is mandatory, no default value: OK
- Subfield is mandatory, defined default value: OK
- Subfield is not mandatory, defined default value: OK
- Subfield is not mandatory, no default value: OK

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fc698eed06ec9a7335c4b94362917d2b364b44c4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11138: add auto_unsuspend_holds to daily crontab (Debian package)
Liz Rea [Fri, 25 Oct 2013 03:40:03 +0000 (16:40 +1300)]
Bug 11138: add auto_unsuspend_holds to daily crontab (Debian package)

To test:

Install the packages with this patch, observe the /etc/cron.daily/koha-common
file - auto_unsuspend_holds should now be in the default list.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ebe92b97ea3082da4de7901971f681b09d3eb265)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11138 - Add auto_unsuspend_reserves to crontab.example
Liz Rea [Thu, 14 Nov 2013 01:52:28 +0000 (14:52 +1300)]
Bug 11138 - Add auto_unsuspend_reserves to crontab.example

To test:

Set up and run the cronjobs from crontab.example with a hold set to
unsuspend today. The hold should be unsuspended.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e6da56acb174c56a746dde44e5d247afc7ff0ed6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11549: [follow-up] Make NewOrder calculate new parent_ordernumber
Julian Maurice [Fri, 17 Jan 2014 10:21:05 +0000 (11:21 +0100)]
Bug 11549: [follow-up] Make NewOrder calculate new parent_ordernumber

If parent_ordernumber is not set in NewOrder parameter, it is
automatically set to ordernumber.

This patch only avoid code duplication.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This solution is better!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Also all tests in
t/db_dependent/Acquisitions/.

Confirmed bug and that the patch fixes it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9cb6174653185e8ea37871245c8d25092d8e4a81)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11549: (follow-up) interpolated variables into SQL statements should not be allowed
Jonathan Druart [Tue, 14 Jan 2014 11:13:31 +0000 (12:13 +0100)]
Bug 11549: (follow-up) interpolated variables into SQL statements should not be allowed

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6e861c5563ddd807088e31a11776fb49014de27e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11549: make it possible to receive and cancel the receipt of a transferred order
Jonathan Druart [Tue, 14 Jan 2014 11:06:34 +0000 (12:06 +0100)]
Bug 11549: make it possible to receive and cancel the receipt of a transferred order

To reproduce the issue:
- transfer an order from a basket to another. Note the previous
ordernumber (X) and the new one (Y).
- receive the order
- cancel the receipt
- verify the order has been deleted:
select count(*) from aqorders where ordernumber=Y;
select * from aqorders_transfers where ordernumber_from = X;
The value for ordernumber_to is null.

To test this patch:
- apply this patch
- transfer an order from a basket to another
- receive the order
- cancel the receipt
- verify the order still exist in the basket where the transfer has been
  done.

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6d63881e0447bae83d21b6f082ee1549277c6071)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11549: Add regression test
Jonathan Druart [Tue, 14 Jan 2014 11:04:24 +0000 (12:04 +0100)]
Bug 11549: Add regression test

test plan:
prove t/db_dependent/Acquisition/TransferOrder.t should fail before the
patch and success after applying it.

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e974b554a5cc08413e66c43072e857f3d2b5458e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11534: fix bug that made it impossible to remove instructors from a course
Owen Leonard [Wed, 29 Jan 2014 17:52:51 +0000 (12:52 -0500)]
Bug 11534: fix bug that made it impossible to remove instructors from a course

In some cases clicking the "remove" link to remove a course instructor
when editing a course reserves course doesn't work. I suspect this is
caused by leading zeroes in the card number. This patch refactors the
relevant function to fix the problem and to remove inline JavaScript
from generated markup.

Other changes:

- Make the "Remove" text translatable
- Re-order the first name and last name when added by JavaScript to
match the template's "surname, firstname" order.

To test:

1. If necessary, create or modify a patron to have a card number
   with leading zeroes.
2. Go to Course reserves and add or edit a course.
3. If you are editing a course and there are existing instructors, click
   the "remove" link. Nothing will happen.
4. Perform a patron search and choose one of the results. The name
   should be added to the list of instructors in the format "surname,
   firstname."
5. Click the "remove" link next to the patron name which was just added.
   Nothing will happen.
6. Apply the patch and repeat step 4. The "remove" link should work.
7. Add an instructor and save the course reserve. Repeat steps 2 and 3.
   The "remove" link should now work.

To test the translation fix, after applying the patch run "translate
update [language code]" and confirm that the "Remove" string is listed
in the updated po file for course_reserves/course.tt.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d567733f2325817cca694c437c01a9e1c669f368)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11533: fix authority searching with no sorting when QueryParser is enabled
Galen Charlton [Thu, 16 Jan 2014 20:36:02 +0000 (20:36 +0000)]
Bug 11533: fix authority searching with no sorting when QueryParser is enabled

This patch fixes an issue where chosing 'None' as the sort order
for an authority search would result in zero hits if QueryParser is
eanbled.

This patch also adds some additional test cases.

To test:

[1] Enable QueryParser.
[2] Perform an authority search in the staff interface that
    uses 'Heading A-Z' as the sort order and returns hits.
[3] Run the same search, but with the sort order set to 'None'.
    No hits are returned.
[4] Apply the patch.
[5] Do step 3 again.  This time, hits should be returned.
[6] Verify that prove -v t/db_dependent/Search.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 27c312b721d5533560234675712391a60f354c51)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11533: (regression test) QP breaks authority search
Tomas Cohen Arazi [Mon, 13 Jan 2014 19:26:22 +0000 (16:26 -0300)]
Bug 11533: (regression test) QP breaks authority search

This patch duplicates the SearchAuthority tests, with QP enabled.
Searching shouldn't be affected by QP. Instructions for manually
reproducing this can be read in the first comment for the bug entry.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 99e2686a4985fd487dfb5e898f24ceba80ba48ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11363: make units in label printer profile form translatable
Roman Amor [Thu, 16 Jan 2014 02:55:03 +0000 (15:55 +1300)]
Bug 11363: make units in label printer profile form translatable

Changed the unit names form an import to a switch case so that it is in
the .tt so that it can be translated

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9e74700b5b4cee8f92a85f18cc2304569c30a910)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10987: (follow-up) fix display of authorities containing only one see from or...
Galen Charlton [Thu, 16 Jan 2014 23:07:09 +0000 (23:07 +0000)]
Bug 10987: (follow-up) fix display of authorities containing only one see from or see also lnik

This patch fixes an incorrect test on the number of see from and
see also links in the authority record, as otherwise if a record
had only one 4XX or 5XX, the linked headings weren't displayed at
all.  This patch also makes the test consistent across the staff
theme and the two OPAC themes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e686dd25438b66de751551c8f8fecff115b661d4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10987: remove duplicate 'see also' and 'see from' labels from authority search...
Tomas Cohen Arazi [Wed, 2 Oct 2013 18:42:13 +0000 (15:42 -0300)]
Bug 10987: remove duplicate 'see also' and 'see from' labels from authority search results

If an authority record has more than one 4xx$a (or 5xx$a) entries the
corresponding labels 'see also' and 'used for/see from' werwe repeated.
This patch removes duplicate instances of the labels, improving
readability.

To test:
- Have authority records with more than one entry on the 4xx (or 5xx)
  fields.
- Do a search, check "see also:" (or 'used for/see from') appear more
  than once.
- Apply the patch
- Reload and check it looks nicer :-D
- Repeat for: staff auth search, OPAC using ccsr, OPAC using prog
- Signoff

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as decribed. No koha-qa errors
Nice view on staff and both opac

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 910dff28254b8a93ed03884b0e768fd7c013f449)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10691: (follow-up) replace HTML comments with TT contents
Galen Charlton [Thu, 16 Jan 2014 22:44:25 +0000 (22:44 +0000)]
Bug 10691: (follow-up) replace HTML comments with TT contents

Comments on the usage of Template Toolkit blocks don't need
to appear in the rendered HTML, so this patch converts HTML
comments to TT comments and thereby saves a tiny amount of
bandwidth.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ab2a422af61a3c6df80091a311b64e8448417b13)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10691: (follow-up) restore behaviour for control field ($w)
Tomas Cohen Arazi [Wed, 11 Dec 2013 14:14:47 +0000 (11:14 -0300)]
Bug 10691: (follow-up) restore behaviour for control field ($w)

As noted by Jared, in the presence of 4XX$w or 5XX$w the display
got broken by this refactoring. This patch restores the previous
behaviour in that front.

The OPAC themes get fixed too, and the Bootstrap one gets this
fix too.

Applied the fix that Galen proposed on comment #30 regarding
Zeno's fix in bug 11174.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 06ef9f11098405cd688f43af39d828a4eb674582)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10691: use authority ID in see-also links in authority search results (OPAC)
Tomas Cohen Arazi [Wed, 18 Sep 2013 14:33:07 +0000 (11:33 -0300)]
Bug 10691: use authority ID in see-also links in authority search results (OPAC)

This patch changes the URL and data used to show the 'see also' links
on the OPAC's authority search results page.

Bonus points: makes some strings translatable.

To test:
- On your dev setup (master) create some authority records (I created
  personal name authorities).
- Pick one of them and link 400$a to another one, do the same with 500$a
- Add some other 400$a and 500$a without linking (i.e. plain text)
- Make sure zebra is running and changes got indexed.
- In the OPAC search for the authority that is linked to the others.
- Check the 'see also:' link points to an authority search
- Apply the patch
- Reload/re-do the search
- Check the 'see also:' link points to the authority id in the case
  of linked authorities, and to an authority search in the case of
  plain text headings.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ae7431608cfa2f9aa2674079d17f3b96fa12c8c7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 10691: use authority ID in see-also links in authority search results (staff)
Tomas Cohen Arazi [Wed, 18 Sep 2013 15:18:20 +0000 (12:18 -0300)]
Bug 10691: use authority ID in see-also links in authority search results (staff)

This patch changes the URL and data used to show the 'see also' links
on the Staff's authority search results page.

Bonus points: makes some strings translatable.

To test:
- On your dev setup (master) create some authority records (I created
  personal name authorities).
- Pick one of them and link 400$a to another one, do the same with 500$a
- Add some other 400$a and 500$a entries with plain text (i.e. no
  linking)
- Make sure zebra is running and changes got indexed.
- In the staff interface search for the authority that is linked to the
  others.
- Check the 'see also:' link points to an authority search
- Apply the patch
- Reload/re-do the search
- Check the 'see also:' link points to the authority id for linked
  authorities,
  and to an authority search result in the case of plain text entries.
- Check that the authority search from the cataloguing interface still
  works as usual.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c62557a4fa239487e128754e79cd3a9427d4f964)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11554: Capitalization fix in patron account on fines tab
Holger Meißner [Wed, 15 Jan 2014 09:16:08 +0000 (10:16 +0100)]
Bug 11554: Capitalization fix in patron account on fines tab

Works as described.

To test: Create patron account with outstanding fines. Open "Fines" tab.
Confirm that capitalization is correct.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
String patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 41a77e659b58160a95bfd93700829cfd4d753886)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11846: DBRev 3.14.05.001
Galen Charlton [Mon, 14 Apr 2014 15:22:28 +0000 (15:22 +0000)]
Bug 11846: DBRev 3.14.05.001

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11846: Correct database update for restrictions with date 9999-12-31
Fridolin Somers [Mon, 24 Feb 2014 11:15:55 +0000 (12:15 +0100)]
Bug 11846: Correct database update for restrictions with date 9999-12-31

The borrowers with indefinite restrictions have borrowers.debarred with '9999-12-31'.

Database update for this bug contained :
  INSERT INTO borrower_debarments ( borrowernumber, expiration, comment )
  SELECT borrowernumber, debarred, debarredcomment FROM borrowers WHERE debarred IS NOT NULL

For borrowers where borrowers.debarred is '9999-12-31', this value
is copied into borrower_debarments.expiration.

This is not correct because borrower_debarments.expiration must be
NULL for indefinite restrictions.

This patch corrects update 3.13.00.035 and also adds an update for
databases already updated.

Test plan :
- Use a database with version 3.13.00.000
- Set a borrower as restricted for ever (leave until empty)
- Use sources to master + patch
- Perform updatedatabase
- Look at borrower details, tab "Restrictions"
=> Without patch, you see Expiration 31/12/9999
=> With patch, you see Expiration Infinite

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I tested both DB revisions by resetting Version of my database (and
adding a SetVersion after the revised older dbrev). This was possible
since the debarred field still exists in borrowers. (I have my doubts
about that, but that goes outside the scope of this report.)

Also note that routine _UpdateBorrowerDebarmentFlags puts back 9999-12-31
into borrowers for indefinite restrictions (which looks not very consistent).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f6131d8e6094ae9e221a9d5750d744ed1f91dd85)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11403: (follow-up) Fix typo in renew help
Nicole C. Engard [Wed, 12 Mar 2014 20:29:48 +0000 (14:29 -0600)]
Bug 11403: (follow-up) Fix typo in renew help

This patch adds a missing letter to the Renew help file

To test:

Go to Circulation > Renew
Click Help
Confirm that the text now reads 'scan' instead of 'can'

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 353418dee043ccd332ef3f24d1f1bd330a6d2dd1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoIncrement version for 3.14.5 release v3.14.05
Fridolin Somers [Wed, 26 Mar 2014 10:37:15 +0000 (11:37 +0100)]
Increment version for 3.14.5 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoMerge remote-tracking branch 'translator/3.14.05-translate' into 3.14.x
Fridolin Somers [Wed, 26 Mar 2014 10:32:43 +0000 (11:32 +0100)]
Merge remote-tracking branch 'translator/3.14.05-translate' into 3.14.x

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoUpdate release notes for 3.14.5 release
Fridolin Somers [Wed, 26 Mar 2014 10:31:35 +0000 (11:31 +0100)]
Update release notes for 3.14.5 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoTranlation updates for 3.14.05 release
Bernardo Gonzalez Kriegel [Tue, 25 Mar 2014 12:35:56 +0000 (09:35 -0300)]
Tranlation updates for 3.14.05 release

Two new languages: Belarusian and Faroese

10 years agoBug 11329: Check for MARC record existence in catalogue/showmarc
Marcel de Rooy [Mon, 2 Dec 2013 08:41:53 +0000 (09:41 +0100)]
Bug 11329: Check for MARC record existence in catalogue/showmarc

Intranet counterpart patch. Same check as in opac/opac-showmarc.

Test plan:
[1] Run showmarc.pl with valid biblionumber in id parameter.
[2] Remove id parameter from URL. You should get a 404 now.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d92dc91f778f5db3360f3070d0bb5d44a0d75024)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11329: Check for MARC record existence in opac-showmarc
Marcel de Rooy [Mon, 2 Dec 2013 08:30:13 +0000 (09:30 +0100)]
Bug 11329: Check for MARC record existence in opac-showmarc

Instead of just running as_formatted, check if GetMarcBiblio returned
a reference. If you e.g. did not pass an id, return 404 instead of 500.
Consistent with opac-export.pl

Test plan:
[1] Run opac-showmarc.pl with valid biblionumber in id parameter.
[2] Remove id parameter from URL. You should get a 404 now.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 80bcbd798991eaa57bcc7b5ac8906b276fbed5bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11473: (follow-up) ensure link to item is construct correctly
Galen Charlton [Fri, 17 Jan 2014 06:04:37 +0000 (06:04 +0000)]
Bug 11473: (follow-up) ensure link to item is construct correctly

This patch adjusts the check on action_logs.info to better detect
if the event concerns an item.  This fixes a problem where the links
from log entries on item modifications would, if followed, result
in internal server errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 490e38069c0b9fcf71449d7812a0056b68318c64)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11473 - add 'biblio' and 'item' to cataloguing logging info
David Cook [Mon, 6 Jan 2014 04:01:10 +0000 (15:01 +1100)]
Bug 11473 - add 'biblio' and 'item' to cataloguing logging info

This patch adds the words 'biblio' and 'item' to the 'info'
of the cataloguing logs which were missing them (such as biblio
delete, biblio mod, item mod, upload cover image).

This patch also adds 'authority' for authority mod.

_TEST PLAN_

Before applying:
1) Create/view mods for items, biblios, and authorities.
2) Create/view biblio deletion
3) Create/view upload cover image log
4) Note that none of these contain the words 'biblio','item',or
'authority' in their "Info" columns.

Apply patch.

5) Repeat steps 1-3
6) Note that the new logs contain 'biblio','item', and 'authority'
in their "Info" column, while the past ones don't.
7) Note also that 'biblio' and 'item' will have 'Biblio' and 'Item'
appear in their "Object" column for the new logs

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5885077fbbc97add0d077898c06726ef3106eee9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11473 - Improve wording in log viewer template
David Cook [Mon, 6 Jan 2014 03:49:01 +0000 (14:49 +1100)]
Bug 11473 - Improve wording in log viewer template

This patch capitalizes 'member' and 'biblio' as object labels in the
log viewer.

It also adds a "Subscription" label, and changes "auth" to "Authority".

_TEST PLAN_

Before applying patch:

1) View logs for patrons, new biblio, serials, and authorities.

Apply the patch:

1) Notice the capitalization and new/modified labels.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8b386419c07413c810c56482cd4b505cdb5f43f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11473 - Remove boilerplate in log viewer template
David Cook [Mon, 6 Jan 2014 03:43:53 +0000 (14:43 +1100)]
Bug 11473 - Remove boilerplate in log viewer template

This patch eliminates unnecessary conditions and boilerplate.

_TEST PLAN_

Apply the patch.

1) Try viewing logs for circulation, patrons, fines,
cataloguines, serials, authorities, etc.
2) Note that everything should look exactly the same as before,
with one exception: FINES
3) Fines will now show "member X" for the user associated with
the fine.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5b3535899acfdcd309d722dba39a8bdcdbdc54e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11473 - Fix log viewer template conditions
David Cook [Mon, 6 Jan 2014 03:32:31 +0000 (14:32 +1100)]
Bug 11473 - Fix log viewer template conditions

This patch adds the 'loopro' key to the 'module' value, so that
conditions are actually triggered in the template logic.

(Note: loopro.CIRCULATION is valid, but I changed it for the sake
of consistency across the different conditions.)

This patch also adds substr checks to the 'info' column when
using the cataloguing module. This will check for 'item' and 'biblio',
so that the appropriate label qualifer can be shown in the log viewer.
If either term is absent, the unqualified number will be shown instead
(this will be the majority of action logs at this point).

_TEST PLAN_

Before applying:

1) Access log viewer from Tools (or wherever really)
2) Look up logs for circulation, patrons, cataloguing, serial,
authorities, etc.
3) Note that the "Object" will always just be a number without qualification.

After applying the patch:

1) Look at those same logs
2) Note that the object number for borrowers will usually be prefaced
by 'member' (notwithstanding FINES which aren't taken into account in
this template yet); new bibs and new items should say 'Item X' or
'Biblio X'. Serials should have a link. Authorities should have a link
and an 'auth' preface.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ac6fb12c9aff29a652ee10c960ab10309d22adee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11476: remove extra empty option from title pull-down in OPAC self-registration
Owen Leonard [Fri, 10 Jan 2014 16:56:15 +0000 (11:56 -0500)]
Bug 11476: remove extra empty option from title pull-down in OPAC self-registration

If you have patron titles enabled, the OPAC patron details form lists 2
empty spaces instead of 1. An empty option is passed by the script, so
the template does not need to include one.

To test you must have at least one patron title set in BorrowersTitles
system preference and OPACPatronDetails must be set to "allow."

1. Apply the patch
2. Log in to the OPAC
3. Click the "personal details" tab.
4. Click the "salutation" dropdown. There should be only one blank line
   preceding the existing titles.

Test in both prog and bootstrap.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described for existing and creating new accounts.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a8aa6e8f7efd1ea29fdbd99cf3e573e72b424eb5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11018: allow adding order from a reverted MARC batch
Jonathan Druart [Tue, 8 Oct 2013 15:17:45 +0000 (17:17 +0200)]
Bug 11018: allow adding order from a reverted MARC batch

Weird behavior:
When an import is undone into catalog, the status is set to "reverted".
But if you open the add orders from iso2709, the status is automatically
set to "imported" and does not appear in the list.
So it is not possible to import a reverted batch.

[RM note: since a reverted batch is nonetheless a staged batch, and
could be reused, allowing orders to be placed by taking bibs
from a reverted batch is not as odd as it might sound.  It *can* look
odd for a staged or reverted batch to contain records that are
imported, but that's a long-standing oddity.]

Test plan:
- verify you reproduce the weird behavior
- apply this patch
- import a file and the batch into the catalog
- verify (in the your mysql/MariaDB cli) the status is "imported"
- verify it does not appears in the add orders from iso2809 page
- undo the import
- verify (in the your mysql/MariaDB cli) the status is "reverted"
- verify it appears in the add orders from iso2809 page and the status
  is always "reverted"
- finish the order

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4bd730d4c24440c157801b68e248002b10ec0dd3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11352: fix unexpected data loss issues with batch patron deletion/anonymization
Jacek Ablewicz [Mon, 24 Feb 2014 16:37:43 +0000 (17:37 +0100)]
Bug 11352: fix unexpected data loss issues with batch patron deletion/anonymization

Batch patron deletion/anonymization tool has some issues:

1) If 'dateformat' setting in I18N/L10N system preferences is set
to anything other then 'iso' (eg. 'metric'), bulk deletion when using
'expiration date is before' criterion is not working properly. Date
entered in this field will be efectivelly ignored (or possibly
sometimes wrongly interpreted as different date, in other format)
on the final patron deletion stage. This may result in deleting
(or moving to trash) more borrower records then intended.
2) Bulk/batch patron deletion should skip borrowers with
nonzero account balance (ones with oustanding fines or credits)
3) This tool shouldn't offer to choose as deletion criterion
those patron categories which have category_type set to 'S'
(= staff patron categories)

This patch fixes above mentioned problems. It also adds an option
to "test run" patron batch deletion, and makes this option
the default choice in "warning" stage.

Test plan:
- prepare test database with some patron records (at least 2,
the more the better) set up in such a way that they will be vulnerable
to issues 1 & 2
- confirm issues 1,2
- restore test database
- apply patch
- ensure issues 1 & 2 are no longer present - first by using new "test
run" option: for #1, record counts in "warning" stage and "final" stage
should be now the same; for #2, observe that patron records with nonzero
balance are now excluded from deletion
- redo the tests, this time choosing "delete permanently" and "move
to trash" instead of "test run"
- test #3 by changing "Category type" to "S" in some
test patron categories - after that, those categories should no
longer be choosable as deletion criteria.

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Tested with dateformat = dd/mm/yyyy. I tested with two expired patrons,
one with fines and one without. Before the patch a lot of unexpected
patrons were deleted along with the expected ones. After
applying the patch only the expired patron was deleted, not the
one with fines. The test run and the "real" run reported correct numbers.

The patch also makes sure no patron categories with category_type = S
are suggested for batch deletion.

Note: The ergonomics of the "Batch delete/anonymize" tool is hardly
optimal, but this patch fixes a real, data-loosing bug, so let's
deal with the ergonomics later.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 69216d2217519cd6d8ad97710236251abdd89ae9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: (follow-up) update the bootstrap theme
Galen Charlton [Fri, 17 Jan 2014 05:21:07 +0000 (05:21 +0000)]
Bug 9788: (follow-up) update the bootstrap theme

This patch applies the change made in the QA follow-up
to the Bootstrap theme.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a776c7764050290d20ad4e5200aaed11a3983bf7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: (follow-up) Unit tests for changed routine GetReservesFromItemnumber
Marcel de Rooy [Thu, 26 Sep 2013 10:22:51 +0000 (12:22 +0200)]
Bug 9788: (follow-up) Unit tests for changed routine GetReservesFromItemnumber

Adds three tests to Reserves.t for GetReservesFromItemnumber.
We test if this routine does not return a future next available hold,
a future item level hold. And if it does return a future wait (that is:
a confirmed future hold, using ConfirmFutureHolds).

Note that Holds.t does also contains some basic tests for this routine,
but the additional tests seem to better located in the direct context of
tests for bug 9761 for ConfirmFutureHolds.

Test plan:
Run both t/db_dependent/Holds.t and t/db_dependent/Reserves.t.
Verify if both tests do not fail.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d211fa50ede180ed511cdf7f55be6c084abc1ff5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: QA followup
Jonathan Druart [Mon, 4 Nov 2013 10:55:57 +0000 (11:55 +0100)]
Bug 9788: QA followup

1/ CURRENT_DATE() is a MySQLism and should be replaced with CAST(now() AS
DATE).
2/ The date formatting should be done in the template (using the TT
plugin).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 38edd714c598322e81a32a0dfc5f2ce0da46826d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: (follow-up) for expirationdate in Letter.pm
Marcel de Rooy [Fri, 21 Jun 2013 16:43:59 +0000 (18:43 +0200)]
Bug 9788: (follow-up) for expirationdate in Letter.pm

Pasting comment from the Bugzilla report:

Looking bit longer at this code, it is kind of strange to find it
there in the first place. Adding maxpickupdelay in Letters.pm should
not be there, but it is..

Also this date is not used normally in the default HOLD Available for
Pickup notice (that we are generating in this case). And if it would be
undef, the expiration date should imo be empty instead of today+0.
(before adding maxreservespickupdelay, you should test the allowexpire
pref first) So it is an (invisible) bug on its own.

Test plan:
See former patch. Kyle just discovered this bug, apparently by
deleting the maxpickupdelay pref..

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a23d4181b1e756a61a036059b8b909d4f0d30537)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber
Marcel de Rooy [Thu, 26 Sep 2013 08:33:46 +0000 (10:33 +0200)]
Bug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber

Before bug 9788 the alldates parameter of GetReservesFromItemnumber was
actually not used in the codebase.
The first patch of bug 9788 did change that and passed true by default.

But a closer look revealed that we do not really need it.

The parameter is removed by this patch; the SQL statement is slightly
adjusted: if reservedate<=now or a waitingdate is filled for the
requested itemnumber, GetReservesFromItemnumber will return the reserve.

This includes so-called future waits: a future hold that has been confirmed
ahead of time with pref ConfirmFutureHolds > 0 days.

Note that future item-level holds are not really interesting to return; this
just corresponds to original behavior. Future next-available holds are not
in view at all; they do not contain an item number.

Test plan:
Actually, the test plan of the first patch is valid. But for completeness I
repeat it here:

[1] Enable future holds and set ConfirmFutureHolds to 2 days.
[2] Place a future next-available hold for 2 days ahead.
[3] Check item status on catalogue detail. Available? That is fine.
[4] Confirm the future hold by checking it in. ('future wait')
[5] Look at item status again on catalogue detail. Must be Waiting now.
[6] Switch to OPAC and login as another opac user. Goto Place a hold.
[7] Check item status with item level hold info. Is it waiting?
[8] Try to place hold in staff, check item level status again. Waiting?
[9] Make a transfer for the item. Switch branch. Check hold status on
    Transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 92be11bbcf20628dd7db8b83fc0b902ba578a28a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9788: Improvements when calling GetReservesFromItemnumber
Marcel de Rooy [Mon, 11 Mar 2013 13:28:57 +0000 (14:28 +0100)]
Bug 9788: Improvements when calling GetReservesFromItemnumber

This patch makes GetReservesFromItemnumber also returns the waiting
date and removes some repeated code.

Improves item status display on catalogue detail, when placing a hold at
opac-reserve and in staff, and on transfers to receive form.

This patch builds on work from reports 9367 and 9761.

Test plan:

Place a future next-av. hold (enable future holds prefs), say 2 days ahead.
Check item status on catalogue detail. Nothing to see.
Enable ConfirmFutureHolds by inserting a number of days, say 2.
Confirm earlier hold by checking it in. Look at item status again on detail.
Switch to other opac user. Try to place a hold again. Check item status with
item level hold info. Try to place hold in staff, check item level status.
Make a transfer for that item. Switch branch. Look at transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1a9737be768aa1e585addc596e2fcb5a77482c38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7143: add another name to the about page
Galen Charlton [Thu, 16 Jan 2014 15:30:43 +0000 (15:30 +0000)]
Bug 7143: add another name to the about page

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4e4a33ef5deecc32711092d78d87f2eefe3fbcf5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 7143: Updating about page and history
Chris Cormack [Sun, 12 Jan 2014 07:11:40 +0000 (20:11 +1300)]
Bug 7143: Updating about page and history

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ef7480f362a0286b13e1ba1b99e58c6d2ca7ba72)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11522: improve formating of self-registration form
Francesca Moore [Tue, 14 Jan 2014 22:43:00 +0000 (11:43 +1300)]
Bug 11522: improve formating of self-registration form

1. in prog theme, enable opac self-registration and inspect clear date
   with firebug; note that there are empty paragraph tags
2. add date of birth as a requirment in self-registration
3. apply patch
4. refresh page and notice that empty paragraph tags have been deleted,
   so that required lines up with clear date
5. repeat the above steps for bootstrap theme

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 42ec10670efb6e33fa23537c1037ff9087f55e30)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 9210: wrap long lines in printed hold notices
Sophie Meynieux [Tue, 4 Dec 2012 17:05:36 +0000 (18:05 +0100)]
Bug 9210: wrap long lines in printed hold notices

This commit adds wrapping styles to print-notices.tt template

Test plan:
  * place a hold on a title with a very very long title or author
  * mark it as "waiting for pickup" by doing a checkin
  * go to command line interface, and run
  * misc/cronjobs/gather_print_notices.pl /tmp
  * misc/cronjobs/printoverdues.sh /tmp
  * if your title/author is long enough, it's split on 2 lines
    with this patch (it is not before this patch)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 06a8b6f314ded89fa6b4f94276e68e390b7afc3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11502: make library filter in "Holds To Pull" more precise
David Cook [Thu, 9 Jan 2014 06:12:26 +0000 (17:12 +1100)]
Bug 11502: make library filter in "Holds To Pull" more precise

This patch uses regex checking via the DataTables fnFilter API method
to make the branch filter more precise on the "Holds to Pull" page.

The ability to use regex is built into DataTables so this just adds
the actual expression.

_TEST PLAN_

Before applying:

1) Add library (branches) with codes of NM, NMH, and NB
2) Add items (that can be placed on hold) at all these branches
3) Place a hold on an item that is only available at NM
4) Place a hold on an item that is only available at NMH
5) Place a hold on an item that is only available at NM and NB
6) Go to "Holds to Pull" in the Circulation module
7) Filter by these three different values
8) Note that filtering by "NM" will incorrectly bring up all three
holds, while "NMH" and "NB" will only pull up one (like they should).

Apply the patch.

9) Shift+refresh the page so that your Javascript refreshes
10) Repeat step 7 (filtering by the different branch values)
11) Note that filtering by "NM" will now only bring up the hold for "NM"
and the hold for "NM" and "NB", while the others still only bring up
one hold.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e96d73aa9f462fb653b8b67d7d5bff81dab94be7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11505: fix untranslatable table headers in Label batch manager
Owen Leonard [Fri, 10 Jan 2014 20:46:29 +0000 (15:46 -0500)]
Bug 11505: fix untranslatable table headers in Label batch manager

The label batch manager script hard-codes the table header cell labels
in order to pass them to an HTML-building function. This obviously isn't
the best solution for internationalization, but picking the whole scheme
apart would be very complicated.

Instead this patch uses a SWITCH statement to check for each possible
case and outputs the correct translatable string for each.

To test, apply the patch and run "perl translate update" for any
translation. Check the revised po file and confirm that the new strings
are present. View the label batch edit page and confirm that the table
headings look correct: Tools -> Labels -> Manage batches -> Edit batch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests.
Similar fixes are probably needed for other pages of the labels
modules.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e8f5ee9eef7a558ae1af8237493f8dc52e52945a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>