Commit graph

8267 commits

Author SHA1 Message Date
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
1ad188f9d6 Bug 10409 - Do not show course entry form if no departments are found
The course reserves entry form should not be shown if there are no
DEPARTMENT authorized values, since this prevents the form from being
submitted. This patch replaces the form with an error message when no
DEPARTMENT authorized values are found.

Also corrected:

- Corrected grid structure for more standard display
- Converted labels with no corresponding inputs to <span class="label">
- Closed unclosed tags
- Corrected incorrect capitalization

This patch contains whitespace changes, so please ignore whitespace when
examining changes.

To test, delete any DEPARTMENT authorized values, if present. Create a
new course in Course Reserves. You should see a warning that no
DEPARTMENT values were found.

If you are logged in with the correct permission, the warning should
contain a link to the correct authorized value page. If you do no, the
warning should refer the problem to an administrator.

After creating one or more DEPARTMENT values, the form should display
and submit correctly.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
After this patch has been applied, I get an error message and no form
if I don't have any DEPARTMENTs defined, which makes sense given that
the form can't be submitted without a DEPARTMENT.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
You now see a useful error message, when no departments have been
defined. Else you are taken to the correct form.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-17 14:09:59 +00:00
Galen Charlton
7d990042e9 Bug 10170: expose more managed staged MARC strings to translation
This commit makes it possible to translated the 'staged'
and 'error' record statuses as well as the 'auto_match'
overlay status.

Also takes out a bit of HTML cruft in one string that is
not needed for translation.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass. New strings are parsed into the po files:
"%s Always add items %s Add items only if matching bib was found %s Add items only if no matching bib was found %s Ignore items %s %s %s %s "
"%s No match %s Match applied %s Match found %s %s %s "
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-16 15:45:20 +00:00
Adrien Saurat
24e561f4da Bug 10170: strings in MARC import made translatable
Following bug 9215: non translatable strings are now
present in the template and translatable

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

Not only does this make the strings translatable it makes the template
a lot easier to read
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-16 15:45:20 +00:00
Mathieu Saby
80ea8bf821 Bug 10189: Translate values in UNIMARC 128b/c cataloguing plugins to English
Cataloguing plugins for UNIMARC 128b and 128c fields are only in Ffrench.

This patch translates them.
Source : http://blue.lins.fju.edu.tw/mao/marc/unicon.htm
Note : 128b and 128c are deprecated in last version of UNIMARC Manual (field 145 used instread).
But they are still used in French Sudoc network.

To test : in a UNIMARC english Koha, edit a record and use 128b and 128c
cataloguing plugins. Check everything is in english.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thx for translating those!
Verified new strings get parsed into the po files.
Templates still contain lots of tabs, those can be fixed separately.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-15 16:18:01 +00:00
Galen Charlton
14a1bd0e42 Bug 10258: offer to create basket group only when staff user has correct permission
If the staff user does not have the group_manage acquisition permission,
do not offer to create a new basket group when closing an order basket.

This avoids a situation where if a staff member without that permission tries
to close a basket and chose the option to create a bakset group, they would
be redirected to the login page.

To test:

[1] Log in as a staff user that does not have
    the acquisition/group_manage permission.
[2] Create a new order basket, attach at least one
    order line to it, then close it.
[3] Verify that the confirmation page does not
    offer to create a basket group with the
    same name as the order basket.
[4] Log in as a staff user that has the
    acquisition/group_manage permission.
[5] Create and close an order basket.
[6] Verify that this time, the confirmation page
    *does* offer to create a basket group.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-15 16:15:01 +00:00