Bug 12111: Improving templates regarding order notes

This bug changes some lines in modordernotes.tt to make them more easily
translatable, especially in german (remark by K. Fisher on bug 9416).
No change should be visible

It also suppresses the ability to edit order "vendor note" in reception,
as the note for vendor is not made to be changed after the document is
received.

Test plan :
- in a basket, try to edit the notes (internal and vendor) of order.
  Check the display is correct
- go in reception module (parcel.pl page) : in the list of all orders
  to receive, you should have a link to change "internal note", but no
  more link to change "vendor note"
- try to receive a specific order which have a "vendor note". On the
  right panel of the page, you must have an editable textarea for
  internal note, and a non-editable (colored in grey) textarea for
  vendor note

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12111: (follow-up) fix breadcrumbs wording for vendor note

As asked by QAer,
this followup fixes wording in modordernotes.tt for vendor note
(Change order vendor note vendor note => Change order vendor note)
It also uses [%- and -%] to make code more readable

Test plan :
try to edit a vendor note, check the wording is correct in breadcrumbs

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, should be nicely translatable now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12111: (follow-up) ensure that vendor note is not editable during order receiving

This patch removes the ability of finishreceive.pl to change the vendor
note of an order.  It also uses a normal span rather than a disabled
textarea to display the vendor note on the receiving page, to emphasize
that it cannot be changed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11986: fix searching by tags in OPAC when DOM mode is in use

This patch fixes the following issue: in installations that are using
zebra DOM indexing for bibliographic records, tag searching in OPAC
doesn't work properly (clicking on any tag in OPAC leads to "404 error").

To test: ensure that with patch applied:
1) problems with tag searching get resolved for [some] test
configuration with biblio DOM indexing enabled,
2) there are no apparent tag-searching-related regressions in OPAC,
in some yet another test installation configured with legacy
(grs1) indexing mode for biblios.

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>
Bug 12115: follow-up fix for tools/inventory's output_pref issues

This should correct issues with the output_prefs in the
compareinv2bar logic section of tools/inventory.pl
It is a follow up to bug 11253.

TEST PLAN
---------
NOTE: There should be no distinguishable difference before and
      after the patch. This corrects a works by accident bug.

Back up DB.
Create a small barcode file from books in a given branch.

Set I18N/L10N system preference of dateformat to mm/dd/yyyy.
Go to inventory/stocktaking tool.
Browse for the barcode file.
Click submit just below the 'Use a barcode file' section.
All looks fine in mm/dd/yyyy format.

Set I18N/L10N system preference of dateformat to yyyy-mm-dd.
Go to inventory/stocktaking tool.
Browse for the barcode file.
Click submit just below the 'Use a barcode file' section.
All looks fine in yyyy-mm-dd format.

Set I18N/L10N system preference of dateformat to dd/mm/yyyy.
Go to inventory/stocktaking tool.
Browse for the barcode file.
Click submit just below the 'Use a barcode file' section.
All looks fine in dd/mm/yyyy format.

Apply patch
Restore DB (so results should be comparable to the first result)
Repeat the three testing blocks above.
There should be no visible difference.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>
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>
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>
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>
Bug 11856: Add publication year and edition to English acq PDF templates

To test:
- Switch OrderPdfFormat to pdfformat::layout3pages
- Create one or more  baskets with a few orders, make sure you
  are adding some records that contain a publication year and/or
  edition statement
- Close the basket
- Create a basket group
- Print the PDF and check that edition and publication year
  show up and bibliographic information is printed correctly
- Switch OrderPdfFormat to pdfformat::layout2pages
- Repeat PDF print

This patch also changes the formatting a bit and differentiates between
UNIMARC and MARC21. For MARC21 no additional punctuation is needed as
those are cataloged with the information. Only spaces are added for MARC21,
while UNIMARC is kept they way it was before.

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>
Bug 11856: Add publication year and edition to German acq PDF template

Follow up to the patch for the English templates - repeat tests
with OrderPDFFormat set to pdfformat::layout2pagesde.

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>
Bug 11856: Add publication year and edition to French acq PDF template

Follow up to the patch for the English templates - repeat tests
with OrderPDFFormat set to pdfformat::layout3pagesfr.

Additional change:
Translates 'published by' to 'publie par'

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>
Bug 11724: Make Funds/Status on suggestions page sortable/searchable

The fund and status columns on the suggestions page are not sortable or
searchable. This patch makes them so.

This patch also amends the DataTables configuration to use class-based
targeting for sorting types as was decided on the koha-devel list. The
table markup has been modified accordingly.

To test you must have existing suggestions. Apply the patch and go to
Acquisitions -> Suggestions. View the table of existing suggestions and
confirm that the funds and status columns are sortable and searchable.

Confirm that the title column correctly ignores articles when sorting.

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

Works as described.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12127: fix incorrect DataTable types in Holds to Pull list

This patch explicitly sets the sType in the Holds to Pull list table
for the libraries, itypes, and locations columns. It appears that the
type is automatically being set to "html" when it should be set to
"string".

It needs to have a sType of "string", since DataTables will strip out
the <br> tags when using "html", and we need them for the regexp
we use to create a more precise filter search.

_TEST PLAN_

Before applying:

1) Place a "next available" hold on a record with an item available
from one library/branch (e.g. "Branch A")
2) Place a "next available" hold on a record with an item available
from two different libraries/branches
3) Place a "next available" hold on a record with an item available
from three different libraries/branches - one of which is the same
as the library/branch from Step 1.
4) Go to the Holds to Pull List
5) Filter the branches by "Branch A".
6) You should only see the hold from Step 1 - not Step 3.
7) Try filtering on a branch for a hold that has multiple
libraries/branches. (They shouldn't appear when filtering, except
when using the "None" filter).

Apply the patch.

After applying:
1) Repeat Steps 4-7 from above. When filtering on "Branch A", you
should be able to see all holds that are available at "Branch A",
even if they are available at other branches (i.e. the holds has
multiple libraries listed).

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>
Bug 7125: make MARC framework tag form not suggest that one can change the form

When you edit an existing tag in a MARC framework the form makes it
appear as if you can change the tag number when in fact you cannot. This
patch changes the template so that the tag number does not appear as an
editable form field during the edit process.

To test, apply the patch and open an existing MARC framework in
Adminstration -> MARC bibliographic framework.

- Choose an existing tag from the list and click 'Edit.'
- The line labeled "Tag" should display the tag as text.
- Making a change to any of the tag's details should work correctly.
- Return to the list of the MARC framework's tags.
- Click 'New tag.'
- The line labeled "Tag" should display a blank form field.
- Create a new tag and confirm that it saves correctly.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as describes, on edit and new.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Work as described, template change only.
Checked editing and adding tags.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11351 - Add support for SIP2 media types

Koha's SIP2 server implementation does not currently support the SIP2
protocol field "media type" ( CK ).

This patch implements the SIP2 media type by allowing an arbitrary
mapping of itemtypes to SIP2 media types.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Edit an itemtype, select a SIP media type, and save the changes
4) Make a SIP2 Item Information Request
5) Verify that the CK field of the Item Information Response contains
   the correct media type code.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 11351 - Add support for SIP2 media types - French file

This patch adds the SIP_MEDIA_TYPE AV for the fr-FR file.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Bug 11351: (follow-up) fix typos in seed SIP2 media types

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11351: DBrev 3.15.00.037

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11351: (follow-up) update DBIC schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>