Commit graph

8672 commits

Author SHA1 Message Date
814c463c24 Bug 10982: fix link to IFLA UNIMARC documentation in Cataloging
In Cataloging, a ? opens a documentation page on IFLA web site. The current
implementation rely on the tag tab to select the appropriate IFLA
documentation web page. It doesn't work when UNIMARC tag are displayed
in a tab which digit is different for tag first digit.

To reproduce the bug:

  - Modify default framework, put all 200 subfields in tab 1
  - Add a new biblio record
  - Click on ? on 200 field
   => Wrong IFLA page is opened

Apply the patch and retry...

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Simple fix. Work as described. No koha-qa errors

Test on UNIMARC install
1) Switched all 2xx tags to tab 1
2) press any 2xx ?, wrong page
3) patch applied
4) links are now correct

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 05:23:51 +00:00
Jonet Moore
ef6185d31f Bug 11099: fixed bug in Label in Staff Client - series on facets not easily css selectable
add c-span to series facet

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 05:21:22 +00:00
Galen Charlton
e52bd72c65 Bug 11002: (follow-up) use jQuery validator plugin
This patch uses the jQuery validator plugin introduced in
bug 6209 for two reasons:

[1] To supply validation for non-HTML5-compatible web
    browsers.
[2] To force use of the validator plugin rather than
    built-in validation for HTML5 browsers, which means
    that our translations will be used.

Note that a version of the function to prevent double form submission
is used as the submit handler invoked when the validator plugin
is satisified that the form is complete.

To test:

[1] Same as the main test plan, but note that the validation
    messages now appear inline rather than as pop-ups.
[2] Verify that the double form submission prevention still
    works.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 05:19:08 +00:00
Jonathan Druart
c900a47aa8 Bug 11002: simplify patron mandatory field validation
When the pref BorrowerMandatoryField is set and a librarian forget to
fill fields, a js popup appears with the following message:
  "The following fields are mandatory: surname, etc."
The fields are not translatable.

Test plan:
- fill the pref BorrowerMandatoryField with something like:
  title|zipcode|surname|cardnumber|branchcode
- go the members/memberentry.pl?op=add page
- verify you are not allowed to add the patron without filling all
  mandatory fields.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 05:18:42 +00:00
Jonathan Druart
f66f34a420 Bug 11003: fix JS error on the staff cart page
A call to yuiToolbar breaks JavaScript code on the cart page.

Test plan:
- add some biblio to your cart
- open the cart
- a js error occurs (see it with firebug):
  ReferenceError: yuiToolbar is not defined
- apply the patch
- retry and verify the error does not appear anymore.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 01:47:02 +00:00
Bernardo Gonzalez Kriegel
481eb9b284 Bug 11070: followup to correct tabs
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 00:40:49 +00:00
Fridolyn SOMERS
9039c8bb74 Bug 11070: fix typo in UNIMARC 115a plugin
In UNIMARC 115a cataloging plugin, there is a typo : "NTSC", not "NSTC" :
http://fr.wikipedia.org/wiki/Ntsc

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Simple string change.
koha-qa complains about tab errors, fixed in followup

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 00:40:31 +00:00
Andrew Lockett
cc3469eff7 Bug 11098: fixed bug in label in opac - topics on facets not easily css selectable
Search opac, then right-click "Topics" and select "inspect element"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Please add a description of the problem and a test plan to your commit
message next time, thanks!

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as expected. Thx!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 00:31:26 +00:00
Gab Hikaka
acdf8df370 Bug 11102: fixed bug in Label in Staff Client - places on facets not easily css selectable
Label in staff client on places facets not easily css selectable

To test:

with data that contains places, right click places heading in facets,
ensure it is wrapped in a span.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 00:30:37 +00:00
Katherine Chisholm
a6f4ff9bb4 Bug 11106: make label for Item types facet easily CSS selectable
Allows the Item types facet to be CSS or JQuery selectable

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 00:29:24 +00:00
Sue Tunnicliff
120fdaa4be Bug 11107: make label for authors facet easily CSS selectable
Label in staff client - authors on facets not easily accessible

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 00:29:08 +00:00
raewyn adams
f175556838 Bug 11100: make label for Topics facet easily CSS selectable
Search in intranet, verify that Topics in the facets is wrapped in a span

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Adds an id, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-22 00:27:13 +00:00
Jared Camins-Esakov
88b46f3422 Bug 10401: Add ability to merge invoices
Given how easy it is to accidentally receive items from one invoice on
multiple invoices, the ability to merge invoices can be quite handy.
This patch adds that ability to Koha's Acquisitions module.

To test:
1) Apply patch.
2) Run unit test:
    > prove t/db_dependent/Acquisition/Invoices.t
3) Create two invoices from the same vendor for merging, and receive at
   least one order on each.
4) Do a search on the Invoices page that brings up both the invoices you
   created.
5) Check the boxes next to the two invoices.
6) Click "Merge selected invoices."
7) Choose which invoice you want to keep (the default will be the first).
8) Click "Merge."
9) Confirm that the resulting invoice has all the orders you received
   listed on it.
10) Sign off.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Merged several invoices sucessfully - with and without received
orders, open and closed. Works nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-21 19:08:03 +00:00
Jonathan Druart
481c062fe9 Bug 10724: Pending orders: add basket group name in filters
This patch adds a new filter "basket group name" for pending orders
searches.

Test plan:
Try different filters and check that results are consistent.
Try to filter by basket group name.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Applied on top of patches for bug 10723.
Passes all tests and QA script.

Note: It's a bit irritating that the basket name is not shown
in the list of pending orders, so there is no way to check the
results are correct without checking from another page.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-21 18:54:03 +00:00
9d7d3085ec Bug 11060: (Bootstrap theme) fix incorrect rendering for right to left languages
The right-to-left CSS copied over from the prog theme does is not
relevant to the redesigned templates. This patch updates the OPAC's
right-to-left CSS and adds a couple of other right-to-left CSS files to
override the default Bootstrap and jQueryUI CSS.

To my eye this looks correct, but I don't speak Arabic.

To test you must have a set of right-to-left templates, like
ar-Arab, installed for the Bootstrap theme. At this time it is necessary
to download the po file to your misc/translator/po directory. Again
using ar-Arab as an example:

http://translate.koha-community.org/ar/314/ar-Arab-opac-bootstrap.po

Install the translation.

Open the OPAC, switch to that right-to-left language, and reload to
refresh the changed CSS. Confirm that it looks like right-to-left is
working.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

As far as I can tell it looks very well.
No koha-qa errors

1) Downloaded arabic bootstrap PO
2) Installed ar-Arab language, enabled on OPAC
3) Tested as anonymous user and logged in one, all pages look
well: cart, advanced search, user tabs.

I sent an email to Karam Qubsi asking his opinion.
But for me it's ok

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

I was testing this at the same time as Bernardo, so I will Pass QA on
it, instead of signing it off

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-21 18:08:08 +00:00
Galen Charlton
58d469ed4d bug 10016: munge history in SCO to discourage resubmitting user login
This patch uses history.replaceState (introduced in HTML5) to manipulate
the browser history to encourage returning to the SCO patron barcode
form if the back button is used.

Note that a side effect of this patch is that if the user uses
the help link, they will be prompted to enter their barcode
again.  It may be better to put the help inline with the rest
of the SCO forms.

To test:

[1] Start a web-based self-check session.
[2] Enter a patron barcode.
[3] Allow the self-check session to time out.
[4] Use the back button.  You should get the patron barcode
    entry form; you should not be prompted to resubmit form input.
[5] Enter a patron barcode, perform some transactions, then
    use the finish button.
[6] Next, use the back button.  You should get the patron barcode
    entry form.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-21 18:05:28 +00:00
D Ruth Bavousett
432f5ad400 Bug 8070: improve MARC preview display for RTL languages
The Right Answer, according to the cataloger I spoke to,
is to make it LTR when doing "raw" MARC display.

To test:

1) Install this patch, then run misc/translator/translate install ar-Arab
2) search for a bib in the staff client.
3) Switch to Arabic, and click the link to the left of "MARC Preview"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

At first glace I was unsure about hard-coding this style in the
template. Further testing indicated that this is required as the
showmarc template doesn't inherit any of the CSS from the containing
page.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-21 16:04:53 +00:00
Galen Charlton
745bcfe0a6 Bug 8368: (follow-up) port change to the Bootstrap OPAC; restore ISBN display
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-18 06:47:39 +00:00
bbcc715c94 Bug 8368: fix email lists from OPAC when using non-English templates
This patch ports to list sending by email, the technique used in sending
cart, i.e. (1) format email in HTML, and (2) transform it into Text with
TT filter html2text.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes a very annoying translation bug successfully.
Also passes all tests and QA script.

To test:
- Add a few records to a shelf, ideally use some with diacritics.
- Send shelf from English templates, verify email is ok
- Send shelf from translated templates (de-DE or similar) - verify
  email content is broken.
- Apply patches, update po files and reinstall the language.
- Send shelf from English templates again, verify there is no
  regression.
- Send shelf form translates templates - verify this email is now
  also working correctly.

Patch also changes the name of the file attachement from shelf.iso2709
to list.iso2709.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-18 06:26:13 +00:00
5fe524cf3a Bug 10850 - give quick spine label template page its own ID
Out of three conditional cases for display of the <body> tag one lacked
a unique ID. This patch copies the unique ID from the other cases to the
one lacking.

This patch also corrects the case of an "onload" attribute which should
follow XHTML style rules.

To test, the patch for Bug 9618 must be applied. Set the
SpineLabelAutoPrint system preference to "[don't] automatically pop up a
print dialog." Submit a barcode on the quick spine label creator and
view source. The <body> tag should have an ID attribute.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-18 04:51:14 +00:00
Jonathan Druart
b04118df82 Bug 10038: fix doubled 'default' entry when creating a new authority type
Test plan:
- Create a new authority type
- Click MARC structure
- Verify the pull down has only 1 entry for Default
- Go on the authority type home (admin/authtypes.pl)
- Click on the "MARC structure" link for the default type
- Verify the pull down has only 1 entry for Default

This patch adds a sort (on the authtypecode) for these 2 lists.

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

When creating a new framework it would be better to have Default
on top, but one is way better than two :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Agreed, one is better than two :)
All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-18 04:43:28 +00:00
Katrin Fischer
b1e4db6be9 Bug 10935: (follow-up) adding a line break to fix first list item
Without the line break after the include the first entry
of our list of orders was behind the header row in the first row
of the spreadsheet.

Adding the line break seems to fix that and translated CSV can
be exported correctly now.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-17 17:03:41 +00:00
Jonathan Druart
6bf848303f Bug 10935: fix breakage of CSV acq exports when using a non-English translation
To reproduce:
- cd misc/translator
- ./translate update LANG
- ./translate install LANG
- go to the Koha mainpage and change the language.
- go to acqui/basketgroup.pl?booksellerid=XX and try to export a
  basketgroup.
The headers is followed by the first basketgroup information. There is
no carriage return.

It looks like it is caused by a routine used by the translator script
(TmplTokenizer::string_canon).

To test this patch:
- apply it
- cd misc/translator
- ./translate -f update LANG
- translate headers in your po file
- ./translate -f install LANG
- go to acqui/basketgroup.pl?booksellerid=XX and try to export a
  basketgroup.
- verify that the csv looks good now.
- same thing for basket.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good idea and seems to work - just fixing a small glitch
with the first entry of the list in a follow-up.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-17 17:02:28 +00:00
Jonathan Druart
fa3903fe3d Bug 10884: circulation table: fix odd behavior on checkboxes
Test plan:
Play with renew, check in and export checkboxes.
The expected behavior is: the renew and check in cb should work as radio
button, without affecting the export cb.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template changes only.
Amended test plan:
* Create a CSV profile under Tools > CSV profiles
* Add CSV profile to system preference ExportWithCsvProfile

1) Check export checkbox
2) Check check in for same item
3) Switch to Renew

The export checkbox should not get unchecked when switching
between renew and check in.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-17 16:41:56 +00:00
Galen Charlton
b16cc61e8b Bug 10309: (follow-up) apply another follow-up for 10856, improve shelf browser
This patch adapts a patch by Julian Maurice to prevent the main
cover image from getting duplicated if the shelf browser
is used.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:23:44 +00:00
266305d488 Bug 10309: (follow-up) Markup fix from Bug 10566 follow-up
This patch corrects a markup error which was fixed recently in the prog
template.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Simple fix. No errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:14:15 +00:00
0956a28df3 Bug 10309: (follow-up) Add changes from Bug 8712, "and" labels in advanced search
This patch adds the changes from Bug 8712 to the new theme. Some HTML
markup errors have also been corrected. From Bug 8712:

"The "and" label not only improves the accessibility but also gives the
user an idea that the operation between multiple search fields is a
boolean "AND" by default."

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

"and" looks well on advanced search. No errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:14:02 +00:00
b0793ec34c Bug 10309: (follow-up) Update for Bug 10856, improve shelf browser
This patch updates this theme with the changes made in Bug 10856.
Because of the way JavaScript is loaded in the new theme, the JS in the
shelfbrowser include had to be moved to the opac-detail template.

Test plan from that bug:
- On a detail biblio page, click on a "Browse shelf" link.
- Play with the next and previous links.
- Deactivate Javascript (using NoScript for example) and check that you
  get the same behavior (but the page is reloaded).
- Launch the unit tests: prove t/db_dependent/ShelfBrowser.t

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No errors

Disabled JavaScript on Firefox (about:config, javascript.enable -> false)
Browse shelf works by reloading.
Unit test report success.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:13:47 +00:00
65e58f30b1 Bug 10309: (Follow-up) Applying changes from Bug 10349
This patch applies the changes from Bug 10349, Don't show empty
Descriptions/Title notes tabs in OPAC and staff.

"The descriptions/title notes tab appears on the detail page in both
staff client and OPAC even if there are no notes. This is probably a
relic of the pre-T:T days when it wasn't possible to use || in an IF.
This patch adds a check for the various variables which might trigger
the display of the tab.

To test, apply the patch and view records in the OPAC and staff client
which do and do not have title notes attached (whether that be in the
MARC record or in the biblio.notes column). In the OPAC Syndetics
content should also be tested if possible. The descriptions/title notes
tab should only appear if there is content."

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No errors

Tested on OPAC, records without notes don't show title notes tab.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:13:30 +00:00
850628743b Bug 10309: (follow-up) Updates for Bug 6594, Schema.org structured data
This patch adds the changes from Bug 6594:

"To support schema.org processors, such as Google, Bing, and Yandex,
structure our data so that it has machine-readable attributes. This pass
declares the CreativeWork sub-types as well as Product for the main
bibliographic record details, and uses the Offer type for holdings
information per the W3C Schema Bib Extend community group discussions."

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Tested against linter.structured-data.org, microdata present
No errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:13:14 +00:00
eb92d94be1 Bug 10309 - New OPAC theme based on Bootstrap
The goal of this theme is to provide a fully-responsive OPAC which
offers a high level of functionality across multiple devices with varied
viewport sizes. Its style is based on the CCSR theme, with elements of
the Bootstrap framework providing default styling of buttons, menus,
modals, etc.

The Bootstrap grid is used everywhere, but Bootstrap's default
responsive breakpoints have been expanded to allow for better
flexibility for our needs.

All non-translation-depended files are in the root directory of this new
theme:

css, images, itemtypeimg, js, less, and lib. Languages.pm has been
modified to ignore the new directories when parsing the theme language
directories.

This theme introduces the use of LESS (http://lesscss.org/) to build
CSS. Three LESS files can be found in the "less" directory: mixins.less,
opac.less, and responsive.less. These three files are compiled into one
CSS file for production: opac.css. "Base" theme styles are found in
opac.less. A few "mixins" (http://lesscss.org/#-mixins) are found in
mixins.less. Any CSS which is conditional on specific media queries is
found in responsive.less.

At the template level some general sturctural changes have been made.
For the most part JavaScript is now at the end of each template as is
recommended for performance reasons. JavaScript formerly in
doc-head-close.inc is now in opac-bottom.inc.

In order to be able to maintain this structure and accommodate
page-specific scripts at the same time the use of BLOCK and PROCESS are
added. By default opac-bottom.inc will PROCESS a "jsinclude" block:

[% PROCESS jsinclude %]

Each page template in the theme must contain this block, even if it is
empty:

[% BLOCK jsinclude %][% END %]

Pages which require that page-specific JavaScript be inserted can add it
to the jsinclude block and it will appear correctly at the bottom of the
rendered page.

The same is true for page-specific CSS. Each page contains a cssinclude
block:

[% BLOCK cssinclude %][% END %]

...which is processed in doc-head-close.inc:

[% PROCESS cssinclude %]

Using these methods helps us maintain a strict separation of CSS links
and blocks (at the top of each page) and JavaScript (at the bottom). A
few exceptions are made for some JavaScript which must be processed
sooner: respond.js (https://github.com/scottjehl/Respond, conditionally
applied to Internet Explorer versions < 9 to allow for layout
responsiveness), the _() function required for JS translatability, and
Modernizr (http://modernizr.com/, a script which detects browser
features and allows us to conditionally load JavaScript based on
available features--or lack thereof).

Another new JavaScript dependency in this theme is enquire.js
(http://wicky.nillia.ms/enquire.js/), which lets us trigger JavaScript
events based on viewport size.

I have made an effort to re-indent the templates in a sane way,
eliminating trailing spaces and tabs. However, I have not wrapped lines
at a specific line length. In order to improve template legibility I
have also tried to insert comments indicating the origin of closing tags
like <div> or template directives like [% END %]:

</div> <!-- / .container-fluid -->

[% END # / IF ( OpacBrowseResults && busc ) %]

TESTING

Proper testing of this theme is no easy task: Every template has been
touched. Each page should work reasonable well at a variety of screen
dimensions. Pages should be tested under many conditions which are
controlled by toggling OPAC system preferences on and off. A variety of
devices, platforms, and browsers should be tested.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:13:05 +00:00
Galen Charlton
96974dc289 Bug 10096: (follow-up) fix typo introduced in previous followup
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 22:44:23 +00:00
Galen Charlton
9dae1a8796 Bug 10565: (follow-up) improve navigation aids
- add links to Tools home page in breadcrumbs
- add patron lists to the tools sidebar

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 22:43:03 +00:00
Galen Charlton
a10773dc77 Bug 10565: (follow-up) add new user permission for patron list management
This patch adds a new user permission for patron list management,
tools => manage_patron_lists.

This closes a security issue with the original patch series where
patron lists and their contents could be retrieved and modified
without requiring authentication of any sort.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 22:43:03 +00:00
Galen Charlton
353e000e2a Bug 10565: (follow-up) make add list/edit list labels sensitive to context
This patch fixes a problem where the form for editing an existing list
would be labeled as if a new list were being created.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 22:43:02 +00:00
Galen Charlton
32e662f0c7 Bug 10565: (follow-up) use datatables.inc
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 22:43:02 +00:00
3b70e7e62c Bug 10565: Add a "Patron List" feature for storing and manipulating collections of patrons
The patron lists feature is somewhat similar to the record lists feature
in that it allows a librarian to create a list of patrons for later
retrieval and manipluation. These lists can then be used with the batch
patron modification tool.

Test Plan:
 0) Apply the patch for Bug 8798
 1) Apply this patch
 2) Run updatedatabase.pl
 3) Access the patron lists feature from Koha's Tools menu.
 4) Create a new list via the "New patron list" button.
 5) For this list, click the "Edit" button, and change the list name.
 6) For this list, click the "Add patrons" button, and search for and
    add some patrons to your list.
 7) For this list select some patrons to remove them.
 8) Try both adding some new patrons, and removing some old patrons
    as a single action.
 9) Click the "Patrons" link on the Koha toolbar
10) Search the patrons, or browse by letter to get patron results
11) Check the checkboxes next to one or more patrons, and add the
    selected patrons to your existing list.
12) Change the "Selected patrons" pulldown to "All resultant patrons"
    and add them to your list.
13) Check the checkboxes next to one or more patrons, and add the
    selected patrons to a new list.
14) Try manipulating a list of patrons using the batch patron
    modification tool.
15) Go back to the Patron Lists feature and delete your lists.
16) Run 'prove t/db_dependent/PatronLists.t'

Signed-off-by: Nora Blake <nblake@masslibsystem.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 21:29:44 +00:00
09b8ce2a5f Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable patronimages
4) Verify patron images are still displaying correctly
5) Test deleting a patron image
6) Test adding a patron image from moremember.pl
7) Test adding a patron image from tools/picture-upload.pl

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 21:08:02 +00:00
ffd625b88f Bug 10820: display item status as lost if item is both lost and on loan
In the OPAC, if an items is both lost and checked out, it will show as
lost on the search results, and checkout out in the record details. The
lost status should take precedence over the checked out status, as the
checked out status may lead a patron to believe the book may return
soon.

Test Plan:
1) Check an item out to a patron
2) Set it to lost ( requires itemlost to be revealed in the framework
    for the items editor ).
3) Rebuild your zebra indexes
4) Run a search where that item is in the results list
5) Note the item is marked as lost
6) View the record details
7) Note the item is listed as "checked out"
8) Apply this patch
9) Repeat steps 4-6, note the item is now listed as lost

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 14:34:23 +00:00
Fridolyn SOMERS
4ce18e2a86 Bug 10689: make subscription public note appear when making a new order from a subscription
Test by creating a new order to a basket using "From a subscription" link

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

When creating a new basket from a susbcription, public note shows
on Notes column.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tiny enhancement, passes tests and QA script.
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 04:23:24 +00:00
Fridolyn SOMERS
4458e86865 Bug 10689: make public note appear in subscriptions search
In a serials module, when searching subscriptions, the results table as
a "Notes" column.
In TT code, you see that it tries to display public note
"subscription.notes" and internal note "subscription.internalnotes".

The internal note is displayed well but not the public note.

You can see the 2 notes in serial details in summary tab.

The problem commes from the SQL query. A join is perform on subscription
and biblio, both containing a "notes" column.

This patch solves the problem by using a alias in query for both columns
(biblio.notes is acutally not used in template but could be).

Test plan :
- Edit a subscription
- Add public and internal notes. For example : "too busy" and "on holiday"
- Perform a subscription search that returns this subscription
=> "Notes" column contains both notes. For example : "too busy (on holiday)"
- Test with only public note
- Test with only internal note

Works as described.
Signed-off-by:Mathieu Saby <mathieu.saby@uhb.fr>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Works as described, fixes a bug as the templates show that
the intention was to display both notes in the column.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 04:21:47 +00:00
Galen Charlton
412995b522 Bug 10854: (follow-up) language tweaks
- adjust description of the default profile
- adjust description of the sample data SQL
- adjust description of the download link

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 03:52:59 +00:00
Jonathan Druart
21b54e7da7 Bug 10854: (follow-up) Small changes to the template
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 03:34:39 +00:00
Jonathan Druart
383b2a75de Bug 10854: add ability to export serial claims using CSV profile.
Test plan:
- Create a CSV profile (or use the default one) with a type 'sql'.
- Go to serials/claims.pl, select the wanted CSV profile and click on
  the "Export selected items data".
- Verify the CSV file is correctly generated.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

On top of 10853 (solving merge conflict)

Need to do homework to test. Add subscription and serial claim
notice.

1) Create a new CSV profile, type SQL, copy sample fields
2) Go to claims, select vendor
3) Go to Export selected items with created profile
4) CSV (in my case I use | as separator) download successfully
5) All fields present, file correct

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as advertised, keeps existing format by porting it to
a SQL profile.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 03:33:30 +00:00
Bernardo Gonzalez Kriegel
06c5d812bd Bug 10853 - followup to correct tabs
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 02:16:17 +00:00
Jonathan Druart
0bf14c2d3a Bug 10853: Add DB field export_format.type ('marc' or 'sql').
This patch:
- adds a new column 'type' to the export_format table.
- renames the field name export_format.marcfields with
  export_format.content.

Test plan:
- Check that existing profiles have the type "marc" selected by default
- Create a new profile with a type "sql"
- Save and verify the profile is correctly displayed when you select it.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. koha-qa reports Small tabs errors,
corrected in followup

Test:
1) go to Tools > CSV profiles, Create profile, current
2) Apply patch, run updatedatabase
3) Go to Tools > CSV profiles, new option present
old profile with type MARC
4) Create new profile MARC, save and show correct
5) Create new profile SQL, save and show correct

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass with all 3 patches applied.
Works as described. Functionality for SQL profiles will be
added by another patch. For now it's possible to add/edit/delete
them.
Existing CSV profiles can still be exported correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 02:12:41 +00:00
Jared Camins-Esakov
c1ec92f685 Bug 10240: (follow-up) correctly record fines and fix label
At some point in rebasing I managed to remove the part of the code
that saved fine payments. This patch re-adds that feature. This patch
also corrects the label on the check out tab to not mention partial
names for checkouts when offline, and partial name searches are not
supported in offline circ.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-11 01:57:05 +00:00
Jared Camins-Esakov
b6ea9da689 Bug 10240: (follow-up) make sure datepicker icons are available offline
The next month/previous month icons for the datepicker were not available
offline. With this patch they are.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.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>
2013-10-11 01:57:05 +00:00
Jared Camins-Esakov
2c89aee3c8 Bug 10240: (follow-up) warn when patron's card is expired
This patch improves the alert messages to be slightly better English
and warns the librarian if a patron's card has expired. Like all alerts,
this is non-fatal since in the case of network failure there is no
particular reason to expect that the offline database is current.
To test this particular patch you can try checking something out to an
expired patron, otherwise test plan remains the same as above.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.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>
2013-10-11 01:57:04 +00:00
Jared Camins-Esakov
46190d5ac4 Bug 10240: (follow-up) disable logout/set library
Logging out/setting the library does not work while using offline
mode, so it makes no sense to present those options to the user.
Much better is some sort of explanatory message informing them that
those two links don't work.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.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>
2013-10-11 01:57:04 +00:00
Jared Camins-Esakov
618ddd3490 Bug 10240: (follow-up) fix display issues
Fix the following two issues:
1) After paying a fine when offline the fine amount becomes NaN.
2) For previous checkouts for a patron, the title and barcode
   fields have the wrong infomation in them (i.e. they have been swapped)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.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>
2013-10-11 01:57:04 +00:00
Jared Camins-Esakov
cbf7e3b11b Bug 10240: (follow-up) don't delete transactions if auth fails
When uploading transactions, we were not checking that authentication
had succeeded before deleting the transactions from the local database.
That was bad. With this patch, we check. That is good.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.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>
2013-10-11 01:57:04 +00:00
Jared Camins-Esakov
9db23b8483 Bug 10240: QA follow-up
Address the following issues:
    1/ Address minor qa issues with the templates:
     FAIL    koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline-mf.tt
      FAIL      forbidden patterns
                forbidden pattern: intranet-tmpl should certainly
                replaced with [% interface %] (line 24)
                [etc.]
     OK      tt_valid
     OK      valid_template

    FAIL    koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
     FAIL      forbidden patterns
               forbidden pattern: intranet-tmpl should certainly
               replaced with [% interface %] (line 509)
               [etc.]
    FAIL      tt_valid
        lines 5, 5
    2/ Run perltidy on new scripts
    3/ download.pl returns data.finished = 1 if number of returned
       data < 5000 (avoids 1 ajax call)
    4/ Replace qq{} around sql queries with q{}

Also, a race condition existed that resulted in pending transactions
only getting deleted from the local database in certain circumstances
(fast connections under Chrome, mostly). This patch fixes that so that
successfully-uploaded transactions are always deleted.

This patch also addresses Jonathan's suggestion:
3/ add a message on check in (currently the input becomes empty but the
   user is not informed).

... and Magnus's suggestion about moving the Synchronize link to the
right on the homepage.

Also, this addresses the further issues Jonathan noted:

- The tab of checkouts always shows "*0* Checkouts"
- If I am not well-educated, I click on the "Check out" link on the
  offline home page, I enter a barcode, click on "Check out" and I get a
  js error (without user message): "TypeError: curpatron is undefined"
  (with chromium I get: Numeric transaction modes are deprecated in
  IDBDatabase.transaction. Use "readonly" or "readwrite").
- There is a "border-right" css rule on the h5.patron-title. It is
  display when there is no patron selected) [really minor!].
- tables are displayed even if there is no data
- The "Clear screen" link (X) points to an old script:
  circ/offline-circulation.pl
- There is a warning when clicking on the "Synchronize" link when the
  user is offline, but not for the "Pending offline circulation actions"
  link.
- Still exists:
> The "Checked in item." message text never disappear (even if I go on the
> offline home page (circ/offline.pl#offline-home)).

Finally, this patch adds a link to the Pending offline operations page
on the synchronize page for easier navigation.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.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>
2013-10-11 01:57:03 +00:00
Jared Camins-Esakov
44d0ad451f Bug 10240: Offline circulation using HTML5 and IndexedDB
This patch adds an HTML5-based offline mode to Koha's existing
circulation module, allowing librarians to check out items using a
basically familiar interface. The feature will be implemented using
the Application Cache and IndexedDB features of the HTML5 specification,
both of which are fully supported on Firefox 10+ and Chrome 23+, with
limited support going back to Firefox 4 and Chrome 11. The basic
workflow enabled by this patch is as follows:

Part 1: While connected to the Internet
1. Enable offline functionality by turning on the
   "AllowOfflineCirculation" system preference.
2. Sync the offline circulation database on the computer that will be
   used for offline circulation by following the "Offline circulation
   interface" link on the Circulation home page, choosing "Synchronize (must be online)",
   and clicking the "Download records" button. This process may take a while.
3. Bookmark /cgi-bin/koha/circ/offline.pl (the page you are currently
   on) for easy access when offline.

Part 2: While disconnected from the Internet
4. Navigate to /cgi-bin/koha/circ/offline.pl using the bookmark you
   created while online.
5. Start checking books in by scanning the barcode of an item that has
   been returned into the box in the "Check in" tab.
6. Scan the barcodes of any additional items that have been returned.
7. Start checking out books to a patron by scanning the patron's barcode
   in the box in the "Check out" tab.
8. Set a due date (the "Remember for session" box will be checked by
   default, since circulation rules are not computed during offline
   transactions and therefore a due date must be specified by the
   librarian).
9. Scan an item barcode (if you did not set a due date, it will prompt
   you) to check the item out to the patron.
10. If a patron has a fine you can see the total amount (current to when
    the offline module was synced), and record a payment. Unlike when in
    online mode, there will be no breakdown of what item(s) fines are
    for, and you will only be able to record the payment amount and not
    associate it with a particular item.

Part 3: While connected to the Internet
11. Click the "Synchronize" link and choose "Upload transactions" to
    upload the transactions recorded during the offline circulation
    session.
12. Navigate to /cgi-bin/koha/offline_circ/list.pl (there will be a
    link from the Offline circulation page) and review the
    transactions, as described in the documentation for the Firefox
    Offline circulation plugin:
    http://wiki.koha-community.org/wiki/Offline_circulation_firefox_plugin

RM note: the IndexedDB jQuery plugin bundled with this patch is
copyright 2012 by Parashuram Narasimhan and other contributors and is
licensed under the MIT license.  The home page for the plugin is
http://nparashuram.com/jquery-indexeddb/.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Works very well, no koha-qa errors

Test with Firefox 24.0
1) did some checkouts pre sync
2) synchronize database (Download)
3) go offline
4) Proceed to checkin some items from patron
5) Proceed to checkout items to patrons, setting date
6) Proceed to checkout to expired patron, warning appears
7) go online
8) Upload records
9) go to review transacctions and proceed
10) verified on patrons that checkin/out are done

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>
2013-10-11 01:53:34 +00:00
Chris Hall
015b9c660c bug 10365: change routing slips to use date published rather than planned date
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>
2013-10-10 23:38:11 +00:00
Jonathan Druart
e273e11b08 Bug 10602: Set default value for authority fields via the framework
This patch allows to define default values in the authorities framework.

Some code already existed but the feature did not work.

Test plan:
1/ Choose a framework, field and subfields.
2/ Define a default value.
3/ Create a new authority and check that the subfield is
automatically filled with the default value.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. koha-qa reports some tabs, fixed in followup

Test
1) Apply patch, run updatedatabase.pl
2) Edit auth framework, put default value someware, save
3) Add new auth, default value present

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Verified database update is done correctly.

Controlfields 0xx
- Edited an existing field (001)
- Set a default value for subfield @
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
  new authority using this authority type

Fields
- Edited an existing field (100)
- Set a default value for subfield e
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
  new authority using this authority type

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 23:25:47 +00:00
Mirko Tietgen
8369aa8431 Bug 9295: Introduce operator equal/ notequal to OAI set mapping instead of hardcoded 'equal' value.
In OAI set mappings, the value "is equal to" is hardcoded. This
enhancement changes it to a dropdown menu to choose between "is equal
to" and "not equal to".

To test:

* define a set
* define a mapping for said set with "is equal to"
* run /misc/migration_tools/build_oai_sets.pl -r -v
* confirm that you have correct entries in SQL: select * from
  oai_sets_biblios;
* change mapping to 'not equal to', save
* run /misc/migration_tools/build_oai_sets.pl -r -v
* confirm that you have correct entries in SQL: select * from
  oai_sets_biblios;

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Fix bug id in updatedb.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 23:03:30 +00:00
Fridolyn SOMERS
c1a289a191 Bug 9282: (follow-up) add authtypecode to authority auto-completion search
Signed-off by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 22:26:45 +00:00
Galen Charlton
aa86e7eb75 bug 5202: (follow-up) tweak display of merge action link on staged batch page
This patch adds a vertical bar between the link to display the
matching authority record and the link to initiate a record
merge; prior to this patch, the two links ran together.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 21:57:29 +00:00
Galen Charlton
4a2aa0e768 bug 5202: (follow-up) adjust for the move of the merge record Javascript
This patch applies to change from bug 10650 to the new
authority record merge feature.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 21:50:08 +00:00
Jared Camins-Esakov
adabb74aa1 Bug 5202: QA follow-up - improve merge reference selection
The link on the merge reference had been wrong, and framework types
were not indicated when you were merging records of two types. This
patch fixes those problems.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 21:38:45 +00:00
Jared Camins-Esakov
cbd9591010 Bug 5202: QA follow-up 2 - fix overeager error message
When rebasing the patch for this, I accidentally moved the line
setting the mergereference when merging from breeding to *before*
I checked whether we were merging from breeding. Needless to say,
this caused problems. This patch fixes that, and:
* Makes the error translatable.
* Adds a missing authtypesloop argument for the template.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 21:37:31 +00:00
Jared Camins-Esakov
b5bd2b7586 Bug 5202: merge authorities from the authority file and reservoir
This patch gives Koha the ability to merge authority records using the
same interface used by bibliographic records, though slightly different
methods for selecting which records to merge. The two ways to select
records are as follows:

1) Records can be selected from authority search results by clicking
   the "Merge" link for two records.
2) Authority records can be merged from the reservoir by clicking the
   merge-related links in the Manage staged MARC batch screen.

To test:
1) Apply patch.
2) Do a search for an authority record that will turn up multiple
   identical records (or at least two records that you don't mind
   merging).
3) Click the "Merge" link for the first record.
4) Click the "Merge" link for the second record.
5) Choose which fields from which record you want to appear in the
   resulting record.
6) Confirm that those are the fields that exist in the resulting record.
7) Stage an authority record (for example, an authority record you
   saved from your catalog.
8) Search for a record to merge with it using the "Search for a record
   to merge in a new window" link.
9) Merge these records, confirming that the resulting record (after
   going through the entire merging process) matches your expectations.
10) Set up a matching rule for authorities, and export an authority from
    your catalog that will match based on that rule. For MARC21, the
    following is a good choice for a rule:
    Matching rule code:  AUTHPER
    Description:         Personal name main entry
    Match threshold:     999
    Record type:         Authority record
    [Match point 1:]
    Search index:   mainmainentry
    Score:          1000
    Tag:            100
    Subfields:      a
11) Stage the record you just exported, choosing the matching rule you
    just created.
12) Merge the record using the "Merge" link, confirming that the
    resulting record (after going through the entire merging process)
    matches your expectations.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 21:32:27 +00:00
Janusz Kaczmarek
68c44093a4 Bug 10335: display translated forms of headings in UNIMARC authorities correctly
To reproduce and test:

To reproduce:
1) Create an authority record with main heading (100) in Latin script
   (e.g. Oppenheimer, Aharon -- subfields $a and $b) and parallel form
   (700) in Hebrew (אופנהיימר, אהרן -- subfields $a and $b).
    Mark it correctly in $8 with freheb (or engheb if you like);
2) Reindex and search;
3) You will see:

Oppenheimer Aharon
freheb: אופנהיימר

Whereas you would rather like to see (mind language and lack of $b above):

Oppenheimer, Aharon
Hebrew: אופנהיימר, אהרן

The patch corrects the issue and should not harm those who (improperly)
put only one triple in $8

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors.
Same result on OPAC and STAFF

Turns out that test plan is wrong,
you neet to fill tag 200ab, not 100ab, for main heading.
I filled 100a with some example data from UNIMARC auth manual.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Took me a bit to figure it out, works according to test plan.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 19:14:44 +00:00
Mathieu Saby
041e3603a1 Bug 8252: Fix indexing of UNIMARC 1xx for GRS-1
Before fixing UNIMARC DOM indexing, we must fix GRS-1 indexing

1) In advanced search, some Coded fields index are not working: Print,
   Illustration, Content
2) Country-heading index is not working
3) Some subfields are indexed in wrong indexes :

  102$a should be in Country-publication instead of Country-heading
        (non defined in bib1.att)
  106$a, filled only for printed works, should be in ff88-23 (form of
         item) instead of itype.  (ff88-23 is made for Marc21 008 pos
         23, which contains the same data as 106a)
  200$b should be in Material-type instead of (or in addition to) itype
        and itemtype: (Material-type :"free-form string, ... that
        describes the material type of the item, e.g., cassette, kit,
        computer database, computer file.")
  100$a pos 22-24 should not be indexed as "ln" : it is the language of
        the record, not the language of the ressource

4) Index names are too long : if we index new positions of coded fields,
   with existing names it breaks Zebra indexing (there must be a limit
   in line lenghth in record.abs?)
5) There are a lot of warns when rebuiding zebra.

This patch make some changes in bib1.att (could be used later to improve
search) :

- fixing wording for att 51 and 1012
- adding comments for attributes based on MARC21 008 field (8800-8841)
- creating 8806 (tpubdate), 8838 (Modified-code), 8818 (ff8-18), 8840
  (ff8-18-21), 8819 (ff8-19), 8821 (ff8-21), 8828 (ff8-28), 8830
  (ff8-30), 8831 (ff8-31)
- creating attributes specific to UNIMARC : 9701-9707 (Video-mt,
  Graphics-type, Graphics-support, Title-page-availability,
  Cumulative-index-availability, script-Title, char-encoding)
- setting apart 3 blocks of attributes, so it could be easy to make
  further changes :
-- common to Marc21 and UNIMARC : 8806, 8822, 8838
-- slightly different in Marc21 and UNIMARC (different meanings
   according to the type of the record => don't match a single
   UNIMARC field)
-- specific to UNIMARC : 9701-9707

In ccl.properties :
- creating a new index: Country-publication 1=1053
- suppressing some warns by mapping with bib1 att:
  Date-time-last-modified, Name, rtype, Music-number
- defining indexes using the 3 blocks attributes defined in bib1
  (common to Marc21 and UNIMARC, slightly different, specific to UNIMARC)

In record.abs :
- renaming some index for 100-105-110 fields
- correcting indexing of 102$a (country of publication)
                         106$a (ff88-23)
                         100$a pos 22-24 (language of record, no more
                               indexed)
                         105$a pos. 0-3 (illustration code)
                         200$b (for the moment, I keep it indexed in
                               itype and itemtype, but also Material-Type)

In C4/Search.pm :
- adding "Country-publication" index

In OPAC and staff interface template subtypes_unimarc.in :
- renaming indexes to take into account the changes made to Zebra
  config files

To test (this cannot be done with a sandbox) :
1) Apply the patch in a UNIMARC GRS-1 Koha instance
2) Copy the following files from the etc/zebradb of your source
   directory into the etc/zebradb of your main Koha directory:
-- etc/zebradb/biblios/etc/bib1.att
-- etc/zebradb/ccl.properties
-- etc/zebradb/marc_defs/unimarc/biblios/record.abs
3) Reindex your data (rebuild_zebra -x -b -r -v)
4) Try to use those Coded fields indexes in Advanced search, in OPAC
   and Staff interface (available after clicking on "More options",
   then on "Coded information filters"):
   Audience, Print, Literary genre, Biography, Illustration, Content,
   Video Types, Serials, Serial Type, Periodicity, Regularity
5) Try to search "Country-publication=FR" in simple search

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

Tests for GRS-1
Followed test plan
Search by coded fields works, but only on OPAC,
on staff there are few options
Search by Country-publication works after patch

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-10 15:06:10 +00:00
Katrin Fischer
4f3b3403fb Bug 10705: follow-up - change one more instance of "shippment cost"
Term also occurs on the spent page accessible from the funds
table on the acquisition module start page.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-09 05:00:37 +00:00
Ketan Kulkarni
8dc4438bf6 Bug 10705: change 'shipment cost' to 'shipping cost'
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Trivial string change. No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String change - fixing another occurence in a follow up.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-09 04:59:43 +00:00
Fridolyn SOMERS
bdbe2545cd Bug 10430: arrived and stopped status are not possible in serial claim
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-09 04:28:46 +00:00
Fridolyn SOMERS
9b5d891bf5 Bug 10430 - status filter not working in serial claims when translated
With a translated intranet (ie fr-FR) the status filter does not work
for "Late" status.  It is because status in combobox filter is
translated "Retard" and status in table is translated "En retard".

This patch changed javascript filter to work on a status code instead
of status name.
The new classes may be used to change CSS depending on status.

Test plan :
- Use a translated intranet (ie fr-FR)
- Go to serials claim of a vendor with issues of multiple status
- Check that status filter does its work

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch passes all tests and QA script.
The status filter should probably be changed to only
allow filtering on status that can appear on the page.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-09 04:28:08 +00:00
Fridolyn SOMERS
7a39fa7b68 Bug 9747: sorting z3950 search results in acquisition
Adds NSB/NSE sort on z3950 seach results in acquisition module.
Also adds default sorting on title column like in cataloguing module.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-09 04:22:28 +00:00
Jonathan Druart
22bbefba64 Bug 9747: Fix NSB/NSE sorting issues on z3950 search results
At least the BNF server returns results containing non-sorting
characters (NSB/NSE).
In order to sort results according these characters, this patch adds a
new Datatable function.

Test plan:
- search 'tintin' on the z3950 search (cataloguing/z3950_search.pl)
- sort on title (default sort) and check that results are not well
  sorted.
- apply this patch
- do the same search and check that the first result is "Hergé. Les
  Aventures de Tintin..."
  The value of the cell is:
      <td>ˆHergé. Les ‰Aventures de Tintin...</td>

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

Works as advertised and doesn't break existing searching

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-09 04:21:03 +00:00
70f322bd86 Bug 10794: fix sorting on billing date column in invoices table
This patch adds the sorting by title string option to the table of
invoices. This allows column data to be sorted based on the
ISO-formatted date rather than the formatted-for-display date. A "blank"
(0000-00-00) date is added to cells which contain no date data.

To test, view the Acquisitions Invoices page (acqui/invoices.pl) and
confirm that the "Billing date" column is sorted correctly regardless of
the dateformat system preference.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template only change, passes all tests and QA script.
Sorting of the billing column now works as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-09 04:16:07 +00:00
e276bea3ee Bug 10917: allow staff to update hold pickup location without modify_holds_priority
A librarian cannot modify a hold's pickup location unless he or she has
the permission modify_holds_priority. This appears to be a bug and not
by design. The reason the update fails is due to the priority not being
passed to ModReserve. The priority is not displayed when a librarian
does not have the modify_holds_priority permission.

Test Plan:
1) Remove the modify_holds_priority from your logged in user
   * User cannot be a superlibrarian
2) Attempt to change the pickup location for a hold
3) Note the change fails
4) Apply this patch
5) Repeat step 2
6) Note the change succeeds

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change only.
Passes all tests and QA script.

Tested:
- Confirmed that changing the pickup location is not
  possible in master without the modify_holds_priority
  permission
- Confirmed that the patch fixes the problem - pickup
  location can now be changed with and without the
  permission
- Pickup location can still not be changed, when
  IndependentBranches is activated

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-08 14:23:07 +00:00
Julian Maurice
117f8a5ccc Bug 10856: Fix cover display in shelf browser
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I was able to reproduce the problem with local covers and
the patch fixes it in my tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 15:58:17 +00:00
ff7b4d4aa3 Bug 10856: (Follow-up) improve behavior of the "close shelf browser" link
In Firefox at least, the shelf browser cannot be reopened after
hiding it with the "close shelf browser" link. This followup improves
the behavior of the "close shelf browser" link so that the shelf browser
can be redisplayed.

To test, open a bibliographic detail page in the OPAC and click a
"browse shelf" link. Click the "close shelf browser" link--the shelf
browser should be hidden. Click the original "browse shelf" link and the
shelf browser should reappear without reloading the page.

Test with Firefox and Chrome (at least).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.

Testing notes:
- New unit tests in t/db_dependent/ShelfBrowser.t pass.
- System preference  OPACShelfBrowser still works as expected.
- Closing and opening the shelf browser works as expected.
- Next and Previous links show new and nicer behaviour.
- Logs are clean.

Tested with Firefox and Chromium under Ubuntu.

Notes: The currently displayed record could maybe be highlighted
a bit better.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 15:57:35 +00:00
Jonathan Druart
84494966d4 Bug 10856: (follow-up) if callnumbers are equal, order should be on itemnumber
If a lot of items has the same callnumber, the order should be on the
itemnumbers. Otherwise the left side is always filled with the same
items.

+ Fix a bad c/p for the next link (when js is disabled).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 15:57:03 +00:00
Jonathan Druart
5c0fa5ec3d Bug 10856: Improve the previous and next items on the shelf browser
The next and previous links should completely refresh the shelf.

For example:
[<] [1] [2] [3] [4] [5] [6] [>]
Before this patch, the next and previous links were the same as the 1
and 6.
With this patch, after clicking on next, we will get:
[<] [7] [8] [9] [10] [11] [12] [13] [>]

This patch adds a new AJAX script to get the shelf browser block.

Test plan:
- On a detail biblio page, click on a "Browse shelf" link.
- Play with the next and previous links.
- Deactivate Javascript (using NoScript for example) and check that you
  get the same behavior (but the page is reloaded).
- Launch the unit tests: prove t/db_dependent/ShelfBrowser.t

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 15:56:35 +00:00
Galen Charlton
b26af80f81 Bug 10096: (follow-up) rename button on authorities toolbar
Change to "New from Z39.50" to be consistent with the
cataloging toolbar.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 15:06:15 +00:00
Galen Charlton
1358acea4f bug 10096: (follow-up) use datatables.inc
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 14:52:32 +00:00
1e0b890b0c Bug 10096 - Add a Z39.50 interface for authority searching
This patch introduces a new Z39.50 interface for searching Z39.50
compliant databases for MARC authority records.

These databases aren't as common as their bibliographic equivalents,
but they're out there and very useful. I have included info at the
bottom of this messsage for sample authority databases you can try.

To test this patch:

1) Set up Z39.50 client targets for authority databases. (I've included
information at the bottom of this message for LibrariesAustralia's
test server for authorities as well as instructions on how to use
your Koha's z39.50 authority server as well. The Library of Congress
also has authority databases available (unsure if these are test or
prod), and you might have access to others through OCLC or RLIN. OCLC
provides login credentials for their test databases.

2) Go to the Authorities module

3) Click on the new "Z39.50 search button"

4) Select your authority search targets from the list.

5) Do a search for an authority you would like using either the "Raw"
input box or the more specific input boxes for names, subjects, subject
sub divisions, or titles. (I like searching Name (personal): Eric on
the LibrariesAustralia test DB.)

6) You should see a table listing the server, heading, authority type,
and two other columns (MARC and a nameless column). "Authority type"
is the type of authority it will become when imported in to Koha. In
the Eric example, "PERSO_NAME".

7) Click on "MARC" next to the results of interest to review the MARC
authority record.

8) When you're satisfied with a record, click on "Import".

9) The pop-up window will close and your original Koha window will
change to the "Adding authority Personal Name" screen (in the Eric
example).

10) All the relevant fields should be filled out for the record. Review
them and make any changes as necessary. (N.B. The 001 will be cleared
when saved, so if you have a use for the imported control number, move
it to the 010, 016, or 035 as appropriate. If you have a default value
for the 003, this will also likely be overwritten. Move it if necessary.
The 005 will also be updated when saved, so do not worry about that.)

11) When you're satisfied, click save.

12) Presto! You've imported your first authority record via Z39.50!

--

Here is the info for the LibrariesAustralia test Z39.50 authority
database:

Z39.50 server: LibrariesAustralia Authorities
Hostname: z3950-test.librariesaustralia.nla.gov.au
Port: 210
Database: AuthTraining
Userid: ANLEZ
Password: z39.50
Syntax: MARC21/USMARC
Encoding: utf8

-

The U.S.A. Library of Congress also provides Z39.50 access to its Name
and Subject Authorities (http://www.loc.gov/z3950/lcserver.html).

Name Authority:
Z39.50 server: Library of Congress Name Authority File
Hostname: lx2.loc.gov
Port: 210
Database: NAF
Syntax: MARC21/USMARC
Encoding: utf8

Subject Authority:
Z39.50 server: Library of Congress Subject Authority File
Hostname: lx2.loc.gov
Port: 210
Database: SAF
Syntax: MARC21/USMARC
Encoding: utf8

(N.B. Both of these databases also include title authorities.)

-

For testing purposes, you can also set up a Z39.50 client target,
which points at your own Koha instance's Z39.50 authority server.

To find the hostname, go to /etc/koha-conf.xml and find the value for
the <listen id="authorityserver"> element. Depending on your
configuration, this could be something like the following:

unix:/zebra/koha/var/run/zebradb/authoritysocket

(N.B. You might be using a different scheme than unix sockets...)

To find the database, scroll down to the bottom of koha-conf.xml until
you reach the <config> element. Within this, look for the value of the
element <authorityserver>. It should probably be "authorities".

To set up this Z39.50 client target in Koha...

Z39.50 server: my koha authorities
Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket
Port:
Database: authorities
Userid:
Password:
Syntax: MARC21/USMARC (or whichever flavour you need)
Encoding: utf8

Signed-off-by: Mason James <mtj@kohaaloha.com>

Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching

This patch adds the "recordtype" column to the "z3950servers" table.

The value in this column (biblio or authority) then controls whether
the z3950 server shows up in a bibliographic search (through the
Acq and Cataloguing modules) or in an authority search (through
the Authorities module).

I also edited the z3950 management console to show this value
and allow users to edit it. The default value is "biblio", since
the vast majority of z3950 targets will be bibliographic. However,
there is an option to add/edit a z3950 target as a source of
authority records.

Test Plan:

1) Apply both patches
2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5
environmental variables)
3) Use the test plan from the 1st patch

N.B. Make sure that your Z39.50 client target has a Record Type
of Authority, otherwise it won't display when you're doing a
Z3950 search for authorities.

Signed-off-by: Mason James <mtj@kohaaloha.com>

Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 14:26:29 +00:00
946908403f Bug 10668 - Improve suggestion detail page - QA Followup
Simplify an expression in the JavaScript

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 03:15:59 +00:00
0c021eddb6 Bug 10668 - Improve suggestion detail page
This patch makes several improvements to the suggestions template:

- Improved breadcrumbs and page title.
- Fixed a JavaScript error which appeared when viewing or editing a
  suggestion.
- Added an 'Edit' and a 'Delete' button to the suggestion detail page.
- Corrected capitalization.

To test:
- Perform various operations with suggestions management and
  confirm that page titles and breadcrumbs are correct.
- View the detail page for an individual suggestion and confirm that
  the edit and delete buttons work correctly.
- Confirm that there are no JavaScript errors when viewing or editing a
  suggestion, in particular when changing Acquisition information
  (quantity, currency, price).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, nice improvement.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-04 03:15:32 +00:00
Jared Camins-Esakov
bd5aec7649 Bug 10948: make reference labels translatable in OPAC auth results
For some reason the translator script was not picking up the see also
and used for/see from labels on the OPAC. This patch fixes the problem.

To test:
1) Apply patch.
2) Generate PO files.
3) Note that "see from" and "used for/see from" appear.
4) Sign off.

Signed-off-by: Nuño López Ansótegui <nunyo@masmedios.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, thx for the fix.
Tested by updating the German po files, translating the
strings and installing the templates.
Verified strings show up in German in the authority
result list.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-02 15:21:40 +00:00
Galen Charlton
7e3f8e0838 Bug 10901: (follow-up) add space between 'Edit in host' and 'Delink'
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-27 17:00:35 +00:00
Jonathan Druart
eec049492f Bug 10901: (follow-up) make the withdrawn column sortable
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-27 17:00:30 +00:00
Jonathan Druart
bb67591647 Bug 10901: Add datatables to the add item page
For a biblio with a lot of items, it is not easy to find the one you
want to edit.

Test plan:
Try to edit/delete item from the add item page.
Verify there is no regression on this page.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Adding, editing and deleting items still works.
Search provides useful help for locating the correct items.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-27 16:46:36 +00:00
Galen Charlton
e9c77aaf3a Bug 10836: (follow-up) improve display toggles on the OPAC hold request form
This patch improves the the toggles for displaying and hiding the hold
options div and the toggles for displaying the table of specific copies
to request.  It also moves the copy table into the hold options div.

To test:

[1] Select a single title in the OPAC and click on the place hold
    button.
[2] Click 'Show more options', and select a specific copy to request.
[3] Click 'Hide options'.  Verify that the hold options, including the
    copy table, are hidden.
[4] Click 'Show more options'.  Verify that the specific copy radio
    button is still selected and that the copy selected in step to is
    selected.
[5] Enable DisplayMultiPlaceHold and select several titles to
    request.
[6] Do steps 2, 3, and 4 on various titles on the request form.  Verify
    that toggling the options link for one title on the form affects
    the visibility only for that title.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

While signing off I removed one <br /> tag and corrected a float in the
CSS. This helps keep the border between individual hold listings.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-27 16:42:14 +00:00
74553d7fef Bug 10836 - New layout for placing holds in the OPAC
This patch changes the layout of the OPAC's place hold screen,
eliminating the table in favor of a more flexible, open display.

To test, place single and multiple holds under various conditions:

- Items which are not available to be place on hold
- With OpacHoldNotes on and off
- With OPACItemHolds on and off
- With OPACAllowHoldDateInFuture on and off
- With IndependentBranches on and off
- With JavaScript disabled

Test setting hold notes, holding specific copies, and setting hold start
dates. When setting a hold start date and hold expiration date, the two
datepickers should work together to prevent invalid date combinations
(dates after today, expiration dates which precede the start date).

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-27 16:41:04 +00:00
Jonathan Druart
40a150f94e Bug 10730: (follow-up) restore background color for cells
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 16:48:21 +00:00
57793b4548 Bug 10730: Use DataTables on the tag review page
This patch enhances the tags review page in the staff client by adding
DataTables sorting to the table of tags.

It also converts the tag list page (list.tt) to use the new DataTables
include introduced by Bug 10649.

To test, apply the patch and view the tags review page for various
categories: Pending, approved, rejected, all. The table should be
sortable by status, term, weight, and date. Sorting by date should work
correctly regardless of date format preference. Title sorting on the tag
list page should work correctly.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Replace tab with 4 spaces

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 16:47:59 +00:00
7c290c4d7e Bug 9761: Reformulating the preference description
After some thought, I had to reformulate what this pref does.
No code changes here.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 00:27:23 +00:00
ded520afdc Bug 9761: Make it possible to confirm future hold requests at checkin time
Description:

A new pref ConfirmFutureHolds is added. When confirming a hold at checkin time,
the number of days in this pref is taken into account when looking for reserves.
Note that this pref does not interfere with renewing, issuing or transferring
a book. For report Holds to pull, the default end date is calculated with this
new preference.
The use of ConfirmFutureHolds is useful only when future holds are allowed.

Test plan:
1) Enable future holds. Add a number of days into ConfirmFutureHolds.
2) Place a future hold within this number of days.
3) Run holds to pull report. Check default startdate and enddate.
4) Check this book in. Can you confirm the hold? Do not confirm.
5) Issue the book to another patron. You should not see a warning.
6) Renew the book for this patron via opac or staff. No warning either.
7) Check in again. Warning pops up again.
8) Transfer book. Switch branch. Check in. Hold found pops up. Do not confirm.
9) Back to first branch. Check in (with popup). Remove the hold. Add new future
hold past the number of days. Check in (no warn).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 00:26:34 +00:00
Katrin Fischer
39c435e36f Bug 10803: make "Make payment" in circ easier to translate
To test:
- Choose a patron account
- Add a fine to it
- Switch to the checkout tab of the patron account
- Check for the "Make payment" link. Make is not a link, but payment is.
- Apply patch
- Check again, now both words are linked.

In translation this string is divided into:
. %s Make
payment

Because of this it's difficult to translate it grammatically.
The patch moves 'Make' into the link text, so that both words
will show up together in translation.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. No koha-qa errors.
Not only improves translatability,
also corrects capitalization.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-24 14:56:54 +00:00
4713a27280 Bug 10924: fix updating contact note from OPAC
If you update your "Contact note" via the OPAC that change doesn't
appear in the staff client's "Update patron records" interface. The
field is missing from members-update.tt

To test, log in to the OPAC and update your details
(opac-memberentry.pl), modifying the "Contact note" in the "Alternate
address" section.

In the staff client, view "Patrons requesting modifications"
(members/memgers-update.pl). The changed contact note field should
appear in the list of field awaiting approval for that patron.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
One line change - contact note now updates perfectly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-23 18:05:46 +00:00
115a3e6b60 Bug 10911: fix invalid links when displaying records that have 880 fields
Koha intranet search results using XSLT for records with 880 fields have
the details link created by a code path that incorrectly links to some
opac pages.

Test Plan:
1) Enable XSLT for intranet search results
2) Upload or create a record with at least one 880 field
3) Search for the item ( must have multiple hits to avoid redirection )
4) Click the title link, note it is broken
5) Apply this patch
6) Click the title link, note it is correct

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described, no koha-qa errors.

Test
1) imported two times sample record
2) reindex
3) search, find example record, broken links
4) applied patch
5) refresh, good links

NOTE: A similar (invalid references) problem is present on
UNIMARC and NORMAC files
I'll file a new bug for those cases.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, tested with a different set of sample
records with Hebrew 880 fields.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-23 17:12:13 +00:00
Mathieu Saby
54befcf59e Bug 10465: remove useless reference to fields 780 and 785 in UNIMARC XSLT files
UNIMARCslim2OPACDetail.xsl and UNIMARCslim2intranetDetail.xsl contained
references to 780 and 785 fields, that exist in MARC21 but not in UNIMARC.

This patch remove the code related to 780 and 785 fields. No effect should
be visible.

To test : in a UNIMARC Koha
1. Be sure that OPACXSLTDetailsDisplay, OPACXSLTResultsDisplay,
   XSLTDetailsDisplay and XSLTResultsDisplay sysprefs are set to "default"
2. Apply the patch
3. Search some records in staff interface : the list view and the detail
   view must be exacty the same as before you apply the patch.
4. search some records in OPAC : the list view and the detail view must
   be exactly the same as before you apply the patch.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: No diplay change, no koha-qa errors.
Removes what can't be displayed.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked detail pages in OPAC and intranet still display correctly
and without errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-23 16:23:38 +00:00
Katrin Fischer
d67ef01814 Bug 10847: Open link to vendor's website in new window
To test:
- Create a new vendor or edit an existing one
- Make sure you have entered a valid URL for the website
- Click the link from the vendor summary page and verify it opens
  in a new window/tab (depending on your browser configuration)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-23 16:10:33 +00:00
Jonathan Druart
4dae2ba8d6 Bug 10651 - (follow-up) add DataTables include to admin/aqbudgets.tt
The aqbudgets.tt needs to use the include file too.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-21 19:31:37 +00:00
bef919d60d Bug 10651 - Use new DataTables include in administration templates
Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
administration-related pages which use DataTables.

To test, view the following pages and confirm that table sorting is
still working correctly:

- Administration -> Budgets
- Administration -> Authority types -> MARC structure
- Administration -> Authorized values
- Administration -> Library transfer limits
- Administration -> Libraries and groups
- Administration -> Patron types and categories
- Administration -> Cities and towns
- Administration -> Item types
- Administration -> MARC bibliographic framework -> MARC structure
- Administration -> System preferences
- Administration -> System preferences -> Local use
- Administration -> Z39.50 client targets

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-21 19:31:16 +00:00
4885435c6a Bug 10868 - Use new DataTables include in catalog templates
Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
catalog-related pages which use DataTables.

The checkout history script has been altered to send unformatted dates
to the template, and the template now uses the "title-string" sorting
filter to enable sorting on unformatted dates.

To test, view the following pages and confirm that table sorting is
still working correctly:

Catalog -> Biblio detail page
Catalog -> Biblio detail page -> Checkout history

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Sorting works. No koha-qa errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: On the issue history page:
1/ If the checkin on is empty (the item is currently checked out), the line
is sorted in last.
2/ The Renewed column is not sorted by date.
Before this patch, the sort was worse.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-21 19:27:08 +00:00
Galen Charlton
fe3628070a Bug 7813: (follow-up) use descriptive text for delete link
This patch replaces the "times" symbol for the local cover image
deletion link with more descriptive text.  This was done because
the original "X" was small, is not necessarily going to be universally
understood to signify the deletion action, and because "&times;"
does not give much context to translators.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-21 19:16:56 +00:00
Jonathan Druart
1dc7d421bc Bug 7813: (follow-up) improvements for deleting local cover images
This patch:
- displays a js alert if a problem occurred on deleting the
  image on the server.
- adds a class for the new span (in order to avoid future problem, if
  someone adds a new span).
- adds a title for the [X] link.
- deal with the upload_local_cover_images permission (don't display the
  delete link if the logged in user does not have it).
- changes the license version.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
I like the ehancements to the original patch and work as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-21 18:11:13 +00:00
ab362b93a7 Bug 7813: Ability to delete local cover images
This patch adds the ability to delete local cover images from the
detail page. It adds an 'X' button to trigger the deletion. It occurs
using a new SVC script called cover_images that accepts the following
parameters:

 - action
 - biblionumber (used for checking imagenumber validity)
 - imagenumber (repeatable)

It then deletes all valid images passed and returns a JSON object
containing the imagenumbers and the deletion status (1/0). The operation
is triggered using jQuery.ajax, and with the response the corresponding
images get deleted.

Note: currently one image is deleted at a time, but the code is there to
be used.

To test:
- Open the detail page fr a biblionumber containing one or more cover
  images, go to its images tab.
- Apply the patch, reload the page, go to the images tab.
- Thumbnails should look better than before ;-)
- An 'X' button should show below each cover.
- Clicking the 'X' button should trigger an alert message asking for
  confirmation.
 a) Cancel: nothing happens, reload the page and check nothing got
    deleted.
 b) Accept: the deleted image should be gone, reload the page to check
    it doesn't exist anymore and is not a browser/DOM manipulation trick.
- Signoff

Note: check having more cover images than those that fit the width and
see it wraps fine.

P.S. I chose not to implement every possible action on the svc script, but
another bug could be filled for more improvements.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-21 18:08:51 +00:00
9bd3a44944 Bug 10888: Don't hide authorities module from users who lack permission to edit authorities
It should be possible for staff client users to search and view
authority records even if they don't have permission to edit them.

To test, apply the patch and view the staff client as a user with and
without "editauthorities" permission.

With "editauthorities" permission, authority search results should show
both an edit and delete link. Viewing the details of an authority
record, one should see a toolbar with edit/delete/new options.

The detail view has been altered to use the term "record" in place of
"biblio" ("Used in X record(s)).

Without "editauthorities" permission, authority search results should
show no edit or delete link. Viewing the details of an authority, the
only option shown in the toolbar should be "Save."

On the staff client home page and in the header's "More" menu the link
to the authorities module should now appear with and without permission
to edit authorities.

This patch also corrects the permissions in the authority export script
to allow saving of authority records by users who do not have permission
to edit.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-21 17:59:05 +00:00
Katrin Fischer
da856fc46c Bug 10871: Make confirmation message for deleting news translatable
To test:
- Create a news entry in tools > news
- Delete the news entry or multiple entries by selecting them
  using the checkboxes to the left and the delete button at the
  bottom of the page.

Verify confirmation message shows up correctly with patch applied.

Bonus:
- Update one of the po files and make sure the new strings shows up
  there.

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>
2013-09-21 17:34:34 +00:00
45b85a700f Bug 10915: (QA followup) warn if cannot read history.txt
This patch makes about.pl test if success opening history.txt, and
shows a convenient warning to the end user. No more warnings in the logs
(about.pl: readline() on closed filehandle $file at /usr/share/koha/intranet/cgi-bin/about.pl line 166)
and better problem solving information for the end user.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-20 17:25:57 +00:00
David Roberts
ace5505305 Bug 10894: Add ID to main address in member entry form
Add an ID to ease customization via jQuery; an ID is already present
on alt address but was missing from main address

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>
2013-09-20 17:17:47 +00:00
Jonathan Druart
3086788b26 Bug 10601: Add a counter on batch items modifications
After executing a batch items modifications, a dialog is displayed above
the result table. It contains the number of items (and total fields)
which has been modified.

Note that items that are selected for modification but which do not
end up actually be changed are not reported in the final counts.

This patch adds two methiods to C4::BackgroundJob, ->set() and ->get(),
that allow background jobs to pass arbitrary data back to the client.

Test plan:
1/ Go to tools/batchMod.pl
2/ Enter a barcodes list
3/ Check/uncheck items and fill some values to apply
4/ Save
5/ The table summary will be displayed with a dialog box on top:
 XX item(s) modified (with YY fields modified)
Check that XX and YY correspond with what you expected.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
batch modification still seems to work correctly, with the helpful addition of the counter. Thanks!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-18 17:10:00 +00:00
Jonathan Druart
5ed940b18e Bug 10599: add option to unselect on loan items on the batch item modification tool
Sometimes when using the batch item modification tool, we would like to
automatically uncheck on loan items.

This patch also adds a new routine in C4::Circulation, IsItemIssued(),
which, when passed an itemnumber, returns whether the item is
currently on loan.

Test plan:
1/ Go to tools/batchMod.pl.
2/ Enter some barcode (at least 1 should be on loan).
3/ Click on the Continue button.
4/ Click on the "Clear on loan" link.
5/ Check that on loan items are unchecked.

Launch the unit test file:
prove t/db_dependent/Circulation/IsItemIssued.t

http://bugs.koha-community.org/show_bug.cgi?id=10572
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Works as expected, only modifies items that are checked (still). No regression noted.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-18 16:45:24 +00:00
990eebf132 Bug 10376: fix ability to print cart from IE9 & 10
Test plan:
1) Test with Firefox (or any other browser except IE):
Add biblio to cart
Go to Cart and click Print
Does the Cart window come back to its original state after confirm/cancel Print?
2) Test with Internet Explorer (I used IE9; testing another version is fine)
Do the same as above. Is behavior now more or less the same?

Signed-off-by: Marc Veron <veron@veron.ch>

1) Test without patch:
IE 10: Does not show print dialog
IE 9 (Developer Emulation in IE 10): Does not show print dialog (as expected)
FF 21.0 OK
Chrome 27.0.1453.110 m: OK

2) Test with patch:
IE 10: OK
IE 9 (Developer Emulation in IE 10): OK
IE 8 (Developer Emulation in IE 10): OK
IE 7 (Developer Emulation in IE 10): OK
FF 21.0 OK
Chrome 27.0.1453.110 m: OK

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Trusting Marc here, as I don't have IE available.
Regression tests in Firefox and Chromium went well.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-18 16:32:42 +00:00
Jonathan Druart
da9863f1a5 Bug 9294: Followup : add missing lines.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-18 16:14:24 +00:00
249b37ef48 Bug 9294 - Move JavaScript out of circulation template
This patch creates a new js file, js/pages/circulation.js, and begins
the process of moving JavaScript into it from circulation.tt. I have
started the process by focusing on sections which are least dependent on
template variables.

To test, load a patron for checkout who has something checked out.
There should be no JavaScript errors:
 - Tabs should work.
 - Showing and hiding the "Add message" form should work.
 - The "specify due date" datepicker should work.
 - Controls for selecting checkboxes in the checkouts table should work

Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Just found a weird behavior with checkboxes in the checkouts table, but
still exists on master.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-18 16:14:24 +00:00
887900ba59 Bug 10731: fix use of IntranetSlipPrinterJS by hold slips
Hold slips aren't printing automatically with JS Print Setup because it
appears the system preference IntranetSlipPrint is never being passed to
the template.

Test Plan:
1) Set up JSPrintSetup
   http://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silently
2) Place a hold
3) Check the item in to capture the hold
4) Click "Print and confirm"
5) Note the slip does not print automatically
6) Apply this patch
7) Repeat steps 2 through 4
8) Observe that the slip now prints automatically

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>
2013-09-18 16:10:54 +00:00
Meenakshi.R
0005f6bad3 Bug 7639: add option to forgive overdue fines when declaring items lost
This patch adds functionality to forgive overdue fine when an item is
set to lost status.  Fines are forgiven only when the syspref
WhenLostForgiveFine is set to yes. Item can be set to lost status from:

- catalogue/moredetail.pl
- cataloguing/additem.pl
- tools/batchMod.pl
- misc/cronjobs/longoverdue.pl

Changed subroutine C4::Circulation::LostItem to forgive fines on the
item depending on the value of syspref WhenLostForgiveFine. This
routine is currently used to return an item and charge a replacement
cost.

Also added a new syspref in C4::Circulation::LostItem -
WhenLostChargeReplacementFee.  The replacement fee will now be charged
only if this syspref is set to yes.  The default value of the
WhenLostChargeReplacementFee is yes, meaning that current behavior
will not change during upgrade.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Alex Hatley <alexh@cctexas.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-17 15:10:46 +00:00
Galen Charlton
85a8df4ca1 Bug 10600: (follow-up) fix unescaped ampersand
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 19:41:46 +00:00
Jonathan Druart
86ac3cd7a2 Bug 10600: (follow-up) change the icon for the action duplicate
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 19:38:09 +00:00
Jonathan Druart
4d270b1202 Bug 10600: add ability to edit new authority record by duplicating existing one
This patch adds simple link that allows one to duplicate an existing
authority.

Test plan:
1/ Go to a detail authority page
2/ Click to the "Duplicate" button
3/ Edit some fields
4/ Save
5/ The new authority is created from the existing one.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass. Template change only.
Also compared the original with the duplicated authoritiy
in MARCXML - no unwanted differences found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 19:35:03 +00:00
Katrin Fischer
ddb67e3237 Bug 10667: Allow authentication with cardnumber for ILS-DI
Test authentication via ILS-DI:
- with userid and password
- with userid and wrong password
- with cardnumber and password
- with cardnumber and wrong password
...

Before the patch only userid will authenticate the patron.
After the patch was applied, userid and cardnumber will work.

To test:
- Run t/db_dependent/ILSDI_Services.t - all tests should pass.

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

Test:
Enable ISL-DI
access opac with /cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=XXX&password=YYY
With userid/cardnumber & password returns borrowernumber
With userid/cardnumber & wrong password returns PatronNotFound
Signed-off-by: Mason James <mtj@kohaaloha.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 19:14:10 +00:00
Galen Charlton
015319dbaf Bug 10513: (follow-up) use "checkin" rather than "check in"
"Checkin" is by far more commonly used as an adjective than
"check in".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 17:45:32 +00:00
Galen Charlton
04818401d7 Bug 10513: (follow-up) allow for multiline checkin alerts/messages
This patch turns the form input for the checkin message to
a text area and uses the html_line_break Template Toolkit filter
to display it.

To test:

[1] Create or edit an item type.  Note that the checkin message
    field is a text area.
[2] Enter a checkin message with at least one line break.
[3] In the item types administration page, note that the checkin
    message is displayed with the line break.
[4] Return an item of the item type modified in step 1.  Verify
    that the displayed checkin message includes the line break.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 17:45:31 +00:00
Magnus Enger
9dca7096c8 Bug 10513: display a warning/message when returning a chosen item type
This patch adds a new column to item types. Text in this column is
displayed as a warning when an item of the given type is checked in.
The type of message can also be chosen, affecting how the message is
displayed.

Use case: Items that are on inter-library loan can have a separate
item type, and when items of this type are checked in a message
saying something like "ILL! Remember to return it to the owning
library!" can be displayed.

To test:
- Apply the patch
- Go to Home > Administration > Item types administration
- Check that there is a new column, called "Check in message"
- Edit an item type and add a check in message
- Check that the check in message you added is displayed in the table
- Check in an item with an item type that has a check in message
- Check that the message is displayed
- Repeat the steps above, but select "Alert" instead of the default
  "Message" as the "Check in message type". Check that the message
  is displayed in a yellow alert box, not a blue message box.
- Check in an item with an item type that does *not* have a check
  in message, and make sure no false messages are displayed
- Create a new item type from scratch and check that it works
  the way it is supposed to
- Run the tests in t/ItemType.t, which are updated by this patch

This patch also removes backticks around column names in the
itemtypes table in installer/data/mysql/kohastructure.sql

UPDATE 2013-07-22
- Rebased on current master (no changes)
- Added "AFTER summary" to the SQL statement in updatedatabase.pl
- Added another placeholder on line 170 of admin/itemtypes.pl
Thanks Katrin!

UPDATE 2013-07-29
- Make this message independent of all other messages - thanks Owen!
- Make it possible to choose the type of message ("alert" or
  "message")

Sponsored-by: Kultur i Halland - Regionbibliotek
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed some tabs to make the QA script happy.
All old and new tests pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 17:45:31 +00:00
Katrin Fischer
7c82fe1a67 Bug 10841: Make edit/delete item context links in cataloguing translatable
HTML created with Javascript is not translatable the way HTML is
normally translated. _() syntax has to be used to have strings
translatable.

To test:
- Edit items for a record with multiple items
- Click somewhere in the items table
- Verify the links for editing and deleting items show up and work correctly
- Apply patch
- Verify the links still show the same behaviour

Bonus:
- Run 'perl translate update <languagecode>' in misc/translator
- Verify that Edit item and Delete item show up in the po file, translate them
- Install updated po files running 'perl translate install <languagecode>'
- Verify links show up translated and work correctly

Patch also fixes capitalization for a couple of error messages - only change
there is: Deleted > deleted.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2013-09-16 16:35:02 +00:00
04aa350777 Bug 8821: make receive shipment page hide inactive funds like new order form
This patch adapts the fund-handling code from neworderempty.pl
in order to limit the display of funds by default to active ones,
with the option to check a box to display all funds.

This patch also adds "(inactive)" to the display of funds on this and
the neworderempty.tt template because it seemed like that was useful
information.

To test, make sure you have both active and inactive funds.
Start the process of receiving a shipment. The "fund" option
in the receive shipment form should show only active funds.
Checking the "show all" checkbox should allow you to choose
from both active and inactive funds.

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>
2013-09-16 16:26:12 +00:00
Katrin Fischer
29498bf696 Bug 10570: Show nonpublic note on check expiration page
The check expiration page in serials only showed the OPAC note,
but it makes sense to also show the nonpublic note here.

This patch adds it.

To test:
- Add a subscription, make sure to enter different notes in
  nonpublic note and OPAC note to check for display later on.
- Go to the check expiration page and search for your subscription.
- Check both notes show up correctly.

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>
2013-09-16 16:22:31 +00:00
Fridolyn SOMERS
0ee3a414e8 Bug 10650 - export merge-record.inc javascript into a file
Bug 9755 added a refactoring of records merge adding the include
merge-record.inc. This include contains a block "mergejs" containing all
JavaScript code that was in merge.tt.
This patch exports this code into a js file.
Translatable strings contained in this file are in
merge-record-strings.inc.

Test plan :
- Put two records is a list
- Go to this list and check the two records
- Click on "Merge selected"
- Click on next
- Go to second source record
- Click on a repeatable field
=> The field is added to destination record
- Click on a subfield of a field existing in destination record
=> The subfield is added to destination record
- Click on a non repeatable field existing in destination record
=> You get an alert and field is not added
- Click on a subfield of a field not existing in destination record
=> You get an alert and subfield is not added
- Click on Merge
=> Records are merged

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and test plan, no regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 16:17:34 +00:00
Jonathan Druart
94868f61c4 Bug 9618: (follow-up) include link to jQuery only if needed
The jQuery lib is useful only if js code is filled into the
intranetuserjs pref.

Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

To test:
- Use Quick spine label creator
- Make sure you have Javascript in your intranetuserjs system
  preference
- Validate Javascript effect on screen or check source code
  to make sure your code is visible there.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 16:05:51 +00:00
cb59e37e56 Bug 9618: Add support for intranetuserjs to labels/spinelabel-print.pl
The template for printing a single spine label is a stripped-down
version of a standard Koha template, but it should include
intranetuserjs and IntranetUserCSS so that libraries can make local
customizations.

This patch updates the page's DOCTYPE to HTML5 and adds the missing
markup for including those preferences. Also added is jQuery, since
there's a good chance local customizations are using jQuery.

To test, make sure there is something in your intranetuserjs and
IntranetUserCSS system preferences. Visit
/cgi-bin/koha/labels/spinelabel-home.pl and submit a barcode. View
source on the spine label output page and confirm that your custom js
and css were included correctly.

Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template only change, works nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 16:05:02 +00:00
Galen Charlton
37127edf54 Bug 7469: (follow-up) update shipment receiving form
To test:

[1] From (e.g.) vendor search results, click on one of the
    receive shipment buttons.  Verify that the focus
    is on the 'vendor invoice' field.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 15:57:36 +00:00
Fridolyn SOMERS
f92c74b65a Bug 7469: put focus on 1st field of creation form instead of search box (Acquisition)
When a user creates a new vendor, a new borrower or a new basket
(maybe on others page too, to be listed), a creation form is displayed,
but the focus is still on the search textbox on page top.

It would be probably better to switch the focus to the first field of
the creation form.

This patch adds the focus, for acquisitions module, on first input for
pages with a data creation or modification or pages with only one form
(like Z3950 search).

Test plan :
Go to pages and look where is the focus :
- acqui/basketgroup.pl : focus on "Basket group name:"
- acqui/basketheader.pl : focus on "Basket name:"
- acqui/invoices.tt : focus on "Invoice no:"
- acqui/modordernotes.pl : focus on "Notes:"
- acqui/neworderempty.pl : focus on "Title:"
- acqui/supplier.pl : focus on "Name:"
- acqui/z3950_search.pl : focus on "Title:"

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The focus choice is relevant and works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 15:53:17 +00:00
Mark Tompsett
4f9ee9a6b8 Bug 10840: restore OPACResultsSidebar in opac-facets.inc
Bug 10405 rightly added id's to items, but inadvertently removed
[% OPACResultsSidebar %] from the opac-facets.inc file. This
bug rectifies that problem.

Test Plan:
Confirm the problem
===================
1) Set OPACResultsSidebar system preference to some text.
2) In the OPAC, search for something
3) The facets will not have the text, though viewing the source, there
   is an empty <div id="opacresultssidebar">.

Correct the problem
===================
1) Apply the patch to the master system
2) In the OPAC, search again for something
3) The facets on the left will now have the text from the
   OPACResultsSidebar system preference.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Is back! OPACResultsSidebar is back!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Copied test plan from bug report into commit message.
Template only change, works as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 15:34:05 +00:00
Galen Charlton
2e3c821564 Bug 10792: fix sorting of funds table on acquisitions home page
This patch introduces a DataTables sorting plugin, title-numeric,
for sorting cells based on a decimal number embedded in a span title
attribute.  This allows currency amounts to be formatted properly
for display without having to writing a sorting plugin that's
super-smart about removing the formatting, particularly for locales
that use a comma as the decimal mark.

The sorter plugin can be used like this:

- In the DataTables config:

"aoColumns": [
   { "sType": "title-numeric" },
]

- In the table data

<td><span title="[% decimal_number_that_JS_parseFloat_accepts %]">
    [% formatted currency %]
</span></td>

To test:

[1] Ensure that there is at least one active budget and at least
    one inactive one.
[2] Go to the acquisitions home page.  Note that changing the sort order
    on the amount, ordered, spent, or avail columns results in incorrect
    sorting that is either ASCII-betical or which ignores any component
    of large numbers that occur after the thousands separator.
[3] Apply the patch.
[4] Verify that the sorting now works correctly and that no JavaScript
    errors appear in the JS debug console of your choice.

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

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Sorting now works correctly, for active and inactive funds.
Passes all tests and QA script.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 15:30:33 +00:00
Galen Charlton
753633213e Bug 5349: (follow-up) tweak order transfer form
This patch implements some of the suggestions made
by Owen Leonard and brings the form closer in line
with other popup forms.  In particular:

- sets dimensions for the popup so that clicking on the
  link is more likely to open a new browser window, not
  a tab.
- ensures that the vendor search form is always visible
- adds a cancel link to make it more clear to library
  staff that they can abort the process.
- tweaks markup to better match the patron guarantor
  popup search form

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 15:21:07 +00:00
Julian Maurice
905306efb1 Bug 5349: Create a table for order line transfers
This allow to keep transfers informations without having untranslatable
strings in database.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 22:38:28 +00:00
Julian Maurice
5761323944 Bug 5349: (follow-up) run transferorder.pl in a popup
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 22:38:27 +00:00
Julian Maurice
12f62ba1db Bug 5349: add ability to transfer order lines from one basket to another
On basket.pl and parcel.pl there is a 'Transfer' link which allow you to
transfer order lines from a basket to another.

The link leads to a new page which allow you to search for a bookseller,
then display this bookseller's baskets. Then you can pick a basket and
the transfer will be done.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 22:38:19 +00:00
6fcb6712fe Bug 10678 - Update addbooks help page
The button's name changed, and a caret was added.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
If you click the button directly, the default framework is still used.
If you use the split button functionality to select another framework,
this framework will be used for the imported record.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 22:31:29 +00:00
a2e7e6ef1c Bug 10678 - Allow framework selection when creating from Z39.50
If we are creating a new record, we are forced to use the default framework
and then change it after we have the cataloguing form filled. This patch
adds the option to choose (from a splitted button dropdown) which framework
to use.

To test:
- Apply the patch.
- Go to More > Cataloguing
- Check there's a nice split button that says "New from Z39.50"
a) Click the button, the usual Z39.50 search popup should appear and work as expected
   (check the URL parameters and see frameworkcode= has no value
b) Click on the dropdown arrow, choose a framework and the usual Z39.50 search popup should
   appear, this time frameworkcode= should have the chosen value.

Edit: fixed a small bug that prevented the default framework to be called. Thanks Owen for testing.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 22:31:09 +00:00
Galen Charlton
d3a0e603fb Bug 10320: (follow-up) remove stray merge conflict marker
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 20:45:22 +00:00
Fridolyn SOMERS
ec09fe092e Bug 10718: fix items with no checkouts report
Bug 8124 has commented the option to download results items with no
checkouts report into a file.  But the perl code of this page uses
the export into a file has default behavior since the input "output"
is no more present.  The consequence is that there are never results
in page.

This patch removes the code concerning file output from template and perl.
Such a feature exists in guided reports.

Test plan :
Play with cgi-bin/koha/reports/catalogue_out.pl form and see if you get results

Bug 10718 - select user branch as default

In cgi-bin/koha/reports/catalogue_out.pl report, select in library filter the user logged-in.

Test plan :
- Log into intranet with a normal user
- Got to "Items with no checkouts" reports
=> Your branch is selected
- Run report
=> You see "Filtered on : Branch = <your branch>"
- Come back to report
- Select "Any library"
- Run report
=> You do not see "Filtered on : Branch"

Bug 10718 - items with no checkouts report permission is execute_reports

This report only executes SQL to change reports/catalogue_out.pl permissions from all reports subpermissions to reports/execute_reports.

Test plan :
Test you can access and run this report with only execute_reports subpermission into reports permission.

Bug 10718 - redefine limit input

In reports/catalogue_out.pl form, the limit input is by defaut none.
So by default the report queries all the catalogue.
This may take a very long time (fall into timeout) and since now the results are displayed in page, the page may be huge.

This patch modifies limit input to removes the "none" option.
Also reduces the number of options (same options as guided reports results per page).

Test plan:
- Go to reports/catalogue_out.pl
=> first value "10" is selected
- Launch report
=> You see "Filtered on: limit = 10"

Bug 10718 - perltidy on reports/catalogue_out.pl

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tested all of these things, all ok - squashed patch for neatness.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Fixed a tab in one of the comments.
Improves script, but more work needed.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 20:04:43 +00:00
Fridolyn SOMERS
bc240a908d Bug 10564 - use OPACURLOpenInNewWindow in UNIMARCslim2OPACResults.xsl
When using UNIMARC XSLT for OPAC detail page, if record has an 856$u,
its content is displayed as a link. The syspref OPACURLOpenInNewWindow
adds the option of opening in a new window (attribute target="_blank").

856$u is also used in UNIMARC results XSLT but the use of
OPACURLOpenInNewWindow syspref is missing. It exists for MARC21.

This patch adds the use of OPACURLOpenInNewWindow in UNIMARCslim2OPACResults.xsl.

Test plan :
- In a UNIMARC catalog, enable XSLT for OPAC results page
- Create a record with a link in 856$u and set second indicator to 0
- Set OPACURLOpenInNewWindow syspref on
- At OPAC, perform a search that contains the record
=> You should see the link : "Click here to access online"
- click on it
=> You shoud get to a new window (or tab depending on your browser configuration)
- Set OPACURLOpenInNewWindow syspref off
- re-perform the search
- click on the link
=> You shoud stay in same window

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Work as described, no koha-qa errors
Tested following plan after applying patch

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
XSLT change only, works as described.
To test: Catalog 856$u and $a, 2nd indicator = 0.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 19:25:19 +00:00
Galen Charlton
46bbfa12a1 Bug 9924: (follow-up) ensure that correct error message is displayed
(Apparently) unlike HTML::Template::Pro, Template Toolkit doesn't like
template variables that are entirely numeric -- in conditionals, it
consider them integers, most of which are Perl true.

This patch changes this by setting the error variable to the error
value.

To test:

[1] Run the test plan from the previous patch.  In each
    case, verify that the error message is specifically applicable
    to the test.  For example, if you try uplaoading a patron image
    that is larger than 500KB, the error message displayed should
    specifically say so.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thank you Galen for catching this. Error messages showing up
now are much more specific and according to the error codes given.
I testd uploading a file larger then 500KB and triggered several
error messages giving the error code in the URL:
/cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201

All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 19:19:50 +00:00
3d8f462cce Bug 9924 - Simplify and rename patron card creator error message include
The patron card creator error message include uses a non-standard method
for displaying error messages, and is poorly-named.

This patch converts the method of displaying error messages for various
patron card creator options to the standard one ('<div class="dialog
alert">') and renames the include file to make it clear that it relates
only to patron card creator operations.

To test, perform various operations:

- Go to 'manage images' and try to upload a file which exceeds the
  500KBfile size limit
- Go to the edit batch page and manually append an error code to the
  URL:  /cgi-bin/koha/patroncards/edit-batch.pl?op=new&error=403
- Go to one of the manage pages and manually append an error code to the
  URL:
  /cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201

Correct display of an error message indicates that the include file is
being found.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plan, test suite and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 19:19:23 +00:00
6434f9264a Bug 9943: activate "Pay selected" button only when at least one fine is selected
If you select no fines but click the "pay selected" button the resulting
screen offers to let you pay against all fines, which is confusing. To
simplify things this patch disables the "pay selected" button if no
lines are selected.

To test, apply the patch and find a patron with outstanding fines. From
the "pay fines" page (members/pay.pl) try selecting and deselecting
checkboxes and using the "select all" and "clear all" links. When no
item is selected the "Pay selected" button should become disabled.
Confirm that the form submits correctly when one or more fines is
selected.

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works nicely in my tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 07:10:42 +00:00
Jesse Weaver
7b71c65885 Bug 10320: (follow-up) Fix copyright and style errors
This patch fixes a copypasta'd copyright statement, and some incorrect
POD and indentation.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 07:04:18 +00:00
Jesse Weaver
0f219a31be Followup for bug 10320: minor bugfixes and style improvements
Switch to the new method of showing star ratings. Also, fix some
translation bugs, an error that occurred when caching was disabled and
add a stub unit test.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 07:04:02 +00:00
Jesse Weaver
2d0bdc80fd Bug 10320 - Integrate OverDrive search into OPAC
Show any relevant results from the OverDrive ebook/audiobook service
on the OPAC search. This is done by showing a link with "Found xx
results in the library's OverDrive collection" at the top of search
results and linking to a page that shows the full results.

This requires an OverDrive developer account, and is enabled by
setting the OverDriveClientKey and OverDriveClientSecret
system preferences.  In addition, this patch adds the
OverDriveLibraryID system preference.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Henry Bankhead <hbankhead@losgatosca.gov>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 07:00:40 +00:00
794f0f28c9 Bug 10619 - fix errors in sco.css for the CCSR OPAC templates
sco.css is not missing from CCSR, but some image paths in the CSS are
incorrect, resulting in some missing images. This patch corrects those
broken paths.

This patch also hides the Cart/Lists/login region of the template which
should not be visible in self checkout.

To test, enable self-checkout and switch to the CCSR theme. Load a
patron for self-checkout and confirm that images associated with buttons
appear correctly: By the help link in the upper-right, on the 'Finish'
button, etc. Try checking out an item which is already checked out to
that patron to see more examples.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
CSS changes only, works nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 06:33:53 +00:00
1c8c9bb0fe Bug 10769 - Simplify clearing of input fields when duplicating a patron
When duplicating a patron record an onclick event is added to many
fields in order to make then clear when focused. This patch updates the
template so that the logic for this can be simplified. A template
variable is set based on the 'opduplicate' variable, and a class added
to the relevant fields. All fields with that class are cleared on focus.

Also changed are several markup issues which were causing validation
errors.

To test, find or create a patron record which has all standard text
fields filled with data. Use the "duplicate" button on the detail view
of that patron to initiate the duplication process.

Focus on each field in the patron entry form in succession. Fields which
contain data should be cleared in the same way they were before the
patch.

Also test a regular edit operation to confirm that fields are not
cleared.

Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.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>
2013-09-08 06:30:03 +00:00
e30612bb3f Bug 10027: (follow-up) improve display of fine details on printed invoice
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Checked invoice is correctly printed for
- partially paid fines
- paid fines
- unpaid fines

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 06:24:39 +00:00
b8e1e7e217 Bug 7478: fix template translation problem in catalogue_out.tt
The items with no checkouts template has a sections that uses DEFAULT to
set some strings: [% DEFAULT loopro.itemcallnumber="No Call Number" %]
This appears to be untranslatable with our current translation tool.

This patch changes the template so that it uses a simple [% IF %] block
to display the default text if no value is set. Added is use of the
Branches template plugin to show library name instead of code.

This patch also fixes an error introduced in my fix for Bug 8124 causing
the page to default to CSV download instead of output to screen.

To test, apply the patch and confirm that the default text appears
onscreen in reports which include results that have a missing barcode,
title, or call number. Results should be displayed on screen correctly.

Run "perl translate update" for any language and confirm that the newly
generated po file includes "No call number," "No barcode," and "NO
TITLE" for catalogue_out.tt

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, thx Owen!

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 05:15:58 +00:00
d892340cf5 Bug 10325 - QA Followup - Fix typos
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 02:16:55 +00:00
47bd795b82 Bug 10325 - Allow system preferences to be overridable from koha-httpd.conf
For Koha installations with multiple OPAC URLs, It would be nice to be
able to override systeprefs from the http conf file. Case in point,
a library wants to have two separate opacs, one the is only viewable
from within the library that allows patrons to place holds, and a second
public one that does not. In this case, overriding the system preference
RequestOnOpac would accomplish this simply, and with no ill affects.

This feature would of course be should only be used to override
cosmetic effects on the system, and should not be used for system
preferences such as CircControl, but would be great for preferences
such as OpacStarRatings, opacuserjs, OpacHighlightedWords and many
others!

Test Plan:
1) Apply this patch
2) Disable the system pref OpacHighlightedWords
3) Do a seach in the OPAC, not the term is not highlighted
4) Edit your koha-http.conf file, add the line
     SetEnv OVERRIDE_SYSPREF_OpacHighlightedWords "1"
   to your koha-http.conf file's OPAC section.
   Also add the line
     SetEnv OVERRIDE_SYSPREF_NAMES "OpacHighlightedWords"
   to the Intranet section
5) Restart your web server, or just reload it's config
6) Do a seach, now your search term should be highlighted!
7) From the intranet preference editor, view the pref,
   You should see a warning the this preference has been overridden.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 02:09:53 +00:00
Galen Charlton
2b9f08555a Bug 10550: (follow-up) correct one additional instances of 'wthdrawn'
This was introduced after Kyle's patch passed QA.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 01:59:00 +00:00
dbaefb626c Bug 10550: Fix database typo wthdrawn
This patch updates the wthdrawn field in items and deleteditems to be
withdrawn instead. No functional changes are made.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Save for translation files (that will be fixed on next release),
only occurrence of wthdrawn is on updatedatabase.pl
No koha-qa errors.

This touch many files, and I did not test everything,
but all seems normal. I think that any problem could
be fixed later.

Perhaps both entries in updatedatabase.pl could be joined
into one, but thats for QA.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 01:58:41 +00:00
f5c7badb31 Bug 10349 - Don't show empty Descriptions/Title notes tabs in OPAC and staff
The descriptions/title notes tab appears on the detail page in both
staff client and OPAC even if there are no notes. This is probably a
relic of the pre-T:T days when it wasn't possible to use || in an IF.
This patch adds a check for the various variables which might trigger
the display of the tab.

To test, apply the patch and view records in the OPAC and staff client
which do and do not have title notes attached (whether that be in the
MARC record or in the biblio.notes column). In the OPAC Syndetics
content should also be tested if possible. The descriptions/title notes
tab should only appear if there is content.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
That's better - thx Owen!
Works nicely and passes all tests.
Tested in staff and OPAC, also in combination with NotesBlacklist
hiding all notes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 01:48:48 +00:00
ec070fa837 Bug 10672 - Add subtitle to display of checkouts, overdues, and holds on the patron summary
In the OPAC, the patron summary page (opac-user.pl) should display
subtitle along with title in the lists of checkouts, overdues, and
holds. This patch adds it.

To test, log in to the OPAC as a patron who has checkouts, overdues, and
holds which include titles with subtitles. Titles should appear
correctly with and without subtitles.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-07 21:07:28 +00:00
8c3d3eb01a Bug 10721 - Improve DataTables configuration on transfers to receive report
I noticed this template used a hidden span to allow correct sorting of
titles--a relic of the previous table sorting plugin. I have removed
that and added an improved DataTables configuration.

To test apply the patch and view the transfers to receive report for a
library which has multiple transfers to receive. Sorting should work
correctly on all columns, including correct date sorting regardless of
dateformat system preference. Title sorting should correctly exclude
articles.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and works nicely.
Tested with different date formats.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-07 21:04:53 +00:00
275dfd2fac Bug 10793: XSLT change 780/785 search queries to use ti,phr indexes like other linking entries
This patch adds the ti,phr index to the search queries for the 780
and 785 MARC fields in the XSLT templates.

Test Plan:

1) Use a record with 780 and 785 MARC fields with data in the "a" or
"t" subfields. (You might need to add these fields to an existing
record, or create a new record. You might also need to change your
MARC Bibliographic Framework settings to not "hide" these fields in
your framework(s)).

N.B. The data in the "a" or "t" subfields should be a title that
exists in your database. Otherwise, this test might seem misleading.

2) Set the system preferences "XSLTDetailsDisplay" and
"OPACXSLTDetailsDisplay" to "default".

3) Go to your record (which contains the 780/785 fields), and look
for links with linktext derived from the "a" or "t" fields in the
record. These may or may not be prefaced with labels such as
"Continued by" or "Continues".

4) Note that the links are formatted "q=TITLE". Click this link
and note the possibly high number of results.

5) APPLY THE PATCH

6) Shift+Refresh your record page, and observe that the link should
now say "q=ti,phr:TITLE". Click this link and note that you are
either taken directly to the referenced article or that your
search results are considerably fewer.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
XSLT change only, no regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-07 20:59:27 +00:00
Mathieu Saby
3d6bec7455 Bug 10218: Add individual CSS classes for bibliographic information in OPAC (UNIMARC)
Follow-up for UNIMARC XSLT Display
This patch adds class to span markup in list and detail display.
XSLT are not build in the same way in MARC21 and UNIMARC, so I had
to add a parameter "spanclass" to 3 templates called in UNIMARC :
tag_title, tag_7xx, tag_comma

To test, apply the patch on a Koha instance with UNIMARC records, and
- activate sysprefs  OPACXSLTDetailsDisplay and OPACXSLTDetailsDisplay
- make a search on the OPAC. In the results, check the spans with
"results_summary" class have also more a precise class.
Ex : span class="results_summary publication"
- view some records in detailed view. If possible, a record with
a series, a record with some subjects, a record with different authors,
a record with a link in 856. Check the spans with "results_summary"
have also a more precise class.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works exactly as described on results and detail.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
XSLT only change.
Tested in a UNIMARC install, HTML source code looks ok.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-07 20:57:04 +00:00
Galen Charlton
dd367efddf Bug 7143: history.txt and about page updates
- two new developers
- releases

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Reads all ok.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-07 20:47:22 +00:00
e86a951617 Bug 10649 - Upgrade DataTables and move scripts out of theme directory
This patch adds an upgraded copy of the DataTables plugin to the jQuery
plugin directory outside the theme directories. Copies of the old
DataTables plugin scripts have been left in the old location while
templates are incrementally updated.

To test, visit each affected page in Acquisitions and confirm that table
sorting still words correctly:

- Acquisitions home
- Acquisitions -> Late orders
- Acquisitions -> Order search
- Acquisitions -> Ordered (from table of available funds)
- Acquisitions -> Spent (from table of available funds)
- Acquisitions -> Vendor search
- Acquisitions -> Vendor detail
- Acquisitions -> Vendor -> Basket
- Acquisitions -> Vendor -> Basket -> Add order from existing record
                                   -> Add order from suggestion
                                   -> Add order from subscription
                                   -> Add order from external source
                                   -> Add order from staged file
- Acquisitions -> Vendor -> Basket groups
- Acquisitions -> Vendor -> Uncertain prices
- Acquisitions -> Vendor -> Invoices
- Acquisitions -> Vendor -> Invoices -> Invoice
- Acquisitions -> Vendor -> Receive shipments
- Acquisitions -> Vendor -> Receive shipments -> Receipt summary (click
  invoice number)

Also test one or more pages which have not been modified to confirm that
old DataTables assets are still in place and working (ex: Circulation,
Quotes editor, Saved reports, etc.)

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Edit: Rebased on current master

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests und QA script pass. I found some smaller bugs, that
also appeared on master without the patch applied. For some datatables
I struggled with a result set of over 5.000 lines - there is room for
improvement where a lot of data can be shown.

testing notes:
    - Acquisitions home
      - Amounts don't sort correctly before and after the patch, see bug 10792.
    - Acquisitions -> Late orders
      - OK.
    - Acquisitions -> Order search
      - OK.
    - Acquisitions -> Ordered (from table of available funds)
      - OK.
    - Acquisitions -> Spent (from table of available funds)
      - OK.
    - Acquisitions -> Vendor detail
      - OK.
    - Acquisitions -> Vendor -> Basket
      - OK.
    - Acquisitions -> Vendor -> Basket -> Add order from existing record
      - Datatables seems not to be in use here?
                                       -> Add order from suggestion
      - OK.
                                       -> Add order from subscription
      - OK.
                                       -> Add order from external source
      - OK.
                                       -> Add order from staged file

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-05 15:43:36 +00:00
Jonathan Druart
ba39ef9d67 Bug 10737: (follow-up) make the new 'Closed' column sortable
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-05 15:28:51 +00:00
baab2a2cb4 Bug 10737: Add "Add to basket" link on vendor search results page
This patch adds an "add to basket" link to the vendor search results
page for each open basket associated with each vendor. Clicking it
triggers a modal window with the "add to basket" choices for that vendor
and basket.

Other changes in this patch:

- The add-to-basket include has been modified in order to make it more
  useful in this context.
- booksellers.pl has been modified to check for an existing budget so
  that the add-to-basket include can properly display a warning if there
  are none.
- "New basket" and "Receive shipment" buttons associated with each
  vendor search result have been converted to Bootstrap-styled buttons.
- Basket closed date has been moved into its own column so that the
  table can be sorted by that value.
- Table columns containing dates now use the "title-string" sort option,
  eliminating the need for a special date sorting algorithm.
- Converted some &'s to &amp;'s

To test, apply the patch and search for a vendor. For each vendor in
your search results baskets which are open should include an "add to
basket" link. Clicking it should open a modal dialog with the same "add
to basket" options offered on the basket page. The correct vendor ID and
basket number should be associated with each link.

The newly-styled "new basket" and "receive shipment" buttons should work
correctly. Table sorting should work correctly, including the new
"closed" column.

Since the add-to-basket include file was modified, the "add to basket"
button on the basket view page should also be tested (acqui/basket.pl).

Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-05 15:28:31 +00:00
76a1a00977 Bug 9603 - Fix layout of Patron Card Creator Layout screen for display in IE
Currently, the layout for the Edit/Add Layout screen of the Patron
Card Creator is in complete disarray, when viewed in Internet Explorer
(of any version).

The nav bar is pushed to the bottom of the page, every fieldset is
empty (as their contents have been pushed out into different parts
of the page), and the checkboxes don't work.

The cause appears to be some extraneous mark-up (a few extra fieldset
and li elements)and some missing mark-up (ol elements to wrap the list
elements, especially when nesting lists within each other and within
div elements).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I didn't test this in IE, but changes are fixing general
problems with HTML validity.

Checking the page with the W3C validator:
Before: 27 Errors, 7 warning(s)
After:  6 Errors, 7 warning(s)

All tests and QA script pass, page looks alright.
Would be nice to see the remaining problems fixed in
a follow-up.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-04 18:15:51 +00:00
Fridolyn SOMERS
600e953dff Bug 10588: improve selection of default branch for OPAC popular items pag
In OPAC most popular items page:
With user is logged-in his branch should be selected by default.
When a branch is manually selected and form is submitted, this branch
should be selected in results page.
When looking at HTML, you see that all options are selected in combobox.

This patch corrects by using the hidden input 'do_it' to distinguish
form display and no branch filter selected.

Test plan :
- Make sure there are issues on records created in the past 3 month
- Go to OPAC not logged-in
- Click on "Most popular"
=> You get to page with results, "All libraries" is selected
- Select a branch and submit
=> You get to page with results, the branch is selected [testing opac-topissues.inc from]
- Select a branch and perform a search that does not have results (for example an item type never issued)
=> You get to page without results, the branch is selected [testing opac-topissues.tt form]
- Log-in with a user
- Click on "Most popular"
=> You get to page with results, user's branch is selected
- Select "All libraries" and submit
=> You get to page with results, "All libraries" is selected [testing opac-topissues.inc from]
- Select "All libraries" and perform a search that does not have results (for example an item type never issued)
=> You get to page without results, "All libraries" is selected [testing opac-topissues.tt form]

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-04 17:14:22 +00:00
Jonathan Druart
d1f8d8811b Bug 10786: fix Javascript error on the parcel page
The include of the yui json file generates a js error: YAHOO is not
defined.

This file seems not to be in use (patches for bug 8382 remove the use).

To test:
- go on acqui/parcel.pl?invoiceid=XXX
- verify the error occurs (with firebug)
- apply this patch
- refresh the page
- verify this error does not appear anymore
- Verify there is no regression on this page

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch fixes the javascript error pointed out by Firebug.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-04 16:59:28 +00:00
a1a4ff2bef Bug 10755 - Add "Keyword as Phrase" to staff client advanced search indexes
This patch adds a "Keyword as Phrase" index to the search options in
the staff client.

Test Plan:

1) Go to the Advanced Search in the staff client and click on the "Keyword"
drop-down list.
2) Note that there is only a "Keyword" not a "Keyword as Phrase" option
3) Apply the patch
4) Reload the Advanced Search
5) Note that there is now a "Keyword as Phrase" option as well

If you want to test the functionality...it will depend on your catalogue
data.

Basically, a phrase search will allow you to find "Keyword Adjacent To
Keyword" rather than a more scattershot search that finds the keywords
regardless of their position to each other.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Template change is correct, and in my tests the searching behavior was
correctly modified: Using "keyword as phrase" returned only results
where the terms were adjacent.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Passes koha-qa.pl, trivial patch with no possible side effects.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-04 14:25:47 +00:00
52a6d2189d Bug 10634 - Use datatables for course details items table
We should make the course items table in the course details a datatable
to enable searching or sorting.

Test Plan:
1) Apply this patch
2) View the details page for a course with items
3) Verify the table displays and is now a datatable

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-04 14:19:03 +00:00
Galen Charlton
4677fa9bd2 Bug 6594: (follow-up) remove TT directive embedded in tag
To test:

Verify that prove -v xt/tt_valid.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 16:40:54 +00:00
0779e98ddf Bug 9782: hide cancel button when importing MARC bibliographic frameworks
When importing frameworks the "cancel" button should be hidden once an
import is initiated since it is not possible to cancel the import in
progress.

This patch uses this bug as an excuse to replace the old import/export
pop-ups with modal dialogs for all import/export functions.

To test:

- Try exporting both the default framework and at least one other
  framework.
- Try importing both a default framework and at least one other
  framework.
- When importing, observe that the modal dialog controls are hidden as
  soon as the import is initiated.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, passes all tests and QA script.
Also the modal works better on smaller screens.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 15:42:30 +00:00
Galen Charlton
e1bde425d8 Bug 10566: (follow-up) fix HTML validation issues
These issues predated the previous patch, I just took
this chance to fix them.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 15:07:09 +00:00
a0456560a4 Bug 10566 - Improve OPAC course reserves pages
This patch makes various improvements to the OPAC course reserve pages:

- Descriptive page titles for both pages.
- More compact display of course information on course detail page
  (a list instead of a table, consistent with other displays of similar
  information in Koha).
- Correct capitalization.
- Added label and fieldset to course reserve search form.
- Added breadcrumb navigation to course reserve detail page as a path
  back to course reserves main page.

To test, apply the patch and confirm that the changes haven't broken
anything and are an improvement.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and improves the display.
Tested with only 1 course, 2 courses,
courses with and without items selected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 15:01:45 +00:00
Magnus Enger
da40fe77fc Bug 10690 - Warn about trailing slashes in description of OPACBaseURL and staffClientBaseURL
The descriptions for OPACBaseURL and staffClientBaseURL are not explicit
about including a trailing slash or not. This patch makes it explicit
that the trailing slash should *not* be included.

To test:
- Apply the patch
- Search for "baseurl" in the system preferences
- Check that the description of both sysprefs includes a warning about
  not including a trailing slash.
- Sign off

If you want to check that the trailing slash is in fact superfluous you
can do something like 'grep -r "BaseURL" *' and check that these
sysprefs are usually concatenated with some string that starts with a
slash.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changes to the description appear correctly on both system
preferences.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 14:15:03 +00:00
08330ec05b Bug 10130: widen input fields for library configuration
Most input fields in the library entry form (admin/branches.pl) have no
explicit width, so they display with a browser-default width. This patch
gives explicit widths to those fields, giving more room for entry.

Other fields have been given an explicit width and/or maxwidth according
to the database table structure.

To test, add or edit a library in Administration -> Libraries and
Groups. Form fields should be more comfortable for entry, and add/edit
actions should complete correctly.

Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template changes only, works nicely.
Tested editing and adding libraries in administration.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 14:06:44 +00:00
Dan Scott
fa68cda549 Bug 6594: Schema.org span nesting improvements
So, it turns out that the <a href> was causing a new "chain" to be
invoked, thus nesting the <span> elements for properties within the <a
href> actually caused the properties to be attached to that new chain
rather than the containing object. Therefore, wrap the <span> elements
around the <a href> elements where applicable.

Thanks to Manu Sporny in #rdfa for helping me to sort this out.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
I tested by validating against the Google rich snippet tool,
validator.nu, and linter.structured-data.org. All were satisfied
with the microdata markup, and the properties that are set make
sense.

These patches are only for MARC21 XSLT view, but I think it is worth
pushing them even without the NORMARC and UNIMARC markup, so that
people can start to test out schema.org microdata in Koha, and
refine the implementation.

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

FWIW I agree with Jared, it is essentially a no-op in terms of what
the user sees, so is safe.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 13:50:06 +00:00
Dan Scott
1a50854d4f Bug 6594: Correct schema.org context for item status
We were inserting the <link> element inside an open <td> element, which
HTML parsers, even the most forgiving, do not like very much.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 13:49:57 +00:00
Dan Scott
aca2d54185 Bug 6594: Move subject keywords schema.org markup into <span> element
Google's rich snippets tool gets confused by the <a property="keywords">
approach, so stuff another span inside the <a> element to remove
confusion with the href attribute.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 13:49:49 +00:00
Dan Scott
c2cd6ae103 Bug 6594: Schema.org structured data for OPAC display
To support schema.org processors, such as Google, Bing, and Yandex,
structure our data so that it has machine-readable attributes. This pass
declares the CreativeWork sub-types as well as Product for the main
bibliographic record details, and uses the Offer type for holdings
information per the W3C Schema Bib Extend community group discussions.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Comments on final patch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 13:49:28 +00:00
452a4b7775 Bug 10587: fix HTML errors on authority detail page in OPAC
A validator check of the OPAC's authority detail returns a few minor
errors. This patch corrects the errors.

To test, apply the patch and run an OPAC authority detail page through
an HTML validator. There should be no errors which are specific to the
authorities detail template (as opposed to header and footer includes).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Also checked using the W3C validator and testing the
authority detail page in the OPAC is still correctly
displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-28 13:47:12 +00:00
Jared Camins-Esakov
1e1ccd68aa Bug 9820 follow-up: fix a typo
Although the XSLT template was renamed to nameABCQ, one instance of
the old name (nameABCDQ) was not corrected. This patch corrects that.

To test: Follow test plan on previous patch

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-26 15:14:08 +00:00
Galen Charlton
75959da681 Bug 9820: display titles in MARC21 name headings better in XSLT mode
Prior to this patch, if a 100/700 had a $c, it would be
displayed with no space between the contents of $a and $c in XSLT mode.

For example,

100 1#$aSeuss,$cDr.

would be displayed as

SeussDr

The problem was caused by the original version of the stylesheets
drawing a bit too much from the MARC21 to MODS transformation.

To test:

[1] In a MARC21 database, turn on XSLT display mode for
    staff and OPAC.
[2] Create or identify a bib that has a 100 or 700 field
    with both a $a and a $c.
[3] Before applying the patch, verify that the name is
    displayed in bib details and search results with the
    name and title squashed together.  For example, "SeussDr"
[3] After applying the patch, verify that the name displays
    in bib details and search results with a space and
    intervening punctuation between the name and the title.  For
    example, "Seuss, Dr."

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plan, works nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-26 15:14:02 +00:00
Bernardo Gonzalez Kriegel
5b9cd85dd0 Bug 10745: remove more ambiguity for translators for XSLT subfieldSelect parameters
As in Bug 6278, this patch replace ">at<" with ">a_t<"
so not to mislead translators. Found more cases that
initial description.

To test:

1) Check that problem exists and only on xslt files,
using your preferred language

egrep -B10 "^msgid \"at\"" misc/translator/po/xx-YY-i-staff-t*

2) Apply the patch

3) Update translation file
(cd misc/translator; perl translate update xx-YY)

4) Verify the problem is gone, repeat 1

5) If you like verify new entries in PO file

egrep -B15 "^msgid \"a_t\"" misc/translator/po/xx-YY-i-staff-t*

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested this with field 780 and running a Dutch translation.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-23 16:14:56 +00:00
Nicole C. Engard
841fe4559f Bug 10743: Add styles to 'my privacy' page in OPAC
This patch does a couple things.  Most importantly it adds
a new div around the privacy rules summary so that it can
be easily changed. It also moves the start of the form to
right above the form's select box so that it's not in the
new privacy rules div.

To test:

* Apply patch
* Enable the use of privacy via the sys prefs
* Log in to the OPAC
* Visit the 'my privacy' tab
* Make sure it looks okay
* Submit the form and make sure it works
* Repeat in the other theme

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Edit: Replaced a few tabs with spaces to keep the QA script happy.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, privacy options can still be edited.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-21 15:26:00 +00:00
Jonathan Druart
edf5467469 Bug 3134: (follow-up) improve ID and peport name sorting on saved reports page
The sort for ID is alpha instead of numerical, same for the report
names.

To test:
create id=1, name=Report 1
create id=2, name=Report 2
create id=10, name=Report 10
create id=11, name=Report 11

Sorting by id:
without this patch 1, 10, 11, 2
with this patch: 1, 2, 10, 11

Sorting by name:
without this patch: Report 1, Report 10, Report 11, Report 2
with this patch: Report 1, Report 2, Report 10, Report 11

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-21 14:26:36 +00:00
Jonathan Druart
fb2bcc05c1 Bug 3134: highlight all selected reports when confirming deletion of multiple reports
This patch adds the same behavior when deleting 1 or more reports.
When checkboxes are checked and the "delete selected" button is pressed,
checked lines are hightlighted in red.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-21 14:25:54 +00:00
0d88109018 Bug 3134: [Follow-up] Ability to select multiple reports to delete at once
This follow-up moves the checkboxes into a separate column from the
report ID in order to prevent visual inconsistencies.

To test, repeat the test plan from the original patch:

You must have two or more saved reports to delete. Deletion
should work properly when:

- Selecting one report for deletion by checking the box.
- Selecting more than one report for deletion by checking boxes.
- Clicking the old "Delete" link

Clicking the delete button should prompt you to confirm. Clicking cancel
should cancel.

Clicking the delete button when no boxes are checked should trigger an
alert asking you to select reports for deletion.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works really nicely, passes all tests and the QA script.

There is one little thing to note: If you delete a single report
using the option from the menu, the line you want to delete
is highlighted in red. It would be nice to do that also for
deleting multiple reports.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-21 14:25:19 +00:00
300918e488 Bug 3134: add ability to selelct multiple reports to delete at once
This patch adds the option to select multiple saved reports for
deletion.

To test you must have two or more saved reports to delete. Deletion
should work properly when:

- Selecting one report for deletion by checking the box.
- Selecting more than one report for deletion by checking boxes.
- Clicking the old "Delete" link

Clicking the delete button should prompt you to confirm. Clicking cancel
should cancel.

Clicking the delete button when no boxes are checked should trigger an
alert asking you to select reports for deletion.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Functional tests pass, template tests pass.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-21 14:24:33 +00:00
50ff4f4a94 Bug 10081: add library name to IndependentBranches error message
With IndependentBranches turned on, if you try to check out an item
which belongs to another library you will get an error message which is
missing the library name. This patch corrects the problem by passing the
necessary variable to the template and outputting the library name using
the KohaBranchName TT plugin.

To test, turn on IndependentBranches and try to check out an item
belonging to another library (note that you must test with a staff user
who is not a superlibrarian). The error message you see should include
the name of the library to which the item belongs:

"This item belongs to Nelsonville and cannot be checked out from this
location."

Checkouts of items belonging to the library should be unaffected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-20 14:26:25 +00:00
0a6e9c48c5 Bug 10701: fix display of transit status on the bibliographic detail page
The patch for Bug 10083 incorrectly changed some template variable names
so that in-transit details could not be shown on the biblio detail page.
This patch corrects the error.

To test, perform any action that will trigger an transfer between
libraries (for instance, check in an item from Library A at Library B).
View the detail page for that title and look for the transfer details in
the status column of the holdings table. It should show correct
information:

"In transit from Athens to Nelsonville since 08/08/2013"

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described, no errors.
Before patch incorrect information: "In transit from to since"
after patch correct information.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works perfectly and passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-19 15:15:48 +00:00
Galen Charlton
dee3354bd6 bug 9916: (follow-up) restore default sort order on OPAC tags list
(As a side-note, I actually prefer descending date as the default
sort order, but better to do that explicitly rather than have the
patch series for bug 9916 change visible default sorts.)

To test:

[1] Log into the OPAC, then go to the list of OPAC tags.
[2] Verify that the default sort order is ascending date
    added.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-19 14:55:12 +00:00
Galen Charlton
7630e0b5ae bug 9916: (follow-up) restore default sort order for self-check loan list
To test:

[1] Log into web-based selfcheck.
[2] Enter the barcode of a patron that has at least two loans.
[3] Verify that the loan list sorts them in order of descending
    due date by default, with a secondary sort order of ascending
    title.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-19 14:54:42 +00:00
Galen Charlton
7a967161dc bug 9916: (follow-up) restore default sort order for OPAC search history
To test:

[1] Go to the search history page on the OPAC.
[2] Verify that the searches are sorted in order of decreasing time.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-19 14:44:08 +00:00
Galen Charlton
1b6452bc54 Bug 9916: (follow-up) restore default sort order for OPAC "most popular" page
Set the primary default sort order to descending number of checkouts,
matching the situation prior to the introduction of DataTables. This
patch also sets the default secondary sort to ascending title.

To test:

[1] Ensure that OpacTopissue is ON.
[2] Go to the OPAC "most popular" page.
[3] Verify that the items are sorted in order of descending
    checkout count.  If two items have the same number of
    checkouts, verify that they are sorted in ascending
    title order.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-19 14:39:24 +00:00
ba470954fd Bug 9916 - Use DataTables in the OPAC
The OPAC still uses the old tablesorter plugin which isn't being
actively maintained. We use DataTables in the staff client and should in
the OPAC too. The plugin was added a while ago but never implemented on
any pages. This patch upgrades the plugin to the latest version and
places it in opac-tmpl/lib for cross-theme access. The patch implements
DataTables on all pages which previously used the tablesorter plugin.

The old tablesorter plugin is removed.

The customized DataTable configuration script, datatables.js, has been
trimmed-down from the staff client version in order to limit it to only
that functionality required in the OPAC.

Sorting based on date is done based on the data's enclosing <span> title
attribute as it is in the staff client:

<span title=" [% iso date %]">[% date | $KohaDates %]</span>

Slight modifications to Serials.pm and opac-search-history.pl have been
made to accommodate this change.

To test, view each page in the OPAC which uses JS-based table sorting:

- The bibliographic detail page
- The cart
- The search history page
- The suggestions page
- The tags page (logged in as a user who has entered tags)
- The "most popular" page (opac-topissues.pl)
- The logged in user summary page (opac-user.pl)
- The subscription "full history" page (opac-serial-issues.pl?selectview=full)
- The self-checkout main page (with existing checkouts)

Table sorting should work correctly on all pages in both the prog and
ccsr themes. Sorting should work for dates whatever your dateformat
system preference setting. Tables listing titles should exclude articles
("a," "an," and "the" in English) when sorting.

Also test the serial collection page in the staff client, which is
affected by the change to Serials.pm. Confirm that dates are displayed
and sorted correctly.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works really nicely on all pages.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-19 14:19:02 +00:00
Christophe Croullebois
a7fe13a52f Bug 10573: French translation for printing a basketgroup
If you want to print a basketgroup with pdf format, it will be in
English.  The pdf is done with layout2pages.pm or layout3pages.pm,
which call layout2pages.pdf or layout3pages.pdf.

This patch adds layout3pagesfr.pm in src/acqui/pdfformat/ which
calls layout3pagesfr.pdf.

And adds in basketgroup.pl the check for layout3pagesfr
To use it you have to change the systempreferences to  pdfformat::layout3pagesfr

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Work as described, koha-qa reports some tab errors.
Corrected in a followup.

Please, always add a test plan, it's easier to test.

Test:
1) apply the patch
2) change syspref OrderPdfFormat to pdfformat::layout3pagesfr
3) select a vendor
4) create a basket group (empty works)
5) close basket group
6) print basket group
7) PDF is in french

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works nicely, although it would be better if we could
find a more general solution to make the templates editable
and translatable.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-17 16:05:04 +00:00
Jared Camins-Esakov
b0ea3be36c Bug 10686: Remove fields from searches for highlighting
If you do a fielded search like au:smith, "Smith" will not get
highlighted on the results page because the Javascript is looking for
the exact string "au:smith."

To test:
1) Turn on OpacHighlightedWords.
2) Do a simple keyword search.
3) Confirm that the word is highlighted on the results and details page.
4) Do a fielded search by entering au:smith (or whatever).
5) Confirm that the word is highlighted on the results and details page.
6) Sign off.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-16 16:33:36 +00:00
dbe233a0e5 Bug 9238 - make fund pull down say 'select fund', not 'select budget'
When adding a new order to a basket the fund selection field is labeled
"Fund:" but the default option is "Select a budget." This patch changes
this string to "Select a fund" and also corrects the associated
JavaScript error message text displayed when one doesn't choose a fund.

To test, add an order to basket. The "New order" form should show
"Select a fund" as the default option for "Fund" in the "Accounting
details" section. If you submit the form without selecting a fund the
error message should read "You must select a fund."

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
String updates only, passes koha-qa.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-16 16:12:29 +00:00
70ede048e5 Bug 5825 - Add Item Type column to Holds Queue report
The hold queue report shows collection code but not item type. This
patch adds it. Also added is use of the KohaAuthorisedValues template
plugin to display the collection code description instead of code.

To test, apply the patch and view the holds queue. There should be a new
item type column showing an item type description for each row. The
collection column should now show the collection description instead of
code.

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
2013-08-16 15:15:31 +00:00
Jonathan Druart
a4d8144efd Bug 10716: fix JavaScript error on basket groups page
To test:

Go on acqui/basketgroup.tt and verify a js error occurred
(ReferenceError: CONFIG_EXCLUDE_ARTICLES_FROM_SORT is not defined).
Apply the patch and verify the error does not appear anymore.

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>
2013-08-16 14:44:07 +00:00
0648d2883d Bug 10615 - Move saved reports action items into dropdown menu
This patch moves saved reports "action" links (view, edit, run, etc)
into a dropdown menu triggered by clicking an "Actions" button.

To test you must have saved reports. View the saved reports page and
click the "Actions" button in the last column of the table. This should
trigger a menu. All options in the menu should work correctly.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
works and looks awesome

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Yes, exactly what I had in mind. Great improvement.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-16 14:20:24 +00:00
Jared Camins-Esakov
6b5960cc2a Bug 10405: add IDs for customizable OPAC regions
This patch adds unique IDs for:
opaccredits
opacheader
OPACMobileUserCSS
OpacNavBottom
OpacUserCSS
opacuserjs

This is an amended patch which includes the changes to CCSR which I
forgot to commit before. The patch does not add a unique ID for
opacheader to CCSR, since opacheader is positioned wrong.

This is most useful for previewing changes you make in the OPAC
preferences using the following javascript in your IntranetUserJS:

function showPreview(url) {
    $('#preview-loading').show();
    document.getElementById('opac-preview').src = url;
    $('#opac-preview').load(function () {
        $('#opac-preview').show();
        $('#region-opaccredits', $('#opac-preview').contents()).html($('#pref_opaccredits').val());
        $('#region-opacheader', $('#opac-preview').contents()).html($('#pref_opacheader').val());
        $('#opacmainuserblock', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlock').val());
        $('#opacmainuserblockmobile', $('#opac-preview').contents()).html($('#pref_OpacMainUserBlockMobile').val());
        $('#region-opacnav', $('#opac-preview').contents()).html($('#pref_OpacNav').val());
        $('#region-opacnavbottom', $('#opac-preview').contents()).html($('#pref_OpacNavBottom').val());
        $('#opacrightsidebar', $('#opac-preview').contents()).html($('#pref_OpacNavRight').val());
        $('#noresultsfound', $('#opac-preview').contents()).html($('#pref_OPACNoResultsFound').val());
        $('#opacresultssidebar', $('#opac-preview').contents()).html($('#pref_OPACResultsSidebar').val());
        $('#region-opacusercss', $('#opac-preview').contents()).replaceWith('<style id="region-opacusercss" type="text/css">' + $('#pref_OPACUserCSS').val() + '</style>');

        $('#region-opacuserjs', $('#opac-preview').contents()).replaceWith('<script id="region-opacuserjs" type="text/javascript">' + $('#pref_opacuserjs').val() + '</script>');
        $('#preview-loading').hide();
    });
}

$(document).ready(function () {
    if ($('#pref_OpacNav').size() > 0) {
        $('#doc3').after('<div class="navbar navbar-fixed-bottom" style="z-index: 10000;"><div id="preview-pane" class="navbar-inner"><h4 style="float: left; margin-right: 2em;">Preview changes</h4><div class="btn-group" data-toggle="buttons-radio"><button type="button" class="btn" id="preview-main">Main page</button><button type="button" class="btn" id="preview-results">Results</button><button type="button" class="btn" id="preview-details">Details</button><button type="button" class="btn active" id="preview-hide">Hide</button></div><img id="preview-loading" style="display: none;" src="/intranet-tmpl/prog/img/loading-small.gif"><iframe id="opac-preview" style="height: 20em; width: 100%; display: none;"></iframe></div></div>');

        $('#preview-main').click(function () {
            showPreview('/cgi-bin/koha/opac/opac-main.pl');
        });
        $('#preview-results').click(function () {
            showPreview('/cgi-bin/koha/opac/opac-search.pl?idx=&q=pqf%3D%40attr+1%3D_ALLRECORDS+%40attr+2%3D103+%22%22&branch_group_limit=');
        });
        $('#preview-details').click(function () {
            showPreview('/cgi-bin/koha/opac/opac-detail.pl?biblionumber=1');
        });
        $('#preview-hide').click(function () {
            $('#opac-preview').hide();
            $('#preview-loading').hide();
        });
    }
});

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Note: The provided JavaScript didn't work for me and resulted in an
error in Firebug. Ater talking to Jared it seems like there is more needed
than the bit of Javascript so make this work, but it might be a good
starting point, so I am leaving it in the commit message.

Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-14 21:55:04 +00:00
Srikanth Dhondi
98bd9de54a Bug 8712: add 'and' label for inputs in OPAC "fewer options" advanced search page
The "and" label not only improves the accessibility but also gives the
user an idea that the operation between multiple search fields is a
boolean "AND" by default.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Actually only adds a label and an id to the select.
Note that the boxes do not exactly align anymore now (with fewer options).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-14 21:41:21 +00:00
Srikanth Dhondi
f0280dabe0 Bug 8712: change "New list" to "Create new list" in OPAC masthead
This makes it clear for screen reader users.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Note that you should delete all your private lists to see this change.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-14 21:36:28 +00:00
Janusz Kaczmarek
129c974fdd Bug 5262: make authority plugin copy indicators to bib record
With this patch Koha should correctly copy indicators
(and create $2 subfield in MARC 21 if need) from the chosen authority
record to the edited bibliographic record (according to discussion in
bugzilla). UNIMARC and MARC 21 flavors are covered.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: work as described, testing in comments 9 and 12.
No errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests. Tested functionality repeating
some of the tests noted by Bernardo - checking mostly 1xx, 490,
and 7xx.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-14 17:17:22 +00:00
fe19321081 Bug 10614 - have add order form at top and bottom
If a basket has a lot of items it may be inconvenient to scroll to the
bottom of the patch to reach the "add to basket" form. This patch adds
as "Add to basket" button to the toolbar which uses JavaScript to copy
the form into a modal dialog for quick access.

To test, apply the patch and view an open basket. You should be able to
click the "Add to basket" button to trigger a modal dialog with the full
"Add to basket" list of options. All options in the list should function
normally.

If you view a closed basket the new button should not appear.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass and I love it :)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-13 14:18:50 +00:00
Fridolyn SOMERS
5192fd81ad Bug 10362: ensure that all messages and alerts are shown upon checkin
If an item is returned and has mutiple error or warnings (e.g.,
it both needs to be transferred and the patron was debarred
in the course of the return), because of a bug in the template,
not all of the messages would be displayed.

This patch changes the template to show both messages and alerts.

Test plan :
- Perform an checkout that will a checkin :
  * need a transfert (return in a different branch)
  * set user debarred (depends on issuing rules)
- Perform check-in
=> You get tranfert message and debarment alert

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-12 15:18:46 +00:00
Fridolyn SOMERS
4f263b3a90 Bug 10247: show warning if hold blocked due to maxreserves syspre
On intranet, when placing a hold requst:
If borrower has reached the request limit, a warning should appear :
  Cannot place hold
  * Too Many Holds: TEST has too many holds.

This works when quota defined in circulation rules is reached but not
when limit specified in syspref maxreserves is reached, in case this
limit is lower than the one defined is circulation rules.

This is because template param maxreserves is set twice, this patch
corrects this bug.

Also moves warnings and messages conditional variable from Perl to
template because it cause the same bug as for maxreserves.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-12 15:02:57 +00:00
7d6edc6f18 Bug 10511: (follow-up) jQuery .removeAttr() has only one parameter
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-12 14:12:38 +00:00
e608f4d48c Bug 10511: fix message preference form glitch concerning phone notifications
An error in the onclick for phone notices causes the "Do not notify"
checkbox to be checked when the phone checkbox is checked. Also,
checking "Do not notify" does not uncheck the phone checkbox.

Test plan:
1) Enable TalkingTechItivaPhoneNotification
2) Browse to the new patron screen ( memberentry.pl )
3) In the patron messaging preferences check the Phone checkbox
4) Not the "do not notify" checkbox is then checked
5) Uncheck the "do not notify" checkbox, and check the Email checkbox as well
6) Now check the "do not notify" checkbox, note the Phone checkbox remains checked
7) Apply this patch
8) Repeat steps 3-6, noting the odd behavior is no longer present

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-12 14:11:12 +00:00
8acce47efc Bug 10404: tweak style of staff client previous/next links
This patch slightly modifies the styles of the previous/next links in a
way that I think is simpler and clearer.

To test, apply the patch and clear your browser cache if necessary.
Perform a search in the staff client, click any result, and look at the
prevous/next links.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-09 15:08:49 +00:00
Jared Camins-Esakov
762c3304ea Bug 10404: add previous/next browsing to staff client
Although previous/next browsing was added for searches in the OPAC
in 2011, the staff client has been without any sort of search browsing.
Until now. This patch is an all-singing, all-dancing, all-compatible
implementation of search browsing that will work across multiple
browser tabs and on any browser since IE7 (though the staff client
layout is broken on IE7).

To test:
1) Perform a search that will bring up multiple results.
2) View one of the results.
3) Use the Previous and Next links to browse along the search results.
4) Use the "Return to results" button to check that you end up at the
   correct page of results, even if you page through more than 20
   records.

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>
2013-08-09 15:07:39 +00:00
cf902c704b Bug 7257: Add a link to remove an individual title from a list in the OPAC
It should be possible when viewing the contents of a list to click a
link to remove an individual title from the list without having to check
a checkbox and click another button.

This patch adds a link to each list item to "Remove from this list."
The functionality is JavaScript-dependent, automatically checking the
appropriate checkbox and submitting the form to delete.

To test, view a list for which you have delete permission. There should
be a "Remove from this list" link next to each item on the list. Test
delete functionality by:

- Clicking the link and then clicking cancel.
- Clicking the link and confirming.
- Checking more than one checkbox and then clicking a single remove
  link (only the one corresponding record should be removed).
- Checking one or more checkboxes and clicking the "Remove from list"
  link at the top of the page.

If JavaScript is disabled the links should not appear.

There are now two delete confirmation messages: One if you're removing
only one item, another if you're removing more than one. This is true
whether you use the links or the checkboxes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-07 14:45:21 +00:00
Galen Charlton
05019c1360 Bug 5652: (follow-up) include subtitle in hyperlink
This follow-up patch makes the subtitle part of the same
hyperlink as the title, maintaining consistency with other
pages in the staff interface such as list contents.

To test:

[1] Make sure that the Keyword to MARC mapping includes
    mappings to 'subtitle'.
[2] Find a biblio that has both title and subtitle.  Check
    it out to one patron and place it on hold for another.
[3] In the checkout and patron details pages, verify that
    the entry for this bib in the list of checked out titles
    or hold requests includes both title and subtitle in
    the same hyperlink.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-06 14:46:31 +00:00
Marc Veron
976561a384 Bug 5652: display subtitles on patron checkout and holds summary
This patch adds subtitles (from Keyword to MARC mapping) to the
following tables on the checkout page:

- Checkouts
- Previous checkouts
- Relative's checkouts
- Relative's previous checkouts
- Holds

Additionally it suppresses the appearence of the superfluous word "by"
in cases where the biblio has no author.

Test scenario:
--------------
1)
Make sure that you have one or more fields mapped to subtitle in:
Home . Administration . Keyword to MARC mapping
(e.g. 245 b)

2)
Test the checkout page with patrons having
- current checkouts (today)
- previous checkouts
- relatives (e.g. kids) with current /previous checkouts
- holds on items
- holds on biblios

...with items having:
- title, subtitle, author
- title,  no subtitle, author
- title,  subtitle, no author
- title, no subtitle, no author

3)
Do the same on patron's detail page

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-06 14:30:52 +00:00
Galen Charlton
3a757d939a Bug 10671: correct minor issues in course reserves help
- fix a typo
- rename the help file for the course reserves home
  page so that it gets picked up when the user clicks
  the help link there.

To test:

[1] Go to the course reserves home page, then click on the
    "Help" link.  Verify that a help page with contents is
    displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-05 13:56:56 +00:00
Nicole C. Engard
b7ab80ae12 Bug 10671: Help files for course reserves
This patch adds the missing help files for course reserves.

To test:

* visit every page related to course reserves in the staff client
* click help in the top right
* review the help file for typos/content/links

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-05 13:56:55 +00:00
82e1a1c1b3 Bug 10609: Use library name rather than code in serials-collection.pl
The serials collection page displays branchcode instead of library name.
This patch uses the Branches template plugin to display the library name
instead.

Also corrected: Added missing datatables config include to prevent a
JavaScript error.

To test, view the serials collection page for a subsciption with
existing issues. Library names should be displayed instead of
branchcodes. There should be no JavaScript errors reported by the
browser.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works well and uses the new TT plugin for displaying the branch name.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-08-01 15:13:31 +00:00
Fridolyn SOMERS
2c7e1390b4 Bug 10543 - add mandatory subfield check to addorderiso2709.pl
When adding orders from staged file, you can create one order per
record using item form in the bottom of addorderiso2709.pl.  The
form was missing checks of mandatory item fields; this patch
adds those checks.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

All 3 patches pass tests and QA script.

Some additional notes on the test plan from the first patch:
It took me a while to figure out a combination of subfields
that would trigger the bug. I am not sure about the condition
that transforms the input field into a textbox as it does
not seem to happen for every field.

What worked in the end was (MARC21):
- $g cost, normal purchase price = mandatory
- $h serial enumeration/chronolgy = optional, filled with
  text over 100 characters

Checked for:
- Adding items in cataloguing
  Was able to reproduce the problem, mandatory check works
  as expected.
- Adding items from staged file in acq
  Was not able to trigger the problem, because we don't edit
  the item here, but mandatory check works as expected.
- Addings items for serial subscriptions
  Was not able to trigger the problem, because we don't edit
  the items here, but mandatory check works better as before
  as missing mandatory fields are now highlighted and weren't
  before.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-30 14:47:36 +00:00
Fridolyn SOMERS
0d4724e81b Bug 10543 - Unify item mandatory subfields check
Use of CheckMandatorySubfields from cataloging.js
everywhere an item cataloging form is checked for
mandatory fields.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-30 14:47:10 +00:00
Fridolyn SOMERS
651ea298ea Bug 10543: fix false warnings from checks of mandatory item fields
Under certain circumstances, when editing an item, you get a popup
warning
  "1 mandatory fields empty (highlighted)".

Even though all mandatory fields are filled in.

This occurs when there is a field with a huge content (more than 100
characters) that gets displayed in a textarea instead of input.

This patch corrects the Javascript form check by using siblings().

Also adds a more precise filter to find mandatory inputs because
looking in full page may bring unwanted results.

Test plan :
- In a framework, make sure you have in item field :
  An optional subfield (without authorised value),
  then a mandatory subfield, then an optional subfield
  next to mandatory subfield
  For example : $i (optional), $r (mandatory) and $s (optional)
- Open a biblio record and create a new item
- Enter more than 100 characters in $i, fill $r and $s
- Click "Add item"
- Edit this item
=> You get a textarea for $i
- Empty $s and Save
=> Without patch, you get a warning and form is not saved and you see that $s is yellow while it should be $r
=> With patch, form is saved
- Re-edit this item
- Empty $r and save
=> You get a warning and form is not saved

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-30 14:43:41 +00:00
Galen Charlton
383fe59871 bug 7494: (follow-up) tweak description of itemBarcodeFallbackSearch syspref
Thanks to MJ Ray for helping with the wordsmithing on #koha.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-24 15:12:45 +00:00
MJ Ray
84c2e7c1e5 bug 7494: optional checkout-time fallback search for a book
When issuing a book, some libraries want to issue by title or other details.
This patch adds a systempreference and code that allows it.

To test:
1) scan a patron card or enter a surname to start checking out;
2) enter title or other keywords;
3) the circulation screen should display a warning allowing to choose between copies.

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
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>
2013-07-24 15:12:38 +00:00
Galen Charlton
1a58e8cde3 Bug 9394: (follow-up) restore ability to cancel holds from the patron summary
To test:

- Place a hold request for a patron
- From the patron details page, navigate to the holds table,
  then cancel (delete) it.
- Verify that the hold request is gone.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-24 05:04:57 +00:00
Jonathan Druart
dd2185981d Bug 9394: QA Followup
* C4::Reserves::_FixPriority
  - The previous code checked the cancellationdate. If think you never pass
in it with bad parameters, but in order to be sure I added the check on
this value.
  - The reservedates array was never used.

* circ/circulation.tt
There was a bug: it was not possible to remove an hold from the
circulation page. Passing reserve_id fixes the issue.

* C4::Reserves::GetReserveId
This subroutine did not have a unit test.

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>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-24 05:04:56 +00:00
53fbfa2dde Bug 9394: Use reserve_id where possible
This patch switches from using a combination of
biblionumber/borrowernumber to using reserve_id where possible.

Test Plan:
1) Apply patch
2) Run t/db_dependent/Holds.t

Signed-off-by: Maxime Pelletier <maxime.pelletier@libeo.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-24 05:04:55 +00:00
Jared Camins-Esakov
4712fc66f0 Bug 9755 QA follow-up: fix template compliance
Fix the following test failure:
* koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc                FAIL
    forbidden patterns          OK
    tt_valid                    FAIL
            lines 10, 24
    valid_template              OK

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Found a pre-existing problem with non-repeating subfields
that I noted on the bug report.
All other tests were ok and merging records worked nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-23 23:10:48 +00:00
Jared Camins-Esakov
50fb4612ed Bug 9755: Refactor record merge functionality
This patch refactors the merge record interface and code a little bit
in preparation for making it possible to merge authority records.

To test:
1) Apply patch.
2) Try merging two records:
    a) Create a list.
    b) Add two records you would like to (or be willing to) merge
       to said list.
    c) View said list.
    d) Check the checkboxes next to the two records you added.
    e) Click "Merge selected records."
    f) Choose a merge reference.
    g) Choose fields from each record that you want to keep.
    h) Click "Merge."
3) Confirm that your merged record has the fields and subfields you
   wanted.
4) Run the unit tests for the two files that were changed:
    prove t/Koha_Record.t t/db_dependent/Koha_Authority.t
5) Sign off.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-23 23:10:07 +00:00
Katrin Fischer
c5cc04ef3d Bug 10516 - Follow up - Fixing capitalization
Fix capitalization on submit buttons when deleting
a Z39.50 server.

- Delete this Server
- Do Not Delete

I think the "Do not delete" should maybe even be a cancel
link to be more consistent with how Koha displays this
kind of dialog in other places.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
fixes capitalisation, tool stil works

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 18:44:17 +00:00
5c60ae40f9 Bug 10516 - Improve titles, breadcrumbs, and confirmation messages for Z39.50 server adds and updates
The template for adding/editing Z39.50 servers shows the same title,
breadcrumbs, etc. for add and edit operations. This patch creates
separate text for each case.

To test, try both adding and editing a Z39.50 server. The page title,
breadcrumb, and heading should correctly reflect the operation you
perform.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and all strings are translatable.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 18:44:02 +00:00
04b6b4ae72 Bug 10586: fix CSS styling when printing cart from Firefox
When printing the Cart from Firefox the styling is off even though it
looks correct in preview. I think this may be because the preview is
including stylesheets designated for screen.

This patch removes special handling of JS and CSS assets for the Cart's
print view, letting the page handle print styling like other pages in
the OPAC.

To test, put items in your Cart in the OPAC. Open your Cart and click
the "print" link. Your printout should be correctly styled and match the
preview.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Tested both fail condition and condition with patch - display is much improved. Thanks, Owen!

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Works as advertised

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 16:04:51 +00:00
b7305e4876 Bug 10576: make strings in additem.js accessible to translation
There are a couple of untranslatable strings in additem.js. This patch
moves the strings out of the script and into the include file which has
been created for this purpose.

To test, apply the patch and test the process for adding an item to an
existing or new basket (with AcqCreateItem set to "when placing an
order."

The add item form should be correctly labeled "Add item." After adding
an item, click to edit it again. The form should now be labeled "Update
item."

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and passes all tests.
Made sure strings can be translated testing with German templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 15:40:21 +00:00
04dd98fa84 Bug 10552: make several sysprefs available to the OPAC login page
Several system preference variables are unavailable to the OPAC login
template because they are not explicitly enabled for that page. Instead
of adding them to Auth.pm using the old method this patch uses the new
system preference check syntax using the Koha TT plugin.

The following preferences are now checked using this syntax in
masthead.inc:

OpacAddMastheadLibraryPulldown
UseCourseReserves
reviewson
OpacShowRecentComments

In order for the call in masthead.inc to the new plugin to work on all
OPAC pages "[% USE Koha %]" must be added to any template which
includes it (most of them).

Also in this patch: A change to Auth.pm to enable correct display of the
LibraryName in the title of the OPAC login page.

To test, turn on the above system preferences and confirm that the
relevant links appear under the OPAC's main search bar on all pages
including the login page.

Confirm that the text specified in the LibraryName system preference is
shown as the title of the login page.

Confirm that course reserves and comments are displayed correctly on the
biblio detail page.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
I checked both prog and ccsr - all seems well and the links are appearing and disappearing in accordance with the appropriate sysprefs.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 14:54:15 +00:00
Nicole C. Engard
7e6a630275 Bug 10197: Add classes to patron info list
This patch adds classes to the patron info found on the
top left of the circulation and patron related pages to
allow for easy styling of the information displayed.

To test:

* Apply patch
* View a patron detail page and view the source on the list to the
  left to see the styles
* View a checkout screen and view the source on the list to the
  left with patron info to see the styles
* You could also try to style things by customizing your CSS

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template only changes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 14:49:10 +00:00
Galen Charlton
ee224415b7 bug 7143: add latest batch of committers
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 14:40:58 +00:00
224d878cf7 Bug 7143 - Updating history and about page
First commit from Silvia Simonetti, went into the 3.12.x branch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 14:37:11 +00:00
Galen Charlton
6405f26524 Bug 10592: fix display of favicon
Move the favicon files for OPAC and staff so that they are not
blocked by the Apache configuration change introduced by the
patch for bug 9812.

Note that this patch makes the favicon customizable by theme,
not both theme and language.

To test, after applying the patch.

[1] Open pages in the OPAC and staff client.  Verify that the favicon
    is displayed in the usual place in your web browser.  Specific pages
    to test include

    - circulation receipts and slips
    - help
    - lists view
    - web-based self-checkout

[2] Verify that the Apache logs do not contain entries like this:

client denied by server configuration: {...}/prog/en/includes/favicon.ico

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified that the favicon displays correctly. Also
tried changing favicons for staff and OPAC using the
system preferences for those. This still works, where
the system preferences are correctly supported in the
templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 14:00:23 +00:00
Galen Charlton
9eb13aa3cd Bug 10592: fix MARC21 006/008 cataloging plugins
Move the XML and XSD data files so that access to them
(particularly the XML files) is not blocked by the Apache
configuration change introduced by the patch for bug 9812.

To test, after applying the patch.

[1] Open a MARC21 bibliographic record in the cataloging editor.
[2] Click on the plugin link for the 008 field.  Verify that
    that the form for all of the fixed field positions is displayed,
    and verify that you can change the type of material.
[3] Repeat step 2 for the 006 field.
[4] Verify that there are no entries in the Apache error log that contain

client denied by server configuration: {...}/cataloguing/value_builder/marc21_field_008.xml

or

client denied by server configuration: {...}/cataloguing/value_builder/marc21_field_006.xml

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Also verified translation of those plugins still works correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-22 14:00:23 +00:00
b38187d8b0 Bug 7598: [Follow-up] make strings in acquisitions JavaScript translatable
This follow-up addresses QA comments and moves punctuation and line
breaks out of the string to be translated.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-19 12:53:11 +00:00
f69e13665d Bug 7598: make strings in acquisitions JavaScript translatable
English strings in acq.js cannot be processed by the translation script.
This patch moves the strings to the templates to be set as JS variables
for use by the script.

To test:

- On the uncertain prices page, enter an invalid price and click save.
  You should see a JavaScript alert pointing this out.

- When adding a fund to an existing budget, enter an amount which
  exceeds the amount in the parent budget. You should see a JavaScript
  alert pointing this out. There is a similar function which has been
  corrected, checkBudgetParent(), but I don't know how to trigger it for
  testing.

The closebasketgroup function has been updated but as far as I can tell
it's not actually in use.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-19 12:49:12 +00:00
f01606d89b Bug 9801: display facet labels in search results only when there are facet values
Currently, the headings for facets (such as location) are showing even
if there are no actual values/links for that facet type.

This patch simply checks if the facet array contains any facets before
printing the heading and HTML for each facet value/link.

Test Plan:

Before applying:

0) If you want to check the location facet (which is easiest),
enable singlebranch  mode in the globals system preferences.

1) Do a search for records/items that you have no shelving location
specified (or simply remove the shelving location for a small range
of records that you can find in a search query).

2) Note that "Location" appears amongst the facets even though there
are no values/links present. (If you look at the HTML source, you'll
see some empty HTML tags have been printed out.)

Apply patch.

3) Flush your cache and refresh your page.
4) You should no longer see a "Location" facet (or those empty HTML
tags) on the facet sidebar.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template changes only.
Checked according to test plan, made sure location facet
still shows up when values exist, otherwise it's hidden.

It might make sense to add ids to the facets so libraries
can decide to hide some of them easily. Or alternatively
add a system preference to make that possible.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-19 00:40:58 +00:00
538ab5631e Bug 2774 - Path to theme is hard-coded in many places
This patch corrects more places in Koha where the path to the "prog"
theme is hard-coded in templates, CSS, and scripts.

Staff client home page:

Paths to the Koha logo background image and the module image sprite have
been corrected. Inactive and hover states of the module links
(circulation, patrons, etc) should look correct.

addbiblio.pl:

An <img> tag is replaced with a text link and an
additional CSS class. CSS uses an image-replacement technique to display
the image as before.

To test, open a blank or existing bibliographic record for editing.
Confirm that the "tag editor" icon displays correctly in two cases: 1)
tags linked to plugin editors and 2) tags linked to authorities. Both
should look correct and work correctly.

System preferences:

The system preferences editor appends a "loading" image to system
preference submit buttons when they are clicked. This patch changes
ajax.js to insert a <span> styled with a background-image instead.

To test, open system preferences and modify any preference. Submit the
change and confirm that the "loading" image appears correctly.

Background jobs:

Any place in Koha where a background job is used displays a progress
bar. This patch corrects the path in CSS to the progress bar image. To
test, perform an action which triggers the display of a progress bar.
For instance, batch modification of items. Confirm that the progress bar
image displays correctly.

blue.css:

I don't know if this is still used by anyone, but a couple of image
paths in this CSS file have been corrected.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, QA script and test plan.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-18 16:49:18 +00:00
3834d1f2b4 Bug 10457: fix SQL error when using 'export select items data' in serials claims page
Currently, if you use the "check all" checkbox next to the "Vendor"
table header, and try to "Export selected items data", you'll
see the following SQL error in the Apache error log:

DBD::mysql::st execute failed: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for
the right syntax to use near 'on ORDER BY title' at line 12 at
/.../lib/C4/Serials.pm line 1828.

This is because the Javascript that produces the re-direct URL is
including the value of the checkall checkbox, which is "on",
as a "serialid".

We need to only take checkboxes with a name of "serialid" when
crafting the re-direct link.

This patch adds the [name=serialid] attribute selector to the Jquery
that creates the URL to lateissues-excel.pl from claims.pl.

Test Plan:

Before applying the patch:

1) Go to Serials > Claims (found on the left navigation bar of Serials)
2) Choose a vendor that has serials to claim (or create some late
serials for a vendor so that they will show up)
3) Click on the checkbox to the left of the "Vendor" table heading.
4) Click "Export selected items data" at the bottom of the page
5) Check the Apache error log.  Notice that you'll get a SQL error
   like the one in the message above.

Apply the patch.

Repeat Steps 1-4.

Note that you should now have a CSV file downloading rather than
getting a SQL error.

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>
2013-07-18 16:44:32 +00:00
b77af93262 Bug 10597: fix Search to hold button on record details page
The holds button in cat-toolbar is broken for "search to hold". It is a
split button rather than a dropdown button. Clicking the caret works
fine, but clicked the button sends you to the marc editor!

Test Plan:
1) View a patron's details page
2) Click 'search to hold'
3) Search for something
4) On the results page, click a result line's title link (
    catalogue/detail.pl )
5) Note the "Place hold" button is a split button, click the left half
    of the button, note it redirects you to the editor.
6) Apply this patch
7) Repeat steps 1-5

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-18 13:57:53 +00:00
Mirko Tietgen
2a1d0fc6d2 bug 10549: make the ILS-DI services advertise that they return UTF-8
This patch changes a few occurences of ISO-8859-1 to UTF-8
within the XML generation of the ILS-DI module.

To test:
- Activate ILS-DI system preference
- Go to [youropac]/cgi-bin/koha/ilsdi.pl
- Check all examples in the documentation for the correct
  encoding
- Check GetAvailability gives you the correct encoding and
  check the source for the correct encoding

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 19:13:18 +00:00
Jonathan Druart
ec3735433a Bug 10515: make behavior of library category fetchers consistent with other fetchers
The prototype is not consistent, GetBranchCategory should return only 1 result
and GetBranchCategories should not have a categorycode argument.
This patch fixes that.

Test plan:
1/ Try to add/remove/modify a library.
2/ Add some groups
3/ Add these groups to a library

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 17:27:24 +00:00
53f82b1d7d Bug 10541: enable cross-browser AJAX in additem.js
Currently, the additem.js is using "indexOf" to search
for a value in an array. While this works in Chrome, Firefox,
and IE > 9, it fails miserably in IE 8 and 7 (which don't have
the indexOf method). This means that users aren't able to add
items using the acquisitions module!

Instead of using "indexOf", we should be using the jQuery function
$.inArray. It was added in jQuery v1.2 (3.8.0 uses v1.3.2 so even
our oldest supported release can use this method). It's perfectly
cross-browser compatible...works in Chrome, Firefox, and every
version of IE that I've tried (i.e. 7, 8, 9).

Test Plan:

Before applying patch:

0) Switch to Internet Explorer 7, or 8, or 9, or 10.

If you're using IE 9 or 10, you'll need to change the Document Mode to
IE7 standards or IE8 standards.

You can do this by opening Internet Explorer 9 or 10, pressing F12 (or
clicking on the gear in the top right corner and choosing
F12 Developer Tools), and then clicking on "Document Mode" on the
top toolbar. There, you can change to IE7 or IE8 standards.

N.B. This is not always a perfect emulation in every case, but this
time it does show you the bug.

1) Set the system preference AcqCreateItem to "receiving an order"
2) Go to Acquisitions
3) Either:
    a) Receive a shipment for a basket with items
    b) Create a new basket, create an order, close the basket, and
       then do 3a)
4) In the "Item" fieldset, fill out some fields such as barcode,
   Date acquiried, Public note, etc.
5) Click "Add" at the bottom of the fieldset
6) Note that while the item may have been added, the "Item" fieldset
is not being shown again. You may also notice a Javascript error
appearing in a pop-up window or you might see a yellow warning flag
on the bottom status bar.

APPLY THE PATCH

7) Do a full refresh of the page (hold down shift and press the refresh
button on the browser next to the address bar), and try adding items
again.
8) Note that you receive no warnings and that items are added correctly
as they would be in Firefox or Chrome.

OPTIONALLY

9) To be sure that I haven't broken anything, go through the same steps
in IE9 (with IE9 standards) or Chrome or Firefox. Everything should be
working.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Tested in IE10 in IE7 mode and IE9 mode. Also tested in Firefox.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 16:36:11 +00:00
835f745b55 Bug 9576: can now control whether max loans limit can be overriden
Adds a new system preference AllowTooManyOverride to control whether
a librarian can override the 'Too many checked out' message which is
currently always overridable.

Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Attempt to check out 1 more item to a patron than the max issues
4) You should be allowed to override by default ( current behavior )
5) Set AllowTooManyOverride to "Don't allow"
6) Repeat step 3
7) You should be blocked from being able to issue the item

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

The new system preference is activated by default, which mean there
will be no change in behaviour on update.

The system preference is correctly added to the database and .pref
files.

Test plan and QA script passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 15:07:42 +00:00
Katrin Fischer
81431fdc86 Bug 10563: Fix broken 'Edit' link on check expiration page
This fixes the broken 'Edit' (subscription) link on the
check expiration page in serials.

To test:
- Add a subscription
- Go to the check expiration page
- Search for your subscription, use an expiration date in the
  far future
- Verify the edit link on the result list doesn't work right
  before applying the patch, but works after

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>
2013-07-17 15:04:08 +00:00
Fridolyn SOMERS
dbd6befa5d Bug 7019: fix sorting by return date in Circulation History
The "return date" column sort is not using the date sort algorithm because it is
confused by the combination of date data and text data ("Checked out").

This patch adds the use of datatable "title-string" sort type.
With that, the date in ISO format are used for sorting and because
letters are before numbers, "Checked out" rows are more recent than any date.

Test plan :
- set dateformat syspref to "dd/mm/yyyy"
- Go to members/readingrec.pl for a borrower having a old issues and
checked out issues
=> Check that sort of "Return date" is correct.
For example :
With patch :
  20/01/2011
  06/03/2011
  20/03/2011
  Checked Out
Without patch :
  06/03/2011
  20/01/2011
  20/03/2011
  Checked Out
- Test also with dateformat syspref "mm/dd/yyyy"

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 15:03:32 +00:00
Katrin Fischer
4043df4395 Bug 10409: Follow up - improving strings for easier translation
Fixing this line:
<legend>[% IF course_id %] Edit [% ELSE %] Create [% END %] course</legend>

As grammar works different in different languages, having single
strings like that in a predefined order makes having a nice translation
unnecessarily hard.

This will make it a little easier:
<legend>[% IF course_id %]Edit course[% ELSE %]Create course[% END %]</legend>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 14:09:59 +00:00