Commit graph

8859 commits

Author SHA1 Message Date
6c264b24d1 Bug 11686: make "please note your reason here..." translatable
Through some quirk of the translation script a predefined value on a
text input is not properly translated even though the string appears in
the po file. On the suggestions form the problem can be solved by using
the HTML5 placeholder attribute.

To test you must have existing suggestions to manage. Apply the patch
and:

- Update a translation by running tranlsate update [language code]
- Install/reinstall the translation by running translate install
  [language code]

- In the English templates:

  - Navigate to Acquisitions -> Suggestions and find the "Mark selected
    as:" section below the table of existing suggestions.
  - Select "Other" from the "choose a reason" field. A text input field
    should appear with the placeholder text "please note your reason
    here."

- In the templates you updated and installed, follow the same procedure
  above. The placeholder text should now appear with the correct
  translation.
- In both English and translated templates using this bulk-status option
  should save your chosen status correctly with the correct reason,
  whether that reason be predefined or manually entered.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Tested successfully with German - nice to see this fixed!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 14:26:36 +00:00
635d544111 Bug 11648 - Use word item instead of copy - opac prog
Sometimes, the word copy/copies is use to speak about item/items.
It would be better to use only item because translation of the word
copy depends on context, it should be used only when speaking about
copy like in "copy and paste".

This patch replaces copy/copies in  opac prog theme.

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>
2014-03-12 14:21:59 +00:00
18456ea5fc Bug 11648 - Use word item instead of copy - opac bootstrap
Sometimes, the word copy/copies is use to speak about item/items.
It would be better to use only item because translation of the word
copy depends on context, it should be used only when speaking about
copy like in "copy and paste".

This patch replaces copy/copies in opac bootstrap theme.

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>
2014-03-12 14:21:44 +00:00
3273f82350 Bug 11648 - Use word item instead of copy - intranet
Sometimes, the word copy/copies is use to speak about item/items.
It would be better to use only item because translation of the word
copy depends on context, it should be used only when speaking about
copy like in "copy and paste".

This patch replaces copy/copies in intranet.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String changes, no regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 14:21:15 +00:00
Galen Charlton
556eb67718 Bug 108661: (follow-up) enshrine letting CardnumberLength specify just a maximum
This patch finishes the work started in one of the previous
follow-ups and allows CardnumberLength to be set to a value
like ',5'.  In conjunction with not including cardnumber in
BorrowerMandatoryField, this allows a cardnumber to not be
required but, if present, to not exceed the specified length.

This patch also updates t/db_dependent/Members.t so that
it runs in a transaction, tests the new return value
of checkcardnumber, and manages the CardnumberLength syspref.

To test:

[1] Verify that prove -v t/db_dependent/Members.t and
    prove -v t/Members/cardnumber.t pass.
[2] Set CardnumberLength to ",5" and take cardnubmer out of
    the BorrowerMandatoryField list.
[3] Verify that you can save a patron record without a cardnumber,
    but if you supply one, that it can be at most 5 characters long.
[4] Add cardnumber back to BorrowerMandatoryField.  This time, the
    minimum length is 1 even though CardnumberLength is ",5".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 04:07:03 +00:00
Galen Charlton
22593e2e9b Bug 10861: (follow-up) use minlength/maxlength rather than pattern for client-side validation
This patch replaces use of the HTML5 pattern attribute with minlength
and maxlength, which is compatible with the jQuery validation plugin
and which, in Chrome 33.0.1750.146 at least, works better.

To test:

[1] Enter a new patron record or edit an existing one.
[2] Verify that the minimum and/or maximum length requirements
    set by the CardnumberLength syspref are validated and that
    form submission is prevented if the cardnumber doesn't
    meet the length requirements.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 03:05:44 +00:00
aeae8ef3b2 Bug 10861: (follow-up) Clarify preference description
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 02:18:42 +00:00
Jonathan Druart
3d938ffc82 Bug 10861: (follow-up) various refactoring
This patch refactors the previous code and moves the logic from the pl
to a new routine.

Same test plan as previous patch.

/!\ new unit test filename.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Bug 10861: Reintroduced the cardnumber length check (client side)

Previous patches has removed the pattern attribute of the input, it was
not needed. This patch reintroduces it. It will only work for new
browser version.

Moreover, it manages with the ',XX' format (see UT).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Squashed the last two follow-ups. The pattern test did not work fully for me
in Firefox 26 (very recent). But I see the message when I clear the field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 02:17:34 +00:00
c898f23f13 Bug 10861: (follow-up) for typo in patrons.pref
I'd rather have a comma than a coma :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Then again, if the cookies are really, really good, a cookie-induced
coma would not be the worst thing.
2014-03-12 02:16:49 +00:00
Jonathan Druart
834abff631 Bug 10861: Add a check on cardnumber length
Some libraries would like to add a check on the cardnumber length.
This patch adds the ability to restrict the cardnumber to a specific
length (strictly equal to XX, or length > XX or min < length < max).
This restriction is checked on inserting/updating a patron or on importing
patrons.

This patch adds:
- 1 new syspref CardnumberLength. 2 formats: a number or a range
  (xx,yy).

- 1 new unit test file t/Members/checkcardnumber.t for the
C4::Members::checkcardnumber routine.

Test plan:
1/ Fill the pref CardnumberLength with '5,8'
2/ Create a new patron with an invalid cardnumber (123456789)
3/ Check that you cannot save
4/ With Firebug, replace the pattern attribute value (for the cardnumber
input) with ".{5,10}"
5/ You are allowed to save but an error occurred.
6/ Try the same steps for update.
7/ Go to the import borrowers tool.
8/ Play with the import borrowers tool. We must test add/update patrons
and the "record matching" field (cardnumber or a uniq patron attribute)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested adding, updating; importing and ran unit test.
Preliminary QA comments on Bugzilla

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 02:16:18 +00:00
Jonathan Druart
88c052b091 Bug 10837: make it possible to export serial claims as CSV even when no notice defined
On the serial claims page, it is possible to export (using a CSV
profile) or claim 1+ serials.
The checkboxes are not shown if the claiming notice is not defined.
So it is not possible to export claims.

Test plan:
- delete your notice "claimissues"
- go on the serial claims page
- verify that you are able to export them as CSV

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described and enables use of the export
funtionality even if you are not using the email notifications.
Exporting the serials will also set the claim date.
Passes QA script and tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 16:49:44 +00:00
c44853ce31 Bug 11170: (follow-up) fix typo 'occured' in parcels.tt
Found this typo while testing bug 11170.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 15:10:35 +00:00
Jonathan Druart
f10ee65d88 Bug 11751: remove dead code related to handling members of institution patrons
This patch removes some dead code concerning the handling of patrons
that are members of other, institutional patrons.  This code did not
work; removing it clears the field if somebody wants to do a better
implementation of such relationships between patrons.

This patch:

[1] Removes the memberofinstitution system preference.
[2] Removes the following routines:

    C4::Members::get_institutions()
    C4::Members::add_member_orgs() (and removing this routine
    removes a reference to a borrowers_to_borrowers table that
    does not exist).

There should be no changes whatsoever to system functionality with this
patch (with the trivial exception of the absence of the
memberofinstitution system preference).

Test plan:

[1] Look at the code and use grep, git grep, etc. verify this patch
    does not remove something in use.
[2] Verify that there are no regressions upon adding or editing
    a patron record.
[3] Verify that the memberofinstitution system preference has been
    removed

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 15:05:14 +00:00
Nicole C. Engard
2f0aac8970 Bug 11918 : Fix typo on authorized values page
This is a small string patch. On Authorized values this patch fixes
the wording next to the library limit.

To test:

Visit Authorized Values
Click 'Add new' or 'Edit' next to a value
Make sure that the text next to the library filter is right

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Text change, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 14:23:11 +00:00
Jesse Maseto
1c794eaeca Bug 11695 - Fixed typo in marc21_field_008.xml
"Tree-character alphabetic code", to "Three-character alphabetic code"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Trees are nice, but Three is better here.
String change, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-11 14:21:23 +00:00
60d24754ee Bug 11465: Show counts and amounts on OPAC 'your summary' tabs
This patch adds counts and amounts to the tabs in the 'your summary'
page of the OPAC patron account.

_TEST PLAN_

Before applying:
1) Choose a test patron
2) Place a few holds
3) Check in one of the holds so that it is waiting for the patron
4) Check out a few items
5) Check out another item that can generate fines (backdate it a few
   weeks/months)
6) Run fines.pl to generate fines (make sure your finesmode syspref
   is set to prod)
7) Check your OPAC patron account.
8) Note the tabs "Checked out, Fines, Holds, and Waiting"

Apply the patch
1) Switch your OPAC to the bootstrap theme
2) Refresh your browser for the OPAC patron account screen
3) Note that the applicable counts and amounts appear on the tabs

--

At the moment, I just have a Bootstrap patch. This is an easy patch
though, so I can duplicate to the other themes if necessary...

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

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
"Waiting" doesn't appear to work for me with and without the patch.
"Checkouts", "Holds" and "Fines" work fine.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 21:46:24 +00:00
9d9a002432 Bug 11516: make OPAC search term highlighting work in results browser
When OpacHighlightedWords syspref is on, the current search terms are
highlighted in results and detail pages.

This workes in detail page with the URL param 'query_desc'.

This parameter must be managed in results browser (appears when
OpacBrowseResults syspref is on) links.

This patch adds query_desc parameter in results list and changes next
nd previous links to be build into TT instead of perl to manage
query_desc parameter only into TT.

Test plan :
- Edit sysprefs :  OpacHighlightedWords on, OpacBrowseResults on.
- Perform a search with a term existing into title
=> You see the term highlighted in search results
- Go to detail of a result with highlight
=> You see the term highlighted
- Click on "Next"
=> you see query_desc in URL, and if search term is present it is
   highlighted
- Same for "Previous"
- Click on "Browse results"
- Click on a result
=> you see query_desc in URL, and if search term is present it is
   highlighted

Signed-off-by: Aurélie <aurelie.fichot@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 21:30:38 +00:00
Frédérick
54a17d97dc Bug 11359: Add the borrower's cardnumber and phonenumber to the branch overdues report
The report also known as "Overdues with fines"

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

All tests pass, this adds data to the Patron column on the
overdues with fines report to show the patron's cardnumber
and phone number.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described and passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 20:25:26 +00:00
Galen Charlton
466cfd2b18 Bug 11343: tweak wording of the syspref editor for MaxItemsForBatch
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 19:17:49 +00:00
Jonathan Druart
0e8f85a3b3 Bug 11343: The max number of items to process in a batch is hardcoded
Until now, the maximum number of item records to process in a batch was
hardcoded to 1000.
This patch adds a syspref MaxItemsForBatch in order to allow to adapt
this value.

Test plan:
- set the pref to 2
- try to delete a batch of 3 items: they are not displayed
- try to modify a batch of 3 items: you are not allowed to do that
- set the pref to 1000 and try again. Now items are displayed and you
  are allow to modify them.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2014-03-10 19:10:27 +00:00
Galen Charlton
706e1380f9 Bug 11605: (follow-up) use DT defaults for the new Ajax staged batch page
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 19:07:15 +00:00
Jonathan Druart
e2ef2f51d0 Bug 11605: (follow-up) fix regression
Bug 11314 overrides the iDisplayLength and aLengthMenu values and should
be kept.

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>
2014-03-10 19:07:00 +00:00
Jonathan Druart
bb96da8ff8 Bug 11605: fallback to default DataTables settings where possible
The default entry is 20 and can be apply to all tables.

Bug 11555 apply the menu entries to all tables, redefining it is
uesless and can be removed.

Test plan:
Test pages impacted by this patch and verify there is no regression on
the tables.

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>
2014-03-10 19:05:51 +00:00
Jonathan Druart
8a7c31f766 Bug 11555: (follow-up) use 20 rather 25 for one of the default DT row counts
If you have a look at git grep aLengthMenu, you will see we choose 20
instead of 25.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 18:50:51 +00:00
b80b8fa40f Bug 11555: Make "All" one of the default options for datatables
There are many instances where librarians would like to have the ability
to see all the rows in a datatable at one. It seems prudent to make this
a default option for datatables, rather than change it on a case by case
basis.

Test Plan:
1) View the circulation history for a patron
2) Note you can select to view 10, 25, 50, or 100 entries
3) Apply this patch
4) Reload the circulation history page for a patron
5) Note the new "All" option
6) Verify the "All" option shows all the rows at once

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I tested the translation for "All"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 18:49:33 +00:00
cb45d4c218 Bug 10452: make AllowHoldsOnDamagedItems control using damaged items to fulfill holds
AllowHoldsOnDamagedItems will stop item-specific holds from being placed
on damaged items, but does not stop Koha from using damaged items to
fill holds. This seems like incorrect behavior.

Test Plan:
1) Set 'AllowHoldsOnDamagedItems' to "Don't Allow"
2) Pick an item, set it to damaged
3) Place a bib-level hold on this item's record
4) Scan the item though the returns system
5) Koha will ask to use this item to fill the hold, click "ignore"
6) Apply this patch
7) Repeat step 4
8) Koha will not ask to use this item to fill the hold

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>
2014-03-10 18:15:12 +00:00
e0b13056b2 Bug 11713 - Use new DataTables include in course reserves templates
This patch modifies two course reserves templates to use the new
DataTables include. This simplifies the inclusion of assets and updates
to the latest DataTables version. Also included:

- Adds a sorting filter on the course reserves detail table to excluding
  articles from sorting.
- Corrects the styling of toolbar buttons (buttons should have btn and
  btn-small classes).

To test you must have UseCourseReserves enabled and have multiple
existing courses, at least one of which should have items on reserve.

1. View the list of courses. Table sorting should work correctly. The
   "new course" button should look consistent with other staff client
   toolbar buttons.

2. View the list of reserves on a course.
   - Toolbar buttons should look consistent with other staff client
     toolbar buttons.
   - Sorting should work correctly, excluding sorting on the Edit,
     Remove, and "Other course reserves" columns.
   - Titles on reserve which begin with an article should be sorted
     correctly with article excluded
   - Test sorting with item-level_itypes on and off.
   - Test sorting using a patron whose permissions include various
     combinations of add_reserves and delete_reserves

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>
2014-03-10 17:51:36 +00:00
5372082724 Bug 8918: (follow-up) improve descriptions of two related sysprefs
Updating pref descriptions for ReservesNeedReturns and ILS-DI:AuthorizedIPs.
Just sideway related to this report, but not important enough to separate.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 17:34:12 +00:00
Galen Charlton
5479468948 Bug 10558: (follow-up) choose label for matching records correctly
This patch ensures that the record type of the import batch (i.e.,
biblio or authority) is consulted in order to choose the "Matches
biblio" or "Matches authority" labels.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:51:08 +00:00
0713f3bf03 Bug 10558 [QA Follow-up]
This patch addresses a number of issues with the main patch:

- regression on bug 2060 (i.e., displaying authority import batches
  correctly)
- regression on bug 10170 (translation of import record states)A
- use of datatables.inc
- lack of clarity as to the licensing of tools/batch_records_ajax.pl
- insufficent sanitizing of input used to generate an SQL statement

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:48:32 +00:00
3f028c72d4 Bug 10558: (follow-up) styling improvements
This patch makes improvements to the default DataTables CSS and corrects
a couple of errors in the original patch. CSS for the "full numbers"
type pagination, used by this and the quotes editor, has been cleaned up
and made more visually consistent with the brief pagination style.

Also changed:

- removed some hard-coded paths containing "http://staff.kohadev..."
- Added a column header to the column showing record match details. This
  provides both information and a clearer target for clicking to resort
- Expanding the default table pager controls for this page and the
  quotes editor (for consistency)
- Correction to quotes.css to fix pager display problem on wide screens

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:47:53 +00:00
4d32421634 Bug 10558 - Convert records table in manage-marc-import.pl to Ajax DataTable
Some libraries would like to sort by columns for the records of an
import batch. This seems like a good use of Ajax DataTables.

Test plan:
1) Apply this patch
2) Import a record batch into Koha
   a) Use some form of matching
   b) Have some records that will match and some that won't
   c) Have at least 30 records so you can test the pager
3) Verify the new table is functionally equivalent to the old static one

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

Tests fine and looks good with the exception of the corrections I put in
a follow-up.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:46:49 +00:00
15ad3061b2 Bug 11794 - restore functioning of opacSerialDefaultTab
The opacSerialDefaultTab system preference should control whether to
show the holdings or subscriptions tab by default on the detail page for
a serial. This behavior was broken when we last updated jQueryUI because
of a change in the jQueryUI active tab class name.

This patch corrects the class on the detail page and removes the old
class from the authorities detail page (where it was unnecessary
anyway).

To test, view a serial record in the OPAC under various settings of the
opacSerialDefaultTab preference. The default tab should correctly follow
the preference.

Test in prog and Bootstrap themes.

Edit: Rebased on current master. Note that the change to
opac-auth-detail.tt is because the page never has more than one tab,
hence doesn't need the "active" designation.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested in prog and bootstrap.
All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:29:04 +00:00
Galen Charlton
19e83d9b9f Bug 11860: (follow-up) standardize spelling of "call number"
It is "call number", not "callnumber".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:24:43 +00:00
Julian Maurice
858bcedc1f Bug 11860: Display subscription callnumber in OPAC detail page
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2014-03-10 15:21:28 +00:00
9ce9eea2db Bug 11328 - Show local cover images in staff client search results
Local cover images do not appear in staff client search results. This
patch adds them.

To test, enable the LocalCoverImages system preference and add at least
one cover image to a title. Perform a search which will return results
that include your title. Confirm that the local cover image is
displayed.

Search results should also display correctly with and without
AmazonCoverImages enabled as well as with LocalCoverImages disabled.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:16:06 +00:00
2453b991b8 Bug 11802 - corrects for the patron purchase suggestions page
This patch corrects some errors with the staff client's patron purchase
suggestions page (members/purchase-suggestions.pl).

To test, apply the patch and make sure the patronimages system
preference is enabled.

- View the purchase suggestions page for a patron whose record has a
  patron image attached. The image should appear in the left-hand
  sidebar.

- View the page for a patron who has submitted no purchase suggestions.
  The message should be styled correctly.

- The toolbar on the page should look correct and work correctly.

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 15:11:53 +00:00
Jonathan Druart
e2de21a943 Bug 11866: (follow-up) ensure that empty toolbar is not displayed
If a user does not have course_reserve permission, a an empty toolbar is
displayed.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-10 14:49:19 +00:00
9e5fcb0d5d Bug 11866: do not require special permissions to view course reserves in staff interface
A librarian with no course reserves permissions cannot view course
reserves from the staff intranet, yet can from the OPAC. This doesn't
make much sense. Librarians should not require any course reserves
permissions to view courses and reserves from the staff intranet.

Test Plan:
1) Log into staff intranet as a librarian with no course reserves
   permissions
2) Note you cannot view course reserves
3) Apply this patch
4) Note you can now view course reserves
5) Verify you cannot modify courses or course reserves

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

Bug 11866 [Follow-up] Staff side course reserves too restrictive

This follow-up patch adds a check for the "UseCourseReserves" system
preference to the display of the Course reserves menu item in the
header.

To test, view the "More" menu with the "UseCourseReserves" system
preference on and off. The menu item should appear and disappear
accordingly.

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>
2014-03-10 14:46:44 +00:00
Jacek Ablewicz
4ce0848fe3 Bug 11798: fix problems with column sorting and row visibility in invoices table
1) Sorting on "Billing date" (functionality introduced by bug 10794)
doesn't work properly any longer after bug 10401 was pushed (another
side-effect being that "Vendor" column is currently not sortable
at all).
2) Only "top ten" invoices are always displayed in the table, and it's
not possible to change that without missing top/bottom DataTables
pagination bars.

This patch fixes sorting for "Billing date" &  "Vendor" columns
in invoices table and restores the ability to see all table
rows/search results (not just "top ten").

Test plan (you'll need to have 11+ invoices with various billing
dates entered in the system):
1) apply patch,
2) view the Acquisitions invoices page (acqui/invoices.pl), do some
search (= as broad search as possible) and confirm that "Billing
date" and "Vendor" columns now do sort correctly,
3) in situations when there are more than 10 search results, they
should all be visible in the invoices table.

NOTE: Generating invoices is a painfully convoluted mess.
      All my "Billing date" entries were blank, so was not
      able to confirm Billing date issues. However, Vendor
      sorting issues, seeing more than 10, and in my bizarre
      initial case the non-visible checkboxes were all fixed.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-27 16:20:08 +00:00
cd089028b8 Bug 11805 - Use validation plugin when creating new basket in Acquisitions
The page for adding a new basket in Acquisitions includes some custom
form validation JavaScript which can be removed in favor of HTML5
validation attributes and Koha's built-in validation plugin. This patch
does so.

To test, apply the patch and go to Acquisitions -> Choose a vendor ->
New basket. Try submitting the form without entering a basket name. This
should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing basket should also work correctly.

Patch works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, passes all tests and QA script.
Tried adding a new basket with/without basket name and editing
an existing basket editing/emptying the basket name.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-27 15:44:48 +00:00
a4a014e365 Bug 11736 - Use new DataTables include in Koha news templates
Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the Koha
news page.

To test you should have existing news items with varying creation and
expiration dates. Apply the patch and confirm that table sorting works
correctly for all settings of the dateformat system preference.

C4::NewsChannels.pm has been modified so that it now passes an
unformatted date to the template, where the KohaDates plugin is used to
apply the correct formatting. Sorting is based on the unformatted date.

Also corrected: Capitalization errors.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.
Also passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-27 15:42:34 +00:00
3fc7ea191c Bug 11716 - Use new DataTables include in label manage template
This patch modifies the template for the label manage pages to use
the new DataTables include. This simplifies the inclusion of assets and
updates to the latest DataTables version.

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

Manage layouts (/cgi-bin/koha/labels/label-manage.pl?label_element=layout)
Manage templates (/cgi-bin/koha/labels/label-manage.pl?label_element=template)
Manage profiles (/cgi-bin/koha/labels/label-manage.pl?label_element=profile)
Manage batches (/cgi-bin/koha/labels/label-manage.pl?label_element=batch)

Signed-off-by: wajasu <matted-34813@mypacks.net>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-27 15:38:58 +00:00
18d5f28804 Bug 11710 - Use new DataTables include in cataloging Z39.50 search template
This patch modifies the template for the cataloging Z39.50 search
template to use the new DataTables include. This simplifies the
inclusion of assets and updates to the latest DataTables version.

To test, go to cataloging and choose "New from Z39.50." Perform a search
and confirm that table sorting still works correctly.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-27 15:34:12 +00:00
a31bf519a9 Bug 11717 - Use new DataTables include in member templates
Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
member pages which use DataTables.

Apply the patch and test the following pages to confirm that table
sorting works correctly:

- Patron details (members/moremember.pl)
  - The checkouts, relatives' checkouts, and holds tables have been
    modified to exclude articles when sorting of titles.

- Notices (members/notices.pl)
- Circulation history (members/readingrec.pl)
- Statistics (members/statistics.pl)
- Update child to adult patron (members/update-child.pl) - This is the
  page which appears in a pop-up when you update a child patron to an
  adult (from the "More" menu in the toolbar when viewing patron
  details).

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-27 15:33:26 +00:00
234560a690 Bug 11809: don't display 'Clear date' on OPAC patron details form if date of birth is required
On the OPAC's patron details form, if the date of birth field is
required we shouldn't offer the user a "clear date." This patch removes
the "clear date" link if the field is required.

To test, configure the BorrowerMandatoryField system preference to
require dateofbirth. Enable the OPACPatronDetails system preference and
log in to the OPAC. View the "personal details" form and confirm that
there is no "clear date" link next to the required date of birth field.

Remove dateofbirth from the BorrowerMandatoryField system preference and
re-test. The "clear date" link should appear.

Test in both prog and Bootstrap themes.

I tested with prog and bootstrap themes, adding/removing field 'dateofbirth'
in sys pref PatronSelfRegistrationBorrowerMandatoryField.
Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-26 17:32:06 +00:00
a8ebfa4702 Bug 11819 - Don't show catalog edit menu if user has no edit permissions
Currently if the logged in user lacks any cataloging permissions the
bibliographic detail page (catalogue/detail.pl) still shows the Edit
button, but with an empty dropdown menu. This patch corrects the toolbar
include so that the button will not appear at all.

To test, view the biblio detail page as a user with various combinations
of the following permissions:

- edit_items
- edit_catalogue
- items_batchmod
- items_batchdel

The edit button should appear with the correct set of links when the
user has any combination of the above permissions. If user has none the
button should not appear.

Followed test plan, patch behaves as expected
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, passes all tests and QA script.
Template only change.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-26 17:29:03 +00:00
2345dc12d8 Bug 11768: Show patron cardnumber in OPAC personal details
In previous versions of Koha, the patron cardnumber was displayed in the
personal details section of the OPAC for logged in users. A patron needs
to be able to access his or her cardnumber in some cases to access
online resources a library makes available that requires his or her
cardnumber. This is especially important for patron self registration
where a patron may not have a physical library card. This field should
be re-added to the patron personal details page.

Test Plan:
1) Apply this patch
2) Log into the OPAC
3) Browse to "your personal details"
4) Verify the patron cardnumber is visible

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Restores cardnumber on personal details tab in OPAC for
prog and bootstrap theme. Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-26 17:22:40 +00:00
521d717372 Bug 11707: fix editing additional attributes for patron whose category code includes a space
When editing additional attributes of a patron of a category with a
code with space (ie "CAT 3"), the Javascript is broken and Additional
attributes are not displayed.

This patch corrects by adding simple quotes around category code in JS
code.

Test plan :
- Create an patron additional attribute
- Create a new patron category with a space in code. ie "CAT 3"
- Create a new patron of this category : /cgi-bin/koha/members/memberentry.pl?op=add&categorycode=CAT 3
=> Without patch the JS is broken (Syntax error, unrecognized expression:
   [data-category_code=CAT 3]) and additional attributes are not
   displayed.
=> With patch the JS is not broken and additional attributes are
   displayed and can be edited.

Signed-off-by: Marc Véron <veron@veron.ch>

In current Koha version it is not possible to create category codes
with blanks.

To test, I changed an existing category code directly in the database.
Then I followed the Test plan.
Without patch, attribute types were not displayed.
With patch, they were displayed as expected.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I recommend not using codes with spaces and fix existing ones.
Koha doesn't allow you to add category codes with spaces, so the only way
to do it is via SQL.
This patch fixes a problem and passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-26 16:35:52 +00:00
59b9078a3f Bug 10751: standardize validation of title in staff purchase suggestions form
The form for adding a new purchase suggestion in the staff client
indicates that the title field is required but does nothing to enforce
this rule. This can be handled client-side with HTML5 validation
attributes and Koha's built-in validation plugin. This patch implements
this.

To test, apply the patch and go to Acquisitions ->
Suggestions -> New purchase suggestion. Try submitting the form without
entering a title. Doing so should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing suggestion should also work correctly.

The patch displays a message 'Required' near the title field.
After submitting a empty title it changes to 'This field is required'
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The title field is required since commit
d565fb02e9
This one makes it more consistent with formatting. It makes sense.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-26 16:25:30 +00:00