Commit graph

13873 commits

Author SHA1 Message Date
9c02784fe5 Bug 20970: Add preventDefault to avoid trailing # to be added to the url
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:09 +00:00
c9d3e54707 Bug 20970: Reformat basket information on acquisitions basket page
This patch reformats the display of information on the acquisitions
basket page, hiding form controls until they are triggered. Some basket
information is now in the second column in order to balance the two
columns better.

The "Library" label has been replaced with the more precise "Managing
library."

Unrelated change: Removed script type attributes.

To test, apply the patch and view a basket in acquisitions. Test these
processes:

- Adding and removing managing users
- Setting and changing managing library
- Setting and changing basket group

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:09 +00:00
433eb16fd3 Bug 21568: Add more spans with classes around callnumbers in OPAC for additional styling
It would be nice if the callnumber portion of the callnumber + label was in a span,
and it also makes sense to wrap the entire callnumber string in a span as well.
This was started on bug 21340 but I have found more callnumbers in the search results that need spans.

Test Plan:
1) Apply this patch
2) Search for something in the OAPC with multiple results
3) View the HTML source
4) Note the new spans around the callnumbers, like: <span class="CallNumber"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:08 +00:00
2e003cd04b Bug 8630: Compiled CSS
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:08 +00:00
458e079285 Bug 8630: (RM follow-up) Remove loop.odd reference and fix filters
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:07 +00:00
529ed6faa4 Bug 8630: (follow-up) Template corrections
This patch makes two corrections to templates: One to correct the case
of a variable, an error which I introduced when adding html filters.

The other removes a redundant image tag from the recent comments
template.

To test, apply the patch and log in to the OPAC as a user with
checkouts. Cover images on the "your summar" page should appear
correctly.

View the "recent comments" page and confirm that images still appear
correctly.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:07 +00:00
Aleisha Amohia
7f6671587c Bug 8630: (follow-up) Make Adlibris cover show on OPAC overdues tab
and fix alignment of cover on Staff detail page.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:07 +00:00
Martin Persson
1ba78e0a21 Bug 8630: Adlibris covers (OPAC SCSS changes)
This patch adds two new CSS classes specific to Adlibris covers.

Sponsored-By: Halland County Library

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:06 +00:00
Martin Persson
6e82493b65 Bug 8630: Adlibris covers (OPAC templates)
Changes to OPAC templates.
Depends on new CSS clases defined in separate patch.

Test plan:

To test this particular patch (intranet templates) you need:
* The syspref patch applied
* The intranet CSS patch applied

To test:
* Apply this patch

* Enable covers (if not done already)
  * Go to staff interface, log in as a priviliged user.
  * Select "More" -> "Administration" ->
	"Global system preferences" -> "Enhanced content".
  * Set ""AdlibrisCoversEnabled" to "Show" under "Adlibris".
  * Save changes

* Add a book with a known cover/ISBN (if none exists)
  * Set MARC field 020 a,
	"INTERNATIONAL STANDARD BOOK NUMBER" to: 9780451524935
  * Set MARC field 245 a, "Title" to: 1984
  * Save changes

* Test opac-results.tt
  * Search library catalog from OPAC for "1984".
  * You should be sent to:
    http://127.0.1.1/cgi-bin/koha/opac-search.pl?idx=&q=1984
  * Cover image should be shown to the right of each title
    with CSS class: "adlibris-cover"

* Test opac-detail.tt
  (continued from previous test's location)
  * Click on the title with cover (1984, ISBN: 9780451524935)
  * Cover should be displayed to the left in full size.
  * If clicked, should link to the full-size image.

Test opac-results-grouped.tt
  * This template is only used if an external "grouping" server is
    setup and the syspref "OPACGroupResults" is set to "Use".
  * Personally I did not test this, b/c: terminally lazy

* Test opac-showreviews.tt
  * Could not find any links to this location, manually enter it:
    http://127.0.1.1/cgi-bin/koha/opac-showreviews.pl
  * Image should be shown to the right in full size.
  * If clicked it should take you to the detail view with the
    comments tab opened.

* Test opac-showreviews-rss.tt
  * Click on the RSS icon from previous test's start location.
    URL should be:
    http://127.0.1.1/cgi-bin/koha/opac-showreviews.pl?format=rss
  * An image tag linking to the full-size image without any
    styling class should be present.

* Test opac-user.tt
  * Click on your username to open:
    http://127.0.1.1/cgi-bin/koha/opac-user.pl
  * Covers should be shown for checked out items with
    CSS class: adlibris-cover
  * When clicked the destination should be the same as
    clicking the title column entry: opac-details.pl

* Test opac-opensearch.tt
  * Click on "Advanced search" and enter "1984" then press "Search"
  * This search screen uses a different template.
  * Cover image should be shown to the right of each title
    with CSS class: "adlibris-cover"
  * If clicked, should link to the OPAC detail view.

* Test opac-readingrecord.tt
  * Click on your logged-in name to go to your personal page.
  * Click on "Your reading history" tab on the left.
    http://127.0.1.1/cgi-bin/koha/opac-readingrecord.pl
  * Covers should be shown in leftmost column with
    CSS class: adlibris-cover
  * If clicked, should link to the same as the 'Title' link.

Sponsored-By: Halland County Library

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:06 +00:00
401b706392 Bug 8630: Adlibris covers (intranet CSS)
This defined two new CSS classes for use by the intranet templates.
Apply this patch before doing the testing of "intranet templates".

Sponsored-By: Halland County Library

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:06 +00:00
Martin Persson
4ea7f20ca3 Bug 8630: Adlibris covers (intranet templates)
Changes to staff interface (intranet) templates.
Depends on new CSS clases defined in separate patch.

Test plan:

To test this particular patch (intranet templates) you need:
* The syspref patch applied
* The intranet CSS patch applied

To test:
* Apply this patch

* Enable covers (if not done already)
  * Go to staff interface, log in as a priviliged user.
  * Select "More" -> "Administration" ->
    "Global system preferences" -> "Enhanced content".
  * Set ""AdlibrisCoversEnabled" to "Show" under "Adlibris".
  * Save changes

* Add a book with a known cover/ISBN (if none exists)
  * Set MARC field 020 a,
    "INTERNATIONAL STANDARD BOOK NUMBER" to: 9780451524935
  * Set MARC field 245 a, "Title" to: 1984
  * Save changes

* Test results.tt
  * From the main intranet page, select "Search the catalog" and
    enter the title we added, "1984" and press "Search".
  * You should end up with the url:
    http://127.0.1.1:8080/cgi-bin/koha/catalogue/search.pl?q=1984
  * The cover image should be shown in the leftmost column.
  * If cover is clicked, the full cover image should be shown.

* Test detail.tt
  (continue from the search results used in prev. test)
  * Click on the title text, you should be sent to:
    http://127.0.1.1:8080/cgi-bin/koha/catalogue/detail.pl?biblionumber=2
  * The cover image should be shown on the right.
  * If clicked, the full cover should be shown.

Sponsored-By: Halland County Library

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:05 +00:00
Martin Persson
fd3a378f9a Bug 8630: Adlibris covers (syspref files)
This patch adds a system preference for cover images from Swedish
book retailer Adlibris. Images are retrieved via http or https
from an external web server. This might leak OPAC and Staff
interface data to third parties and should thus be used with
caution.

Sponsored-By: Halland County Library

Test plan:

Test 1: Test upgrade procedure for clean installation.

  Start by removing existing sysprefs, if present:

  $ mysql -u kohaadmin -p -D koha
  > DELETE FROM `systempreferences` WHERE `variable` LIKE 'Adlibris%';

* Apply this patch which will add a pref file, update the 'syspref'
  structure and add an atomic upgrade file.

* Install the update:
  Koha$ perl installer/data/mysql/updatedatabase.pl

* Once upgraded and logged in, Select 'More', 'Administration',
  'Global Preferences' and finally 'Enhanced content'.
  There should be a new option called 'Adlibris'.

  The first option should default to "Don't show", if not the
  patch is broken.

  The second options should show the default URL:
  http://www.adlibris.com/se/organisationer/showimagesafe.aspx

  If not, the patch is broken.

Test 2: Changing sysprefs

* In the control panel, change the first value from "Don't show"
  to "Show" and save the changes. Use MySQL client to inspect changes:

  $ mysql -u kohaadmin -p -D koha
  > SELECT * FROM `systempreferences` WHERE `variable` LIKE 'Adlibris%';

  The column 'value' should now have the value '1', if not the patch
  is broken.

Test 3: Apply update to existing data

* Re-execute the installer now that the database has the data already:
  Koha$ perl installer/data/mysql/updatedatabase.pl

  If any errors occur the patch is broken.

  Examine the database contents:

  $ mysql -u kohaadmin -p -D koha
  > SELECT * FROM `systempreferences` WHERE `variable` LIKE 'Adlibris%';

  If the values were overwritten by the installer the patch is broken.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:05 +00:00
a8b6a5daa5 Bug 19490: (follow-up) Improve tooltip message and some tidying
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:04 +00:00
36a2627c39 Bug 19490: (follow-up) Add tooltip to each row
To test:
1 - Run batch modification on some items
2 - Hover over the holds column
3 - Note the tool tip
4 - PLace some holds to verify combinations of item/record level holds
show appropriately

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:04 +00:00
e427cf5b3f Bug 19490: Add a 'Holds' column to the items batchmodification tool
To test:
1 - Add some items to bathc modification
2 - Note there is no indication fo holds
3 - Apply patch
4 - Reload and note you can see how many holds (or none)
5 - Note you can hide this column with css:
    #batchMod-edit .holds_count { display: none; }
6 - Note the column has a tooltip to indicate item vs. record holds

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:04 +00:00
e520d69910 Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks
This is a consistency issue: we store '@' as the subfield for
fixed-lenght fields, yet on editing '_' is displayed (on the form and
the tab). This was probably done to avoid URI encoding problems in the
past.

This patch restores the '@' everywhere.

To test:
- Open the MARC structure for any bibliographic MARC framework
- Choose Actions > Subfields on any fixed-length field
=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well.
- Cancel
=> SUCCESS: '@' is displayed on the list
- Apply this patch
- Restart all the things:
  $ restart_all
- Choose Actions > Subfields on any fixed-length field
=> SUCCESS: '@' is displayed in the tab title, and on the 'Subfield
code' form field.
- Save some changes
=> SUCCESS: Things work correctly.
- Sign off :-D

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:03 +00:00
1a0172a253 Bug 20968: (RM follow-up) Add missing filter
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:41:15 +00:00
Julian Maurice
84857caaef Bug 21501: Remove dead code from course reserves module
search_on parameter is not used in any templates so course-reserves.pl
can be simplified a bit

Test plan:
1. Go to course reserves module and verify that it is still working
2. `git grep search_on` should return nothing

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:37:45 +00:00
Andrew Isherwood
9783773ada Bug 20968: (follow-up) Replace tabs with spaces
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:36:03 +00:00
Kyle M Hall
e87fa069dc Bug 20968: Rename method get_intranet_catalog_toolbar_button to intranet_catalog_biblio_enhancements_toolbar_button
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:36:03 +00:00
Andrew Isherwood
7910a530b8 Bug 20968: (follow-up) Respond to feedback
This patch:

- Removes the unecessary testing for
intranet_catalog_biblio_enhancements method in detail.pl
- Renames get_toolbar_button to get_intranet_catalog_toolbar_button

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:36:02 +00:00
Andrew Isherwood
741f17e916 Bug 20968: Add hooks into cat-toolbar.inc to display buttons
This commit adds hooks into cat-toolbar.inc to allow the display of
arbitrary buttons as supplied by plugins within the
intranet_catalog_biblio_enhancements class that provide the method
get_toolbar_button

To test:

1) Download the plugin from
https://github.com/PTFS-Europe/cla-permissions-check-plugin
2) Follow the installation instructions from:
https://github.com/PTFS-Europe/cla-permissions-check-plugin
3) TEST: Observe that the "CLA Check Permissions" button takes the user
to the Check Permissions page and a modal displays containing the
results of the query
4) Remove the API key from the plugin "Configuration" page
5) TEST: Ensure that the "CLA Check Permissions" button takes the user
to the Check Permissions page and message displays informing the user
that "Did not receive required request parameters"

https://bugs.koha-community.org/show_bug.cgi?id=20968

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:36:02 +00:00
Mark Tompsett
e1b5fa657d Bug 14385: Squash of a lot of patches rebased
- Added missing GetHiddenItems parameter change case
     Without this prove t had a failure.

- Always use mocks, not set_preference

- Tweaks so t/db_dependent/00-strict.t passes
     There was a typo botcat vs borcat and borrowernumber was never
     defined. Grabbing from userenv, like other code does.

- Tweak t/db_dependent/Items.t to fully test changes
     This will test all the if structures fully in GetHiddenItemnumbers.
         prove t/db_dependent/Items.t

- Tweak borrower category code
     $borrower->{categorycode} on a Koha::Patron is not the
     same as $borrower->categorycode. Fixed error.

- Search was returning URLS for wrong interface
     There was one search context place wrong. Changed it to $is_opac
     as the logic for setting $is_opac was modified correctly.

- Corrected issues with category code.
     When a user isn't logged in, $borrower is undef and causes error
     when determining category code. Added conditional check.

- Properly trigger all changes in C4/Search.pm

- Fix QA Test tool failures
     C4/Search.pm had some tabs.

- Add some commenting to make sense of logic

- Refactor EmbedItemsInMarcBiblio parameters to hashref

- Trigger GetMarcBiblio's EmbedItemsInMarcBiblio call.
     prove t/db_dependent/Items.t

- Add missing test to trigger Koha/BiblioUtils/Iterator change

- Add borrower category overrides
     These files generally add borcat parameter to GetMarcBiblio.
     Others might include correction of filtering of items
     (opac-basket), or a comment as to why no changes were done
     (opac-search).

     In the case of opac-search, correcting the first FIXME will
     likely correct the OpacHiddenItems issues on tags. As such,
     that is beyond this bugs scope.

     Some code had loop optimizations and fixes made, like a
     'next unless $record' when the biblio shouldn't even be in
     the list.

- Modify opac-ISBDdetail and opac-MARCdetail
     Both files had similar logic. They were rearranged and
     optimized, so that both files would have practically identical
     initial blocks of code.

     Optimizations were possible, because GetMarcBiblio
     returns a filtered record, so that there is no double call
     (once in the opac-### file and once in GetMarcBiblio) to
     GetHiddenItemnumbers.

- Fix hiding in opac-tags
     opac/opac-tags.pl was not properly hiding.

     There is currently one known bug associated with tags left.
     If you have two biblios tagged by different people with the
     same tag, the opac-search will show the one you tagged that
     is supposed to be hidden, because tag searches work differently
     than regular searches. This is beyond the scope of this bug.
     See the FIXME's in opac/opac-search.pl

- Trigger the C4::ILSDI::Services changes
     prove t/db_dependent/ILSDI_Services.t

- Added missing 'my'

- Test C4/Labels/Label.pm changes

- Improve C4::Record::marcrecord2csv test cases

- Corrected opac-details searchResult call

- Fix breaking issues constraint in ITerator test

- Fix ILSDI_Services test when clubs with branch exist

- Rebased again!
- Rebased t/db_dependent/Items.t conflict.

The test plan is in comment #112 last I checked.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:33:12 +00:00
Chris Cormack
5e4e10c4ca Bug 14385: Extend OpacHiddenItems to allow specifying exempt borrower categories
Edit: Fixing merge conflicts in
 - t/db_dependent/Items.t
 - t/db_dependent/Search.t
 - C4/Search.pm

Changes the API for calling GetHiddenItems and all the places in the code that call it. This is to allow borrower categories to be passed in.
Adds an OpacHiddenItemsExceptions syspref to allow certain borrower categories to be able to see items, even if they are marked hidden by OpacHiddenItems

To test:

1) Make two borrowers, one in a category that should see everything (ie Adult), and another in a category that should only see certain things (ie Adult - exceptions)
2) Add the borrower that can see everything (the Adult) to OpacHiddenItemsExceptions
3) To the OpacHiddenItems syspref, add an item type (ensure that you have some records that fall under this type in your library).
4) Log in as the borrower that should only see certain things (Adult - exception)
5) Do a search, filtered to show records which are the item type that you specified in the OpacHiddenItems syspref. No records should show for this borrower as this item type is hidden to them.
6) Log in as the borrower that should see everything (Adult)
7) Do the same search. There should be results from this search, as this borrower category has been specified as an exception to the hidden items

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:33:09 +00:00
Andrew Isherwood
4ffd2d3b34 Bug 20996: (follow-up) Fix column name expectation
This bug changes how request metadata is obtained. Previously the
appropriate backend's metadata function would return it. For at least
the FreeForm backend, the metadata property names we title cased. The
datatable JS was expecting this and breaks with the new metadata getting
which is performed in the API controller, which just returns the
property names as they appear in the DB.

This patch changes the expectation of the JS to match what's coming back
from the API

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Tested by repeatedly loading the API-call
http://intranet/api/v1/illrequests?embed=metadata,patron,capabilities,library
in Chromium and watching the reported time to load the URL. There
is a siginificant decrease in the time with the patches compared to
the time it takes without the patches. I had some concerns along the
way, but they have all been fixed.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested by repeatedly loading the API-call
http://intranet/api/v1/illrequests?embed=metadata,patron,capabilities,library
in Chromium and watching the reported time to load the URL. There
is a siginificant decrease in the time with the patches compared to
the time it takes without the patches. I had some concerns along the
way, but they have all been fixed.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:33:05 +00:00
Andrew Isherwood
1c8952a36b Bug 20996: Remove prefix use of borrower category
This patch removes the potential use of borrower category as a ILL
request ID prefix. It makes no sense. We provide the ability for a site
to define a request prefix based on branch, there is no use case for
using the borrower category. Add to this that the borrower for every
request was being retrieved in order to get the category, it's a huge
performance hit also.

We also now require the <branch> block in the <interlibrary_loans> block
and complain if it's not present. The request prefix should be defined
in this block.

This patch also improves the performance of the API request that returns all
requests, optionally including additional data.

It also deprecates the overloaded TO_JSON method and moves the request
augmentation code into the API route's controller. It may be that we
want to shift it out of there at some point, but it is fine where it is
for now.

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:33:02 +00:00
Magnus Enger
5ea877f6cb Bug 21585: Ignore missing firstname in ILL requests table
To test:
- Make sure you have a patron with just a surname and no firstname
- Create an ILL request so that the name of this patron shows up in
  the Patron column of the ILL requests table
- Before the patch, the name will display as "null Surname"
- Apply the patch
- Reload the ILL requests page
- The name should now display as just "Surname"
- Sign ye merrily off

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-01 19:06:37 +00:00
9d78af26d9 Bug 21556: Deleting same record twice leads to fatal software error
If you delete a record, confirm the deletion, and try to delete the
record and confirm it again befoe the first deletion completes, you'll
generate a fatal software error.

This patch unbinds the click handlers for the "Delete record" button
after the deletion is confirmed and just before the Javascript
processes the redirect to the next page in the process.

To test:
1) You will need a bibliographic record that is able to be deleted
2) Click "Edit", then "Delete record", then "OK"
3) While the browser is reloading, click "Edit", then "Delete record",
    then "OK
4) Observe a fatal error such as "Internal server error" or 'Can't call
method "holds" on an undefined value at
/home/vagrant/kohaclone/C4/Biblio.pm line 406.'
5) Apply the patch
6) Run "restart_all" on kohadevbox (or otherwise restart Plack if
    running Plack)
7) Navigate to another bibliographic record that is able to be deleted
8) Click "Edit", then "Delete record", then "OK"
9) While the browser is reloading, click "Edit", then "Delete record"
10) Observe that no fatal software error is generated
11) You are redirected to
http://localhost:8081/cgi-bin/koha/catalogue/search.pl (on kohadevbox)

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-01 19:05:12 +00:00
7736b5c2e3 Bug 21476: Fix HTML5 media from playing in the OPAC - incorrect filters
This patch makes a correction to a template filter to prevent
incorrectly-encoded HTML in media source links which were preventing
media from embedding correctly in the OPAC.

To test, apply the patch and enable the HTML5MediaEnabled and
HTML5MediaYouTube system preferences.

- Edit a record to include links to videos in 856$u. For example:
  - https://www.youtube.com/watch?v=grTwH6Evdfc
    - https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%20Sindbad%20The%20Sailor%20%281936%29.ogv

    View the record in the OPAC and confirm that the videos display in
    the
    "Play media" tab and that they play correctly.

Tested and works as described, also matches the intranet code.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-01 18:59:46 +00:00
Andrew Isherwood
efc92a5ea2 Bug 20941: (follow-up) Update N/A handling
Modify the conditional display of N/A in accordance with comment #17

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:45:56 +00:00
Andrew Isherwood
f7ec3b5ab6 Bug 20941: (follow-up) Wrap N/A strings in <span>
All N/A strings in ILL templates wrapped in <span> to aid translation

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:45:56 +00:00
aced7b10de Bug 20941: (QA follow-up) Fix return value of get_type, make templates more consistant
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:45:56 +00:00
Andrew Isherwood
7cecc27e01 Bug 20941: (follow-up) Carry out comment #4 advice
- Switch getType -> get_type
- get_type now returns a type or undef
- Ternary now performed in template

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:45:55 +00:00
Andrew Isherwood
cc12509c1e Bug 20941: Add Illrequest->getType method
This patch adds a method to the Illrequest object enabling it to return
its type, which is stored as an Illrequestattribute object

To observe broken state:

- Do not apply patch
- Ensure you have at least one Interlibrary loan created
- In OPAC view, go to "your interlibrary loan requests"
  - => TEST: Observe that the "Request type" column is not populated
  - Click on "View" for one of the requests
  - => TEST: Observer that the "Request type" row is not populated
- In Staff view, go to "ILL requests"
- Click on "Manage request" on a request
  - => TEST: Observer that the "Request type" row is not populated

To Test:

- Apply patch
- In OPAC view, go to "your interlibrary loan requests"
  - => TEST: Observe that the "Request type" column IS populated
  - Click on "View" for one of the requests
  - => TEST: Observer that the "Request type" row IS populated
- In Staff view, go to "ILL requests"
- Click on "Manage request" on a request
  - => TEST: Observer that the "Request type" row IS populated

Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:45:55 +00:00
9f65d3422e Bug 10442: Compiled CSS
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:34:43 +00:00
52028d9932 Bug 10442: Remove references to non-standard "error" class
The CSS for <div class="error"> is obsolete and should not be used. This
patch removes the definition from the main CSS file and corrects
instances of its use in the templates to the standard <div class="dialog
alert">.

To test:

- In Acquisitions -> Late orders, locate an order from a vendor which
  doesn't have an email address. Selecting that order and clicking
  "Claim" should trigger an error dialog, "This vendor has no email." It
  should be styled correctly.

- With  AcqCreateItem set to "when placing an order," add to an existing
  order using the "From a new (empty) record" option. Add two items with
  identical barcodes and submit the form. A error should show at
  the top of the page.

- With AcqCreateItem set to "when receiving an order," receive an order
  and add two items with identical barcodes. Submitting the form should
  trigger an error message at the top of the page.

With the remaining cases I don't know how to trigger the errors in
question, so a visual check of the changes may be required:

- Administration -> Funds -> "You are not authorized to modify this
  fund"
- Administration -> Search engine configuration
  (/admin/searchengine/elasticsearch/mappgings.pl) -> Various
  modification errors.
- With the  AutoEmailOpacUser preference set to "send," adding a patron
  without an email address can trigger an error, "This member has no
  email."
- With plugins enabled, and installed, there are error messages
  displayed under various circumstances.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:34:02 +00:00
559e051bb9 Bug 21080: Fix patron's attributes display when PA_CLASS is used
When a patron attribute class (AV PA_CLASS) is created, the patron's
edit view is broken:
https://screenshots.firefox.com/62uNhoUtH6rPXm9l/pro.kohadev.org

To recreate:
1. Create 1+ authorised values PA_CLASS
2. Create patron's attributes using it
3. Edit a patron

it depends on the order of the fieldset and the ol elements

This is certainly not the best fix but the display does not look broken!

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:31:01 +00:00
Ere Maijala
bffd0d8f11 Bug 14716: Fix more unencoded url parameters.
Fixes issues found during QA and unifies the SubfieldSelect function across the utils xsl's.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:19:23 +00:00
Ere Maijala
a140843721 Bug 14716: URI-encode URLs in NORMARC xsl templates.
https://bugs.koha-community.org/show_bug.cgi?id=14716

Test plan:

1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:19:22 +00:00
Ere Maijala
8bdde43465 Bug 14716: URI-encode URLs in UNIMARC xsl templates.
https://bugs.koha-community.org/show_bug.cgi?id=14716

Test plan:

1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.
4. Also try the attached test records and make sure their links work.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:19:21 +00:00
Ere Maijala
217c8a656f Bug 14716: URI-encode URLs in MARC21 xsl templates.
https://bugs.koha-community.org/show_bug.cgi?id=14716

Test plan:

1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.
4. Also try the attached test records and make sure their links work.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:19:21 +00:00
Katrin Fischer
3a150b5d75 Bug 20720: (QA follow-up) Some minor corrections
Made some corrections to countries, spelling and
changed OPUS entry.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-29 01:07:40 +00:00
5367bfcabd Bug 20720: Found some more sponsors to add to 'about'
git log|grep -i "sponsored-by"|sort -n | uniq
git log|grep -i "sponsored by"|sort -n | uniq

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-29 01:07:39 +00:00
cde4bb0d23 Bug 20720: Using git Sponsored-by lines to update 'about'
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-29 01:07:39 +00:00
ad56b39888 Bug 21634: Keep "circulation" module selected when viewing patron's logs
To recreate:
- View a patron detail page
- Click "Modification log"
- Notice that the url has "modules=MEMBERS&amp;modules=circulation", but
the "Circulation" option is not selected in the "Modules" dropdown list.
This is because of uppercase vs lowercase.

The bug:
- Right after you click "Modification log" you will see all the
"members" and "circulation" logs
- Submit the form without changing any input/select from the form
=> Now you only see the "members" logs.

Test plan:
- Apply the patch
- Click "Modification log"
- Notice that the url now contains "modules=MEMBERS&amp;modules=CIRCULATION"
- Submit the form without changing any input/select from the form
=> Now you have the "members" and "circulation" modules selected.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-29 01:02:19 +00:00
Mark Tompsett
2ca766f392 Bug 21349: Instructors with special characters in cardnumber cannot be removed from course reserves
The cardnumber can contain strange non-javascript-friendly
characters. This patch converts all the internal references
to borrowernumber, but displays the cardnumber when showing
list of matching users.

TEST PLAN
---------
1) Make sure Course Reserves is being used. Check system preferences.
2) Make sure there is a Course entered.
3) Make sure there is a patron with an cardnumber which breaks
   the existing javascript (eg. Ka-boom:Ka-boom!KABOOM@#$!)
4) Go into the course list.
5) Click the course name link
6) In the "Instructor Search" box enter the patron name.
7) Select the patron which has the ugly cardnumber.
8) Click Save
   -- The course listing should have the new teacher listed.
9) Click the course name link again.
10) Click 'Remove' beside the instructor's name.
    -- nothing happens, and inspecting the error console gives
       you the ugly error described in comment #0
11) apply this patch
12) restart_all
13) sudo service apache2 restart
14) refresh the page.
15) click 'Remove' beside the instructor's name.
    -- name is removed.
16) Click Save
    -- the course listing no longer lists the new teacher.
17) Actually confirm that adding and removing others normally
    works as expected.
18) run koha qa test tools.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-29 00:35:41 +00:00
b943991316 Bug 21186: (follow-up) Incorrect Bootstrap modal event name in multiple templates
This patch addresses a few more instances of this problem which I didn't
catch in my first pass.

To test, apply the patch and clear your browser cache if necessary.

- Go to Circulation -> Check in and check in an item which has a hold.
  - When the 'Hold found' modal appears the checkin barcode field
    behind it should be disabled.
  - When the modal is dismissed the checkin field should be enabled
    again and focus should be on that field.

- Go to Administration -> Library groups.
  - Click the "Add group" button. The cursor focus should be on the
    title field.

- Go to Tools -> MARC modification templates.
  - Click the "New template" button. The cursor focus should be on the
    name field.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-29 00:31:51 +00:00
7b6107beaf Bug 21186: Incorrect Bootstrap modal event name in multiple templates
Modals in the staff client which load data via AJAX require an "on
close" action in order to clear the modal of the loaded data. The
problem presents itself the second time the modal is opened: The
"loading" message doesn't appear, and the data from the previous link
is shown until the new data loads.

To test, apply the patch and test the following pages. In each case,
click multiple instances of the modal trigger link/button to confirm
that the "loading" message always appears between re-displays of the
modal.

- Acquisitions -> Vendor -> Add to basket -> From a staged file -> Add orders
  - Test the "MARC" and "Card" links
- Acquisitions -> EDIFACT messages
  - Test the "View message" button
- Acquisitions -> Vendor -> Add to basket -> From an existing record
  - Test "View MARC" link
- Acquisitions -> Vendor -> Invoices -> Invoice -> Receipt page
  - Test the "Order," "MARC," and "Card" links.
- Catalog -> Bibliographic record details
  - Test the MARC Preview link.
- Cataloging -> Cataloging search results
  - Test the Actions -> MARC preview and Actions -> Card preview menu
    items
- Cataloging -> Cataloging search results -> Merge
  - Test the "View MARC" linkscataloguing/merge.tt
- Tools -> Patron lists -> Actions -> Print patron cards
- Tools -> Batch record modification -> Results -> Show MARC
- Tools -> Staged MARC record management -> View batch
  - Test MARC preview shown when you click a staged title

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-29 00:31:50 +00:00
5256f25d24 Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again
We must not encode & again and use the url filter, instead of uri.

To test:
- Search for a record in staff
- Go to holds
- Search for patrons, multiple should be displayed
- Pick a patron by clicking on the name
- Verify an error is shown and the URL is incorrect
- Apply patch
- Repeat test above, placing a hold should now work.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-29 00:27:42 +00:00
e64650216f Bug 21311: (follow-up) Adjust wording of failed login message
Based on the feedback of Jonathan, Katrin, Mark and Martin (thx), adding
the general remark that if lockout is enabled, an account may be locked
out after x attempts. This does not say that the account on hand is
locked or not.

Adding a <p> tag between 'Log in'-button and 'Forgot your password' for
presentation.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-29 00:26:23 +00:00