As pointed out by Jonathan, this script introduced a third form for the
CGI variable. This patch updates the script to use the more common
$input variable name.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
As we have multiple email fields in the patron record, we should
be clear which one can be changed from the batch mod now. Easiest
is to use the same label.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This adds the email field to the patron batch modification tool.
To test:
1) Install patch
2) Open Batch Patron Modification tool, and input a borrowernumber to edit
3) Add some data (e.g. test@foobar.com) into the Email address field, and click Save
4) The Primary Email address in the user record should now contain your email address
5) Test that running the tool again with the option to delete the data clears the field correctly
6) Repeat steps 1-5 with a file of user borrowernumbers
Sponsored-by: PTFS Europe
Signed-off-by: Sal <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies the OPAC suggestions interface so that patrons will
be asked for confirmation before deleting suggestions.
The patch also makes some minor markup changes to improve consistency
between this interface and others in the OPAC.
To test, apply the patch and log in to the OPAC as a user who has
submitted multiple suggestions.
- From the list of your suggestions, confirm that the "New purchase
suggestion" and "Delete" links have Font Awesome icons.
- Check the checkbox corresponding to one of your suggestions. You can
also now click the title of the suggestions to control the checkbox.
- When you check a box the "Delete" link at the top of the page should
activate.
- Clicking the delete link should trigger a confirmation modal showing
the title(s) you selected.
- The message and button labels should reflect whether one or
multiple titles are being deleted.
- Test that the confirm and cancel controls work correctly.
- Also test this process via the delete button at the bottom of the
table of suggestions.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Just a tiny coding guidelines fix.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When exporting a barcode range, the export popup should display "1 batch
to export" instead of "0 batches to export". In this context, it can be
considered a label batch and should be counted as such.
To test:
When clicking the "Print range" button, the popup should show "1 batch
to export".
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Edit the labels/label-edit-range.tt template to follow current
standards :
- Use footer javascript
- Use bootstrap grid
- Use jQuery Validation plugin for validation
Also fixes breadcrumbs to be more specific.
To test:
Make sure the page looks correct and still works as expected.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
TEST PLAN++
1) Apply all the patches
2) Connect to the intranet with an account with permissions to visit the "Tools" page
3) Go to /cgi-bin/koha/labels/label-home.pl
. Either by entering the URL directly
. OR, from the front page, by clicking "Tools", followed by the hyperlink "Label creator" under the "Catalog" section
4) Under the "+ New" button, a new option should be available: "Barcode range"
5) Fill the "From:" and the "To:" fields of the "Print barcode range" form
. Keeping both fields at "0" should trigger a warning beside the first field: "*Cannot be smaller than 1"
. If the value "From:" is greater the "To:" value, a warning should appear beside the second field: "*Cannot be smaller than the starting value"
. Make sure the form doesn't let you enter non-numerical values
. For a casual test, use "From: 1000" and "To: 1100"
6) After pressing the "Print Range" button, choose a template, a layout, and a starting position
. The "DEFAULT TEMPLATE 01" has a page height of 5pt and a page width of 0pt, don't use it
. All the default layouts should look alike, since we're only printing a barcode over a number, and not bibliographic information
. Using a layout not defined as 'Barcode' will show a warning message
7) Clicking the "Export" button should lead to a second dialog window with a "Download as PDF" hyperlink. Clicking the link should prop up a download dialog box
8) Save the PDF locally, or simply open it, and make sure the options you used were taken into account
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
+ Added a warning when the user selects a range with some non-existent barcodes, and a layout without barcodes.
This allows the user to print barcodes of items not in the database if he so desires, but will warn him if he tries to print only biblios (which results in missing entries or a blank page).
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
It seems I was using an href to a javascript function in the 'Print Range' button, which Chrome didn't mind, but Firefox did understand.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Adds an option to the label creator to print a range of barcodes.
Only allows printing to PDF.
C4/Label.pm had to get minor changes to override database-based barcode
generation. Same with labels/label-create-pdf.pl. By default, the
barcode is fetched from the database using the itemnumber, but when
printing ranges, you might not have a corresponding database entry.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 9156 changed the wording of the pref slightly to make it
clear that the subfield sequence of the record will be used,
not the sequence of the subfields defined in the pref.
This just reinstates the note:
The order of the subfields in the record will be preserved.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Note that we change both cataloguing/additem.pl and C4/Items->PrepareItemrecordfordisplay
I can find no code that uses callnumber from the C4/Items sub, except for the itemrecorddisplay script
which is not called with an itemnumber from Koha and should be deprecated for REST or ILSDI or OAI (imho)
To test:
1 - Define itemcallnumber syspref as "082ab,092ab,9520,245a"
2 - Find a record with no items
3 - Ensure it has no 082 field, but an 092 field
4 - Go to add an item - itemcallnumber is empty
5 - Apply patch
6 - Go to add item, itemcallnumber should be the 092ab fields
7 - Delete the 092 field
8 - Go to add item, itemcallnumber should be the 245a
9 - Edit the callnumber to be "testing" and save item
10 - For should now show itemcallnumber="testing" as default
11 - Browse to http://localhost:8081/cgi-bin/koha/services/itemrecorddisplay.pl?itemnumber=## subbing the correct itemnumber
12 - Ensure the callnumber is defaulting to testing
13 - delete the item you created
14 - browse to URL above - callnumber should now be 245 again
15 - Add an 092 field to record and ensure it is now default callnumber
16 - Add an 082 field, it should now be default
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch introduces a handy shortcut to get the items count for a
biblio. So instead of calling:
$count = $biblio->items->count;
you can call:
$count = $biblio->items_count;
The use case for this, is when we want to embed information on objects
to be sent as API responses. In that case, calling ->items->count needs
to be done manually on the controller script, with interesting added
complexity. With this kind of method, we can just require it to be
embedded automagically by calling the following on the API:
$biblio->to_api({ embed => { items_count => {} } });
If there are several nested layers of objects, doing manually can get
really tricky and error prone.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch replaces the only uses of CountBiblioInOrders and makes that
code use $biblio->orders->count instead.
Test nothing breaks in basket.pl and parcel.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch introduces an accessor to the related orders, and a method
that returns the active orders count. The target usage for the count is the
API. In the rest of the codebase, we would just call:
$biblio->orders->count
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a ->suggester accessor to the Koha::Suggestion class. It
will return undef if no suggester, and a Koha::Patron object otherwise.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Suggestion.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the mentioned accessor. To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Add a format option to the datatables export that remove .noExport
elements present in a data cell, just as .noExport columns are
not exported.
To test:
1. For late orders (which uses .noExport elements in data cells) :
Export data in any format using the export button at the top
of the datatable.
=> data should exclude "Add/Edit note" label, but
otherwise look the same as before the patch.
2. Try exporting data in other datatables in Koha and make sure
exported data is the same before and after applying the patch.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Replace inputs to edit notes by a link opening a modal, similar
to the basket summary page. This makes it possible for the notes
to appear in the datatable exports.
Also fix exporting with the export as csv button at the bottom
of the page to export notes.
Test plan :
1) In the late orders table (acqui/lateorders.pl), a link should
appear in both the internal and vendor note column, following the
current value if it exist.
-> This link should read "Add ..." if there is no existing note
or "Edit ..." if there is.
2) Click on the link. A modal should appear. Confirm that saving a
note works as expected.
3) Try exporting to any format using either the button at the top
of the table or the one at the bottom of the page.
-> The three new columns and their values should appear in the
export.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
0) Make sure you have a late order
a) Create a test vendor unless you have one
b) Create a test basket unless you have one
c) Close the basket to mark the order as late
1) Go to the late orders table
Before patch : Orderno, ISBN, vendor notes, internal notes are absent
After patch: fields are present
2) Edit the vendor note and/or the internal note
3) Press the save notes button
4) Refresh page and cache (CTRL+F5), if notes have been correctly saved, your modifications should be displayed.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This follow-up adds a missing template filter quiet qa tool warning.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds DataTables column configuration and export options to
the suggestions management tables in the staff interface.
The columns settings made via the administrative interface will affect
tables under each tab in the interface whether it be organized by
status, library, etc. However because of the way the KohaTable function
is currently written, changes made via the "Columns" button will only
affect the visible table.
To test, apply the patch and go to Acquisitions -> Suggestions.
- Under each tab, the table of suggestions should have a DataTables
toolbar with export and columns buttons. These controls should work
correctly:
- Showing and hiding columns should work as expected
- Exports should work, excluding the first and last columns
- Test the tables when using the various "Organize by" settings.
- Test changing the settings in Administration -> Columns settings.
- Verify that the changes you make to that configuration are
reflected in the suggestions tables.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch changes the column heading on smart-rules.pl to indicate that it only effects item level holds on the OPAC side, rather than the intranet.
To test:
1. Go to Administration, circulation and fine rules.
2. Observe incorrect heading on both the top and bottom of the table.
3. Apply the patch.
4. Repeat step 1.
5. Observe new headings.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Adapted from Bug 23784: At the moment only the title will display in the
course reserves details, but not the information from other title
fields. For series with multiple volumes that can lead to confusing
display. The patch makes use of the new include to display 245$abnp.
To test:
- Add mulitple records to a course reserve course
Make sure you have titles with different combinations of 245$b$n$p
- Look at the course details in the staff client
- Verify only $a displays
- Apply patch
- Reload
- Verify now the full information displays
Depending on your installation, you might want ot check that the 245
are correctly mapped and save the record once so the database
fields are correctly filled.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies the link to suggest purchase of an existing record
from the OPAC. The icon is changed to "gift" and the text shortened to
"Suggest for purchase."
To test, apply the patch and view the detail page of any record in the
OPAC. Confirm that the modifications look good.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
So far nothing is displayed if a librarian removes patron with
outstanding credits.
Note that outstanding debits blocks the deletion.
Test plan:
- Create a patron with outstanding credit
- Create a patron with outstanding debits
- Delete the 2 patrons
=> With credit - You get a warning but do not block the deletion
=> With debits - You get a warning message that blocks the deletion
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When checking out and sticky due date is selected, on the next screen
the due date is displayed iso-formatted, instead of following the
dateformat syspref
Test plan:
0/ Do not apply the patch
1/ Check an item out, with a selected due date. Tick "Remember for
session"
2/ Next screen you see the date like YYYY-MM-DD HH:MM
regarless the value of the dateformat syspref
3/ Apply this patch
4/ Reload the page
=> The date is correctly formatted
5/ Check an item out
=> Due date is correctly set
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
They are inserted depending on their alpha order, and sample_holidays
will fail because of missing branchcode.
This patch suggests a simple fix: rename sample_holidays to
sample_libraries_holidays, to make sure it will be loaded after
sample_libraries
Test plan:
Start a fresh installation and select all sample data
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Those are missing foreign keys, it will also clean the holidays tables
and automatically remove the holidays when a library is removed.
Test plan:
0. Do not apply this patch
1. Create a new library
2. Create special and repeatable holiday for this library
3. Remove the library
=> Notice that the holidays still exist in DB
4. Apply this patch
5. Execute the update database entry
=> Notice that the holidays for this library have been removed from the DB
6. Repeat 1-3
=> Notice that the holidays have been removed along with the library
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch removes some instances of the "onclick" attributes from the
template that lists patron clubs and templates.
To test, apply the patch and go to Tools -> Patron clubs.
- Test the process of deleting a club template. Clicking the "Delete"
button should trigger a confirmation. Confirming should delete the
template.
- Test the process of deleting a club. In the "Clubs" section of the
page, click the "Actions" menu next to any club. Clicking the
"Delete" link should trigger a confirmation. Confirming should delete
the club.
- Also in the "Clubs" section of the page, find a club which has
enrollments. Select "Search to hold" from the "Actions" menu. It
should take you to the advanced search. On the search results page
you should have the option to place a hold for the club you selected.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Not supported on Chrome < 63
https://www.w3schools.com/tags/ev_onafterprint.asp
Signed-off-by: Gabriel DeCarufel <gabriel@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds more specificity to handling of MARC21 documentation
links in the basic MARC editor.
To test, apply the patch and make sure the "advancedMARCeditor" system
preference is set to "Display."
You may need to edit a bibliographic framework so that 09x, 59x, and 69x
tags will display in the editor.
Edit or create a bibliographic record using that framework. Next to each
tag label in the editor should be a "?" link. Clicking this link should
open a new window with the correct Library of Congress documentation
page.
Check the links for 09x, 59x, and 69x tags as well as others to confirm
they open the correct pages.
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When cancelling a receipt, the quantity of the original order is
increased.
Test plan:
Create a basket, mark is as "standing orders"
Create an order
receive it
cancel the receipt
=> Without this patch the quantity of the original order is 2
=> With this patch applied the quantity it always 1
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch restores markup added by Bug 21870 and subsequently removed
accidentally by Bug 21772. This allows the OPAC user summary page to
display a confirmation dialog before deleting a hold.
To test, apply the patch and log in to the OPAC as a user with holds.
- On the "Your summary" page, click the "Holds" tab.
- Click the "Cancel" button next to any hold.
- You should see a modal dialog asking for confirmation, showing the
correct title.
- Test both the "Yes" and "No" actions.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch changes the globally-available confirmModal() function in the
OPAC so that it uses jQuery's html() function for adding information to
the confirmation modal's body. This will allow for more than just plain
text to be added.
This patch also removes some obsolete lines from the JavaScript in
opac-user.tt and renames some variable for clarity.
To test, apply the patch log in to the OPAC as a user who has holds and
article requests.
- Test the following interactions, both the confirmation and cancel
options for each:
- Cancel a hold
- Suspend all holds
- Resume all holds
- Cancel an article request
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>