]> git.koha-community.org Git - koha.git/log
koha.git
8 years ago Bug 16011: $VERSION - Remove empty BEGIN block
Jonathan Druart [Wed, 9 Mar 2016 12:42:09 +0000 (12:42 +0000)]
 Bug 16011: $VERSION - Remove empty BEGIN block

perl -p -i -0 -e 's/BEGIN \{\n?\n?\}\n//' **/*.pm

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16011: $VERSION - Remove use vars qw();
Jonathan Druart [Wed, 9 Mar 2016 12:39:11 +0000 (12:39 +0000)]
 Bug 16011: $VERSION - Remove use vars qw();

perl -p -i -e 's/use vars qw\(\s*\);\n//' **/*.pm

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16011: $VERSION - Remove comments
Jonathan Druart [Wed, 9 Mar 2016 08:40:29 +0000 (08:40 +0000)]
 Bug 16011: $VERSION - Remove comments

perl -p -i -e 's/^.*set the version for version checking.*\n//' **/*.pm

+ manual adjustements

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16011: $VERSION - Remove the $VERSION init
Jonathan Druart [Thu, 3 Mar 2016 09:14:00 +0000 (09:14 +0000)]
 Bug 16011: $VERSION - Remove the $VERSION init

Mainly a
  perl -p -i -e 's/^.*3.07.00.049.*\n//' **/*.pm
Then some adjustements

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16011: $VERSION - remove use vars $VERSION
Jonathan Druart [Wed, 2 Mar 2016 10:38:31 +0000 (10:38 +0000)]
 Bug 16011: $VERSION - remove use vars $VERSION

perl -p -i -e 's/^(use vars .*)\$VERSION\s?(.*)/$1$2/' **/*.pm

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16028: Remove holds count from bibliographic information only
Aleisha [Wed, 23 Mar 2016 22:51:56 +0000 (22:51 +0000)]
 Bug 16028: Remove holds count from bibliographic information only

To test:

1) Go to the detail page for a record with holds (catalogue/detail.pl)
2) Confirm Holds count is no longer in bibliographic information but is
present in tab and Place Hold button is still on toolbar

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16100 [Alternate] Buttons in patron toolbar are styled differently
Owen Leonard [Fri, 18 Mar 2016 12:53:57 +0000 (08:53 -0400)]
 Bug 16100 [Alternate] Buttons in patron toolbar are styled differently

This patch makes modifications to the global CSS file in order to make
font rendering in buttons more consistent. The Bootstrap CSS is setting
font styles which are not being consistently overriden by the staff
client's CSS.

To test, apply the patch and clear your browser cache if necessary.
Check several places to confirm that the changes look correct and don't
go too far:

- Go to the "Patrons" home page. The "New patron" and "Patron lists"
  buttons should look consistent with each other.
- Locate a patron and view their detail page. Toolbar buttons should
  look correct.
- Go to Administration -> Libraries and Groups and click the "Delete"
  button on any library. Verify that the warning dialog buttons look
  correct.
- Go to Cataloging and open the advanced editor. Confirm that toolbar
  buttons look correct.
- Go to Tools -> Stage MARC records for import and confirm that the
  "Upload file" button looks consistent with other generic submit
  buttons.

Applied alternate patch only, followed test plan, buttons display as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16120: Add the actions class to all actions td
Jonathan Druart [Wed, 23 Mar 2016 22:03:01 +0000 (22:03 +0000)]
 Bug 16120: Add the actions class to all actions td

We have several others places where a td contains buttons. This patch
fixes the ones in table generated server-side.

Test plan:
Search for patrons and shelves: the buttons should not wrap

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16120: Making 'Edit' on patron search a button
Aleisha [Tue, 22 Mar 2016 03:19:25 +0000 (03:19 +0000)]
 Bug 16120: Making 'Edit' on patron search a button

EDIT: Adding nowrap styles to the Action column. I chose to do it with a span because that's the way it's already done in this file for another column.

To test:
1) Go to Patrons and do a search that will bring up more than one result
2) Confirm 'Edit' now shows as a font awesome button and works as expected
3) Confirm the button does not wrap when you make your browser narrower

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16130 - Show the item non-public note on the detail view
Liz Rea [Tue, 22 Mar 2016 23:22:02 +0000 (12:22 +1300)]
 Bug 16130 - Show the item non-public note on the detail view

To test:

1) Ensure your non-public note field is mapped to the
   items.itemnotes_nonpublic database column
2) Edit an item, add a test nonpublic note
3) Verify the nonpublic note is shown in the items table on the Detail view.

sponsored-by: New Zealand Ministry of Education Library
sponsored-by: New Zealand Central Agencies Library

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Removed a stray Data::Dumper

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16132: Removing branch select button
Aleisha [Wed, 23 Mar 2016 04:08:52 +0000 (04:08 +0000)]
 Bug 16132: Removing branch select button

To test:
1) Go to Admin -> Library Transfer Limits
2) Notice that you do not have to click the Choose button when selecting a new library
3) Refresh page
4) Notice that Choose button is gone and page still works

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16027 - Use Font Awesome icons in the professional cataloging interface
Owen Leonard [Mon, 14 Mar 2016 16:41:58 +0000 (12:41 -0400)]
 Bug 16027 - Use Font Awesome icons in the professional cataloging interface

The professional cataloging interface uses Glyphicons. They should be
replaced with Font Awesome icons.

I have replaced the "Import record" icon as per the discussion on Bug
15966 about which icon better expresses import vs. export.

To test, apply the patch and go to Cataloging -> Advanced editor.

- Confirm that the icons in the toolbar look correct.
- Click the "Macros" button and confirm that toolbar buttons in the
  modal look correct.
- Click the "Advanced" link in the left-hand sidebar and confirm that
  the buttons in that modal look correct.
- Click the "Save" button without adding anything to the blank record.
  Confirm that the "Missing..." error messages are styled with the
  correct icon.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16133: Translatability of database administrator account warning
Marc Véron [Wed, 23 Mar 2016 07:11:49 +0000 (08:11 +0100)]
 Bug 16133: Translatability of database administrator account warning

This patch removes sentence splitting of the database administrator warning with
a button styled link.

Additionally, it uses the same wording as in the warning on the 'About' page.

To test:

- Apply patch
- Log in to Staff client as database administration user
- Verify that the wording of the warning is the same as on the About page (Tab
  'System information')
- Verify that the link to the patron administration page is styled as a button
  and behaves correctly

NOTE: Actually, the category is irrelevant. But I like the improved message.
      Categories may or may not be set up at the initial log in.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15722: Escape patron infos for JSON in patron searches
Jonathan Druart [Tue, 8 Mar 2016 14:09:09 +0000 (14:09 +0000)]
 Bug 15722: Escape patron infos for JSON in patron searches

If patron infos contain invalid JSON chars (\t for instance), the
results won't appear.
The solution is to escape these info.

Test plan:
Edit patron infos in DB (update borrowers set surname="foobar\t" where
borrowernumber=42)
Search for foobar (you should have more than 1 result)
Without this patch, DT retrieves a bad formatted JSON and the results
won't appear.
With this patch, the table result appears

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15741: Fix rounding in total fines calculations
Jonathan Druart [Tue, 8 Mar 2016 11:58:24 +0000 (11:58 +0000)]
 Bug 15741: Fix rounding in total fines calculations

C4::Members::GetMemberAccountRecords wrongly casts float to integer
It's common to use sprintf in Perl to do this job.

% perl -e 'print int(1000*64.60)."\n"';
64599
% perl -e 'print sprintf("%.0f", 1000*64.60)."\n"';
64600

Test plan:
1) Create manual invoice for 64.60 (or 1.14, 1.36, ...)
2) Try to pay it using "Pay amount" or "Pay selected" buttons

Signed-off-by: Sally Healey <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15741: (regression tests) Rounding is not calculated correctly
Tomas Cohen Arazi [Wed, 23 Mar 2016 23:28:56 +0000 (20:28 -0300)]
 Bug 15741: (regression tests) Rounding is not calculated correctly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15888 - Syndetics Reviews preference should not enable LibraryThing reviews
Nick Clemens [Tue, 23 Feb 2016 20:41:57 +0000 (20:41 +0000)]
 Bug 15888 - Syndetics Reviews preference should not enable LibraryThing reviews

To test:
1 - Enable Syndetics Reviews without a LibraryThing ID
2 - Check page source and note you have a stanza for LTFL tabbed reveiws
3 - Apply patch
4 - Reload page and note LTFL tabbed reviews are not present
5 - Enter a LibraryThing ID and not the tab is restored.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15921: Do not include datatables js/css files twice
Jonathan Druart [Mon, 29 Feb 2016 08:55:36 +0000 (08:55 +0000)]
 Bug 15921: Do not include datatables js/css files twice

datatables.inc loads dataTables.buttons.min.js and buttons.colVis.min.js
since bug 15285: Update common files because the dom param now contains
'B'. The DT init fails with it does not know what 'B' means.

Test plan:
Test tables using buttons (columns visibility), they should work as
before this patch.

Tested with patron search and administration/currencies, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16125: Remove the flagged boolean in circ/circulation.tt
Jonathan Druart [Wed, 23 Mar 2016 16:04:47 +0000 (16:04 +0000)]
 Bug 16125: Remove the flagged boolean in circ/circulation.tt

Before 15632, flagged was passed in any cases: GetMessages returned an
arrayref, so:
  my $bor_messages_loop = GetMessages( $borrowernumber, 'B', $branch );
  if($bor_messages_loop){ $template->param(flagged => 1 ); }
set 'flagged'.

It seems that this variable is not needed as it's always set.

Test plan:
Confirm that the "Add a new message" link is always displayed (even if
no message exist).
Note that a "Attention" is displayed but should not, that already
existed before bug 15632.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16134: t::lib::Mocks::mock_preference should be case-insensitive
Julian Maurice [Wed, 23 Mar 2016 13:07:09 +0000 (14:07 +0100)]
 Bug 16134: t::lib::Mocks::mock_preference should be case-insensitive

Test plan:
1. prove t/db_dependent/Auth_with_cas.t => FAIL
2. Apply patch
3. prove t/db_dependent/Auth_with_cas.t => SUCCESS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16136: Koha::Patron contains 'return undef' and fails critic tests
Tomas Cohen Arazi [Wed, 23 Mar 2016 17:57:41 +0000 (14:57 -0300)]
 Bug 16136: Koha::Patron contains 'return undef' and fails critic tests

This patch fixes this issue.

To test:
- Run
  $ TEST_QA=1 prove t/00-testcritic.t
=> FAIL: Koha::Patron makes the tests fail.
- Apply the patch
- Run
  $ TEST_QA=1 prove t/00-testcritic.t
=> SUCCESS: tests PASS
- Sign off

Regards

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16143: Make opac-shelves.pl generate OPAC itype images path
Tomas Cohen Arazi [Thu, 24 Mar 2016 02:43:17 +0000 (23:43 -0300)]
 Bug 16143: Make opac-shelves.pl generate OPAC itype images path

This patch makes icons point to the OPAC path instead of intranet's.

To test:
- On current master/3.22.x
- Have some itemtypes with icons set
- Have some biblios matching the itemtypes
- Add them to a public list
- Do a search in the OPAC for any of those biblios
=> SUCCESS: icons show correctly
- Choose the list
=> FAIL: icons fail to show, URL points to /intranet-tmpl/....
- Apply the patch, reload
=> SUCCESS: icons show correctly
- Sign off :-D

Sponsored-by: American Numismatic Society
NOTE: I had to set item-level_itypes to 'biblio record'
      in order to trigger this. My icon's showed, but the
      path was wrong. This patch corrects it.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 14614: Multiple URLs (856) in cart/list email are broken
Marc Véron [Thu, 24 Mar 2016 10:59:27 +0000 (11:59 +0100)]
 Bug 14614: Multiple URLs (856) in cart/list email are broken

To reproduce:
- Add multiple subfields 856 u to a bilbio
- Add this biblio to a cart and send it as mail
  (from Staff client and from OPAC)
Result: Links in mail body are broken

To test
- Apply patch
- Send carts again (from Staff client and from OPAC)
- Result: In mail body, links display separated with blank-pipe-blank
  like http://bla.com | http://blabla.com | http://blablabla.com
- Change one of the 856 u to not to be a link, e.g. äöü
- Send carts again
- Verify that in mail body äöü correctly display as text.

(Amended to make it work for OPAC as well, MV)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16040: Update fnReloadAjax DT plugin to fix quotes deletion
Jonathan Druart [Mon, 21 Mar 2016 15:49:25 +0000 (15:49 +0000)]
 Bug 16040: Update fnReloadAjax DT plugin to fix quotes deletion

When deleting quotes, the table is not regenerated and a JS error is
raised.
That is because we are not using an up-to-date plugin

Test plan:
Delete a quote and confirm you do not get a JS error

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 7594: Google Cover Javascript contains hardcoded CSS style
Owen Leonard [Tue, 22 Mar 2016 12:07:44 +0000 (08:07 -0400)]
 Bug 7594: Google Cover Javascript contains hardcoded CSS style

The JavaScript which handles the display of Google book cover images
includes a hard-coded "style" attribute. It may have been relevant to
the design of the old prog template, but it doesn't seem to have any use
in the Bootstrap one. This patch removes it.

I have replaced the style attribute with a class in case someone needs
a hook for some custom CSS.

To test, apply the patch, enable the GoogleJackets system preference,
and clear your browser cache if necessary.

- Search for a title in the OPAC which has a Google book cover image
  associated with it.
- View the detail page for that title. Confirm that the "Google Preview"
  link underneath the cover image looks correct.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13238: Specific string if no results
Jonathan Druart [Mon, 14 Mar 2016 16:40:59 +0000 (16:40 +0000)]
 Bug 13238: Specific string if no results

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13238: Improve heading on vendor search when searching for all vendors
Aleisha [Wed, 2 Mar 2016 00:36:49 +0000 (00:36 +0000)]
 Bug 13238: Improve heading on vendor search when searching for all vendors

To test:
1) Go to Acquisitions and do an empty vendor search
2) Should now read "Vendor search: X results found"
3) Enter a search term and search for vendor
4) Should now read "Vendor search: Y results found for 'search term'"

Sponsored-by: Catalyst IT
NOTE: two nested if/else/end's could make it result/results,
      as suggested in comment #3. However, this meets my understanding
      of the problem as defined in comment #0.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 13464 - Standardize the pagination class
Owen Leonard [Mon, 21 Mar 2016 13:32:39 +0000 (09:32 -0400)]
 Bug 13464 - Standardize the pagination class

There are a few template which use a different wrapper class for the
pagination links. These should be made consistent for a consistent
style.

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

- On this page the pagination markup has been removed in favor of
  DataTables pagination. The budget tables were already sorted using
  DataTables, so having server-side pagination on top of that doesn't
  make sense.

In Administration -> Class sources:

- This page had pagination markup which was unused.

In Authorities -> Authority search results:

- Perform an authority search which will return more than one page of
results. Confirm that the pagination links are correctly styled.

In Search -> Item search:

- Perform a search which will return more than one page of results.
Confirm that the pagination links are correctly styled.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Since the funds are all displayed (and nobody complained), it makes sense to
display all budgets.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 14582 - OPAC detail shows an unuseful link to "add tag" when user is not logged in
Owen Leonard [Mon, 21 Mar 2016 14:47:56 +0000 (10:47 -0400)]
 Bug 14582 - OPAC detail shows an unuseful link to "add tag" when user is not logged in

This patch rearranges some parts of the OPAC detail page template so
that the "add tag" link does not appear if the user is not logged in.

This patch also includes some whitespace changes, so please diff
accordingly.

To test, apply the patch and set "TagsEnabled" to "Allow."

- With "TagsInputOnDetail" set to "Allow," view the detail page for a
  bibliographic record in the OPAC when /not/ logged in. You should see
  a "Log in to add tags" link which triggers the login modal when
  clicked.

- Log in and view the same page. Confirm that there is now an "Add
  tag(s)" link which triggers the add tags form. Confirm that the
  behavior of the add tags form is still correct.

- With "TagsInputOnDetail" set to "Don't allow" view the detail page
  again and verify that the "Log in to add tags" link doesn't appear
  when not logged in, and the "Add tags" link doesn't appear when logged
  in.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15044: Add date suggestion to OPAC suggestions table
Aleisha [Sun, 13 Mar 2016 23:29:42 +0000 (23:29 +0000)]
 Bug 15044: Add date suggestion to OPAC suggestions table

To test:
1) Log in to OPAC, go to your purchase suggestions (opac-suggestions.pl)
2) Confirm there is now a 'Suggested on' column displaying the date of your past suggestions
3) Add a new purchase suggestion and confirm that the date displayed is correct

Sponsored-by: Catalyst IT
Signed-off-by: Marjorie <marjorie.barry-vila@ccsr.qc.ca>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15196: Default sorting of patron lists
Aleisha [Sun, 20 Mar 2016 23:47:30 +0000 (23:47 +0000)]
 Bug 15196: Default sorting of patron lists

This patch sorts users by surname.
Also string fix -> Firstname to First name in column heading

To test:
1) Go to a patron list
2) Confirm it is sorted by surname
3) Add a patron that will need to slot in the middle somewhere
4) Confirm the data table sorts it correctly
5) Confirm column heading change

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15672: (follow-up) Show descriptions instead of codes on the hold ratios report
Jonathan Druart [Thu, 17 Mar 2016 08:48:56 +0000 (08:48 +0000)]
 Bug 15672: (follow-up) Show descriptions instead of codes on the hold ratios report

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15672 [Revised] Show descriptions instead of codes on the hold ratios report
Owen Leonard [Wed, 16 Mar 2016 14:00:40 +0000 (10:00 -0400)]
 Bug 15672 [Revised] Show descriptions instead of codes on the hold ratios report

This patch revises the hold ratios report so that it uses template
plugins to display descriptions instead of codes for item holding
branch, item home branch, item type, and shelving location.

To test you should have multiple items on the hold ratio report (set the
ratio to a small number to increase the number of results). It should
include one or more items which have a shelving location set.

View the hold ratios report and confirm that library names, shelving
location descriptions, and item type descriptions are shown instead of
codes.

This revised patch steals from Bug 15560 to enable the correct display
of multiple home libraries, holding libraries, shelving locations, item
types, and call numbers. To properly test you should have records in
your report which have multiple values for each of those fields.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15825 - Patron lists does not show tools menu sidebar
Owen Leonard [Tue, 15 Mar 2016 17:43:37 +0000 (13:43 -0400)]
 Bug 15825 - Patron lists does not show tools menu sidebar

Patron lists pages do not show the Tools sidebar menu like other tools
pages do. This page adds it to two views: The list of lists, and the
page for adding to a list.

To test, apply the patch and go to Tools -> Patron lists.

- Confirm that this page has the tools sidebar menu.
- On any existing list click Actions -> Add patrons.
- Confirm that the page has the tools sidebar menu.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15952: Add missing <tr>
Jonathan Druart [Wed, 16 Mar 2016 11:09:18 +0000 (11:09 +0000)]
 Bug 15952: Add missing <tr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15952: Moving cataloging search actions into a drop-down menu
Aleisha [Tue, 1 Mar 2016 23:09:39 +0000 (23:09 +0000)]
 Bug 15952: Moving cataloging search actions into a drop-down menu

Edit: Have removed the datatables stuff - wasn't necessary. Also fixed a
merge conflict
Edit: Comment 7

To test:
1) Go to Cataloging and do a search in the catalog and reservoir
   (cataloguing/addbooks.pl)
2) Confirm that for the results found in catalog, the options (MARC and
   Card preview, Edit biblio, Add/edit items) are there and behave as
   expected.
3) Confirm that for the results found in reservoir, the options (MARC
   and Card preview, Add biblio) are there and behave as expected.
4) Set user permissions so that the user cannot edit the catalog or
   items. (editcatalogue -> edit_catalogue and edit_items)
5) Confirm that you no longer see the options to edit or add
   items/biblio in either table.

Sponsored-by: Catalyst IT
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Expected result following the test plan.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15989 [Follow-up] Making classification sources actions buttons
Owen Leonard [Fri, 11 Mar 2016 17:56:11 +0000 (12:56 -0500)]
 Bug 15989 [Follow-up] Making classification sources actions buttons

This trivial follow-up adds an "actions" class to the table cell
containing the new buttons. In conjunction with the style update in Bug
16048, this will prevent the buttons from wrapping at narrow browser
window widths.

Also changed in this patch: A couple of capitalization errors.

To test, apply the patch for Bug 16048 and go to Administration ->
Classification sources. Confirm that the "Edit" and "Delete" buttons do
not stack on top of each other even at narrow browser widths.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15989: Making classification sources actions buttons
Aleisha [Thu, 10 Mar 2016 01:39:55 +0000 (01:39 +0000)]
 Bug 15989: Making classification sources actions buttons

To test:

1) Go to Administration -> Classification sources
2) Confirm that the actions 'Edit' and 'Delete' now show as buttons for
   BOTH tables and work as expected.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16032 - Use Font Awesome icon in "note" styled divs
Owen Leonard [Wed, 9 Mar 2016 18:58:17 +0000 (13:58 -0500)]
 Bug 16032 - Use Font Awesome icon in "note" styled divs

Several pages use <div class="note"> to display important information
about the functionality on the page. The style of this div can be
modified to use Font Awesome, eliminating an image file.

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

- Go to Administration -> Authorized values.
- Confirm that the "NOTE" box is styled correctly.
- Edit an existing authorized value.
- Confirm that the "NOTE" box is styled correctly.

- Go to Tools -> Batch record deletion.
- Submit a batch of biblionumbers.
- Confirm that the "Reminder" box is styled correctly.
- Go back and submit a batch of authority numbers.
- Confirm that the "Reminder" box is styled correctly.

- Go to Tools -> Batch record modification.
- Submit a batch of biblionumbers.
- Confirm that the "Reminder" box is styled correctly.
- Go back and submit a batch of authority numbers.
- Confirm that the "Reminder" box is styled correctly.

- Check that there are no other references to "note.png" in the
  templates.

Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16037: Renaming 'Print basket group' as 'Export as PDF'
Aleisha [Sun, 13 Mar 2016 21:35:06 +0000 (21:35 +0000)]
 Bug 16037: Renaming 'Print basket group' as 'Export as PDF'

To test:
1) Go to Acquisitions
2) Go to the basket groups for a vendor
3) Confirm that an open basket group has the option to 'Close and export as PDF'
4) Confirm that a closed basket group has the option to 'Export as PDF'
5) Confirm these buttons still work as expected

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16039: Remove useless exit
Jonathan Druart [Mon, 21 Mar 2016 15:04:56 +0000 (15:04 +0000)]
 Bug 16039: Remove useless exit

pod2usage will exit with the status given in parameter.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16039: Added -q flag to share_usage_with_koha_community.pl
Srdjan [Thu, 10 Mar 2016 06:03:51 +0000 (19:03 +1300)]
 Bug 16039: Added -q flag to share_usage_with_koha_community.pl

To test:

With UsageStats syspref set to No:

* run misc/cronjobs/share_usage_with_koha_community.pl
  (without -q)
  - "The UsageStats system preference is not set." message
    with usage info should be output

* run misc/cronjobs/share_usage_with_koha_community.pl -q
  - the output should be quiet

NOTE: See comment #7.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16043 - Use Font Awesome icon in hold confirmation dialog
Owen Leonard [Thu, 10 Mar 2016 15:32:11 +0000 (10:32 -0500)]
 Bug 16043 - Use Font Awesome icon in hold confirmation dialog

This patch fixes another instance in the checkin template where a Font
Awesome icon should be used instead of a background image.

To test, apply the patch and locate an item which is on hold for a
patron at your logged in library.

- Check in the item.
- Confirm the hold.
- Check in the item again.
  - You should get a "Hold found (item is already waiting)" message. The
    "Print and confirm" button in this dialog should have a Font Awesome
    icon.
  - Confirm that the print button still works correctly.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16046 - Use Font Awesome icons on patron edit pages
Owen Leonard [Thu, 10 Mar 2016 16:43:32 +0000 (11:43 -0500)]
 Bug 16046 - Use Font Awesome icons on patron edit pages

This patch updates links in the patron edit and batch patron
modification templates to use Font Awesome icons instead of
background-images.

To test you must have ExtendedPatronAttributes enabled and at least one
repeatable attribute defined.

- Apply the patch and edit any patron record.
- In the section for editing attributes and identifiers, check the
  styling and behavior of the "Clear" and "New" links.
- In Tools -> Batch patron modification, load a batch of patron records.
- In the "Edit" form, check the style and behavior of the "Clear" link
  for date inputs.
- Test the "New" and "Delete" links for patron attributes.

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16052: Putting buttons from after MARC records have been staged into a toolbar
Aleisha [Tue, 15 Mar 2016 00:34:31 +0000 (00:34 +0000)]
 Bug 16052: Putting buttons from after MARC records have been staged into a toolbar

EDIT: Incorporating Owen Leonard's changes from Comment 6

To test:
1) Go to Tools -> Stage MARC records for import
2) Upload any file and click Stage for import once it has uploaded
3) Confirm both links are now buttons in a toolbar and work as expected
4) Notice that 'Stage MARC records' (what was once the 'Back' button)
   now takes you back to stage-marc-records.pl instead of tools-home.pl
5) Also confirm that the space between results and colon (MARC staging
   results :) is gone

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Thank you, this is a great improvement.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16057: Use font awesome button for cleaning a batch of staged MARC records
Aleisha [Sun, 13 Mar 2016 22:08:22 +0000 (22:08 +0000)]
 Bug 16057: Use font awesome button for cleaning a batch of staged MARC records

To test:
1) Go to Tools -> Staged MARC management (tools/manage-marc-import.pl)
2) Confirm that 'Clean' button is now styled as a font awesome button
   and works as expected

Sponsored-by: Catalyst IT
NOTE: If anyone can suggest an appropriate font awesome icon to go with
this button, feel free to add it. I had a play around with some buttons
and couldn't really find one that fit.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16059: Use Font Awesome icons in standard cataloging duplicate warning dialog
Owen Leonard [Wed, 9 Mar 2016 02:08:01 +0000 (21:08 -0500)]
 Bug 16059: Use Font Awesome icons in standard cataloging duplicate warning dialog

In the standard MARC editor, when a duplicate record is suspected a
dialog is shown. This patch updates the template to show Font Awesome
icons in this dialog.

Also changed: Using <h3> instead of <h4> in dialog so that it is
correctly styled. Adding "popup" class to duplicate record link to
indicate that a new window will be opened.

To test, apply the patch and go to Cataloging -> New record.

- Use Z39.50 to import a record which is already in your catalog.
- Save the record. Confirm that the duplicate warning dialog is styled
  correctly.
- Confirm that both the "Save as new" and "Edit items" buttons work
  correctly.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16062 - (follow-up) Remove CSS and images related to old "approve" and "deny...
Jonathan Druart [Thu, 17 Mar 2016 09:46:09 +0000 (09:46 +0000)]
 Bug 16062 - (follow-up) Remove CSS and images related to old "approve" and "deny" button styles

Remove another obsolete CSS rule for input.approve

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16062 - Remove CSS and images related to old "approve" and "deny" button styles
Owen Leonard [Wed, 9 Mar 2016 12:54:22 +0000 (07:54 -0500)]
 Bug 16062 - Remove CSS and images related to old "approve" and "deny" button styles

Now that confirmation dialogs have all been udpated to use Font Awesome
icons, the old CSS for styling "approve" and "deny" buttons can be
removed along with the associated images.

To test, apply the patchs for Bugs 16061 and 16064 if necessary.

- Search the templates for instances of the "approve" or "deny" class
  which don't have a Font Awesome icon associated with it. There should
  be none.
- Confirm that there are no other references to the files "approve.gif"
  and "deny.gif"

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16071: Use Font Awesome icons in authority duplicate warning dialog
Owen Leonard [Mon, 14 Mar 2016 17:47:01 +0000 (13:47 -0400)]
 Bug 16071: Use Font Awesome icons in authority duplicate warning dialog

In the authority editor, when a duplicate record is suspected a
dialog is shown. This patch updates the template to show Font Awesome
icons in this dialog.

Also changed: Using <h3> instead of <h4> in dialog so that it is
correctly styled. Adding "popup" class to duplicate record link to
indicate that a new window will be opened.

To test, apply the patch and go to Authorities -> New record.

- Use Z39.50 to import a record which is already in your catalog.
- Save the record. Confirm that the duplicate warning dialog is styled
  correctly.
- Confirm that both the "Save as new" and "Edit existing" buttons work
  correctly.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16074: Replace Modify with Edit
Jonathan Druart [Fri, 18 Mar 2016 07:56:07 +0000 (07:56 +0000)]
 Bug 16074: Replace Modify with Edit

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 16074: Making frequencies actions buttons
Aleisha [Tue, 15 Mar 2016 06:14:40 +0000 (06:14 +0000)]
 Bug 16074: Making frequencies actions buttons

To test:

1) Go to Serials -> Manage frequencies
2) Confirm that buttons 'Modify' and 'Delete' show as buttons and work
   as expected
3) Confirm that when you make your window narrow, the column with the
   buttons does not wrap
4) Confirm that column heading is now 'Actions'

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Buttons look correct and work correctly.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years ago Bug 15866: Add confirm message for deleting rotating collection from toolbar
Aleisha [Sun, 20 Mar 2016 23:24:18 +0000 (23:24 +0000)]
 Bug 15866: Add confirm message for deleting rotating collection from toolbar

To test:
1) Go to Tools -> Rotating Collections
2) Click on any rotating collection ('Add or remove items' from drop down menu)
3) Click 'Delete' from toolbar. Validate you are now asked to confirm your deletion. Check that cancel works, then check that confirm works.

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I've added the word 'rotating' before collection, to make
it clear for translators what is meant here.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
8 years agoBug 15773: Fix and standardise checkboxes code in framework
Jonathan Druart [Tue, 9 Feb 2016 17:02:05 +0000 (17:02 +0000)]
Bug 15773: Fix and standardise checkboxes code in framework

When creating a new subfield for an authority framework, the checkboxes
don't behave as they should.
If you click on the 'repeatable', 'mandatory' or 'is url' checkbox's
label, the checkbox from the second tab will be checked/unchecked.
This is caused by a non-unique id of the input element.

I have found this bug when working on the removal of CGI::checkbox in
both admin/auth_subfields_structure.pl and
admin/marc_subfields_structure.pl scripts.

This patch remove the use of CGI::checkbox as well as the generation of
html code from these 2 pl scripts (which should be avoided).
The code these scripts are now pretty similar.

Test plan:
Add/modify/remove subfield for a MARC framework and an Authority
framework.
Use as many field as possible and confirm that the values are correctly
inserted/displayed.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16114: Koha::ItemType->translated_description should return a string
Jonathan Druart [Tue, 22 Mar 2016 09:38:52 +0000 (09:38 +0000)]
Bug 16114: Koha::ItemType->translated_description should return a string

This patch fixes a regression introduce by bug 14828.
If an itemtype is translated, its description won't be displayed
correctly on the item search form.

Koha::ItemType->translated_description is only used once.

Test plan:
- define a translation for an item type (Administration ->
  Item types -> Edit -> Translate into other languages)
- go on the item search form, the item type should be displayed
  correctly.

QA note: This module is not covered by tests, it seems that I forgot to
write them...

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16075: Making numbering patterns actions buttons
Aleisha [Tue, 15 Mar 2016 06:26:06 +0000 (06:26 +0000)]
Bug 16075: Making numbering patterns actions buttons

To test:

1) Go to Serials -> Manage numbering patterns
2) Confirm that buttons 'Edit' and 'Delete' show as buttons and work as
   expected
3) Confirm that when you make your window narrow, the column with the
   buttons does not wrap
4) Confirm that column heading is now 'Actions'

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Buttons look correct and work correctly.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16078 [Revised] Remove unused YUI CSS
Owen Leonard [Tue, 15 Mar 2016 13:58:22 +0000 (09:58 -0400)]
Bug 16078 [Revised] Remove unused YUI CSS

The YUI CSS file "skin.css" is no longer relevant to the staff client
templates and can be removed. Other references to YUI-related classes,
with the exception of grids, can also be removed.

This patch removes references in CSS to:

.yuimenuitemlabel
.yui-button
.yui-menu-button

...and removes the "yui-skin-sam" class from two templates' body tag.

skin.css is also included in a list of assets cached by the offline
circulation page. It can be safely removed.

To test, apply the patch and clear your cache if necessary. Look around
and confirm that the style of the staff client is unchanged.

Search for references to the listed classes and confirm that none are
found.

Revised patch squashes in the follow-up as well as a missing commit
removing skin.css from staff-global.css.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16081: Making Koha to MARC mapping actions buttons
Aleisha [Wed, 16 Mar 2016 03:25:58 +0000 (03:25 +0000)]
Bug 16081: Making Koha to MARC mapping actions buttons

To test:

1) Go to Admin -> Koha to MARC mapping
2) Confirm that Edit shows as a font awesome button and works as
   expected.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16096: Change 'modify' to 'edit' for OAI sets config
Aleisha [Thu, 17 Mar 2016 22:39:57 +0000 (22:39 +0000)]
Bug 16096: Change 'modify' to 'edit' for OAI sets config

To test:
1) Go to Admin > OAI Sets Configuration
2) Confirm button in dropdown now says 'Edit'. Click button
3) Confirm heading of page now says 'Edit' and says 'Edit' in breadcrumbs

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16097: Making messages for subscription fields more user friendly
Aleisha [Thu, 17 Mar 2016 23:15:40 +0000 (23:15 +0000)]
Bug 16097: Making messages for subscription fields more user friendly

To test:
1) Go to Serials -> Add Subscription fields
2) Create a field, confirm message.
3) Attempt to create a new field that has the same name as an existing
   field, confirm message.
4) Create another field with a different name. Attempt to edit this
   field to have the same name as another field. Confirm message
5) Edit field (change name to something different)
6) Delete field, confirm message.
6) Turn off permissions to delete subcriptions ONLY. Attempt to delete a
   field, confirm message.

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16098: Making subscription fields actions buttons
Aleisha [Thu, 17 Mar 2016 23:52:14 +0000 (23:52 +0000)]
Bug 16098: Making subscription fields actions buttons

To test:
1) Go to Serials -> Add subscription fields
2) Confirm actions "Edit" and "Delete" now show as buttons and work as
   expected
3) When you make your browser narrow, confirm that the Actions column
   does not wrap
4) Confirm that you cannot sort on the Actions column

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16099: Make name required field when creating subscription field
Aleisha [Fri, 18 Mar 2016 00:02:20 +0000 (00:02 +0000)]
Bug 16099: Make name required field when creating subscription field

To test:
1) Notice behaviour when adding subcription field (Serials) without a
   name
2) Apply patch
3) Attempt to create subscription field without a name and click Save
4) Notice that you not cannot submit the form without adding the name

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16110: Making lists actions buttons
Aleisha [Sat, 19 Mar 2016 21:43:36 +0000 (21:43 +0000)]
Bug 16110: Making lists actions buttons

To test:
1) Go to Lists
2) Confirm that actions (Edit and Delete) now show as font awesome buttons and work as expected for both Public and Private lists

Sponsored-by: Catalyst IT
NOTE: Pretty! :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15119: Hide search header text boxes on render
Jonathan Druart [Wed, 6 Jan 2016 13:10:00 +0000 (13:10 +0000)]
Bug 15119: Hide search header text boxes on render

When the page rendering is slow or the page is heavy, the tabs in the
header shown be not correctly displayed as tabs.

This patch suggests to hide them, display the first one, and wait for
the JS code to display them nicely.

To easily reproduced the ergonomic issue, go on the circulation home
page (/cgi-bin/koha/circ/circulation.pl) and search for a patron 'a' or
'd', you will get a lot of result and the page will be slow to be fully
displayed.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15861: Isolated 'The' in help files untranslatable
Aleisha [Sun, 20 Mar 2016 23:37:38 +0000 (23:37 +0000)]
Bug 15861: Isolated 'The' in help files untranslatable

Changes made:

help/reports/reports-home.tt
    Line 11: Koha database schema: shows the entire Koha database structure so that you can write effective SQL Queries
    Line 12: Koha reports library: lists reports written by Koha users around the world.

help/rotating_collections/rotatingCollections.tt
    Line 7: Important: AutomaticItemReturn (system preference) must be set to ..

TEST PLAN
---------
1) Log in to staff client
2) Click 'Reports'
3) Click 'Help'
   -- Notice the two lines starting with 'The'
4) Click 'Tools'
5) Click 'Rotating collections' in the Catalog column
6) Click 'Help'
   -- Notice the Important has a 'The'
7) Apply patch
8) Repeat steps 2-6
   -- Notice the wording has changed to eliminate 'The'
9) Run koha qa test tools

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16025 [Revised] Use Font Awesome icons on item types localization page
Owen Leonard [Wed, 9 Mar 2016 15:27:03 +0000 (10:27 -0500)]
Bug 16025 [Revised] Use Font Awesome icons on item types localization page

The item types localization page uses a Glyphicon. This patch converts
it to a Font Awesome icon.

Also changed in this patch: "Delete" text has been added to the delete
link, and a dummy "href" attribute has been added to the link so that it
triggers the right kind of cursor. The deletion confirmation JavaScript
has been edited to ignore the default click action.

To test, apply the patch and go to Administration -> Item types.

- Edit any existing item type and click the "Translate into other
  languages" link.
- If there is not an existing translation, add one. Close the modal
  window and click the "Translate into other languages" link again to
  redisplay it.
- Confirm that there is a "Delete" link next to your translation which
  is styled correctly.
- Confirm that the behavior of the "Delete" link is correct both when
  confirming and when canceling.

Revision adds the "actions" class to the table cell with the delete link
to prevent a line break between the icon and the text.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15946 Valid namespace for OAI marcxml schema
Zeno Tajoli [Tue, 1 Mar 2016 10:18:04 +0000 (11:18 +0100)]
Bug 15946 Valid namespace for OAI marcxml schema

This path fixes the value of xml schema variable and the link to Library
of Congress.  For Dublin Core format those values are defined in
UNIMARCslim2OAIDC.xsl and MARC21slim2OAIDC.xsl.  For MARCXML those
values are written into the code

To test it:
1) Setup OAI-PMH
2) Test the site inserting the BaseURL into http://validator.oaipmh.com
3) See the problem with ListMetadataFormats [link:
   http://validator.oaipmh.com/#ListMetadataFormats]
4) Insert the patch
5) See the problem is over

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  Invalid before patch, valid after.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15809: Redefine multi_param is CGI < 4.08 is used
Jonathan Druart [Fri, 12 Feb 2016 11:32:02 +0000 (11:32 +0000)]
Bug 15809: Redefine multi_param is CGI < 4.08 is used

On debian Jessie, the CGI version is >= 4.08
Since this version, the param method raise a warning
"CGI::param called in list context".
Indeed, it can cause vulnerability if called in list context

https://metacpan.org/pod/CGI#Fetching-the-value-or-values-of-a-single-named-parameter
http://blog.gerv.net/2014/10/new-class-of-vulnerability-in-perl-web-applications/

There is a long journey to get rid of these warnings.
First I suggest to redefine the multi_param method when the CGI version
 installed is < 4.08, it will allow us to move the wrong ->param calls to
 ->multi_param without waiting for everybody to upgrade.

The different ways to call these 2 methods are:

my $foo = $cgi->param('foo'); # OK

my @foo = $cgi->param('foo'); # NOK, will raise the warning
my @foo = $cgi->multi_param('foo'); #OK

$template->param( foo => $cgi->param('foo') ); # NOK, will raise the warning
                                               # and vulnerable
$template->param( foo => scalar $cgi->param('foo') ); # OK

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested a call to multi_param with CGI < 4.08.
With reference to the comments on Bugzilla, this workaround is arguable,
but provides a base to move to multi_param. If we come up with a better
solution, it should be easy to adjust.

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15585: Remove "shift on reference is experimental" warning
Jonathan Druart [Tue, 22 Mar 2016 11:04:41 +0000 (11:04 +0000)]
Bug 15585: Remove "shift on reference is experimental" warning

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15585 - Move C4::Passwordrecovery to the new namespace Koha::Patron::Password...
charles [Wed, 27 Jan 2016 20:17:32 +0000 (15:17 -0500)]
Bug 15585 - Move C4::Passwordrecovery to the new namespace Koha::Patron::Password::Reset

As promised, here is the long-awaited sequel to #8753.

What has changed :

    - The Koha::Patron::Password::Reset is now used in place of C4::Passwordrecovery
    - That ugly shift-grep contraption is no more (goodbye old friend)
    - The generated unique key won't end in a dot anymore

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16106 Correct loose to lose in comment
Colin Campbell [Fri, 18 Mar 2016 13:49:56 +0000 (13:49 +0000)]
Bug 16106 Correct loose to lose in comment

Comment was using incorrect (but similarly spelled) word, obscuring
the meaning slightly. Also corrected the release note altering the
grammar there additionally as it should have been 3rd person singular
so that it now reads more clearly

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15421: Show 'Duplicate' and 'Schedule' on Reports toolbar
Aleisha [Thu, 17 Mar 2016 22:34:08 +0000 (22:34 +0000)]
Bug 15421: Show 'Duplicate' and 'Schedule' on Reports toolbar

To test:
1) Go to Reports -> Use saved
2) Click 'Show' on the dropdown for any report
3) Confirm that 'Duplicate and 'Schedule' are now on the toolbar and work as expected

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15984 - Correct templates which use the phrase "issuing rules"
Owen Leonard [Fri, 18 Mar 2016 13:41:15 +0000 (09:41 -0400)]
Bug 15984 - Correct templates which use the phrase "issuing rules"

This patch corrects two places in the templates where the phrase
"issuing rules" is used instead of "circulation and fine rules."

To test, apply the patch and view the help pages for Administration ->
Circulation and fine rules; and Tools -> Automatic item modification by
age. Confirm that the term "circulation and fine rules" is used instead
of "issuing rules."

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoDBREV for Bug 16019 - Remove unused blue.css
Brendan Gallagher [Tue, 22 Mar 2016 01:03:03 +0000 (01:03 +0000)]
DBREV for Bug 16019 - Remove unused blue.css

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16019 - Remove unused blue.css
Owen Leonard [Wed, 9 Mar 2016 13:51:26 +0000 (08:51 -0500)]
Bug 16019 - Remove unused blue.css

This patch removes blue.css and one image which was used only by
blue.css, css_header.png.

To test, apply the patch and search Koha files for references to
blue.css and css_header.png. There should be none.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16019: Add a warning in the update DB process if intranetcolorstylesheet=blue.css
Jonathan Druart [Fri, 18 Mar 2016 16:34:09 +0000 (16:34 +0000)]
Bug 16019: Add a warning in the update DB process if intranetcolorstylesheet=blue.css

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
8 years agoBug 16020 - Remove unused CSS and images following label creator UX changes
Owen Leonard [Wed, 9 Mar 2016 14:20:14 +0000 (09:20 -0500)]
Bug 16020 - Remove unused CSS and images following label creator UX changes

Since the changes made by Bug 16020, some CSS and images are no longer
needed by the label and patron card creator modules. This patch removes
the unnecessary files and CSS.

To test, apply the patch and go to Tools -> Label creator.

- Confirm that the label creator home page doesn't look broken.
- Go to Tools -> Patron card creator and confirm that the page doesn't
  look broken.
- Search Koha files for references to label-creator-image.png. There
  should be none.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16023 - Use Font Awesome icons on audio alerts page
Owen Leonard [Wed, 9 Mar 2016 15:02:08 +0000 (10:02 -0500)]
Bug 16023 - Use Font Awesome icons on audio alerts page

The audio alerts management page uses Glyphicons in a few places. This
patch replaces them with Font Awesome icons.

To test, apply the patch for Bug 15886 if necessary and enable
the AudioAlerts system preference.

 - Go to Administration -> Audio alerts
 - Confirm that icons for "Edit" and "Delete selected" look correct.
 - Edit an existing alert and confirm that the "play" button looks
   correct and works correctly.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16029: Hide patron toolbar if patron does not exist
Aleisha [Sun, 13 Mar 2016 23:40:53 +0000 (23:40 +0000)]
Bug 16029: Hide patron toolbar if patron does not exist

To test:
1) Create a patron, take note of the borrower number
2) Delete the patron
3) Navigate to the page of the patron you just deleted by typing the url (ie /cgi-bin/koha/members/moremember.pl?borrowernumber=X)
4) Confirm that the patron toolbar is not showing on the page
5) The message now has a link that says 'Find another patron?'. Click this link and confirm you are taken to the member home pgae.

Sponsored-by: Catalyst IT
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16047 [Follow-up] Software error on deleting a group with no category code
Owen Leonard [Thu, 17 Mar 2016 13:08:39 +0000 (09:08 -0400)]
Bug 16047 [Follow-up] Software error on deleting a group with no category code

This follow-up take the original patch a little further, making category
name required on the entry form as well. Without a category name there
is no label in the interface when selecting a category. That doens't
make any sense.

Also changed on the group entry form:

- Added "required" attribute to labels on required fields.
- Changed "Update" submit button label to "Submit."
- Added a "Cancel" link.
- Added the "validated" class to the form so that our built-in
  validation script will process it (not strictly necessary but makes
  the validation appearance more consistent).

Followed test plan, form displays and behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16047: Making category code a required field on creating a group
Aleisha [Thu, 10 Mar 2016 21:49:57 +0000 (21:49 +0000)]
Bug 16047: Making category code a required field on creating a group

This will prevent users from creating a group without a category code,
which causes a software error when you try to delete it

To test:
1) Go to Admin -> Libraries and groups
2) Create new group without category code
3) Attempt to delete the group you just created and notice software
   error
4) Apply patch
5) Create new group without category code
6) Notice you now cannot save the group without putting in a category
  code

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16077 - Remove unused script and template card-print
Owen Leonard [Tue, 15 Mar 2016 14:02:22 +0000 (10:02 -0400)]
Bug 16077 - Remove unused script and template card-print

I can find no reference to card-print.pl being used in Koha. This patch
deletes it and its associated template.

To test, apply the patch and search for references to "card-print" in
Koha. There should be none.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This script does not work, it fails with 'Undefined subroutine
get_label_output_formats'. This subroutine was in C4::Labels::Lib which
has been removed by 2433a91 (Feb 8 2010): Removing depricated file from the
C4::Labels module.

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15868: Ask for confirmation when deleting a MMT action
Jonathan Druart [Tue, 8 Mar 2016 11:07:43 +0000 (11:07 +0000)]
Bug 15868: Ask for confirmation when deleting a MMT action

Test plan:
Create marc modification template
Add an action
Delete it
With this patch you must get a confirmation mesg

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15962: Block the currency deletion if used
Jonathan Druart [Tue, 8 Mar 2016 10:46:46 +0000 (10:46 +0000)]
Bug 15962: Block the currency deletion if used

A currency should not be deleted if used by a vendor or a basket.

Test plan:
1/ Add a new currency
2/ Create a vendor using this currency
3/ Create a basket using this currency
4/ Try to delete the currency
5/ Delete the basket
6/ Try to delete the currency
7/ Delete the vendor
8/ Delete the currency

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15962: Add messages on the currency admin page
Jonathan Druart [Tue, 8 Mar 2016 10:38:37 +0000 (10:38 +0000)]
Bug 15962: Add messages on the currency admin page

Bug 15084 rewrote the currency admin page but forgot to add the messages
block.

Test plan:
Add/update/delete vendors.
You should get information messages.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15997 - Hold Ratios for ordered items doesn't count orders where AcqCreateItem...
Kyle M Hall [Mon, 7 Mar 2016 14:04:44 +0000 (14:04 +0000)]
Bug 15997 - Hold Ratios for ordered items doesn't count orders where AcqCreateItem is set to 'receiving'

Currently, the hold ratios script only counts on order items where the
record item is created at the time the order is placed, and not if the
item is created when the item is received.

Test Plan:
1) Set AcqCreateItem to recieving
2) Run the hold ratios report with "include ordered" checked
3) From aquisitions, order some additional items for the record
4) Re-run the hold ratios report, not there is no change in the ratio
   for that record
5) Apply this patch
6) Re-run the hold ratios reporat again, the ratio should now have
   changed

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16012: Restore the ability to edit default authority type
Jonathan Druart [Wed, 9 Mar 2016 11:16:07 +0000 (11:16 +0000)]
Bug 16012: Restore the ability to edit default authority type

Bug 15380 introduced a regression on the authority types admin page: the
default authority type (authtypecode="") is no longer editable.

Test plan:
Edit the authority type to update the summary
=> Without this patch you will get the "add a new authority type" form
=> With this patch applied, the correct behavior will be restored

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16013: Make classification sources deletable
Jonathan Druart [Wed, 9 Mar 2016 11:28:04 +0000 (11:28 +0000)]
Bug 16013: Make classification sources deletable

Because of a wrong variable scope, the classification sources are not
deletable.

Test plan:
Create a classification sources (admin/classsources.pl)
Try to delete it
Without this patch, the classification source won't be deleted
With this patch, it will work!

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16030: Add 'Automatic item modifications by age' to the tool sidebar
Jonathan Druart [Wed, 16 Mar 2016 10:14:44 +0000 (10:14 +0000)]
Bug 16030: Add 'Automatic item modifications by age' to the tool sidebar

Test plan:
Go on a page of the tools module
You should see a "Automatic item modifications by age" link
Click on it
The list should not be styled to highlight the fact that you are on this
page.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16053: Do not remove the active flag when editing the active currency
Jonathan Druart [Fri, 11 Mar 2016 11:42:09 +0000 (11:42 +0000)]
Bug 16053: Do not remove the active flag when editing the active currency

From commit b574b615919a6463708d4c1d7b1153a061c1ea0a
   Bug 15084: Make sure the previous active currency is marked as inactive

When a currency is stored, all the active flags of all currencies are unset.
Only the active ones and different than the one we are editing should be updated.

Test plan:
Edit the active currency
=> Without this patch the active flag was removed
=> With this patch, the active flag is kept

Edit another currency and set it the active flag
=> The active flag must have been removed from the previously active
currency.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16053: Add tests
Jonathan Druart [Fri, 11 Mar 2016 11:32:22 +0000 (11:32 +0000)]
Bug 16053: Add tests

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16066 - JavaScript error on new patron form when duplicate is suspected
Owen Leonard [Mon, 14 Mar 2016 15:36:19 +0000 (11:36 -0400)]
Bug 16066 - JavaScript error on new patron form when duplicate is suspected

When a new patron is submitted which is suspected to be a duplicate, the
entry form is redisplayed with a new name attribute, "form_nodouble."
Other scripts on the page still look for a form named "form," so there
is an error.

This patch removes the use of "form_nodouble" on the assumption that it
is unnecessary to name the form something different when a duplicate is
suspected. All the same validation scripts should be run on the form
either way.

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

- Go to Patrons -> New patron and add a patron which matches an existing
  one in order to trigger the duplicate warning.
- Confirm that Firebug (or similar) is not reporting a JavaScript error.
- Confirm that the 'Edit existing' and 'Save as new' buttons work
  correctly.

Reproduced JavaScript error and verified that it no longer appears with
this patch.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16060 - Add Font Awesome icon to Z39.50 search button when no results are found
Owen Leonard [Thu, 10 Mar 2016 14:19:14 +0000 (09:19 -0500)]
Bug 16060 - Add Font Awesome icon to Z39.50 search button when no results are found

When a staff client catalog search returns no results, a Z39.50/SRU
search button is shown. This patch adds a Font Awesome icon to that
button.

Also changed: A stray extra double quote has been removed. The onclick
attribute has been removed from the search button in favor of an event
already defined.

To test, apply the patch and perform a search in the staff client
catalog which will return no results.

- Confirm that the Z39.50/SRU button looks correct and works correctly.
- Validate the HTML of the page and confirm that no unexpected errors
  are returned.

NOTE: Pretty!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16061: Use Font Awesome icons in reports when filter returns no results
Owen Leonard [Tue, 8 Mar 2016 19:40:02 +0000 (14:40 -0500)]
Bug 16061: Use Font Awesome icons in reports when filter returns no results

In Reports -> Saved reports, when the filter form returns no results a
dialog is shown. This patch updates the dialog to use Font Awesome
icons.

Also changed: The dialog now includes a button for creating a new SQL
report, not just one to create a new guided report. The "clear" link in
the sidebar has been modified to pass HTML validation.

To test, apply the patch and go to Reports -> Saved reports.

- In the left-hand sidebar filter, submit terms which will return no
  results.
- Verify that the resulting dialog is correctly styled.
- Confirm that all three buttons in the dialog work correctly: New
  guided report, new SQL report, and Cancel.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
I'm passing this one, while I don't like it is hardcoding a URL path,
because it will make is easier to spot it when time comes and we
make Koha delpoyable in any endpoint.

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16064 - Remove use of image to indicate approval in tags moderation
Owen Leonard [Mon, 14 Mar 2016 14:12:38 +0000 (10:12 -0400)]
Bug 16064 - Remove use of image to indicate approval in tags moderation

This patch updates the tags moderation template to use text labels to
mark tag moderation status, eliminating the use of an image file to
signify approval.

To test you should have some tags in each approval state: pending,
approved, and rejected.

- Apply the patch and go to Tools -> Tags.
- Confirm that the status of each tag is clearly shown with a text
  label.

Works as expected (Do not forget to set filter at the left to 'all' for testing)
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16065 - Use Font Awesome icons in dialog when duplicate patron is suspected
Owen Leonard [Mon, 14 Mar 2016 15:07:14 +0000 (11:07 -0400)]
Bug 16065 - Use Font Awesome icons in dialog when duplicate patron is suspected

This patch updates the new patron template to use Font Awesome icons in
the dialog which is shown when a duplicate patron is suspected.

The patch modifies the CSS rules for a dialog button with "white-space:
pre-line" so that line breaks in button text markup are treated as line
breaks on display. Allowing the text to wrap prevents the buttons from
being too wide and stacking one below the other.

To test, apply the patch and go to Patrons -> New patron.

- Attempt to save a new patron with details matching an existing patron
  in order to trigger the duplicate patron warning.
- Confirm that the resulting dialog is styled correctly.
- Confirm the behavior of both the 'Edit existing' and 'Save as new'
  buttons.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 15840: Catch errors if userid already exists when importing patrons
Jonathan Druart [Wed, 17 Feb 2016 16:21:50 +0000 (16:21 +0000)]
Bug 15840: Catch errors if userid already exists when importing patrons

Import borrowers tool explodes if userid already exists. This error
should be caught to avoid the script to explodes.

TEST PLAN
---------
1) back up DB
2) drop DB, create empty DB
3) Apply patch 15842
4) web install all the sample data
5) login as system user and import patron data
   -- sample provided to trigger error.
   -- you will get a DBIx::class exception
      "Duplicate entry ' for key 'userid'"
6) Apply this patch
7) Repeat steps 2-5
   -- patrons won't be inserted but an error
      will be nicely displayed in the error list.
8) run koha qa test tools

Note that it would be easy to insert the patrons anyway and generate a
userid based on the surname and firstname.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16095: Remove target="_blank" when a link refer to an external link
Jonathan Druart [Fri, 18 Mar 2016 08:34:22 +0000 (08:34 +0000)]
Bug 16095: Remove target="_blank" when a link refer to an external link

If you click on a link that opens a new tab/window to another site, that tab
has access to the original window through JavaScript. The browsing context is
related, even if the domains are totally different.

The tab retains access to the original window's object via window.opener, even
if you navigate to another page or domain, in the new or original window.
Access to the Window object means the new window can use Window.location to
open a different URL in the original window, perfect for phishing attacks.

Depending on the site's Same-Origin Policy settings, the new window may have
access to other parts of the original window's DOM as well.

Any  'A HREF' that contains a target of of '_blank' or '_new' or a fixed name
is vulnerable. Previous security best practice often suggested creating a random
fixed name for an unpredictable namespace - that won't help with this problem!
Targets of '_self' and '_parent' are safe.

We do not use _new (at first glance) but several _blank. Some are used
to refer internal url, we do not need to update or remove them. Others
are used to satisfy OPACURLOpenInNewWindow, in these case, we should add
the rel="noreferrer" attribute to the a tags.
In other cases, we can simply remove them and let the users discover
that a mouse has more than one button (we are in 2016, they can do it!)

Signed-off-by: Chris <chrisc@catalyst.net.nz>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16010: follow-up of 15381 - FIX merge_authorities migration script
Jonathan Druart [Wed, 9 Mar 2016 08:20:04 +0000 (08:20 +0000)]
Bug 16010: follow-up of 15381 - FIX merge_authorities migration script

Caused by commit 7e70202d34d75f988fbaea9b911347417c203aac
    Bug 15381: Remove GetAuthType and GetAuthTypeCode

If you execute perl misc/migration_tools/merge_authority.pl -f 1 -t 2
you will get:
Can't locate object method "authtypecode" via package "1" (perhaps you forgot to load "1"?)
 at misc/migration_tools/merge_authority.pl line 58.

GetAuthority does not return a Koha::Authority but a MARC::Record:
there is no authtype code method!

Test plan:
perl misc/migration_tools/merge_authority.pl -f X -t Y
Should not return any error.
Note that if the authid X or Y does not exist, the script will die.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
8 years agoBug 16015: Restore the ability to delete a group of libraries
Jonathan Druart [Wed, 9 Mar 2016 12:21:14 +0000 (12:21 +0000)]
Bug 16015: Restore the ability to delete a group of libraries

If a group of libraries is linked to at least 1 library, the group
cannot be delete and the librarian should get a warning message.
But if no libraries are linked, the deletion should be allowed.
Since bug 15294 this behavior is broken: The deletion is always blocked:
"This library category cannot be deleted. 0 libraries are still using
it", hum...

Test plan:
Create a group of libraries, delete it

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com