Commit graph

33057 commits

Author SHA1 Message Date
29456ce3d8 Bug 14391: DBRev 18.06.00.052
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-07 13:04:51 +00:00
d932101fa3 Bug 14391: (RM follow-up) Adjust a few template conditions
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-07 12:56:23 +00:00
Katrin Fischer
a29824970c Bug 14391: (QA follow-up) Correct database update for manage_item_search_fields permission
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-07 12:29:33 +00:00
89b16151ca Bug 14391: Move udpate to perl
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-07 12:29:33 +00:00
Katrin Fischer
fa611c5b72 Bug 14391: Keep parameters_remaining_permissions for now
Since this patch has been written, new references to this
permission have been added to the code:

- t/db_dependent/api/v1/stockrotationstage.t
- t/db_dependent/api/v1/cities.t
- admin/overdrive.pl

Instead of removing the permission, let's keep it for now
and do more clean-up later in separate patches if required.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-07 12:29:33 +00:00
Katrin Fischer
8875324246 Bug 14391: (QA follow-up) Fix some typos
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-07 12:29:32 +00:00
16f475e493 Bug 14391: (QA follow-up) Resolve POD warn on svc..systempreferences
*** WARNING: No items in =over (at line 48) / =back list at line 54 in file svc/config/systempreferences
*** WARNING: No items in =over (at line 73) / =back list at line 79 in file svc/config/systempreferences

=> If you use 'over', you should add 'item'-s.

Test plan:
Run perldoc svc/config/systempreferences

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-07 12:29:32 +00:00
Katrin Fischer
252f4674a5 Bug 14391: Add granular permissions to the administration module
So far the administration module only allowed for 2 permissions:
- circulation conditions (manage_circ_rules)
- everything else (parameters_remaining_permissions)

With this patch almost every section of the administration page
will have its own granular permission.

To test:
- Create different staff users:
  1) One with parameters_remaining_permissions
  2) One with parameters
  3) One with catalogue and no parameters
  4) One superlibrarian
- Apply the patch
- Run the database update
- Check the staff users:
  1) All subpermissions, but manage_circ_rules
     should be checked
  2) Nothing should have changed
  3) manage_item_serach_fields shoudl be checked
     (page had catalogue permission before)
  4) Nothing should have changed
- Try different settings of the permissions and
  verify that
  - Administration page behaves correctly
  - Administration menu behaves correctly
  ! You shoudl only see what you have permission for

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

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-07 12:29:32 +00:00
7bd3e6736c Bug 21474: Add the Koha::Subscription->frequency method
And the 2 modules for the subscriptions' frequencies

Test plan:
  prove t/db_dependent/Koha/Subscription.t
must return green

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 20:26:21 +00:00
dec84e0820 Bug 21619: Expand tax abreviations in acquisitions form hints
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-06 20:19:54 +00:00
702ca8e9a3 Bug 21387: Receive items from - form should include tax hints
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-06 20:14:02 +00:00
5e3f428ade Bug 20996: Remove warning 'Un-mocked method'
t/db_dependent/api/v1/illrequests.t .. Un-mocked method 'status_graph()'
called at /home/vagrant/kohaclone/Koha/Illrequest.pm line 439.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 17:42:32 +00:00
d05a7e4a73 Bug 20996: (RM follow-up) Fix the api tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 17:42:32 +00:00
41a172ac4f Bug 20435: Allow lowercase prefix in inventory value builder
Cataloging value builders for inventory stocknumberAV.pl and stocknumberam123.pl use a regexp to define if entered text is a prefix or not.
It actually only allows uppercase characters. A library may want to catalog with lowercase characters in inventory number and using those value builders.
Note that in database the text is not case-sensitive.

Test plan:
1) Configure stocknumberAV.pl value builder on an item subfield
2) Create an autorized value category 'INVENTORY'
3) Create in this category a value with code 'UC' and description '10'
4) Create in this category a value with code 'lc' and description '20'
5) Create a new item
6) Focus on stocknumber subfield
7) Enter '123' and click on value builder, the entry stays '123'
8) Enter 'UC' and click on value builder, the entry turn to 'UC 0000000011'
9) Enter 'lc' and click on value builder, the entry turn to 'lc 0000000021'
Same for stocknumberam123.pl

To elaborate on step #1:

Go to Administration->MARC Bibliographic framework
Click on the "Action" button to view the framework
for the item you will be creating, view MARC structure.
Search for Tag 952 (LOCATION AND ITEM INFORMATION (KOHA))
Select Actions->Subfields
Edit subfield i for "Inventory Number"
In the "Other options" pane, select the plugin to test.

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-11-06 17:42:31 +00:00
1885e6a214 Bug 21771: (follow-up) Revert the shift statement
Obviously you should never shift an items from an array if you need that
item later on :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with entering userid as well as entering email..

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 17:42:20 +00:00
143d738dab Bug 21647: Clean up SRU fields mapping templates
This patch makes corrections to the SRU field mapping templates
(bibliographic and authority):

 - Bootstrap grid
 - JavaScript to the footer
 - Other markup corrections

To test, apply the patch and go to Administration -> Z39.50/SRU servers

- Add or edit an SRU server
  - Click "Modify" next to the SRU search fields mapping field.
    - Confirm that the popup window layout is correct.
    - Confirm that adding information to the form is correctly saved to
      the SRU server form.
    - Test this process with SRU server record type set to both
      "Authority" and "Bibliographic."

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-11-06 17:01:44 +00:00
1dd40741b5 Bug 21696: Use Koha::Account->lines from Koha::Account
There is now Koha::Account->lines, we should use it instead of
Koha::Account::Lines->search

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>
2018-11-06 16:44:37 +00:00
7e5f5ec93f Bug 21673: (QA follow-up) Fix typo and remove unused library
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 16:44:33 +00:00
4d28bc7d3c Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed
There are several times the same pattern to retrieve the sum of
amountoutstanding columns for Koha::Account::Line set.
We should use Koha::Account::Lines->total_outstanding instead.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 16:44:33 +00:00
1e5e9f5e80 Bug 20629: (QA follow-up) Remove actions_col
The actions_col template param requires a DB search, only to display the
'Actions' column header vs. an empty string. But there will always be
buttons in there, that were added *after*.
It made sense when only the 'Reverse' button was displayed, but now both
'Print' and 'Details' are displayed anyway.

This patch removes it for good :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 16:32:42 +00:00
146f1ca3a6 Bug 20629: Rename reverse_col to actions_col
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 16:32:42 +00:00
Mark Tompsett
b6c8f9f7ef Bug 20629: (follow-up) fix reverse_col value
Before this patch the Void button didn't appear.
After this patch the Void button appears on payments.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 16:32:42 +00:00
9f112ff75c Bug 20629: Pass accountline objects to template instead of hashref
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 16:32:41 +00:00
fb15a96310 Bug 20629: Remove ability to 'reverse' payments
Test Plan:
1) Apply this patch
2) Note all references to reversing payments have been removed
3) Note ability to void payments remains unchanged

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 16:32:34 +00:00
Koha instance kohadev-koha
88eb4d3e20 Bug 20078: (QA follow-up) Correct attribute in PQF.pm
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 12:22:54 +00:00
cfc6c112d3 Bug 20078: (follow-up) Prevent conflict from attribute duplication
To test:
1 - Apply first patch
2 - Attempt searching by arp, no results
3 - Apply this patch
4 - Copy bib1.att and ccl.properties to the correct locations
5 - Restart zebra
6 - Rebuild indexes
7 - Search agian, success!

Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 12:22:53 +00:00
4478545368 Bug 20078: Add accelerated reading indexes to getIndexes
To test:
1 - Find a bib with 526$c and 526$d populated, or populate them
 e.g. 526$a 5.5 | 526$d 14
2 - Try searching for 'arl:5.5' or 'arp:14'
3 - Your record should be returned in results
4 - Add the indexes as dropdowns by entering the following in intranetuserjs:
$(document).ready(function(){
        // Add Accelerated Reading Level to advanced search
    if (window.location.href.indexOf("catalogue/search.pl") > -1) {
        $(".advsearch").append('<option value="arl">Accelerated Reading Level</option>');
    }

    // Add Accelerated Reading Point to advanced search
    if (window.location.href.indexOf("catalogue/search.pl") > -1) {
        $(".advsearch").append('<option value="arp">Accelerated Reading Point</option>');
    }
});
5 - Search using these in the dropdown, your record will not be found
6 - Apply patch
7 - Repeat searches directly and by using dropdown, your record should be returned.
8 - prove t/db_dependent/Search.t

Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-06 12:22:47 +00:00
f683c181ac Bug 21650: Remove the subroutine C4::Items::GetLastAcquisitions
C4::Items::GetLastAcquisitions has been added by
  commit 7753bbad4f
  Adding Some new functions

(?)

Apparently it has never been used, we should remove it to avoid unnecessary maintenance.

Test plan:
  git grep GetLastAcquisitions
must not return any results

NOTE: POD Coverage test failure is expected on removal

Signed-off-by: Mark Tompsett <mtompset@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:11 +00:00
fef32fac36 Bug 21645: Fix focus when modal is shown
First the event must be defined in the document.ready block, then, since
bootstrap 3 the event is 'shown.bs.modal', not 'shown'

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:10 +00:00
1dc17d8502 Bug 21645: e.preventDefault on click
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-05 14:41:10 +00:00
f6808f5e55 Bug 21645: Clean up library groups template
This patch modifies the library groups administration page to help
compliance with several coding guidelines:

 - Move JavaScript to the footer
 - Convert to Bootstrap grid
 - Other markup corrections

To test, apply the patch and go to Administration -> Library groups.

 - Confirm that the page how has a "Library groups" heading.
 - Confirm that action buttons in the table of library groups are styled
   correctly.
 - Test both adding and editing groups. The "Required" label on required
   fields should be styled correctly.
 - Test all JavaScript-driven interactions on the page:
   - Adding, editing, and deleting groups
   - Removing libraries from groups
   - Expanding and collapsing group hierarchies
 - Validate the page's HTML and confirm that there are no errors found
   in the main body of the page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.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:10 +00:00
368a9b1d53 Bug 21570: Update two-column templates with Bootstrap grid: Various
This patch modifies several assorted templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Administration -> Plugins
 - Tools -> Comments
 - Acquisitions -> Suggestions
 - Lists

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

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
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
c4ff0eac60 Bug 8630: DBRev 18.06.00.051
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
Marc Véron
44778ddcc9 Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used
To test:
- Apply patch
- Set syspref CronjobLog to "Log"
- Set syspref PurgeSuggestionsOlderThan e.g. to 20
- From console, run misc/cronjobs/purge_suggestions.pl
- Check entry in cgi-bin/koha/admin/preferences.pl?op=search&searchfield=log
- Verify that log entry contains number of days (20, same as in syspref)
- From console, run misc/cronjobs/purge_suggestions.pl -days 100
- Verify that log entry contains number of days (100, same as in param -days)

Signed-off-by: Mark Tompsett <mtompset@hotmail.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: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