Bug 13151 - staff marc preview not wrapping

The MARC preview available on the staff client detail page doesn't wrap
long lines of text because it uses a huge block of whitespace-formatted
text in a <pre> tag. The OPAC doesn't have this problem because the MARC
preview is formated in a table.

This patch copies the OPAC's "plainMARC.xsl" file for use in the staff
client. The preview modal has been converted to use Bootstrap following
the method used in Bug 12755

To test, apply the patch and clear your browser cache. View the
detail page for a bibliographic record in the staff client. Click the
link to show the MARC preview. Confirm that the modal looks correct,
works correctly, and adapts gracefully to different browser widths.

Confirm that the MARC preview and Card links still work from Z39.50
searches.

Note: This patch assumes that UNIMARC records display correctly using
xslt/plainMARC.xsl. Please let me know if that is wrong.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

I confirm it works: nice modal dialog box; display aligned on opac display;
works also with Unimarc biblios.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13037 - Staff client cart should exclude articles when sorting by title

This patch modifies the configuration of the staff client cart table
sorting to enable title sorting to ignore articles. Other column sorting
configuration settings are revised to use table header classes instead
of indexes.

To test, add multiple titles to the staff client cart, choosing several
titles which begin with articles ("a," "an," or "the" in English). View
the cart and test sorting of all columns. Sorting by title should sort
correctly while ignoring articles. Other columns should sort correctly
too.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12981 - Patron attribute type limit by patron category not working on patron entry form

To reproduce this bug:

- Create a patron attribute type and limit it by patron category
- Create a new patron with that category
- Observe that there is no entry field for the patron attribute type you
  created for that patron category. Inspecting the source should show
  that the entry field has been hidden.

The patron entry form tries to hide patron attribute type input fields
based on the currently selected patron category. It does this based on
the value of $("categorycode"). However, instead of pulling the data
from the categorycode input in the body of the entry form, it pulls it
from the patron search box at the top of the page. The value of that
input is always empty because no category is preselected.

This patch corrects the problem by changing the ID of the categorycode
<select> in the body of the entry form and making corresponding changes
to the JavaScript which depends on it.

To test, apply the patch and load the patron entry form for a patron
category to which a patron attribute type has been limited. That patron
attribute entry field should appear correctly.

Choose a different patron category from the "Category" dropdown. Confirm
that the patron attribute entry field has been hidden.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12909 - item withdrawn is missing in inventory results

In inventory results, CSV or screen, the item withdrawn information is missing.
This information can be usefull to understand why an item was not scanned.

Test plan :
- Check you have in default framework an item subfield mapped with items.withdrawn
- Create a biblio with default framework
- Create an item with barcode='000AAA1', callnumber='ZZZAAA1' and withdrawn=0
- Create an item with barcode='000AAA2', callnumber='ZZZAAA2' and withdrawn=1
- Go to inventory tool : /cgi-bin/koha/tools/inventory.pl
- Enter item callnumber between 'ZZZ' and 'ZZZZ'
- Submit
=> You see a column 'Withdrawn' with withdrawn value
- Go to inventory tool : /cgi-bin/koha/tools/inventory.pl
- Enter item callnumber between 'ZZZ' and 'ZZZZ'
- Check 'Export to CSV file'
- Submit
- Open exported file
=> You see a column 'Withdrawn' with withdrawn value

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13050: Follow-up for bug 12371

This patch simplifies the SQL query in Letters.pm for table
borrower_modifications.
It also addresses the only case this query is used in opac-memberentry.
An unused variable in Letters.pm is removed.

Test plan:
Enable selfregistration on opac.
Set verification by email to required in prefs too.
Self-register two new users.
Check the email notices generated.
Verify the new users with the tokens in their notice.

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

Much cleaner SQL

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Cleaner and works as described, no regressions found.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>