Bug 10894: Add ID to main address in member entry form

Add an ID to ease customization via jQuery; an ID is already present
on alt address but was missing from main address

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10915: fix About->timeline breakage on incompletely upgraded Koha

This patch supplies a default value for the koha-conf.xml
setting docdir to handle the case where the user neglects
to set it upon upgrade.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fixes dev and standard installs without docdic tag in koha-conf.xml.
Doesn't break when docdir present either. Warning still present
on packages install that didn't add the docdir definition in koha-conf.xml

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10915: (QA followup) warn if cannot read history.txt

This patch makes about.pl test if success opening history.txt, and
shows a convenient warning to the end user. No more warnings in the logs
(about.pl: readline() on closed filehandle $file at /usr/share/koha/intranet/cgi-bin/about.pl line 166)
and better problem solving information for the end user.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10871: Make confirmation message for deleting news translatable

To test:
- Create a news entry in tools > news
- Delete the news entry or multiple entries by selecting them
  using the checkboxes to the left and the delete button at the
  bottom of the page.

Verify confirmation message shows up correctly with patch applied.

Bonus:
- Update one of the po files and make sure the new strings shows up
  there.

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>
Bug 10617 - koha-common init script cleanup

Removed unused stuff, added a new config file /etc/default/koha-common
to control the init script behaviour. Currently is only a stub. The config
file could be put on /etc/sysconfig on RedHat and friends. The init script
should work them too. Added a TODO comment regarding the 'status' switch.

To test:
- Apply the patch on master, build your own packages and install.
- The init script should continue to work as expected.
(it can be tested replacing the /etc/init.d/koha-common file with
debian/koha-common.init on a packages install).
- The absence of the /etc/default/koha-common file should not prevent
the init script from working.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10622: add --sip and --nosip switches to koha-list

Just added those switches.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Magnus Enger <magnus@enger.priv.no>

I applied the patch on my local dev install, and then copied the
patched koha-list script to a couple of servers with actual
instances running off the packages, to test the script.
- It seems that the -h switch did not work before this patch, now
  both -h and --help works nicely
- --sip and --nosip work as expected, also in combination with
  --email and --noemail

The patch does not add --sip and --nosip to the man page for
koha-list, but I will do a followup for that.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10622 - [SIGNED OFF] Followup: Add --sip, --nosip and --help to man page

The original patch for bug 10622 added the --sip, --nosip and
--help switches to the koha-list command, but did not update the
manpage for the command. This patch does.

To test:

Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-list.xml
$ man -l koha-list.8

Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Forgot the docs this time, good catch Magnus

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10622: (follow-up) uppercase "SIP" in documentation and help text

"SIP" is an acronym and should be capitalized.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10888: Don't hide authorities module from users who lack permission to edit authorities

It should be possible for staff client users to search and view
authority records even if they don't have permission to edit them.

To test, apply the patch and view the staff client as a user with and
without "editauthorities" permission.

With "editauthorities" permission, authority search results should show
both an edit and delete link. Viewing the details of an authority
record, one should see a toolbar with edit/delete/new options.

The detail view has been altered to use the term "record" in place of
"biblio" ("Used in X record(s)).

Without "editauthorities" permission, authority search results should
show no edit or delete link. Viewing the details of an authority, the
only option shown in the toolbar should be "Save."

On the staff client home page and in the header's "More" menu the link
to the authorities module should now appear with and without permission
to edit authorities.

This patch also corrects the permissions in the authority export script
to allow saving of authority records by users who do not have permission
to edit.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7813: Ability to delete local cover images

This patch adds the ability to delete local cover images from the
detail page. It adds an 'X' button to trigger the deletion. It occurs
using a new SVC script called cover_images that accepts the following
parameters:

 - action
 - biblionumber (used for checking imagenumber validity)
 - imagenumber (repeatable)

It then deletes all valid images passed and returns a JSON object
containing the imagenumbers and the deletion status (1/0). The operation
is triggered using jQuery.ajax, and with the response the corresponding
images get deleted.

Note: currently one image is deleted at a time, but the code is there to
be used.

To test:
- Open the detail page fr a biblionumber containing one or more cover
  images, go to its images tab.
- Apply the patch, reload the page, go to the images tab.
- Thumbnails should look better than before ;-)
- An 'X' button should show below each cover.
- Clicking the 'X' button should trigger an alert message asking for
  confirmation.
 a) Cancel: nothing happens, reload the page and check nothing got
    deleted.
 b) Accept: the deleted image should be gone, reload the page to check
    it doesn't exist anymore and is not a browser/DOM manipulation trick.
- Signoff

Note: check having more cover images than those that fit the width and
see it wraps fine.

P.S. I chose not to implement every possible action on the svc script, but
another bug could be filled for more improvements.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7813: (follow-up) improvements for deleting local cover images

This patch:
- displays a js alert if a problem occurred on deleting the
  image on the server.
- adds a class for the new span (in order to avoid future problem, if
  someone adds a new span).
- adds a title for the [X] link.
- deal with the upload_local_cover_images permission (don't display the
  delete link if the logged in user does not have it).
- changes the license version.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
I like the ehancements to the original patch and work as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7813: (follow-up) use descriptive text for delete link

This patch replaces the "times" symbol for the local cover image
deletion link with more descriptive text.  This was done because
the original "X" was small, is not necessarily going to be universally
understood to signify the deletion action, and because "&times;"
does not give much context to translators.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10868 - Use new DataTables include in catalog templates

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

The checkout history script has been altered to send unformatted dates
to the template, and the template now uses the "title-string" sorting
filter to enable sorting on unformatted dates.

To test, view the following pages and confirm that table sorting is
still working correctly:

Catalog -> Biblio detail page
Catalog -> Biblio detail page -> Checkout history

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Sorting works. No koha-qa errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: On the issue history page:
1/ If the checkin on is empty (the item is currently checked out), the line
is sorted in last.
2/ The Renewed column is not sorted by date.
Before this patch, the sort was worse.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10651 - Use new DataTables include in administration templates

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

To test, view the following pages and confirm that table sorting is
still working correctly:

- Administration -> Budgets
- Administration -> Authority types -> MARC structure
- Administration -> Authorized values
- Administration -> Library transfer limits
- Administration -> Libraries and groups
- Administration -> Patron types and categories
- Administration -> Cities and towns
- Administration -> Item types
- Administration -> MARC bibliographic framework -> MARC structure
- Administration -> System preferences
- Administration -> System preferences -> Local use
- Administration -> Z39.50 client targets

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Sorting works. No koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10651 - (follow-up) add DataTables include to admin/aqbudgets.tt

The aqbudgets.tt needs to use the include file too.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>