Commit graph

8672 commits

Author SHA1 Message Date
Bernardo Gonzalez Kriegel
1b695517a6 Bug 5031: (follow-up) correct tabs
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tiny QA follow-up corrcting whitespace to match coding
guidelines.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-03 17:02:23 +00:00
Jonathan Druart
8c52782707 Bug 5031: CSV profiles: validate required content fields
Some fields are required on editing/adding CSV profiles.  This
patch adds HTML5 validation so that required fields must be
filled in before the form is submitted.

Test plan:
- add a new CSV profile (tools/csv-profiles.pl) without any value.
- save => error on empty fields.
- fill the "marc" content, select type="sql", fill the CSV name input.
- save => error on sql content field.
- fill the sql content
- save => the CSV profile is saved.
- retry for the edit form.

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

Comment: On top of both patches for Bug 10853

Works very well, now we get an alert with empty field
Saves correctly MARC and SQL profiles

Solved minor conflict introduced by tab followup on Bug 10853
Again small tab errors corrected in followup

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, looks a bit 'non standard' for Koha,
but improves usability of the form.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-03 17:01:24 +00:00
Galen Charlton
097d5d5c8e Bug 11035: (follow-up) update licenses section
The OpenJS keyboard shortcuts library by Binny V A is licensed under
the BSD license.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-03 15:54:26 +00:00
Galen Charlton
e0dcb44ae1 Bug 11035: (follow-up) move shortcut.js
shortcut.js is not a jQuery plugin, so this patch
moves it out of the jquery plugin directory.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-03 15:35:15 +00:00
Blou
58432bf777 Bug 11035: (follow-up) update offline circ manifest
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-03 15:29:43 +00:00
Blou
39830ac023 Bug 11035: Replace shortcut plugin jquery.hotkeys.min.js
To old plugin prevents the upgrade to the latest jquery. By replacing
with openjs' shortcut.js, we have now one less hurdle in upgrading
Koha to latest.

Changes:
- removed jquery.hotkeys.min.js
- added shortcut.js
- modified the related includes (doc-head-close.inc and help-top.inc)
- modified the calls in staff-global.js

Regression test:
1) apply the patch
2) in the intranet, test the shortcuts alt-q, alt-r, alt-u.

These are the only affected functionalities.  There is no new functionality.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Tested existing
shortcuts for the search bar tabs on various circulation
related pages.

This uses a Javascript under BSD license, I wonder if it
should be listed in the About>licenses section that we
are using it. As Yui is also BSD I assume the license is
compatible.

+/**
+ * http://www.openjs.com/scripts/events/keyboard_shortcuts/
+ * Version : 2.01.B
+ * By Binny V A
+ * License : BSD
+ */

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-03 15:23:37 +00:00
Chris Cormack
90f3b84def Bug 11322: fix XSS bug in purchase suggestions - OPAC
1/ Add a suggestion in the opac, with lots of html
2/ View that suggestion in the OPAC, note the html is rendering
3/ Apply the patch
4/ Test again, in prog and bootstrap, no more rendered html

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

Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-03 00:20:12 +00:00
Chris Cormack
368068c715 Bug 11322: fix XSS bug in purchase suggestions pages
To test
1/ Switch on purchase suggestions
2/ On the public interface (OPAC) add a suggestion, put html in every
field
3/ In the staff interface go to the suggestions page
/cgi-bin/koha/suggestion/suggestion.pl
4/ Notice the html is rendered
5/ Click on a suggestion, notice the html is rendered on the show page
also
6/ Apply the patch, check these two pages again, html should now be
escaped

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

Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, thx Chris!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-03 00:19:18 +00:00
Galen Charlton
15b86a38ed Bug 7791: (follow-up) adjust wording of basket deletion confirmation dialog
This patch uses "bib" and "bibliographic record" rather than just
"record"; "record" is not quite specific enough in this context.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-02 16:17:21 +00:00
Mathieu Saby
de2bfb6799 Bug 7791: (follow-up) add warning after deletion if some records were not deleted
This followup add some warnings after deletion if some items were not
deleted.

4 types of messages are possible :
- x item(s) attached.
- x subscription(s) attached.
- x order(s) attached.
- Unknown error.

To test :
test a
1. create a basket with
- an order using a record A which has already an item, which is used in
   a subscription, and in other order (in an other basket)
- an order using a record B used nowhere elese
2. click on "Delete basket"
3. choose button "Delete basket, orders and records"
4. you should see a page anouncing basket deletion, and that record A was
   not deleted because of its item, subscription and order.
5. check the link around the title of record B takes you to the record
6. check the link under the warning box ("Click here to go back to
   booksellers page") takes you to booksellers page
5. check record B is deleted

test b
1. suppress the subscription linked with record A
2. create an other basket using record A
3. delete the basket on the same way as for test a
4. you should see a page anouncing basket deletion, and that record A was
   not deleted because of its item and order

test c
1. suppress the item attached under record A
2. create an other basket using record A
3. delete the basket on the same way as for test a
4. you should see a page anouncing basket deletion, and that record A
   was not deleted because of its orderBug 7791 Followup: add warning
    after deletion if some records were not deleted

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-12-02 16:17:18 +00:00
Mathieu Saby
2c307f3e92 Bug 7791: (follow-up) tidy up some cruft in the main patch
This patch
- delete warns
- add a missing }
- add a condition in template of avoiding asking to delete orders or
  records if the basket is empty

To test :
1. Make the same tests as defined in test plan of main patch. It should
   behave the same way
2. Try to delete a basket with no records inside. You will only have a
   "Delete basket" button, with fewer warnings

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
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-12-02 16:07:28 +00:00
Mathieu Saby
09953f836d Bug 7791: add ability to delete records when deleting a basket
Currently, when a basket is deleted, all the orders are deleted (there
is a foreign key in aqorders table on basketno).

This could be dangerous, and there is no warning.
After the deletion, unused biblios are left in the catalogue.

This patch
- adds a more detailed message describing the consequences of deletion
- give the choice of also deleting biblio records if possible

To test :
Test A :
1. create a basket with 4 orders:
- an order from a new record A
- an order from a record B which has already an item
- an order from a record C used in a subscription
- an order from a record D used in an other order
2. note the biblionumbers of the records used (or open them in other
   tabs in your browser)
3. click on "Delete basket"
4. choose button "Delete basket and orders"
5. check the catalogue : records A,B,C,D should still be there
Test B:
1. create a basket with 4 orders:
- an order from a new record A
- an order from a record B which has already an item
- an order from a record C used in a subscription
- an order from a record D used in an other order
2. note the biblionumbers of the records used (or open them in other
   tabs in your browser)
3. click on "Delete basket"
4. choose button "Delete basket, orders and records"
5. check the catalogue : records B,C,D should still be there. Record A
   should be deleted

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
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-12-02 16:05:33 +00:00
d536ed92fa Bug 2693: add ability to filter by reviewer name on tag review page
If you want to filter results on the tags management page by the
reviewer you have to know their borrowernumber. It would be better to be
able to search by name, but in the meantime this patch adds an
autocomplete widget to the form field so that you can do a name search
and populate the field with the borrowernumber.

To test you must have approved or rejected tags. From the tags review
page (tags/review.pl), view all, approved, or rejected tags. Type a name
in the "reviewer" form field in the left sidebar filter. You should get
an autocomplete dropdown with names matching your search. When you
select one the form field should be populated by the borrowernumber.

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

Patch works as described. I'm not sure whether or not it would be better
to be able to search by name, as that would involve either choosing
between names after applying the filter or showing any possible matches,
so this seems fine.

--

Owen and I did observe that we were able to cause AJAX errors while
using this autocomplete, but we are not 100% sure how we caused the error.
In my case, I was able to occasionally cause it by typing in a name
then backspacing rapidly. The ajaxError method is attached to every
element in the DOM (yikes) so it's tough to say what exactly is the
source of the error (which is signalled by a pop-up window that can be
cancelled).

The error is quite rare so I don't think it's necessarily a problem
for us.

One idea that Owen had was to remove the current error message, which
is very unhelpful and replace it with an error like "Something went
wrong. Try again."

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-02 15:58:04 +00:00
Fridolyn SOMERS
cfa0dc1aed Bug 11059: (follow-up) restore time in staged dates in addorderiso2709.tt
Follow-up patch to restore the display of time in
acqui/addorderiso2709.tt in staged date.
Simply uses an option of KohaDates TT plugin.
This time may be useful if there where several imports in the same day.

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-12-02 15:47:40 +00:00
Lyon3 Team
097a92b318 Bug 11059: fix date sorting of import batches in basket add form
This patch improves the sorting of staged import batches by date,
particularly when the dateformat system preference is set to anything
other than YYYY-MM-DD.

Adds title-string sorting type to enable this.

To test:

[1] Ensure that there are at least three staged
    bib import batches, with upload timestamps such that
    date sorting errors would be apparent.
[2] Set the dateformat system preference to either DD/MM/YYYY
    or MM/DD/YYYY.
[3] Create a new basket in acquisitions, then chose to add
    a new order line from a staged record batch.
[4] In the list of batches, click on the 'staged' column
    heading to sort by date.
[5] Observe that dates are sorted in alphanumeric order, not date
    order.
[6] Apply the patch and refresh.  This time, dates should sort
    correctly.

Signed-off-by: Fridolyn SOMERS <fridolyn.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-12-02 15:41:46 +00:00
Fridolyn SOMERS
85642ededa Bug 7484: keep selected values when changing search type on authority search form
1) I'm on the "Search authorities" tab. I select an authority type,
   then change the active tab. The type change is lost.
2) I'm on a tab and type a search pattern, then change tab, the string
   is lost.

This behaviour is logical, given the fact that we're using tabs, but it
would be more practical to keep the typed informations when the user
changes the search mode.

This patch add a few JQuery code to synchronise inputs between all
tabbed authorities search forms.

Test plan :
- Go to Authorities home page : cgi-bin/koha/authorities/authorities-home.pl
- In toolbar, "Search main heading" is selected
- Change all inputs : authotity type, operator, term, and sort order
- Click on "Search all headings" tab
=>  Inputs are the same has previous tab
- Click on "Keyword search" tab
=>  Inputs are the same has previous tab

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Explicitly declare 2 new variables used.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described, Firebug doesn't show any problems with
the Javascript.
Could be useful for other tabbed searches like the start page
as well.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 18:30:35 +00:00
Fridolyn SOMERS
0c631934de Bug 11214: improve create/edit routing list links in serial collection page
When a subscription has no routing list yet, the page
serials/subscription-detail.pl shows in left menu : "Create routing list".
In serials/serials-collection.pl page, the link in table is always
"Edit routing list", even when there is no routing list.

This patch adds a conditionnal link "Edit routing list"/"Create routing
list" into serials/serials-collection.pl page.

Test plan :
- Create a subscription no. 1 without routing list and a subscription
  no. 2 with a routing list
- Go to serials/serials-collection.pl of subscription no. 1
=> You see "Create routing list" link
- Click on link
=> You see "Create routing list for"
- Go to serials/serials-collection.pl of subscription no. 2
=> You see "Edit routing list" link
- Click on link
=> You see "Edit routing list for ..."

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Functional and automated tests pass. Passes koha-qa.pl.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
With the patch applied the serial collection page shows the
right link depending on the existance of a routing list.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 18:23:54 +00:00
Jonathan Druart
d5281fd41e Bug 11171: (follow-up) fix a javascript error
The previous patch adds an error on booksellers.pl:

TypeError: a.aoColumns[c] is undefined

It was caused by the add of the new column. The aoColumns DT parameter
should manage it.

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-11-27 18:02:38 +00:00
Jonathan Druart
c9b873ff10 Bug 11171: Display basket group name on the supplier list page
Test plan:

Search supplier and verify the basket group column is filled.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 18:02:21 +00:00
Rachel Dustin
a9900b0d35 Bug 11105: wrap places OPAC facet in a span
prog-only OPAC patch.

To test:
Verify places in the facets is wrapped in a span.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change only, works as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 17:56:02 +00:00
1b80e77f84 Bug 11304: fix display of detail page holdings tab in translated Bootstrap theme
Detail page tabs are not displayed properly because JavaScript is broken
in French. This is due to _(' JS string construction used in place of
_(".

This patch fixes:

  - opac-detail.tt page
  - xt/single_quotes to test bootstrap theme

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

Tested by applying the patch, running translate update, then translate
install. Saw no JavaScript error on the French detail page.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Switches from single to double quotes for translatatable strings.
Unit tests for xt/single_quotes passes now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 16:52:02 +00:00
3a76f4298c Bug 11283: make restriction type translatable
The new restrictions system has different types:
MANUAL, OVERDUES and SUSPENSION.

Those are shown in the interface and seem to come directly from the
database, so they are not translatable.

As they are hardcoded translations should be possible and be handled in
the template.

Test Plan:
1) Create a patron with one of each type of restriction
2) Apply this patch
3) Note you see the type with only the first letter capitialized,
   this indicates you are seeing the translatable string

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Strings now appear in
updated po files:
  msgid "%s %s Manual %s Overdues %s Suspension %s "

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 16:47:42 +00:00
71a3516d21 Bug 11308: fix RSS page in bootstrap theme
To test:
1/ Do a search in the opac, click on the rss feed icon
2/ Notice the page renders, not like an rss feed should
3/ Apply the patch and refresh
4/ Page should now be (more) valid xml

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small change, big difference. With the patch the content of
the RSS feed renders like it does for the prog theme.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 15:50:19 +00:00
68a0164e22 Bug 7143: New release team for Koha 3.16
Note that the 3.8 RMaint should still be elected on the next meeting.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No typos or problems found.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-27 15:41:59 +00:00
803789f13b Bug 11307: (follow-up) apply fix to bootstrap theme (master and 3.14.x only)
To test:
Same as first patch, but using bootstrap theme

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-26 18:17:20 +00:00
6f0d4153df Bug 11307: Fix potential XSS attack in public catalog RSS feed
To test:
1/ Craft a url like
/cgi-bin/koha/opac-search.pl?q=a&count=50"'<h1>test</h1>&sort_by=acqdate_dsc&format=rss2
2/ look at the source, notice
<opensearch:itemsPerPage>50"'<h1>test</h1></opensearch:itemsPerPage>
3/ apply the patch, and reload url
4/ source now contains
 <opensearch:itemsPerPage>50&quot;'&lt;h1&gt;test&lt;/h1&gt;</opensearch:itemsPerPage>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-26 18:16:27 +00:00
Peggy Thrasher
2131c78618 Bug 11040: Add CircAutoPrintQuickSlip option to print regular slip
This patch adds a third option to the CircAutoPrintQuickSlip system
preference.  The three options are now:

* print quick slip
* print regular slip
* clear the screen

Test plan:
1.  Set the System Preference for CircAutoPrintQuickSlip to "clear the
    screen".
    Enter a borrower barcode for checkout
    Press Enter
    The screen should be cleared.

2.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    quick slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Quick slip is printed.

3.  Apply the patch
    Update the database using UpdateDatabase.pl

4.  Set the System Preference for CircAutoPrintQuickSlip to "clear the
    screen".
    Enter a borrower barcode for checkout
    Press Enter
    The screen should be cleared.

5.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    quick slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Quick slip is printed.

6.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Slip is printed.

7.  Reload the database using sysprefs.sql
    Set the System Preference for CircAutoPrintQuickSlip to "clear the
    screen".
    Enter a borrower barcode for checkout
    Press Enter
    The screen should be cleared.

8.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    quick slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Quick slip is printed.

9.  Set the System Preference for CircCircAutoPrintQuickSlip to "open a
    slip window"
    Enter a borrower barcode for checkout
    Press Enter
    A Slip is printed.

10.  Verify that the Checkout Help includes information about printing Slips.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-24 18:37:42 +00:00
Sophie Meynieux
7021d36d0e Bug 11125: Correct display for patron messaging preferences on OPAC
To test :
 1) Remove 'sms' from message_transport_types table
 2) Go on OPAC "My messaging" tab => table columns are out of alignment with table heading
 3) Apply patch => table is correctly displaid

Signed-off-by: Koha team AMU <koha.aixmarseille@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-23 20:54:07 +00:00
5dcf1857da Bug 7491: improve description of the item-level_itypes syspref
Adding some text to the pref description referring to OPAC display.

Test plan:
Look at the new description in Cataloging preferences.

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-11-23 19:45:26 +00:00
Fridolyn SOMERS
d1bec84142 Bug 11146: Show a go back link on no permission page
When a user does not have permissions for a page or module, the
authentication page is displayed with message

  "Error: You do not have permission to access this page.".

Most librarians uses the "previous page" button of their browser to
come back on the page they were before trying to get to the
non-permitted page.

This patch adds a button to help coming back to previous page.
It also changes the "Click to log out" link as a button.

Test plan :
- Define a user with staff permissions but no permission on tools module
- Login with this user
=> You get to intranet home page
- Edit URL to go to tools module : cgi-bin/koha/tools/tools-home.pl
=> You get a page with a red error message and 2 buttons "Previous page"
   and "Log out"
- Click on "Previous page"
=> Go get to intranet home page
- Edit URL to go to tools module : cgi-bin/koha/tools/tools-home.pl
- Click on "Log out" button
=> You are logged-out and get to authentication page : cgi-bin/koha/mainpage.pl?logout.x=1

Signed-off-by: Garming Sam <garming@catalyst.net.nz>

Works as intended.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-23 19:43:37 +00:00
Jonathan Druart
572c586793 Bug 11238: contruct links to the appropriate manual version dynamically
This patch uses the version number of the Koha database to
dynamically generate links from help to the appropriate version
of the manual.

Test plan (for 3.15 branch):
- Open a help page
- Verify the manual link is correct (point to 3.14 manual)
- change the version in mysql:
update systempreferences set value="3.1600000" where variable="version";
- Verify the manual link now points to the future 3.16 manual.

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

Tested on top of Bug 10671
On master (BD version 3.13.xxx) help links point to 3.12 manual
Changing version to 3.14/15 points to 3.14 manual
Changing version to 3.16 points to the future :)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2013-11-23 19:30:16 +00:00
Fridolyn SOMERS
2a4fa0a803 Bug 11245: fix typo in modborrowers.tt javascript string
In modborrowers.tt, Bug 8986 made the javascript strings translatable:
  _("This attribute will be only applied to the patron\'s category")

In this case, the backslash is useless.

Test plan :
- Create a borrower attribute with a "Category" defined
- Go to Tools / Batch patrons modification
- Enter a cardnumber and submit
- Next to "Attribute", select the borrower attribute you created
=> You see a grey text at the right : This attribute will be only
   applied to the patron's category "XXX"

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-11-21 17:38:23 +00:00
Fridolyn SOMERS
7ca790997e Bug 10809: use branches template plugin in serials search
In serials-search.pl, branch name was computed using branch code and
then passed to template.

This patch uses the new template plugin now for this:
    Koha::Template::Plugin::Branches.

Test plan :
- Go to serials search
- Perform a search that returns at least an open an a closed subscription having a branch defined
=> The branch name is displayed in "Library" column

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-21 15:20:05 +00:00
Galen Charlton
1c0a2f6b40 Merge branch 'new/bug10671' 2013-11-15 00:30:02 +00:00
Nicole C. Engard
28717402b2 Bug 10671: Update Circ Help Files
This patch updates the existing help files and
adds the missing offline circ help file.

To test:

* Visit all circ pages and check the manual links
* Visit the new offline circulation page and confirm text
and link are there (link will work after 10/25)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-15 00:29:40 +00:00
Galen Charlton
2bc24502eb Bug 9261: (follow-up) improving implementation of page title and breadcrumbs
This patch improves how the page title and breadcrumbs for the patron
purchase suggestions page are generated by:

* removing references to a template variable that is not set by the
  script
* using the patron-title.inc template include consistently

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-15 00:25:14 +00:00
Jonathan Druart
d565fb02e9 Bug 9261: (follow-up) make title required when adding a new suggestion
I don't know if it was a bug but at the OPAC, title is a required field
and not on the staff interface.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-15 00:24:58 +00:00
Jonathan Druart
967a48e5af Bug 9261: (follow-up) QA improvements and GPL version change
This patch:

- changes the GPL version from 2 to 3.
- uses the datatables.inc file
- removes the single pixel before and after the DT (modifying the sDom
  value).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-15 00:24:24 +00:00
68fb73d9b3 Bug 9261: (follow-up) remove references to deprecated YUI widget
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-15 00:23:30 +00:00
c1dbee2ea4 Bug 9261: (follow-up) fix various issues identified during QA
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-15 00:22:59 +00:00
8505942344 Bug 9261: (follow-up) fix various issues identified during QA
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-15 00:22:11 +00:00
be51854e46 Bug 9261 - Allow librarians to make purchase suggestions for patrons
This patch adds a new tab to the patron side menu for purchase
suggestions.  From this new tab, a librarian can view the patron's
existing purchase suggestios and also create new suggestions in the
name of that patron.

Test Plan:
1) Apply patch
2) Ensure the system preference 'suggestions' is enabled
3) View the details for a patron
4) Click the new 'Purchase suggestions' tab
5) Click the 'New purchase suggestion' button
6) Add the new purchase suggestions
7) You should now end up back at the borrower's purchase suggestions
8) Verify the new purchase suggestion was added

Signed-off-by: Corey Fuimaono <agent.075@gmail.com>

Step though the test plan. All OK.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-15 00:20:23 +00:00
Galen Charlton
8c5c50b2f2 Merge branch 'new/bug11216' 2013-11-14 15:41:06 +00:00
Dobrica Pavlinusic
165e8750b8 Bug 11216: fix bug where editing patron creates indefinite manual restriction
Editing partron data results in unintended adding of indefinite manual
restriction to it. Reason for it is hidden field add_debarment which
is wrongly initialized to 1 instead of 0. Also JavaScript code seems
to want to toggle checkbox, and since this field is hidden correct
approach would be to change its value to 1.

Test scenario:

1. edit patron data
2. verify that debarrment is wrongly added
3. remove debarrment
3. apply this patch
4. edit patron again
5. verify that debarrment wasn't added
6. intentionally add debarrment and verify that it's saved
7. add debarment, enter something in comment but press cancel
   and verify that debarment isn't added

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

This fixes this blocker, however, with or without the patch, the date
is not saved correctly. I will file a new bug for that

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-14 15:39:39 +00:00
Galen Charlton
0d5f73d9b0 Merge branch 'new/bug11205' 2013-11-09 16:30:54 +00:00
Jonathan Druart
6e7d8ece1f Bug 11205: fix DataTables filter issue when more than one table is on a page
This patch fixes a bug where if there are more than one table on the
same page that uses the DataTables column filter, applying a filter on
one table applied it to both.

Test plan:
1/ Go on serials/serials-search.pl?searched=1
2/ Filter on a column (e.g., title) on the open subscriptions
   table.
3/ Switch to the closed subscriptions table.  Observe that
   that the table is *also* filtered by the criteria
   set for the open subscriptions table.
4/ Apply the patch and reload the page.
5/ This time, applying a filter on one time should not affect
   the other table.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-09 16:28:52 +00:00
Mathieu Saby
a290309daf Bug 11189: Rename "Print" label in UNIMARC advanced search
"Print" label for search on the 106 field is not correct in UNIMARC
advanced search:

- 106 field can be used for non printed ressources (manuscript...)
- "Print" is ambiguous for translation tool, as it can be understood as
  a verb or a noun.

The official label for 106 field is "Type of form".  The offical label
for 106$a subfield is "Medium designator".

I think "Physical presentation" is the best way to describe the content
of 106$a in a user understandable label.

Test plan :

Check the "Print" label is replaced with "Physical presentation" in OPAC
(prog theme and Bootstrap theme) and Staff Advanced Search

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

OK for me. Make sense for UNIMARC users.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: replace a tab with 4 spaces.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-08 16:48:42 +00:00
Fridolyn SOMERS
31e9c90e2b Bug 11159: fix small typo in catalogue/results.tt
In catalogue/results.tt, there is a small HTML error line 377 :
[% ELSE %]<option value"au,phr">Author</option>[% END %]
The = is missing

Test plan :
- In intranet, test go to advanced search
- Click on [More options]
- Enter a term, check "Scan indexes" and click on "Search"
- Look at HTML code of select "Indexed in"
=> option "Author" is correct : <option value="au,phr">Author</option>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-08 16:28:31 +00:00
Jonathan Druart
5fa616821c Bug 11204: make pendingreserves use datatables.inc
A JS error occurs on the pending reserves (holds to pull) page:

ReferenceError: CONFIG_EXCLUDE_ARTICLES_FROM_SORT is not defined
if(CONFIG_EXCLUDE_ARTICLES_FROM_SORT){

Test plan:
Apply the patch and verify the error does not appear anymore.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-06 15:33:43 +00:00
Mathieu Saby
eca16da01f Bug 11033: Make Save button and Cancel link always visible on basketgroup page
This patch suppresses the first CSS declaration in basketgroup.tt. It was
unneeded, and was the cause of the Save button and Cancel link not
being visible if the bar for changing language was activated.

To test :
1. activate the "language" syspref, with at least 2 languages
2. open a basketgroup : the 'Save' button and 'Cancel' link are now visible
   at the bottom of basketgroup page
3. Check you can use the basketgroup as before : put a basket in it, cancel, save etc.

Signed-off-by: Koha Team Amu <koha.aixmarseille@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:32:23 +00:00
Galen Charlton
effd8f55f6 Bug 7684: (follow-up) use datatables.inc
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:17:35 +00:00
Jonathan Druart
f86a16182b Bug 7684: QA Followup and bugfixes
This followup fixes some QA issues:
- replace the MySQLism SQL_CALC_FOUND_ROWS
- use Koha::DateUtils instead of C4::Dates
- replace "branch" and "location" with "library"
- fixe wrong capitalisation on "Clear all" and "Select all"

and fixes some behaviors:
- the inventory tools can be used without barcode file (fixed for the
  csv export too).
- mark as not scanned a non scanned item.
- update the datelastseen 1 time per biblio (and fixes the displayed
  count)

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Koha Team Amu <koha.aixmarseille@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:11:45 +00:00
Matthias Meusburger
0313856d9a Bug 7684: multiple fixes for inventory
* when a file was uploaded and the comparison with catalogue range
 requested, the comparison was wrong: the logic was wrong
* items that were not supposed to be scanned (ie: supposed to be on another shelf)
  didn't had the author and title, it was hard to retrieve them on the shelved
* some useful fields were missing, like homebranch, location, status
* the CSV export contained all the item information. It should contain the same
   informations as the screen

Behaviour now:
   * scan a list of barcode & select a range of location
   * if a barcode has been scanned and should not be (misplaced item),
       the information is displayed
   * if you choose "compare barcodes list to result option", the
     resulting list contains all items that have been scanned and those
     that were supposed to be. Any item not in both list appears with a
     specific message on the last column

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Koha Team Amu <koha.aixmarseille@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:10:49 +00:00
Galen Charlton
8ae61b6a2a Bug 9374: (follow-up) add FIXME suggesting that use of a regexp is not the long-term solution
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:08:04 +00:00
Jonathan Druart
c523b56bcf Bug 9374: The color should manage all zero format.
The format of prices in Koha is discuted in some bugs (e.g. 9410).
The good way will be to introduce a syspref in order to deal with the
number of decimal.
The previous patch is too restrictive, we should deal with other zero
format.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:03:18 +00:00
Mathieu Saby
cbe0d7bebd Bug 9374: Only 0.00 prices must have class error in basket.tt
A regexp '^0' in basket.tt is used to give the class "error" to null prices.
It is wrong, because it matches prices like "0.15". It should only match "0.00".

To test :
- apply the patch
- display a basket with an order with a price between 0 and 1 (like "0.50") and an order with a price stricty null ("0.00")
- only the "0.00" price should be displayed in red

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:03:18 +00:00
Mathieu Saby
79bf1d4a20 Bug 9780: (follow-up) suppress line feeds in javascript
This patch suppress \n in javascript, in order to keep Pootle quiet.

String patch, no need to test I think.
But if you want to test, replay the test plan of main patch, and check
the messages in javascript alert are displaying the right way.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:00:28 +00:00
Mathieu Saby
b693ea0cd8 Bug 9780: restrict the ability to delete a bib record associated with an order
Currently, anyone can delete a record used in an order.

With this patch, only librarians with managing order permission
can delete it if it is used in an active or a deleted order.

This patch also add a specific warning informing that deleting a record
used in an active order is dangerous.

To test :
A. test what can do and see a librarian with order managing rights
0) Connect to Koha with a borrower with order managing rights
1) in a basket, create 2 orders A & B from new records
2) delete order B
3) in the catalogue, try to delete
- record used for order A : you should see a specific warning
   informing you the record is used in 1 order, and that deleting it
   is dangerous
- record used for order B : you should see a specific warning informing
  you the record is used in 1 deleted order
- a record not used in any order : you should see no specific warning

B. test what can do and see a librarian without order managing rights
4) Connect to Koha with a borrower without order managing rights
5) in a basket, create 2 orders A & B from new records
6) delete order B
7) in the catalogue, try to delete
- record used for order A : you should see a specific warning informing you that
   you need specific rights to delete the record
- record used for order B : idem
- a record not used in any order : you should see no specific warning

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:58:40 +00:00
Jonathan Druart
c4c5496ec6 Bug 9218: fix intranet cart email for non english templates
This patch adapts the method from OPAC to the staff interface (cf bug 8062).

Test plan:
- add somes notices to the cart
- try to send the cart by email
- the email should be the same as before
- translate templates and retry with another language. Before this patch,
  the email was empty. With this patch, it contains the list of records
  and items.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Passes all tests and QA script.
Fixes quite a bad translation problem, tested with German templates
and umlauts in the message and records.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:53:25 +00:00
Jonathan Druart
4b36244c73 Bug 8307: Set a value for subfields when receiving
If items are created when ordering, this patch allows to add a value for
some items subfields.

Test plan:
Define status for items.notforloan (mapping 995$o in unimarc), for
example 4:On order, 5:On treatment

Set the Syspref AcqCreateItem on "ordering".

ACQ framework : set default value = 4 for 995$o (in unimarc)

Syspref AcqItemSetSubfieldsWhenReceived : set "o=5|b='foo bar'"

When ordering the item, default status will be 4 ; when receiving the
item, status will be changed from 4 to 5. The subfield b have to contain
'foo bar'

Signed-off-by: Frederic Durand <frederic.durand@unilim.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2013-10-31 23:36:59 +00:00
Liz Rea
6398126f88 Bug 10776: fix awkward wording in subscription notification screen
to test:
- make a subscription available to be notified about
- log into the opac, click the subscriptions tab, then More details
- click "Subscribe to email notification on new issues"
- observe the text without the patch - there seems to be an extra "arrive?"
- apply the patch, refresh - wording should flow a bit better.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:26:32 +00:00
Nicole C. Engard
aed8063ce4 Bug 10671: Update patron help files [ FOLLOW-UP ]
This patch adds two new permissions that were just pushed
to the related patron help files. It is a follow up to the
previous patch that updated the patron help file.

To test:

Apply the patron help patch
Apply this patch
Visit the patron permissions page
Confirm that help is there and right

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:33 +00:00
Nicole C. Engard
1d8746c2ab Bug 10671: Update Acq Help Files
This patch updates the Acq help file links
to the manual.

To test:

* visit acq pages
* confirm manual links are right

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:29 +00:00
Nicole C. Engard
294ac9ccc8 Bug 10671: Update patron help files
This patch updates the text and links in the
patron related help files.

To test:

* visit all patron pages
* Click help
* confirm test and links

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:29 +00:00
Nicole C. Engard
17ac5d01a3 Bug 10671: Update Admin Help Files
This patch updates the links to the manual in the
help files. It also updates the text a bit in a few.

To test:

* Visit admin pages
* Check the help files on each
* Make sure links and text appears

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:29 +00:00
Nicole C. Engard
66266e95f2 Bug 10671: Update Tools Help Files
This patch updates the links to the manual in
the tool help files.

To test:

* Visit tool pages and click the help
* confirm links work

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:28 +00:00
Nicole C. Engard
b7e905f9a9 Bug 10671: Update Serials Help
This patch updates the links to the manual in
the serials help files.

To test:

* Visit serials pages and click the help
* confirm links work

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:28 +00:00
Nicole C. Engard
7d28a3f26d Bug 10671: Update Cataloging Help
This patch updates the links to the manual in
the cataloging help files.

To test:

* Visit cataloging pages and click the help
* confirm links work

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:28 +00:00
88e6ae7821 Bug 8015: QA Followup 2
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:48 +00:00
3952c20289 Bug 8015: QA Followup
* Add bug number to database update
* Fix capitalization errors
* Fix JavaScript string translation errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:39 +00:00
Jonathan Druart
5d170aa268 Bug 8015: Add unit tests for SimpleMARC and MarcModificationTemplates routines
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 8015: Fix complains from qa tools

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

Bug 8015: Get rid of the eval in ModifyRecordWithTemplate

This patch removes the use of eval in the
C4::MarcModificationTemplates::ModifyRecordWithTemplate routine.

Now this routine call the wanted modification routine with the list of
parameters.
This call is done only if the condition is respected.

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

Bug 8015: Get rid of eval for evaluating =~ m//

Koha::SimpleMarc::field_equals uses eval in order to check if a string
matches a pattern.
Now this eval is removed and the "regex" variable does not contain the
regex separated character (/ or |).

Regression: Before this patch, the user was able to user a modifier. Now
it is not possible.

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

Bug 8015: Get rid of the eval for substitution

Before this patch, the regex substitution was contain into only one
variable (e.g. my $regex = "/foo/bar/i").
Now each member of the regex is stored into a field in the
marc_modification_template_actions sql table.

In order to avoid a complex code, only modifiers i and g are take into
account.

Note: If you already add the mmta table, you have to drop it.
This patch also adds a foreign key from mmta to mmt tables.

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

Bug 8015: FIX ui issue

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

Bug 8015: The template name is a required field

Test plan:
Try to add a template with an empty string as name.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:11 +00:00
7362776897 Bug 8015: (follow-up) fix various issues (squashed patch)
Bug 8015: Fix template capitalization amd other template issues

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Fix error where field object is returned instead of field value for fields without subfields

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Fix bad ordering on function parameters

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Escape escape characters for strings

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Fix bad parameter list for direct external call to update_field

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Fix problem with moving existing subfield value to nonexistent field/subfield

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: FIX QA issues

This patch fixes some stuffs failing qa tests: POD, indentation (tabs),
perlcritic

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:49:45 +00:00
622430cfb5 Bug 8015: Add MARC Modifications Templates
The MARC Modification Templates system gives Koha users
the power to make alterations to MARC records automatically
while staging MARC records for import.

This tool is useful for altering MARC records from
various venders work with your MARC framework.

The system essentially allows one to create a basic script
using actions to Copy, Move, Add, Update and Delete fields.

Each action can also have an optional condition to check
the value or existance of another field.

The Copy & Move actions also support Regular Expressions,
which can be used to automatically modify field values during the
copy/move. An example would be to strip out the '$' character
in field 020$c.

Furthermore, the value for an update can include variables
that change each time the template is used. Currently,
the system supports two variables, __BRANCHCODE__ which
is replaced with the branchcode of the library currently
using the template, and __CURRENTDATE__ which is replaced
with the current date in ISO format ( YYYY-MM-DD ).

At its simplist, it can perform functions such as:
Copy field 092$a to 952$c
At its most complex it can run actions like:
Copy field 020$c to 020$c using RegEx s/\$// if 020$c equals RegEx m/^\$/

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:47:08 +00:00
77c19db26f Bug 11142 - Update Bootstrap theme's place hold form to match the new version in prog
The update to the prog theme's place hold page (Bug 10836) happened
after the Bootstrap theme's place hold form had already been converted,
so it lags behind. This patch applies the changes made to prog to Bootstrap.

To test, switch to the Bootstrap theme and follow the test plan from Bug
10836:

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: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors. Works as described, very well.

Tested all situations, all syspref, and without JavaScript.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:58:51 +00:00
Jonathan Druart
363e986c60 Bug 10283: Hide "many items" on second tab when using OpacSeparateHoldings
If there are over 50 items in the holdings or Other holdings tab, the
warning and link 'This record has many physical items. Click here to
view them all.' is only shown for the first tab.

Test plan:
- Switch on the OpacSeparateHoldings pref.
- Go on a biblio detail page at the OPAC with more than 50 items
- Check that the 'view all' link appears on the second tab.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:53:56 +00:00
Julian Maurice
b027b47aa0 Bug 7295 (follow-up) replace simple-quoted string by double-quoted string
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:37:20 +00:00
Julian Maurice
fe777ef937 Bug 7295: (follow-up) several fixes
- List of libraries in basket.pl is now sorted by branch name, not code
- When IndependantBranches is ON, user has only the possibility to set
  basket branch to its own branch, or to no branch at all.
- When basket do not belong to any branch, selected branch by default is
  connection branch (was 'no branch')
- added id attributes to both added li elements
- change description of 'order_manage_all' permission to make it
  clearer.
- remove Test::MockModule dependency

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:37:08 +00:00
Julian Maurice
54616c37e2 Bug 7295: More granular permissions for baskets
- Add branch info to baskets
- Add a list of borrowers that are allowed to manage a basket (one list
for each basket).
- Add a new subpermission: acquisition => order_manage_all

If user is superlibrarian, or if that user has permission acquisition = 1
(GranularPermissions = OFF), or subpermission acquisition =>
order_manage_all (GranularPermissions = ON), that user is authorised to manage
all baskets.

Depending on syspref AcqViewBaskets:
  'all': user can manage all baskets
  'branch': user can manage baskets of their branch (the basket branch is
            taken into account, not the branch of the basket's creator).
            If basket branch is not defined, all users can manage this
            basket.
  'user': user can manage baskets she created, and baskets in their
          user list

There are unit tests in t/Acquisition/CanUserManageBasket.t, which
require Test::MockModule

You can edit basket's branch and users list in basket modification page
(acqui/basket.pl)

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:35:35 +00:00
Jonathan Druart
bdfcae57cd Bug 7298: (follow-up) fix translation for CSV strings
Following the same way as bug 10935, the headers are in an include file.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Translatability tested successfully.
Passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:51:45 +00:00
Jonathan Druart
43adbda007 Bug 7298: (follow-up) various QA fixes
- use Modern::Perl;
- GPL version
- tabs

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

Testing notes:
- CSV header row is now translatable.
  Tested by updating the German po files and checking for the line.
- Tested that claiming for late serial issues still works as
  expected, as one file has been renamed. Filed 10931 for
  untranslatable CSV contents.
- Tested that claiming late orders still works:
  * Table searching and sorting
    Works nicely, but some columns could be split up for better
    searching and sorting:
      * Order date: 20/01/2013 (245 days)
      * Total cost:     10.00x1 = 10.00 Books
        => item type should be separate
      * Basket:  10 MPL
        => Library and basket number could be separate columns
  * Filters
     * Combined various filters, search results look correct.
  * Selecting order for claiming
      * Limiting by vendor makes it possible to check/uncheck all
      * With no vendor limit, entries for other vendors will be
        locked after the first checkbox is checked for one vendor
  * Exporting as CSV
     * Exported single line > CSV appears correct.
     * Exporting multiple lines > CSV appears correct.
     PROBLEM: Translated CSV don't work correctly, as line
     breaks are lost in the translation process.
     Needs to be fixed in a follow-up.
  * Sending serial claim email
     * No regressions found - there are some problems with the
       email contents noted on bug 7298.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:51:25 +00:00
Jonathan Druart
58111f8ece Bug 7298: (follow-up) make CSV strings translatables.
Using a template file, the CSV headers become translatable.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:50:58 +00:00
Jonathan Druart
89d951c855 Bug 7298: (follow-up) fix checkboxes binding on load
Click on checkboxes should be bound on load.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:50:29 +00:00
Katrin Fischer
92aa1246e2 Bug 7298: (follow-up) fix capitalization and moving supplier id
Fixes a few capitalization errors on the late orders page like
- Claim orders
- filter
- Search results

Also moves the supplierid from the order date column to the
vendor column.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:50:08 +00:00
Jonathan Druart
fd2c751a86 Bug 7298: add option to export late orders as CSV
This patch allows to export late orders as CSV.

Test plan:
- Go on the late orders page (acqui/lateorders.pl)
- Select one or more order and click on the button "Export as CSV".
- The generated file should contains some information on the orders
  (order date, estimated delivery date, vendor name, information field,
  cost, basket name (and basketid), claims count and the claimed date)
  The last line of the file is the total of orders.
- You are not allow to select order from different vendor.
- The check/uncheck all links appears only if a vendor is selected.
- Check that the check/uncheck works for all pages of the table.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing comments on last patch in this series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:49:24 +00:00
Jonathan Druart
d2052311cb Bug 8435: add permission to enable editing other library's serials if IndependantBranches is on
In the serial module, we want to hide serials from others libraries.
However, to permit central serials manage, this patch introduces a
new permission, 'superserials'. If a staff member has this permission,
that person can override the restriction.

Test plan:
- Switch on the IndependantBranches syspref
- Add the permission 'superserials' for a patron and test you can
  navigate and see all serials
- Remove this permission and test you cannot manage/view subscriptions
  from others libraries

Signed-off-by: Frederic Durand <frederic.durand@unilim.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:27:19 +00:00
Galen Charlton
eaf4730abe Bug 8037: (follow-up) fix undefined variable warning during template processing
Fix instances of the following warning appearing in the Apache log:

... parcel.pl: Argument "" isn't numeric in addition (+)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:17:44 +00:00
Galen Charlton
4b3b87a7c3 Bug 8037: (follow-up) tweak fund subtotal note
Use "Tax exc." rather than "GST exc." to be consistent with other parts
of the table footer.  Also remove the new style introduced in the previous
patch; defining non-semantic CSS classes like font-weight-normal is not
desirable.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:53:33 +00:00
Jonathan Druart
380bfcedd5 Bug 8037: (follow-up) bad sql query and variable renaming
The first patch does a left join on aqorders_items which returns too
much order lines.

This patch follows the Galen's suggestion: it removes the join and calls
the GetItemnumbersFromOrder routine for retrieving itemnumbers.

Bonus: the "parcelitems" variable is badly named and obfuscates the code.
I changed it for "orders".

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:53:17 +00:00
4f775cd640 Bug 8037: (follow-up) adds the note "GST exc." for subtotals by fund
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:53:17 +00:00
3910d5e8b4 Bug 8037: Display holds & fund on the already received table on order receipt summary
Adds a column to indicate holds on received items, as well as adding
a new column for fund and showing the subtotals per fund above
the total subtotal.

To test:

[1] Create an order basket containing at least one title and
    ensure that an item is created for that title.  Close the
    basket.
[2] Place a hold on the title.
[3] Receive the order.  After receiving it, but before finishing
    the invoice, the table of already received orders should now
    have columns for the order budget and number of holds on the
    title as well as lines with the subtotal per fund.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:53:07 +00:00
Bernardo Gonzalez Kriegel
742e070fcc Bug 11134 - Typo on course reserves help
This patch fixes a small typo on course reserves help

To test:
1) Go to Course reserves
2) Press 'New course'
3) Press Help
4) On 3dr paragraph you will read "To link a ninstructor ..."
5) Apply patch
6) Now it reads "To link an instructor ..."

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2013-10-31 14:10:04 +00:00
Galen Charlton
ca18e624fd Bug 9456: (follow-up) use datatables.inc
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:54:26 +00:00
Jonathan Druart
ce4c7f31bf Bug 9456: (follow-up) remove whitespaces and tab
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:52:24 +00:00
1b10a6f3a0 Bug 9456: (follow-up) sort on callnumber only
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:52:05 +00:00
eedb0aade4 Bug 9456: (follow-up) Remove useless CSS
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:51:49 +00:00
470bc63512 Bug 9456: (follow-up) move sort filters to datatables.js
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-31 05:51:29 +00:00
75f9cdcf80 Bug 9456: (follow-up) add tooltip
Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:51:15 +00:00
5a781c2ff9 Bug 9456 - Add callnumber column to the cart
This patch adds call-number sorting to the staff client cart. Sortining is enabled
on the 'Items' column which uses a custom sorting routine to sort the callnumbers.
If the sort is ascending, each column will be sorted by the highest ordered
callnumber for that row. Likewise, if the sort is descending the table will be
sorted by the lowest valued callnumber for that row.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:51:03 +00:00
Galen Charlton
f556bf0cc9 Bug 9044: (follow-up) restore the toolbar menu items
This patch adds the following items back to the cataloging
toolbar:

- Edit items in batch
- Delete items in a batch

My rationale: the question of the best UI for selecting items for
batch operations is not yet settled.  Adding the ability to select
items from the bib details page is indeed useful, but as currently
implemented, it can hide the availability of the batch
edit/deletion operations if no item is yet selected.  Although
having both the toolbar items and the links that display when an
item is selected is a bit redundant, for now I think we can live
with that until we get more eyes on the UI.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:31:23 +00:00
Julian Maurice
a794ce5a76 Bug 9044: (follow-up) set the number of filters according to number of columns
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Filters now shows correctly. No errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
This feature is a little controversial as it removes
the batch edit/delete options from the menu and moves them
to the item table, additionally controlled by a system
preference. Maybe later on, we can think about the UI a bit
more, but it works nicely.

Tested with.
- SeparateHoldings and SeparateHoldingsBranch activated/deactivated.
- Search filters.
- None, both, or one of the permissions.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:31:12 +00:00