koha.git
9 years agoBug 12052: DBrev 3.14.09.001
Fridolin Somers [Wed, 6 Aug 2014 09:39:42 +0000 (11:39 +0200)]
Bug 12052: DBrev 3.14.09.001

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12052: New syspref to display message on the OPAC patron summary page
Jonathan Druart [Wed, 9 Apr 2014 08:24:24 +0000 (10:24 +0200)]
Bug 12052: New syspref to display message on the OPAC patron summary page

Test plan:

Fill the OPACMySummaryNote with HTML code or just text.
The content should be displayed at the OPAC on the summary page for
patrons.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Rephrased the pref text a little bit, using 'logged in' instead of
'connected', also added " so the description appears correctly in the
pref editor.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f82d22b0df63e2924e9c8b35d2a4eb02edc2650e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10825: don't display enum/chron twice for items received via the serials module
Mason James [Mon, 16 Sep 2013 03:12:16 +0000 (15:12 +1200)]
Bug 10825: don't display enum/chron twice for items received via the serials module

TEST PLAN
---------
1) In the staff interface, display a bib that has one or more items
   that were received in the serials module.  The following query
   can identify them:
   -- in MySQL:
      SELECT items.biblionumber,items.enumchron,serial.serialseq
      FROM items,serial,serialitems
      WHERE items.itemnumber=serialitems.itemnumber
        AND serialitems.serialid=serial.serialid;
2) Note that in the holdings tab, the serial enumeration/chronology
   is displayed twice.
3) Apply the patch
4) Refresh the screen
4) Now, the enum/chron should be displayed only once per item.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Template change only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3f5636cac39ca1109a73b40be08d9dbef096a17c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11797: (follow-up) fix MARC21 branch of bug more idiomatically
Galen Charlton [Tue, 15 Apr 2014 15:16:42 +0000 (15:16 +0000)]
Bug 11797: (follow-up) fix MARC21 branch of bug more idiomatically

This patch puts the MARC21 variant of the bugfix in alignment
with the UNIMARC variant, removing the use of unnecessary
temporary variables.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cc7a99ba7f23c7f77bb28c23613fbd9b4ab61cd5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11797: fix odd number of elements in hash (UNIMARC)
Jonathan Druart [Tue, 15 Apr 2014 09:08:54 +0000 (11:08 +0200)]
Bug 11797: fix odd number of elements in hash (UNIMARC)

I got the same warning for my UNIMARC DB.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fa989631f6b6f2d4a6dc86e8b9535bd9ce786c1e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11797: fix odd number of elements in hash warning (MARC21)
Mark Tompsett [Thu, 6 Mar 2014 06:29:39 +0000 (01:29 -0500)]
Bug 11797: fix odd number of elements in hash warning (MARC21)

This was discovered when someone triggered an authority search
on an authority record that was missing what is assumed the
default subfield for a given field.

It, however, also can be triggered in an OPAC authority search
by looking at the record that lacks the default subfield for a
given field.

TEST PLAN
---------
1) Create an authority record with 180$x and NOT 180$v.
   See C4::AuthoritiesMarc::BuildSummary in the 1.. foreach loop
   for known tags and default values. The default subfields are
   the first letter of the $subfields_to_report string.
2) Trigger the bug:
   Method 1: /cgi-bin/koha/opac-authoritiesdetail.pl?authid=#
             Where # is the authority id of your tweaked record.
             The error occurs in Normal view.
   Method 2: Home -> Cataloging -> + New record
                  -> Click the 'Tag Editor' on 100$a
                  Editing of $a to $b and back may be required.
3) Notice there is an error log entry.
4) Apply the patch
5) Attempt to trigger the bug again
6) That specific error log entry is not generated.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Could generate the warning with a missing 151$a with both methods.
No warning anymore after applying this patch.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 129bc3281180d892659d3ad1ef253fbc7ec6f316)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11797: add regression test
Galen Charlton [Tue, 15 Apr 2014 15:38:49 +0000 (15:38 +0000)]
Bug 11797: add regression test

This patch adds unit tests for C4::AuthoritiesMarc::BuildSummary
for both UNIMARC and MARC21 and a regression test for the "Odd
number of elements in anonymous hash" warning.

To test:

[1] Run prove -v t/db_dependent/AuthoritiesMarc.t.  It should
    report one failure.
[2] Apply the main patch.
[3] Run t/db_dependent/AuthoritiesMarc.t again; it should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f2b655dfabc4a4464099e7d9bc219b6714ef7de1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 5052: make it possible to pick a language if all choices are sublanguage
Bernardo Gonzalez Kriegel [Fri, 4 Apr 2014 01:37:09 +0000 (22:37 -0300)]
Bug 5052: make it possible to pick a language if all choices are sublanguage

This was tricky to catch. In current implementation, Bug 6755
introduced in C4/Templates.pm as condition to send the array of
hashrefs of languages that (@$languages_loop<2), but with one
language group that condition is false, there is only one
element in that array.

This patch changes that condition to have more than one language
selected, grouped or not.

Also send $bidi value always, that was only sent if there is
more than one group language.

To test:
1. Translate to en-GB and en-NZ, or simply do mkdirs
on intranet-tmpl/prog and opac-tmpl/bootstrap

2. Go to Administration > System preferences > I18N
enable those languages on staff/opac

3. Check that language chooser is nowhere to be found

4. Apply the patch

5. Reload staff/opac, now you can see language chooser

NOTE: I made little changes on staff, but can't replicate
bootstrap colors for selected/unselected language. Someone
need to touch css files to make it happen. But that is
current behavior.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Good catch!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c212b9328edd69a8e8f5082674a9f29741d159ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12075: fix keyboard shortcuts broken by jQueryUI upgrade
Owen Leonard [Fri, 11 Apr 2014 16:40:20 +0000 (12:40 -0400)]
Bug 12075: fix keyboard shortcuts broken by jQueryUI upgrade

The recent jQueryUI upgrade broke keyboard shortcuts in the staff client
because of changes to the jQueryUI API. This patch fixes the problem.

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

- View any page in the staff which includes header search tabs for check
  out, check in, or catalog search (staff client home page or
  circulation page for instance).
- Test the keyboard shortcuts: Alt-q for catalog search, Alt-u for check
  out, Alt-r for check in.
- Each keyboard shortcut should select the correct tab.

Followed test plan, patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Confirmed that the shortcuts were broken before the patch
and now work again after applying it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dcca71f0befa92d2212855aecfc0f473b6304832)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 7143: Updating history with new developers
Chris Cormack [Thu, 13 Mar 2014 20:20:34 +0000 (09:20 +1300)]
Bug 7143: Updating history with new developers

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c52b086d38cde98504457aa9f40f65ba20bbfbe1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12073: don't show link URLs when printing Bootstrap OPAC detail page
Frédéric Demians [Fri, 11 Apr 2014 15:23:50 +0000 (17:23 +0200)]
Bug 12073: don't show link URLs when printing Bootstrap OPAC detail page

On OPAC Bootstrap detail page, by clicking Print link on the right the
page is printed. But the printed page contains HTML <a> anchors URL
attribute. It's useless, and unreadable. It isn't the case with prog
theme.

This patch hides all <a> href attributes when printing any OPAC page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and improves the printed detail page's readability.
Currently there is no less file for the print.css.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fe8242fc0383f9bafe1ead9033926c405ee5dfbe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12069: redirect to staff login if you access members/mod_debarment.pl when logged out
Owen Leonard [Thu, 10 Apr 2014 19:50:40 +0000 (15:50 -0400)]
Bug 12069: redirect to staff login if you access members/mod_debarment.pl when logged out

members/mod_debarment.pl's call to checkauth should pass 'intranet' so
that if the user happens to be logged out they will be redirected to the
staff client login form, rather than the OPAC.

To test, apply the patch and log in to the staff client:

- Add a restriction to a patron's account.
- View the restrictions tab on the patron's account. You should see the
  restriction and a "Remove" link for that restriction.
- In another tab, log out of the staff client.
- In the first tab, click the "Remove" link. You should be redirected to
  the staff client login page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch! Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cbcfb847e0022f79b82f0601c955ae085917d377)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12076: better detect an untranslatable template construct
Galen Charlton [Fri, 11 Apr 2014 18:49:07 +0000 (18:49 +0000)]
Bug 12076: better detect an untranslatable template construct

Per bug 6458, template constructs of the form

<li [% IF (foo) %]selected="selected"[% END %]...

are forbidden as they can cause problems with translated templates.
However, the tt_valid.t test currently doesn't catch the variation
where '-' is used to suppress extra whitespace:

<li [%- IF (foo) -%]selected="selected"[%- END -%]...

This patch corrects the issue.

To test:

[1] Temporarily add the following line to a template file:

<li [%- IF a -%]a="a"[%- END -%] />

[2] Run prove -v xt/tt_valid.t.  Note that no error is reported.
[3] Apply the patch, and rerun the tt_valid.t test.  This time,
    an error should be reported.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, detects the forbidden pattern
No koha-qa errors.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9a7eedce78af128772a36b5a16416fdad1a16fcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11960: replace unnecessary call of GetMemberDetails by CanBookBeRenewed
Jonathan Druart [Wed, 19 Mar 2014 15:38:20 +0000 (16:38 +0100)]
Bug 11960: replace unnecessary call of GetMemberDetails by CanBookBeRenewed

C4::Circulation::CanBookBeRenewed called C4::Members::GetMemberDetails to
retrieve categorycode and branchcode.

- categorycode is used to retrieve the issuing rule
- the borrower information is passed to
  C4::Circulation::_GetCircControlBranch. Which only uses the branchcode
  parameter.

GetMemberDetails does a lot of calls/queries (patronflags,
account, etc.) that are not needed by CanBookBeRenewed.

This patch replaces it with a call to C4::Members::GetMember.

Note: I presented this small optimisation during a quick introduction to
NYTProf (hackfest 14 in Marseille).

Test plan:
- launch member unit tests
- check the code

Checking the code resulted in the following:
CanBookBeRenewed builds a hash reference from the borrowernumber
(2482). Note it is only used in this function and not passed in.

_GetCircControlBranch (2485) requires that hashreference to
have a branchcode key. As stated above.

The following line (2486) requires it have a categorycode key.

As such, C4::Members::GetMemberDetails is confirmed to be
overkill, and C4::Members::GetMember is sufficient.

Testing Done
------------
0) Back up DB
1) Make sure MPL is in the list of libraries.
2) Apply the patch.
3) run the koha qa test tool
4) prove -v t/db_dependent/Circulation.t

Patch applies cleanly. QA Test tool was all OK. All tests ran successfully.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9132f9befb36f32fc35a511c3829c224b42893bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11441: (follow-up) improve utility help text
Galen Charlton [Fri, 11 Apr 2014 15:25:41 +0000 (15:25 +0000)]
Bug 11441: (follow-up) improve utility help text

This patch expands and reformats the help text displayed
when running remove_unused_authorities.pl -h.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f4633cc5e51e8859f93be397eaee1370afc54099)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11441: enhance remove_unused_authorities.pl ability to select records
Juan Romay Sieira [Tue, 21 Jan 2014 11:46:09 +0000 (12:46 +0100)]
Bug 11441: enhance remove_unused_authorities.pl ability to select records

remove_unused_authorities.pl previously required that --aut be supplied
to specify one or more authority types to check for unlinked authority
records.  If --aut was omitted, it would default to search for
records of authority type NC, which is not present in many (or any?)
Koha databases.

Now, if --aut is omitted, unlinked authority records of any type
are removed.

To test it:
Parse only PERSO_NAME authorities:
misc/migration_tools/remove_unused_authorities.pl -aut PERSO_NAME

Parse all authorities:
misc/migration_tools/remove_unused_authorities.pl

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0f6652d62bd9053c87de5b94eb6a35f68a3af4bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11995: restore ability of serialsUpdate.pl to calculate next serial issue dates
Jonathan Druart [Mon, 24 Mar 2014 14:25:05 +0000 (15:25 +0100)]
Bug 11995: restore ability of serialsUpdate.pl to calculate next serial issue dates

Bug 7688 changed the prototype for GetNextDate, but the serialsUpdate.pl
cronjob script had not been updated.  This patch fixes the problem.

Test plan:
Before applying the patch:
1/ Check that the following SQL query returns something:
SELECT serial.*
FROM serial
LEFT JOIN subscription ON (subscription.subscriptionid = serial.subscriptionid)
WHERE serial.status = 1
AND DATE_ADD(planneddate, INTERVAL CAST(graceperiod AS SIGNED) DAY) < NOW()
AND subscription.closed = 0;
2/ Run misc/cronjobs/serialsUpdate.pl -v
   It should die with an error message like this:
   Can't use string ("2011-03-05") as a HASH ref while "strict refs" in use
3/ Apply the patch
4/ Run misc/cronjobs/serialsUpdate.pl -v
   It should exit normally and print messages like this:
   Serial issue with id=XX updated
5/ Run the Koha QA test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f71283bad5517757ee6b670c0edb5257d0a1bedc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 7267: Add account number to German PDF template
Katrin Fischer [Thu, 27 Feb 2014 09:16:21 +0000 (10:16 +0100)]
Bug 7267: Add account number to German PDF template

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pagesde
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
  vendor details

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ae030272a4f30104adefe9d6164eb99a0f4d8f73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 7267: Add account number to English PDF templates
Katrin Fischer [Thu, 27 Feb 2014 09:13:33 +0000 (10:13 +0100)]
Bug 7267: Add account number to English PDF templates

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pages
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
  vendor details
- Repeat with pdfformat::layout3pages

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 62151ced35329f94e4508b4973521464d48307c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 7267: Add account number to French PDF template
Katrin Fischer [Thu, 27 Feb 2014 09:17:44 +0000 (10:17 +0100)]
Bug 7267: Add account number to French PDF template

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout3pagesfr
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
  vendor details

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a4841aae08cf60b4fcf628eee991738e2232cc80)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11828: (follow-up) add new option to OrderPdfFormat
Katrin Fischer [Sat, 1 Mar 2014 08:33:27 +0000 (09:33 +0100)]
Bug 11828: (follow-up) add new option to OrderPdfFormat

To test:
- Check appearance of the OrderPdfFormat system preference
  It will offer a pull down with options, including
  "German 2-page"

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6372689f5dc7f0e9d34ffef3ad0c2a1ab6d6fb58)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11828: Add German translation of layout2pages PDF template
Katrin Fischer [Wed, 26 Feb 2014 16:50:10 +0000 (17:50 +0100)]
Bug 11828: Add German translation of layout2pages PDF template

To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pagesde
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check everything is translated into German and the formatting/layout
  looks ok

Followed test plan and compared English with German printout.
German version is OK.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ffeb666994327b97e26bc372fd574d05a40e8336)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11885: (follow-up) add a CSS class to set subfield code bold
Jonathan Druart [Fri, 11 Apr 2014 08:32:37 +0000 (10:32 +0200)]
Bug 11885: (follow-up) add a CSS class to set subfield code bold

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit eab5480614edf9cc5895bc076d4e31dc77c1fe40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11885: (follow-up) remove tabs
Bernardo Gonzalez Kriegel [Wed, 9 Apr 2014 11:43:23 +0000 (08:43 -0300)]
Bug 11885: (follow-up) remove tabs

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 35142704d0a9831b6d4560cdf98a1bc9481414e9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11885: (follow-up) make default styling consistent with previous look
Mark Tompsett [Thu, 3 Apr 2014 00:22:44 +0000 (20:22 -0400)]
Bug 11885: (follow-up) make default styling consistent with previous look

Jonathan Druart raised the following three issues:
1/ subtags was bold before patch
2/ 1 dash existed between tag and tag name
3/ A space has been added ("606 #1 - Sujet nom commun"
    becomes "606 # 1 Sujet nom commun",  "101 ## - Langue"
    becomes "101 # # Langue")

This patch addresses them in the following way:
1/ You will note that @ was not bold on the 0 tab.
   Every other tab were bold. By making the similar template
   into a procedure based on the 0XX tab, bolding was lost.
   This patch bolds all subtags including the @, so that
   the visible change is minimized.
2/ The dash was programmatically added in at the code stage
   previously. This bug fix splits the the single concatenation
   mess into parts which can be styled. This puts the dash back
   into the template. However, it should be noted that the
   spacing for the 0 tab's tag and tag description will have an
   extra space after the hypen that was lacking before.
3/ <span>...</span><span>...</span> is different than
   <span>...</span>
   <span>...</span>
   The later puts that extra space. This patch fixes that.

See comment 1 for the test plan.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described.
Small koha-qa errors fixed in followup

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 377dbfc73fb2a06b8a0d50731e2c8ba14968d68e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11885: fix inconsistent HTML in MARC Details
Pasi Kallinen [Tue, 4 Mar 2014 06:57:11 +0000 (08:57 +0200)]
Bug 11885: fix inconsistent HTML in MARC Details

In Catalog > MARC Details, the HTML in the different tabs is slightly
inconsistent and doesn't differentiate different elements, making CSS
styling complicated or impossible:

* tab 0 has <p class="subfield_line"> whereas all the other tabs
  have just <p>

* all other tabs wrap the subfield character in <b> tags, except
  for tab 0

* the MARC tag title is a single div with the tag, the indicators
  and the field description.

Attached patch folds all the tab outputs into a single TT BLOCK,
which is then reused. It also marks the separate parts of the tag
title in their own spans.

The output should be nearly identical to previous behaviour, minus
a dash from the tag title descriptions - it was used to separate
the tag from the description. The description can now be styled
separately from the tag itself, so the dash can be added with CSS,
if necessary.

Revised test:
1) Find a biblio
2) Edit the record so that there is something in every tab (0-9).
3) Save and then click 'MARC' in the left pane to view the
    MARC details.
4) Note the contents of each tab.
5) Apply patch
6) Compare the MARC details output to what was noted. Should
   be the same, minus a dash in each of the tag title descriptions.

Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0ea17a6a7689e7fb3d60ebb72cac72eefb142d8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11951: fix OPAC search suggestions template error
Owen Leonard [Mon, 17 Mar 2014 13:34:03 +0000 (09:34 -0400)]
Bug 11951: fix OPAC search suggestions template error

If you have search suggestions enabled in the OPAC and click the "Check
for suggestions" link before it is replaced with the JS-rendered output
you will get a template error. This patch corrects it.

To test you must have the bootstrap theme enabled and at least one
OPAC plugin enabled in Administration -> Did you mean?

- Perform a search in the OPAC.
- Look for a box which says "Not what you expected? Check for
  suggestions"
- Click the "Check for suggestions" link before it disappears. If
  necessary disable JavaScript in your browser so that the link doesn't
  disappear.
- The search suggestions page should render without errors.

Signed-off-by: A. Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The non-Javascript fallback link now works correctly.
Passes tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c38cf38c973159af2d03c6956d7aede8aebb20d5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11184: correct attribute cloning for the patron editor
Srdjan [Fri, 1 Nov 2013 08:24:11 +0000 (21:24 +1300)]
Bug 11184: correct attribute cloning for the patron editor

This patch fixes Perl warnings logged when setting up the
patron attribute form in the patron editor.

To test - Patron details entry page:
* Have  ExtendedPatronAttributes enabled. Check that "Additional
  attributes and identifiers" section behaves.
* Verify that editing and saving a patron record does not
  result in the following sorts of entries in the Apache log:

  se of uninitialized value $_ in hash element at memberentry.pl line 798
  Use of uninitialized value in anonymous hash ({}) at memberentry.pl line 798

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with different types of patron attributes:
- repeatable
- linked to an authorized value
- free text
Tested editing, adding, removing one of multiple, adding multiple,
etc. No regressions found.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3334f03d779dc41bac3fe6e25a0d08733fc030ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10865: (Follow-up) Add CSS style for form hints
Owen Leonard [Wed, 9 Apr 2014 16:41:24 +0000 (12:41 -0400)]
Bug 10865: (Follow-up) Add CSS style for form hints

This patch adds a new "hint" class for displaying information relating
to a form field. On the list edit screen the hint also has an alert
class to highlight it.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Works as advertised.
Tested with Bootstrap and prog theme. Some notes:

- When OpacAllowPublicListCreation is turned off, the permissions
  don't show.
- When OpacAllowPublicListCreation is turned off, we could also hide
  the Category pull down in the [new list] pop up, as there is only
  Private left as an option.
- Maybe we should move the new list link outside of the tabs?
  When OpacAllowPublicListCreation is turned off, but public lists
  exist, the link 'new list' will still show on the public list tab,
  but a private list will be created.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9094b4a1bbff95e0f8e5747a805dacede165bc9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
koha-tmpl/opac-tmpl/bootstrap/css/opac.css

9 years agobug 10865: (follow-up) allow patrons to make their public lists private when OpacAllo...
Galen Charlton [Fri, 21 Feb 2014 20:44:24 +0000 (20:44 +0000)]
bug 10865: (follow-up) allow patrons to make their public lists private when OpacAllowPublicListCreation is off

This patch ensures that patrons continue to have the ability to make
their public lists private for any public lists they control that were
created before the library turned the OpacAllowPublicListCreation
system preference off.

To test:

[1] Ensure OpacAllowPublicListCreation is on.
[2] As a patron, create a public list in the OPAC.  Also, create
    a private list.
[3] Turn OpacAllowPublicListCreation off.
[4] Back in the OPAC, verify that the public list can be edited
    and that there are drop-downs for category and permissions.
    Also verify that there is a warning that the patron cannot
    change it back if they convert a public list to private.
[5] Edit the private list created in step 2.  Verify that the
    category and permissions drop-downs are not displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7dd0e9a41fd639e86ed32d98d863d605a6ba63e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10865: (follow-up) Move a li tag to avoid overlapping tags
Jonathan Druart [Wed, 12 Feb 2014 10:33:21 +0000 (11:33 +0100)]
Bug 10865: (follow-up) Move a li tag to avoid overlapping tags

With this patch, a li tag is empty (only using the bootstrap theme) if
the pref is disabled.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c8085cb9c38f60b1152f4cf86c7ffcc82d3e8106)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10865: Don't show list permissions when adding public lists/sharing lists is...
Owen Leonard [Fri, 13 Sep 2013 14:50:27 +0000 (10:50 -0400)]
Bug 10865: Don't show list permissions when adding public lists/sharing lists is not allowed

If patron creation of public lists is disallowed by the
OpacAllowPublicListCreation system preference the "category" option
should be hidden altogether instead of showing a <select> with "private"
as the only option. This patch hides category and permissions controls
when OpacAllowPublicListCreation is set to "don't allow."

To test you must have the virtualshelves system preference enabled.
Apply the patch and log into the OPAC. Test:

- With OpacAllowPublicListCreation enabled, create a new list. You
  should see options for setting category and permissions. Saving the
  new list should complete correctly and save the right settings.
- With OpacAllowPublicListCreation enabled, edit an existing list. You
  should see the same options and saving your changes should work
  correctly.
- With OpacAllowPublicListCreation disabled, create a new list. You
  should only see fields for title and sort. Saving this list should
  complete correctly and save the right settings.
- With OpacAllowPublicListCreation disabled, edit an existing list. You
  should be able to edit only title and sort settings. Saving your
  changes should work correctly.

Repeat your tests for both prog and bootstrap themes.

Revision: Existing public lists can be edited and retain their public
status even if OpacAllowPublicListCreation has since been disabled. This
preserves the behavior previous to this patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This patch fixes a big ergonomic issue.
Note: to me, the "New list" action should be outside the tabs.
It is confusing to have a "new list" into the public lists tab when it
is not possible to create new public lists.

Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9bb5238bcf55c1dabb3c1e41eee582df888ea80b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12056: fix untranslatable strings in calendar
Owen Leonard [Wed, 9 Apr 2014 13:08:27 +0000 (09:08 -0400)]
Bug 12056: fix untranslatable strings in calendar

In the calendar there are some strings in a JavaScript function which
are not properly wrapped in a function for translation. This patch
corrects this.

This patch also corrects some minor validation issues and spelling and
grammar issues, including those covered by Bug 12055.

To test, apply the patch and view the calendar in Tools -> Calendar.
When you hover your mouse over a day in the calendar you should see a
title tooltip indicating what kind of day/holiday it is and showing the
title of the holiday, if any.

To test that the strings are now being picked up for translation,
run translate update on a po file and confirm that the affected strings
are now present: "Weekly holiday," "Yearly holiday," etc.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. New strings on translation file. No koha-qa errors.

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0837954cdda85549f5552dacefd3a5bc3e58292e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 9865 (follow-up) give better usage examples in example SIPconfig.xml
Kyle M Hall [Fri, 10 Jan 2014 13:36:28 +0000 (08:36 -0500)]
Bug 9865 (follow-up) give better usage examples in example SIPconfig.xml

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7b295e9dd7a1f2a9b1d1cf1882edbc2a0e70fe3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 9865: make SIP msg encoding configurable via SIPconfig.xml
Adrien Saurat [Fri, 8 Nov 2013 10:49:56 +0000 (11:49 +0100)]
Bug 9865: make SIP msg encoding configurable via SIPconfig.xml

The accounts->login tag in SIPconfig.xml can now accept a new
parameter, "encoding". It will be mostly used to encode to utf8.

For this, simply add the parameter: encoding="utf8"

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Works as advertised, does nothing if encoding is not set.
Blows up all the machines that can't handled utf8 if it is set :) But
that's not Koha's fault. :)

Patch rebased by Christophe Croullebois  <christophe.croullebois@biblibre.com>

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
But now I did it the right way! And I can confirm that this patch solves
all issues with mangled characters in SIP messages. Confirmed that it
looks good with Norwegian characters in patron name and in book titles.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4a72f6b2375895c690dcaaaff26b07de53cfd518)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 8044: (follow-up) ensure Modern::Perl is imported first
Marcel de Rooy [Thu, 15 Aug 2013 13:19:32 +0000 (15:19 +0200)]
Bug 8044: (follow-up) ensure Modern::Perl is imported first

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fe32727fc55823ab1a3edba70597b89856cd0ea3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 8044: (follow-up) add copyright block and use Modern::Perl
Julian Maurice [Mon, 20 Aug 2012 11:51:27 +0000 (13:51 +0200)]
Bug 8044: (follow-up) add copyright block and use Modern::Perl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 061cff837d1667b0f714fbbfba59c2caed098d6b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 8044: (follow-up) fix warning and error messages in translate.pl
Julian Maurice [Mon, 20 Aug 2012 08:55:50 +0000 (10:55 +0200)]
Bug 8044: (follow-up) fix warning and error messages in translate.pl

CHARSET is now automatically replaced by UTF-8, and 'update' creates the
PO file if it does not exist.

Also do not try to create PO files if POT file creation failed (when
there is no messages to translate for example).

+ add some verbosity
+ add Locale::Maketext and Locale::Maketext::Lexicon to Koha
dependencies

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 75bd34df7acba7b20bc7981f2484e79e19032d4a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
C4/Installer/PerlDependencies.pm

9 years agoBug 8044: new module for translating strings in Perl source files
Julian Maurice [Fri, 4 May 2012 12:33:10 +0000 (14:33 +0200)]
Bug 8044: new module for translating strings in Perl source files

You have to use the new module Koha::I18N

Code example:
  use Koha::I18N;
  use CGI;

  my $input = new CGI;
  my $lh = Koha::I18N->get_handle_from_context($input, 'intranet');

  print $lh->maketext("Localized string!");

PO files are in misc/translator/po/LANG-messages.po.
Creation of PO files are integrated to existing workflow, so to create
PO file for a language, just run in misc/translator:
  ./translate create LANG
To update:
  ./translate update LANG
You can then translate the PO with your favorite editor. Strings will be
localized at runtime.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Some details needing further attention noted on bug
report.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 114f3dd49998be21643f83bec644f9837c6bdecc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 9075: Rename "type" to "material type" on OPAC XSLT detail and results
Marcel de Rooy [Fri, 4 Apr 2014 15:11:15 +0000 (17:11 +0200)]
Bug 9075: Rename "type" to "material type" on OPAC XSLT detail and results

The label Material type better describes what the icon presents.
It is based on leader values of the MARC record.

Revised Test Plan
-----------------
 1) In the staff client, set the OPAC system preference
     OPACXSLTDetailsDisplay to 'default' and save.
 2) In the staff client, set the OPAC system preference
     OPACXSLTResultsDisplay to 'default' and save.
 3) In the staff client, set the OPAC system preference
     opacthemes to 'bootstrap' and save.
 4) In the OPAC, search for biblio used in previous patch testing.
    -- It should display "Type:"
 6) Look at the biblio details
    -- It should also display "Type:"
 7) In the staff client, set the OPAC system preference
     opacthemes to 'prog' and save.
 8) In the OPAC, search for biblio used in previous patch testing.
    -- It should display "Type:"
 9) Look at the biblio details
    -- It should also display "Type:"
10) Apply the patch
11) In the staff client, set the OPAC system preference
     opacthemes to 'bootstrap' and save.
12) In the OPAC, search for biblio used in previous patch testing.
    -- It should display "Material type:" this time.
13) Look at the biblio details
    -- It should display "Material type:" this time.
14) In the staff client, set the OPAC system preference
     opacthemes to 'prog' and save.
15) In the OPAC, search for biblio used in previous patch testing.
    -- It should display "Material type:" this time.
16) Look at the biblio details
    -- It should display "Material type:" this time.
17) Run the koha qa test tool.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Note: Just a simple string change.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
String change, works as advertised in staff, prog and bootstrap
OPAC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 007c94ff20a5c9d9c3121849b42f820a0da5b869)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 9075: Rename "type" to "material type" on staff XSLT detail and results
Marcel de Rooy [Mon, 11 Apr 2011 09:46:44 +0000 (11:46 +0200)]
Bug 9075: Rename "type" to "material type" on staff XSLT detail and results

The label Material type better describes what the icon presents.
It is based on leader values of the MARC record.

Revised Test Plan
-----------------
1) Set the Staff system preference XSLTDetailsDisplay to
   'default' and save.
2) Set the Staff system preference XSLTResultsDisplay to
   'default' and save.
3) Click 'Search the catalog' tab in the search area.
4) Search for something
5) Look for a biblio that has 942$c set to some type.
   -- It should display "Type:"
   Or take a result and modify it to have a 942$c.
6) Look at the biblio details
   -- It should also display "Type:"
7) Apply the patch
8) Search for the same biblio again.
   -- It should display "Material type:" this time.
9) Look at the biblio details
   -- It should display "Material type:" this time.
10) Run the koha qa test tool.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Note: This is a simple string substitution.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4bdd8d9a69f72751f0429be5bc58afdd218a4bb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11734 - Use new DataTables include in batch modification templates
Owen Leonard [Mon, 10 Feb 2014 17:26:34 +0000 (12:26 -0500)]
Bug 11734 - Use new DataTables include in batch modification templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
batch modification and batch deletion pages.

Minor text changes: Corrected capitalization.

Apply the patch and test the following:

- On batch modification and batch deletion, submit multiple barcodes or
  item numbers. On the results page the title column has been configured
  to use the "anti-the" filter to exclude articles from sorting. Sorting
  on all columns should work correctly.

Edit: Put back checkboxes plugin which was accidentally removed.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7349f847fad28ada0eb98cd5ebb44d563d7ee0f7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11711 - Use new DataTables include in circ templates
Owen Leonard [Fri, 7 Feb 2014 19:06:50 +0000 (14:06 -0500)]
Bug 11711 - Use new DataTables include in circ templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
circ-related pages which use DataTables.

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

- Circulation
  - The UseTablesortForCirc system preference must be enabled.
  - Check out to a patron with existing checkouts. Choose a patron who
    is a guarantor to another patron with checkouts in order to test the
    relatives' checkouts table.
  - The checkouts and relatives' checkouts tables have been modified to
    exclude articles when sorting of titles.

- Hold ratios - The title column has been configured to exclude articles
  from sorting

- Transfer to receive

- Holds queue
  - The title column has been configured to exclude articles when
    sorting
  - The date column has been modified to use the title-string filter for
    sorting. An unformatted date is now passed from C4::HoldsQueue.pm to
    the template, where the KohaDates filter is used for formatting.
    Sorting is based on the unformatted date.

- Holds awaiting pickup
  - The "available since" column has been configured for sorting on an
    unformatted date. waitingreserves.pl now passes the unformatted
    date to the template, and formatting is done using the KohaDates
    filter.
  - The title column has been configured to exclude articles when
    sorting.

Edit: Rebased on current master following commit of Bug 11605
Signed-off-by: A. Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 612b33ae69adbed63e55c91f7314f6c2888f6d71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11219: (follow-up) fetch only URL parameters
Fridolin Somers [Thu, 10 Apr 2014 11:12:19 +0000 (13:12 +0200)]
Bug 11219: (follow-up) fetch only URL parameters

This followup corrects the fact that when using $query->url(), both
GET and POST params are get.
Using $query->url_param() will only get params directly in URL.

Test plan :
- Enable CAS
- Go to login page : cgi-bin/koha/opac-user.pl
- Try to connect with local login using random login and password
  (they will be transmitted by POST)
- You stay to login page
- Look at CAS login URL
=> Without this patch it will contain the random login and password
   as parameters of opac-user.pl
=> With this patch it does not contain any parameter

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b57d98517c5a9572a54412f7f4e5d872acfa85c3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11219: make CAS authentication work with URL parameters
Fridolyn SOMERS [Fri, 8 Nov 2013 10:12:57 +0000 (11:12 +0100)]
Bug 11219: make CAS authentication work with URL parameters

Bug 10029 tries to fix the use of URL parameters in CAS authentication.
But is does not work.
The full URL must be used in all methods of C4::Auth_with_cas.
Also, in checkpw_cas(), the 'ticket' parameter must be removed to find
the original URL.

This patch removes the 'ticket' parameter from query before calling
checkpw_cas() since the ticket is passed as method arguemnt.
In C4::Auth_with_cas, many methods use the same code to get the CAS
handler and the service URI. This patch adds a private method
_get_cas_and_service() to do the job.

Test plan:
- Enable CAS
- Go to opac without been logged-in
- Try to place hold on a record
=> You get to /cgi-bin/koha/opac-reserve.pl?biblionumber=XXX showing
   authentication page
=> Check that CAS link contains query param "biblionumber"
- Click on CAS link and log in
=> Check you return well logged-in to reserve page with biblionumber
   param
- Check CAS loggout
- Check Proxy CAS auth

Signed-off-by: Koha team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests in t, xt, and t/db_dependent/Auth.t.
Also passes QA script.

As I have no working CAS server, I focused on regression testing:
Activated Persona and casAuthentication.
- Verified normal login against database still works.
- Verified Persona login works.
  Note: With Persona you are always forwarded to the patron
  account - so you have to search for the record again before
  you can place a hold.
- Verified that the CAS URL contains the biblionumber when
  logging in while placing a hold.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Retested 2014-04-12

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c8a18f5eefd81dc07512faa962064effdfb88de9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12079: ensure that CheckReserves() includes reserve_id in its response
Galen Charlton [Mon, 14 Apr 2014 18:44:07 +0000 (18:44 +0000)]
Bug 12079: ensure that CheckReserves() includes reserve_id in its response

This patch modifies _Findgroupreserve so that its one caller,
CheckReserves(), would include the reserve_id field in the
hold request it returns.

Failure to include reserve_id in every circumstance resulted
in bug 11947.  This patch is therefore a complementary fix for
that bug, but is not meant to preempt the direct fix for
that bug.

To test:

[1] Verify that t/db_dependent/Reserves.t passes.
[2] Verify that the following test plan taken from
    the patch for bug 11947 works for this patch
    *without* applying the patch for 11947:

* have a few borrowers, say 4.
* have a biblio with a single item (you can scale this up, it should
  work just the same.)
* issue the item to borrower A
* have borrowers B, C, and D place a hold on the item
* return the item, acknowledge that it'll be put aside for B.
* view the holds on the item.

Without the patch:
* the hold priorities in the UI end up being "waiting, 2, 1" when they
  should be "waiting, 1, 2".
* in the database "reserves" table, they're really "0, 2, 3" when they
  should be "0, 1, 2".

With the patch:
* the hold priorities in the UI end up being "waiting, 1, 2"
* in the database, they're "0, 1, 2"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors. Test pass

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 695fdebdee802387f45505a1350120727d3e2f7f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11947 - renumber reserves when hold is confirmed
Robin Sheat [Mon, 17 Mar 2014 05:33:00 +0000 (18:33 +1300)]
Bug 11947 - renumber reserves when hold is confirmed

Currently when a reserve is moved to "waiting" status because it's
acknowledged on checkin, the reserve priorities aren't renumbered. This
causes things to go a bit haywire in the UI, in particular, some
reserves can unjustly end up with priority 1 when they shouldn't. It
also seemed to mess with the logic of who should get it next, but I
didn't look too closely at that.

This patch forces a renumbering so that all the priorities remain
copacetic.

Test plan:
* have a few borrowers, say 4.
* have a biblio with a single item (you can scale this up, it should
  work just the same.)
* issue the item to borrower A
* have borrowers B, C, and D place a hold on the item
* return the item, acknowledge that it'll be put aside for B.
* view the holds on the item.
Without the patch:
* the hold priorities in the UI end up being "waiting, 2, 1" when they
  should be "waiting, 1, 2".
* in the database "reserves" table, they're really "0, 2, 3" when they
  should be "0, 1, 2".
With the patch:
* the hold priorities in the UI end up being "waiting, 1, 2"
* in the database, they're "0, 1, 2"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan confirms that the problem exists and that the patch corrects
it.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, especially t/db_dependent/Reserves.t.
Improves priority calculation.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 95056d17b715b74e3f7149d60e12d5a365d70eeb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12071: improve generation of Z39.50 search links
Fridolin Somers [Fri, 11 Apr 2014 08:54:57 +0000 (10:54 +0200)]
Bug 12071: improve generation of Z39.50 search links

This patch fixes two problems with the generation of
links to execute a Z39.50 search from the staff client
catalog and cataloguing search results page.

First, if using URI::Escape 3.30 or earlier, performing a simple search
with a double quote (e.g., "histoire algerie"), the Javascript is broken
in results page because of :

function GetZ3950Terms(){
  var strQuery="&frameworkcode=";
  strQuery += "&" + "title" + "=" + ""histoire%20algerie"";

Second, the encoding of non-ASCII characters in the search
term was broken.

This patch moves URI escaping from Perl to template with uri TT filter.

Test plan :
- To reproduce the issue with double quotes, the server
  must be running URI::Escape 3.30 or earlier; the current
  version of URI::Escape properly escapes double quote.
- In staff interface, perform a search with double quotes
  that will return no result, ie "aaa xxx"
=> Without patch, javascript is broken
=> With patch, javascript is not broken
- Click on Z3950 button on results page
=> Without patch, the Title input is empty
=> With patch, the Title input contains the search terms

Additional test:
Do a search with something like äöü and then click Z3950
button on results page.
Without patch, encoding is broken in Z3950 form
With patch, encoding is correct.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed a few tabs. Passes tests and QA script.
I can't reproduce the Javascript problem, but I can reproduce
the Z39.50 encoding problem and can detect no regression.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 064d5478d31b05442e19b7d57f0af94d3422731e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoIncrement version for 3.14.9 release v3.14.09
Fridolin Somers [Fri, 25 Jul 2014 12:54:32 +0000 (14:54 +0200)]
Increment version for 3.14.9 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoMerge remote-tracking branch 'translator/3.14.09-translate' into 3.14.x
Fridolin Somers [Fri, 25 Jul 2014 12:41:52 +0000 (14:41 +0200)]
Merge remote-tracking branch 'translator/3.14.09-translate' into 3.14.x

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoUpdate release notes for 3.14.9 release
Fridolin Somers [Fri, 25 Jul 2014 12:37:54 +0000 (14:37 +0200)]
Update release notes for 3.14.9 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11226: subscription frequencies and numbering patterns should be editable with...
Jonathan Druart [Wed, 9 Jul 2014 07:49:19 +0000 (09:49 +0200)]
Bug 11226: subscription frequencies and numbering patterns should be editable with serials permissions

 Bug 7688 does now allow patrons with serials permissions to edit
 subscription frequencies/numbering patterns.

 Test plan:
 Try to access to serials/subscription-frequencies.pl and
 serials/subscription-numberpatterns.pl with the "serials" permissions.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
With patch and only serial permissions can now access
frequences and patterns.
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit dac26290b0feb08277a7d4bb7929559dfe7b36c4)

9 years agoBug 12060: remove extraneous tags from header.inc
Mark Tompsett [Wed, 9 Apr 2014 18:34:21 +0000 (14:34 -0400)]
Bug 12060: remove extraneous tags from header.inc

By correcting the indentation, it became more apparent the two
markup errors (stray </li> and </div> tags) that were generated
by pasting the page source of
   PROTOCOL://STAFFCLIENT/cgi-bin/koha/tools/holidays.pl
into http://validator.w3.org/check

TEST PLAN
---------
1) Home -> Tools -> Calendar in the staff client
2) In another tab open http://validator.w3.org/check
3) Select Validate by Direct Input
4) In the staff client, view the page source
5) Copy the page source to the Validation text box in the
    other tab.
6) Click the 'Check' button.
   -- There will be 3 errors.
7) Apply the patch.
8) Refresh the staff client page.
9) Copy the revised page source into the validation text box.
10) click the 'Check' button.
    -- There will be 1 error.
11) Run the koha qa test tool.

NOTE: This error is not in the intended file to fix.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
git diff --color -w HEAD^ reveals, that only a </li> and a </div>
are removed by this patch, all other changes are whitespace.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7382bee7cdcf289487dd8770add5412b7d44d11e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11855: remove unused template file
Jonathan Druart [Tue, 18 Mar 2014 15:01:07 +0000 (16:01 +0100)]
Bug 11855: remove unused template file

members/search.tt is not in use anymore.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f08153775f3ed210b219a3498395fa98a481d820)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11855: Tiny code cleanup in members
Marcel de Rooy [Thu, 27 Feb 2014 08:12:25 +0000 (09:12 +0100)]
Bug 11855: Tiny code cleanup in members

[1] Template variable actionname is not used in the associated
template. This could be a copy-paste from serials/member-search.pl.
Consequently, the module is no longer needed in member.pl. Template
members/search.tt still contains actionname; it seems that this
emplate is not used too.

[2] $template_name not used in members-home.pl.

Test plan:
[1] Go to Patrons. If you reach that page, you tested members-home.pl
[2] Add a new patron.
[3] Search for a patron. Edit one.

Followed test plan. No problems found.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fad3d646ff9f9ef3b9808e245f7d8b4077e63fa5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11978 - Fix URLs displayed in OverDrive search
Jesse Weaver [Thu, 20 Mar 2014 17:20:40 +0000 (11:20 -0600)]
Bug 11978 - Fix URLs displayed in OverDrive search

OverDrive has recently changed its APIs to include "http://" in the URLs
it returns. This patch removes the "http://" on the Koha end so they
aren't doubled.

Test plan:
  1. Run an OverDrive search on the OPAC.
  2. Check the links, they should start with "http://http://"
  3. Apply this patch.
  4. Rerun the search, the links should now be correct.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I can reproduce the problem and confirm that this patch fixes it.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch removes hardcoded http:// from URLs in the Overdrive code.
Trusting Jesse and Owen to have tested this with Overdrive,
code review reveals no additional changes or possible problems.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ea5040bad2d3d0d298a9b27a95b81e2a3d7a9ad0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoTranslation updates for 3.14.09 release
Bernardo Gonzalez Kriegel [Tue, 22 Jul 2014 21:48:53 +0000 (18:48 -0300)]
Translation updates for 3.14.09 release

9 years agoBug 4068: (follow-up) use URI::Escape
Galen Charlton [Thu, 8 May 2014 16:36:10 +0000 (16:36 +0000)]
Bug 4068: (follow-up) use URI::Escape

This allows for suggestions that contain characters such
as the ampersand to have their status changed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fb8d47bedac13944d8efd6eec8286c3eff574782)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 4068: ensure accepting a suggestion does not hide the 'pending' tab
Kyle M Hall [Tue, 6 May 2014 12:49:15 +0000 (08:49 -0400)]
Bug 4068: ensure accepting a suggestion does not hide the 'pending' tab

Prior to this patch:

1) Moving a suggestion from status 'pending' to 'accepted
   - After saving only tab 'accepted' is shown.
2) Moving a suggestion back from 'accepted' to 'pending'
   - After saving only tab 'pending' is shown.

Test Plan:
1) Verify the bug by taking the actions listed above
2) Apply this patch
3) Verify the bug no longer exists

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It is not very elegant but I have nothing else to suggest.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 769f18a6a95b3757cb830b0765d93149d03a6495)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12295: fix Javascript error when merging authorities
Kyle M Hall [Tue, 20 May 2014 18:58:32 +0000 (14:58 -0400)]
Bug 12295: fix Javascript error when merging authorities

Attempting to merge authorities results in the following error:
Uncaught SyntaxError: Unexpected token u authorities-home.pl:284
    showMergingInProgress authorities-home.pl:284
    (anonymous function) authorities-home.pl:297
    o jquery.js:2
    p.fireWith jquery.js:2
    e.extend.ready jquery.js:2
    c.addEventListener.B

This was the result of the upgrade of jquery-cookie by the patch
for bug 11369; newer versions of jquery-cookie changed the return of
$.cookie('foo') from null to undefined when the cookie is not present.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No test plan, no errors.

Test
1. search some authorities
2. click merge, on browser dev console pops reported error message
'Unexpected token u authorities-home.pl...'
No way to marge auths
3. with pach applied, merging works again

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1857c444cc6666331eae34e9a99fa1eaa3f1c760)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoRevert "Bug 12438 - Bad encoding in acquisition basket"
Fridolin Somers [Tue, 22 Jul 2014 07:59:58 +0000 (09:59 +0200)]
Revert "Bug 12438 - Bad encoding in acquisition basket"

This reverts commit 8f4fbba79b6a64eeed03e4780bcebbf264a69c9d.

9 years agoBug 12438 - Bad encoding in acquisition basket
Fridolin Somers [Tue, 17 Jun 2014 14:38:54 +0000 (16:38 +0200)]
Bug 12438 - Bad encoding in acquisition basket

We noticed a bad encoding (diacritics replaced by <?>) in acquisition basket when updating a server to Debian Wheezy.
We found it comes from a query containing biblio.title twice.
Maybe the mysql newer version creates this side-effect.

Test plan :
- Create an order on a record containing a diacritic in title
- Look at the basket : cgi-bin/koha/acqui/basket.pl?basketno=x
=> Without the patch the record title is bad encoded (with <?>)
=> With this patch the record title is well encoded
- Check also basket CSV export

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch!
Works as expected, passes tests and QA script.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Duplicated biblio.title is a (minor) bug, and should be removed.

The side-effect of it solving an encoding problem might be seen
as problematic: it hides a real problem.
The efforts on 11944 actually solve this encoding problem (11944
merged into master actually fixes this), so I'm pushing it, for
a short term solution for stable, with the hope that we will soon
have 11944 pushed.
BTW, non-diacritic but non-ASCII characters are not broken either.

(cherry picked from commit 9fe36e0c705b958859babe565517554b722c66cd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10951: (follow-up) add support for NoLoginInstructions to Bootstrap theme
Galen Charlton [Sat, 19 Apr 2014 17:05:12 +0000 (17:05 +0000)]
Bug 10951: (follow-up) add support for NoLoginInstructions to Bootstrap theme

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3ba6d35c8999d7133e7f5519ff3128af56a6686c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10951: (follow-up) tweak description of the NoLoginInstructions system preferences
Galen Charlton [Sat, 19 Apr 2014 16:54:43 +0000 (16:54 +0000)]
Bug 10951: (follow-up) tweak description of the NoLoginInstructions system preferences

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bebe165266a1babc955cc2f0c3d2defe657ac9db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref

9 years agoBug 10951: (follow-up) use Koha.Preference() template function
Galen Charlton [Sat, 19 Apr 2014 16:53:26 +0000 (16:53 +0000)]
Bug 10951: (follow-up) use Koha.Preference() template function

This patch uses the TT helper function Koha.Preference() to
retrieve the value of NoLoginInstructions rather than passing
it to all templates as a template variable.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 08fe85950ae38a4faa5f0adce5e7d308a766117a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10951: DBrev 3.14.08.001
Fridolin Somers [Fri, 11 Jul 2014 07:09:55 +0000 (09:09 +0200)]
Bug 10951: DBrev 3.14.08.001

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10951: The new pref NoLoginInstructions should be empty by default.
Jonathan Druart [Mon, 4 Nov 2013 14:19:27 +0000 (15:19 +0100)]
Bug 10951: The new pref NoLoginInstructions should be empty by default.

We don't want to display an English message by default for everybody.
The default message is in the template, so the pref should be empty.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
(cherry picked from commit 71f0d1639784aab68013ef3d052852f7c605cc66)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10951 - Tweaked opac-auth.tt sentence.
blou [Mon, 7 Oct 2013 15:01:05 +0000 (11:01 -0400)]
Bug 10951 - Tweaked opac-auth.tt sentence.

The change was causing issue with the next sentence. Adjusted
the start (uppercase) and ending (dot) on self-registration
invitation.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
(cherry picked from commit ffacd90e0efb334be657e222b1f98fad584d09ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 10951 - Adding NoLoginInstructions to system preferences
blou [Fri, 4 Oct 2013 17:25:33 +0000 (13:25 -0400)]
Bug 10951 - Adding NoLoginInstructions to system preferences

     On a failed login, the default message is harcorded into opac-auth.tt.

     It would be preferable to allow for a preference to override that message (for example: ...Please bring an ID to t
     The changes modify
         -opac-auth.tt to allow for custom value
         -admin/preferences/opac.pref to add it to the preferences with a description
         -C4/Auth.pm for the loading of the preference
         -sysprefs.sql
         -updatedatabase.pl

     TESTING
         1) in OPAC, logged out, try login in by entering no or wrong credentials.  Acknowledge the "Don't have a p
         2) Apply the patch
         3) Regression Test: Redo step 1.  Same (default) message should appear.
         4) Log in to intranet,
             - select NoLoginInstructions in system preferences.
             - Enter new (xml) message.  Possible:
             <h5>Welcome to Koha, please bring your passport to the front office</h5>
            - and save
         5) refresh the OPAC, try login again with invalid credentials.  The new message should appear.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
(cherry picked from commit c67b397236d63cc2b94306aa1620023bf7193198)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref

9 years agoBug 10818: improve display and translatability of sysprefs OAI-PMH:ConfFile's description
Bernardo Gonzalez Kriegel [Sat, 22 Mar 2014 15:02:12 +0000 (12:02 -0300)]
Bug 10818: improve display and translatability of sysprefs OAI-PMH:ConfFile's description

This patch correct english display for OAI-PMH:ConfFile syspref,
and makes it's strings translatable

To test:
1) On Administration > System preferences > Web Services
OAI-PMH:ConfFile syspref doesn't have description before
file box. Text after that box is not translated.
2) Choose your prefered language, xx-YY, update po files
cd misc/translator
perl translate update xx-YY
3) Look into xx-YY-pref.po for any occurence of "YAML", there is none
4) Apply the patch
5) Update po files again
6) Look into xx-YY-pref.po, now there are 2 entries
7) Also reload page from 1) and check for text before
file box.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works for me as described, only changes YAML pref file.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 15b4f9bbe990224067aea8ac9ddfd02d524c84ad)

9 years agoBug 12034: standardize alerts referring to lists and list items
Owen Leonard [Thu, 3 Apr 2014 12:38:08 +0000 (08:38 -0400)]
Bug 12034: standardize alerts referring to lists and list items

The staff client lists template contains a warning which differs from
the same warning in the OPAC. The OPAC version is correct because it
refers to a list rather than a shelf. This patch copies the OPAC version
to the staff client template.

This patch also corrects a few of other instances where the incorrect
term "shelf" is used.

To test, apply the patch and view a list in the staff client which is
populated with items. Check the box next to one or more items on the
list and click the "Remove selected" button. You should see the message,
"Are you sure you want to remove these items from the list?"

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0f7b89633ed9e5be611a4d6c981bf3065670ba1a)

9 years agoBug 11786: Improve RDFa structured data schema.org mappings
Dan Scott [Tue, 18 Feb 2014 18:29:35 +0000 (13:29 -0500)]
Bug 11786: Improve RDFa structured data schema.org mappings

This patch updates both the prog and bootstrap themes to provide better
schema.org mappings for catalogue elements in the following ways:

* More granular author attributes (one "author" property per author in records
  with multiple contributors; wrap in a Person or Organization type instead of
  using a simple literal value)
* Use "byArtist" instead of "author" for music recordings to respect schema.org
  preferences
* Use alternateName instead of alternativeHeadline, as the former is a better
  parallel to the "name" property

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Only covers MARC21, but that is no reason not to move it forward

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests. Looked at the source code of a few records in both
prog and bootstrap and took a look at the properties using
http://www.google.com/webmasters/tools/richsnippets.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3bc1021deb851db8965e9ac3a8ff89aba71f6acc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11671 - Restructure patron lists add form for improved usability
Owen Leonard [Mon, 3 Feb 2014 18:59:34 +0000 (13:59 -0500)]
Bug 11671 - Restructure patron lists add form for improved usability

Non-standard interface features have the potential to cause confusion.
This patch brings various aspects of the patron lists add page into
conformity with other staff client pages.

- Add "select all/clear all" links for the checkboxes
- Add a "remove selected" to the top of the table (see also Lists)
- Split functionality of add from from delete form
- Hide "Add patrons" button until at least one patron has been selected
- Remove non-standard trash can icon from table's checkbox column
- Exclude checkbox column from table sorting
- Add confirmation to deletion actions
- Improve breadcrumb specificity
- Add title-string sorting to date column to accommodate sorting for all
  date format types

To test, apply the patch and create a patron list.

1. Search for and select patrons for the list. Selecting a patron should
   trigger the display of an "Add patrons" button.
2. Click "Add patrons" and confirm that the add process completes
   correctly.
3. Search for and select a patron and also check the box next to an
   existing patron. Click "Add patrons" and confirm that no patron is
   removed.
4. Check that the "select all" and "clear all" links work correctly.
5. Select patrons on the list and click the "Remove selected" link. You
   should be prompted to confirm your choice.
   4.a. Click cancel and confirm that the deletion process aborts.
   4.b. Click OK and confirm that the deletion process completes.
6. Repeat step 4 with the "Remove selected patrons" at the bottom of the
   page.
7. Confirm that the page title and breadcrumbs correctly show the list
   name.
8. Switch between us and metric dateformat settings and confirm that
   table sorting by date is correct in both cases.

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no regressions found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 1b0dd7eedebc91fa7178d0d4e0768ebc64b41fd2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11738: Use new DataTables include in batch patron modification template
Owen Leonard [Mon, 10 Feb 2014 19:51:27 +0000 (14:51 -0500)]
Bug 11738: Use new DataTables include in batch patron modification template

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to the
batch patron modification template.

This patch modifies the template so that date columns are sorted using
the "title-string" filter, based on the unformatted date. The DataTables
configuration has also been modified to account for varying structure
based on the page state.

Other minor edits: Corrected capitalization.

To test, go Tools -> Batch patron modification and submit a list of
patrons for modification. The resulting page should be correctly sorted.
Date columns should sort correctly for all dateformat system pref
settings.

Test with extended patron attributes enabled. Test adding and removing
varying numbers of attributes to patrons in your batch.

Submit a change to multiple borrowers. The results page should also be
sorted correctly.

Revision: Corrected error caused by the variable number of columns in
the table corresponding to varying numbers of patron attributes.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ac82cbb3dc79b00f2a73bfce1b8a57c2f8e9e202)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12292: ensure that patrons are not displayed as restricted even when the last...
Jonathan Druart [Tue, 20 May 2014 14:07:17 +0000 (16:07 +0200)]
Bug 12292: ensure that patrons are not displayed as restricted even when the last restriction has expired

This is the same issue as bug 12134, but for the patron deatils page.

Test Plan:
1) Add a manual restriction to a patron and wait until the
   expiration date of the restriction has passed.  This can be
   simulated by modifying borrowers.debarred for a borrower and
   setting the date in the past.
2) Go on the detail page for a patron (members/moremember.pl)
3) Note the warning message
    "Patron is restricted until XX/XX/XXXX View restrictions"
4) Apply this patch
5) Repeat step 2
6) Note the warning message does not appear anymore

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no errors.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a672240a7575d25c554cbbf003abee00aa3f7e89)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11495: Make "Select titles to: " translatable
Katrin Fischer [Sat, 11 Jan 2014 14:54:44 +0000 (15:54 +0100)]
Bug 11495: Make "Select titles to: " translatable

Fixes translation of "Select titles to: " on the Bootstrap
OPAC result page.

Test plan:
- Update one of the po files running:
  perl translate update <langcode>
- Verify that "Select titles to: " is only listed once for
  search-results.tt
Apply patch
- Verify addings titles to lists and cart from the result list
  still works as expected
- Rerun the po file update
- Verify the string is now listed twice for search-results.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 133746136cb1c8b2f2ab1d1c08650369ca4b9ee8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 12458 - Holidays calendar has wrong colors for weekly and yearly repeatable
Fridolin Somers [Fri, 20 Jun 2014 12:54:07 +0000 (14:54 +0200)]
Bug 12458 - Holidays calendar has wrong colors for weekly and yearly repeatable

In Tools / Calendar, the colors in the calendar for weekly and yearly repeatable are different from the color of the "Key" legend.

This patch sets the colors used in the "Key" legend to the cells if calendar.

Test plan :
- Go to Tools/Calendar
- Add a weekly repeatable holiday
- Check its color in calendar is the same as the text "Holiday repeating weekly"
=> Without this patch, it's green instead of yellow
- Add a yearly repeatable holiday
- Check its color in calendar is the same as the text "Holiday repeating yearly"
=> Without this patch, it's yellow instead of orange
- Check the color of others holydays types are OK

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
I'd like to see today's date a clearly different color from the
weekly repeated holiday, because now they're close in color.
But this patch does exactly what it says and should so I'm signing
off.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Legend, headings and calendar colors now match.
No problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2e18152e39198e92cf7411851598760490fb4803)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoIncrement version for 3.14.8 release v3.14.08
Fridolin Somers [Thu, 26 Jun 2014 12:52:12 +0000 (14:52 +0200)]
Increment version for 3.14.8 release

9 years agoMerge remote-tracking branch 'translator/3.14.08-translate' into 3.14.x
Fridolin Somers [Thu, 26 Jun 2014 12:50:14 +0000 (14:50 +0200)]
Merge remote-tracking branch 'translator/3.14.08-translate' into 3.14.x

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoUpdate release notes for 3.14.8 release
Fridolin Somers [Thu, 26 Jun 2014 12:49:37 +0000 (14:49 +0200)]
Update release notes for 3.14.8 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11715: Update POD for get_template_and_user
Jonathan Druart [Fri, 2 May 2014 10:06:30 +0000 (12:06 +0200)]
Bug 11715: Update POD for get_template_and_user

If flagsrequired is set, authnotrequired should be 0.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 7b161b5bbe09d80197906aa049080607852066d9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11715: require authentication for various staff scripts
Galen Charlton [Tue, 29 Apr 2014 17:04:02 +0000 (17:04 +0000)]
Bug 11715: require authentication for various staff scripts

To test:

[1] Verify that item record creating and editing during the
    acquisitions process continues to work.
[2] Verify that calling  services/itemrecorddisplay.pl without
    a valid user session fails.
[3] Verify that authentication is required for making a new
    order from a suggestion, transferring an order, doing a
    Z39.50 search from acquisitions, displaying the record
    card view in the staff interface, and running the till
    reconciliation report (/cgi-bin/koha/reports/stats.screen.pl)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified all changed scripts are not accessible witout a valid
user session, but are with one.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit effb64f7f2e48f5cf87e39699bd93c5448160da5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11715 : require authentication for the cataloging authorities Z39.50 search
Chris Cormack [Sun, 16 Mar 2014 20:15:05 +0000 (09:15 +1300)]
Bug 11715 : require authentication for the cataloging authorities Z39.50 search

To test:
1/ go to /cgi-bin/koha/cataloguing/z3950_auth_search.pl when you are not
logged in, notice no log in is enforced
2/ Apply patch
3/ go to /cgi-bin/koha/cataloguing/z3950_auth_search.pl notice you now
   need to login

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2b1ffd66bb88d13ac755ad1cb1aa7d86d70dc893)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11715: require authentication for the cataloging Z39.50 search
Chris Cormack [Mon, 10 Mar 2014 21:56:53 +0000 (10:56 +1300)]
Bug 11715: require authentication for the cataloging Z39.50 search

To test:
1/ go to /cgi-bin/koha/cataloguing/z3950_search.pl when you are not
logged in, notice no log in is enforced
2/ Apply patch
3/ go to /cgi-bin/koha/cataloguing/z3950_search.pl notice you now need
to login

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a9ab843118ab4c45734a21b156f8e940542ba0a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
9 years agoBug 11715: Set the default of authnotrequired = 0 in get_template_and_user
Chris Cormack [Mon, 10 Mar 2014 21:51:00 +0000 (10:51 +1300)]
Bug 11715: Set the default of authnotrequired = 0 in get_template_and_user

To test:

Verify that pages in the OPAC and staff interface display correctly.

Note that there are cases where 'authnotrequired' was not passed
at all to get_template_and_user, so there may be pages that start
requiring authentication.  Whether that is correct or not depends
on context.

Follow up patches are to remove all the unnessecary setting of this
value, so that the only places we set are when we do want
authnotrequired=1

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 0599c9b6e9a509c375d5d19e4a64653cbbf14f5e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
C4/Auth.pm

10 years agoTranslation updates for 3.14.08 release
Bernardo Gonzalez Kriegel [Mon, 23 Jun 2014 12:53:46 +0000 (09:53 -0300)]
Translation updates for 3.14.08 release

10 years agoBug 10790: fix misalignment in item type form when noItemTypeImages is off
Bernardo Gonzalez Kriegel [Thu, 20 Mar 2014 01:25:07 +0000 (22:25 -0300)]
Bug 10790: fix misalignment in item type form when noItemTypeImages is off

This patch fixes the odd behavior when noItemTypesImages is set
to 'Don't show'. Just a misplaced </div>

To test:

1) Set syspref noItemTypeImages to 'Don't show'
2) Go to Admininstration > Item types
3) Edit some item type, you will view a display
similar to the attached image
4) Apply the patch
5) Reload the page, now the display is fixed
6) Change syspref to 'Show' to check that
the display is also good

Also fixed a missing '/' on a closing select

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 04e4fc9751332f08ada8da7814652dcddbee72c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12094: fix default tab selection broken by jQueryUI upgrade
Owen Leonard [Wed, 16 Apr 2014 14:21:05 +0000 (10:21 -0400)]
Bug 12094: fix default tab selection broken by  jQueryUI upgrade

The recent upgrade to jQueryUI didn't take into account the new method
for forcing selection of a tab by adding a class to the tab markup. This
patch corrects this by updating the class name.

This patch also updates one instance where it was necessary to switch to
the new function for selecting a tab by ID, introduced by Bug 12075.

To test, view the following pages:

- Perform a catalog search in the staff client. On the search results
  page the "Search the catalog" tab should be selected.

- In Acquisitions, view the basket groups page for a vendor which has
  open and closed basket groups
  (/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=X). Append
  "&listclosed=1" to the URL. The "Closed" tab should be selected.

- In Administration -> Authorized values, modify an authorized value for
  which an icon has been selected. When the edit form loads the
  corresponding icon tab should be selected.

- In Administration -> Item types, modify an itemtype for which an icon
  has been selected. When the edit form loads the corresponding icon tab
  should be selected.

- In Cataloging, open an existing record and select any tab besides the
  first one. Choose "Save and continue editing" from the Save menu. When
  the page reloads you should be returned to the tab you selected
  before.

- In Suggestions, markup for selected the tab has been removed because
  it didn't appear to be performing any function. The first tab is
  selected by default. The template doesn't need to explicitly add a
  class to make it so.

- In Tools -> CSV profiles, choose an existing profile for editing. When
  the page loads the "Edit existing profile" tab should be selected.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: Unable to duplicate Cataloging step issue, but there is no
      visible regression with the patch. The second part of the
      addbiblio.tt portion of the patch is clearly correct,
      because it is the same type of change as made in the other
      sections.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8a124f8951c19388f3e3a08ada243f080b6b9373)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt

10 years agoBug 11570 - Upgrade jQueryUI to latest version in the staff client
Owen Leonard [Wed, 15 Jan 2014 19:51:11 +0000 (14:51 -0500)]
Bug 11570 - Upgrade jQueryUI to latest version in the staff client

This patch upgrades the version of jQueryUI included in the Koha staff
client from v1.8.23 to v.1.10.4. The upgrade introduces a few minor API
changes which require the updates in this patch:

- In CSS, the term "active" is used instead of "selected"
- Autocomplete functions use slightly changed parameters

Changes to the default jQueryUI CSS allows us to remove some instances
of "!important" from jQueryUI-related CSS in the staff client's main CSS
file.

To test:

Testing changes to autocomplete:

- Enable the CircAutocompl system preference. Try searching in the
  header's "Check out" tab. Autocomplete should look correct and
  function correctly.

- In Circulation -> Overdues: The patron attribute authorized value
  filter (must have patron attributes enabled, and a patron attribute
  defined which uses authorized values.

- Course reserves -> Course -> Edit: Searching for an instructor

- In the unimarc_field_210c_bis.pl plugin:
  1. Link the publisher name field in your MARC structure to
     the unimarc_field_210c_bis.pl plugin.
  2. Open a MARC record for editing and click the "tag editor" link to
     launch the plugin.
  3. Type the first few letters of a publisher which exists in your
     database. You should get an autocomplete menu of publishers
     which match your search.
  4. Select one and click the "choose" button to fill the field in the
     MARC editor.

- Tools -> Patron lists: Add a list or choose an existing list and add
  patrons. Perform a search for a patron.

- Placing a hold: After choose a title and clicking "Place hold,"
  search for a patron.

- Tags management: The sidebar filter for "reviewer" should let you
  search by patron name.

Other jQueryUI widget changes:

- Check tabs appearance in header search, biblio detail, cataloging, and
  circulation patron fines pages.

To confirm other jQueryUI widgets still function correctly:

- Check accordion (collapsing sections) in Patrons -> Patrons requesting
  modifications and the MARC subfield structure edit screen.

- Check datepickers, especially in Circulation with the added timepicker.
  Test a linked datepicker, for example in Reports -> Stats wizards ->
  Circulation where the value in one date field affects what dates are
  available in the matching field.

- Check the calendar interface in Tools -> Calendar

To confirm that the new jQueryUI default CSS is more flexible (fixing
Bug 11042), add the following CSS to your IntranetUserCSS system
preference and confirm that the header search active tab border color
changes (hash mark escaped so that it will appear in commit msg):

\#header_search ul.ui-tabs-nav li.ui-tabs-active {
  background-color: #FFFFF1;
  border: 1px solid #800000;
  border-top: 0 !important;
  top: -2px;
}

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit aa722ab694e1fc3141cda47f00f9b553e152265a)

10 years agoBug 11850: Add -append option to bulkmarcimport.pl to append to logfile
Matthias Meusburger [Wed, 26 Feb 2014 15:59:14 +0000 (16:59 +0100)]
Bug 11850: Add -append option to bulkmarcimport.pl to append to logfile

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Keeps current behaviour as default.
The -append option is described in the POD and works as expected.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.
Adding a date/time to the output might
be good, to make it easier to find the entry you were looking for.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5935654bacddfaba2b8019817d857f0f092cd20d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12024: fix add to list opening the list adding UI in two windows
Pasi Kallinen [Wed, 2 Apr 2014 11:30:03 +0000 (14:30 +0300)]
Bug 12024: fix add to list opening the list adding UI in two windows

In Item details, when using the menu toolbar for Add To > List,
the list adding UI opens in a popup window, and also in the original
window. The original window should stay showing the item details page.

This patch corrects this behavior, which has been observed in Chromium
on Ubuntu and Chrome on Windows.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works fixing problem. No koha-qa errors.

Test:
1. On staff, go to detail of some biblio,
click add to List, described behavior

2. With patch applied, original windows stay on item detail

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

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b5ae30cd6376ded9c7e63f0e3fcc34d043640e0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12032: disable automatic URL conversion by TinyMCE in news
Liz Rea [Thu, 3 Apr 2014 03:25:35 +0000 (16:25 +1300)]
Bug 12032: disable automatic URL conversion by TinyMCE in news

To test:

* create a news item with a link in it that is within the same domain

example: my koha was at http://demo.mykoha.co.nz, I created a link in a
news item to http://demo-intra.mykoha.co.nz

* note that when the item is saved, the url changes to ../../../../ (or
something like)

* apply the patch

* edit the link again, and save it

* note that the link is saved correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3fc5aeb7456fbda97b6fbc0fb66ddbc3aa253439)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11993: fix untranslatable confirm popup in request.tt
Bernardo Gonzalez Kriegel [Thu, 27 Mar 2014 03:32:33 +0000 (00:32 -0300)]
Bug 11993: fix untranslatable confirm popup in request.tt

This patch makes confirm popup text translatable. It implements a
similar function as used on OPAC deleteConfirm() and a JS var message.

This function, or variants, can also be found on other files on intranet,
I think that the only valid places are staff-global.js and help-top.inc

Redefinitions of this function:
prog/en/modules/serials/subscription-frequencies.tt:6
prog/en/modules/tools/marc_modification_templates.tt:158
prog/en/modules/virtualshelves/shelves.tt:92

Last case is a little different

To test:

1) Confirm that the "cancel hold" link correctly prompts for
   confirmation:
   a) Place an item-level hold on a title.
   b) Check in the item and confirm the hold.
   c) Return to the place hold screen for that title and submit another
      patron to place a hold for.
   d) On the place hold screen for that patron, look at the table of
      items. There should be a "cancel hold" link next to the item for
      which the hold was confirmed in step (b).
   e) Click "cancel hold."  You should see a confirmation message.
      Cancelling this dialog should cancel the operation. Confirming it
      should cancel the hold.

2) Check the string is not present on staff PO file
3) Apply the patch
4) Update translation files (cd misc/translator; perl translate update
   xx-YY)
5) Verify the string is now present

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5da480b61b689c7497d386fdd0b9bd30f260d2db)

Conflicts:
koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js

10 years agoBug 12018 - add table sorting to patron card batches
Owen Leonard [Wed, 2 Apr 2014 14:13:31 +0000 (10:13 -0400)]
Bug 12018 - add table sorting to patron card batches

When viewing batches of patrons in the patron card creator module the
table is not sortable. This patch adds table sorting.

The patch also makes some corrections of invalid markup and moves
informational/error messages to the top of the page rather than in a
sidebar. This change lets the table and sorting controls expand into a
wider space.

This patch also corrects a translation issue with table headers
identical to that addressed by Bug 11505.

To test, go to Tools -> Patron card creator -> Manage batches.
View an existing batch or create a new batch and populate it with
patrons. Table sorting controls should work correctly. Batch management
operations should work correctly.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b78596311bb23eb4e81356cc07c12868d9a90b96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 12000: ensure that hold resumption dates can be set only to future dates
Galen Charlton [Wed, 26 Mar 2014 17:58:46 +0000 (17:58 +0000)]
Bug 12000: ensure that hold resumption dates can be set only to future dates

This patch makes the datepickers for the hold resumption date
(AKA the hold suspend until date) field only permit dates in
the future to be selected in the staff interface checkout page
and hold list pages.  This makes these pages consistent with
the OPAC and the patron details page in the staff interface.

To test:

[1] Ensure that AutoResumeSuspendedHolds and SuspendHoldsIntranet
    are enabled.
[2] Go to the checkout page for a patron that has at least one hold
    request.
[3] Verify that the datepicker for the hold suspend until
    date field only permits choosing a date in the future.
[4] Go to the page listing hold requests for a title.
[5] Verify that the datepicker for the hold suspend until
    date fields only permit choosing a date in the future.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7378d488414d1859c75f0d3b40e5ce99cde67cb7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11906: ensure that Koha::Database uses UTF8 mode when connecting to databases
Galen Charlton [Wed, 26 Mar 2014 20:38:32 +0000 (20:38 +0000)]
Bug 11906: ensure that Koha::Database uses UTF8 mode when connecting to databases

This patch fixes an issue whereby the DBIx::Class schema objects
were not connecting to the underlying database in UTF8 mode.  This
most visibility manifested as patron list pages not displaying
diacritics correctly.

To test:

[1] Create a patron list, and make sure that it contains at least
    one patron whose name or patron category description contains
    a non-ASCII character.
[2] View the list contents; the diacritics should appear mangled.
[3] Apply the patch.
[4] View the patron list again.  This time, the diacritics should
    be displayed correctly.  Note that Apache will also log
    "list.pl: Wide character in print ...", but this is the lesser
    of two evils.
[5] Verify that prove -v t/db_dependent/Koha_Database.t passes.
[6] (extra credit) Verify that  t/db_dependent/Koha_Database.t
    passes when connect to a PostgreSQL database.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 05a6beba9f023f87d3355b6e72f35b220cd691b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11906: regression test for using DBIC to store & fetch UTF8 strings
Galen Charlton [Wed, 26 Mar 2014 20:26:26 +0000 (20:26 +0000)]
Bug 11906: regression test for using DBIC to store & fetch UTF8 strings

This patch adds a regression test for verifying that a
DBIx::Class schema object initialized by Koha database sets up
the database connection to correct store and retrieve UTF8
values as Perl utf8 strings.

To test:

[1] Apply this patch.
[2] Run prove -v t/db_dependent/Koha_Database.t
[3] The test should fail.
[4] Apply the main patch for this bug, then do step 2 again.
[5] The test should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b21d16ca75bb40371773d3008fcb06c67200ab36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11946 - add table sorters to label batches
Owen Leonard [Fri, 21 Mar 2014 19:50:18 +0000 (15:50 -0400)]
Bug 11946 - add table sorters to label batches

When viewing batches of titles in the label creator module the table is
not sortable. This patch adds table sorting.

The patch also makes some corrections of invalid markup and moves
informational/error messages to the top of the page rather than in a
sidebar. This change lets the table and sorting controls expand into a
wider space.

To test, go to Tools -> Labels -> Manage label batches. View an existing
batch or create a new batch and populate it with items. Table sorting
controls should work correctly.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Solves 1/2 of this bug which is to add the sorters to labels, the original
request was to add this to patron cards as well.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.
Template could be improved forther by showing
the itemtype description instead of the code in the table.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 94d80555489a2f07163bdb2e1b1a8104de9c410c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11878 - Eliminate use of deprecated jQuery .toggle() method usage
Owen Leonard [Tue, 4 Mar 2014 13:19:57 +0000 (08:19 -0500)]
Bug 11878 - Eliminate use of deprecated jQuery .toggle() method usage

jQuery's .toggle() method can no longer be used to trigger a pair of
specified functions. .toggle() can only be used to change the visibility
of an element. This patch fixes a few places in Koha where the
deprecated functionality was used.

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

- View the system preferences page in the staff client. Clicking a
  heading ("Appearance" under OPAC preferences, for instance) should
  collapse that section. Clicking again should expand it.

- View the MARC detail page for a record in the OPAC. Clicking the "view
  plain" link should display the plain MARC view. Clicking the "view
  labeled" view should return to the original view. Test in both prog
  and bootstrap themes.

Signed-off-by: wajasu <matted-34813@mypacks.net>
Followed test plan. Works fine.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described.
No Javascript errors found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 06026a7e297c8537c7a4a7cb9c7720b482f26eba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
10 years agoBug 11806 - Use validation plugin when creating new OAI set
Owen Leonard [Thu, 20 Feb 2014 21:08:02 +0000 (16:08 -0500)]
Bug 11806 - Use validation plugin when creating new OAI set

The form for adding a new OAI indicates that two fields are
required but does nothing to enforce this rule. This can be
handled client-side with HTML5 validation attributes and Koha's built-in
validation plugin. This patch implements this.

To test, apply the patch and go to Administration -> OAI sets
configuration -> New set. Try submitting the form without entering a
setSpec and/or setName. Doing so should trigger a validation warning.

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

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e634a5ad82e9fa0aef96ae5a23bb5b389d1704e7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>