Commit graph

317 commits

Author SHA1 Message Date
Paul Poulain
949fcd04ba Merge remote-tracking branch 'origin/new/bug_8315' 2012-07-13 14:17:59 +02:00
Dobrica Pavlinusic
130e3d9c10 Bug 8315 - remove use C4::* version
This patch touches a lot of code, but basically it removes version
information from use C4::* in our code.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
All script still compiles after the patch (confirmed by pre-applypatch hook)
2012-07-13 14:17:20 +02:00
Jared Camins-Esakov
8affddc52d Bug 8268 follow-up: incorporate QA comments
Fixes the following things:
1. Sanitizes log output to prevent an attacker from using a specially
   crafted POST to add extra lines to the log
2. Simplify a regular expression since "..file" cannot be used to
   escape the current directory
3. Makes sure directories are consistent
4. Correct logic issues in misc/cronjobs/backup.sh

Thanks to Frere Sebastien Marie for catching these issues.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-12 17:40:22 +02:00
Jared Camins-Esakov
bbcb1d784b Bug 8268: Add database dump to export tool
This patch builds on work by Lars Wirzenius for the Koha packages.

To date, the only way for a Koha librarian to obtain a complete backup
of their system has been to log into the system via SSH (or FTP) to
download the mysqldump file. This patch makes it possible for
superlibrarians in properly configured systems to download night backups
via the staff client's Export tool.

Recognizing that this is functionality with potentially very grave
security implications, system administrators must manually enable these
features in the koha-conf.xml configuration file.

The following configuration settings have been added to the koha-conf.xml
file:
* backupdir => directory where backups should be stored.
* backup_db_via_tools => whether to allow superlibrarians to download
  database backups via the Export tool. The default is disabled, and
  there is no way -- by design -- to enable this option without manually
  editing koha-conf.xml.
* backup_conf_via_tools => whether to allow superlibrarians to download
  configuration backups via the Export tool (this may be applicable to
  packages only). The default is disabled, and there is no way -- by
  design -- to enable this option without manually editing koha-conf.xml.

This commit modifies the following scripts to make use of the new
backupdir configuration option:
* koha-dump and koha-run-backups in the Debian packages
* The sample backup script misc/cronjobs/backup.sh

Note that for security reasons, superlibrarians will not be allowed
to download files that are not owned by the web server's effective user.
This imposes a de facto dependency on ITK (for Apache) or running the
web server as the Koha user (as is done with Plack).

To test:
1. Apply patch.
2. Go to export page as a superlibrarian. Notice that no additional
   export options appear because they have not been enabled.
3. Add <backupdir>$KOHADEV/var/spool</backup> to the <config> section
   of your koha-conf.xml (note that you will need to adjust that so that
   it is pointing at a logical directory).
4. Create the aforementioned directory.
5. Go to export page as a superlibrarian. Notice that no additional
   export options appear because they have not been enabled.
6. Add <backup_db_via_tools>1</backup_db_via_tools> to the <config>
   section of your koha-conf.xml
7. Go to the export page as a superlibrarian. Notice the new tab.
8. Go to the export page as a non-superlibrarian. Notice there is no
   new tab.
9. Run: mysqldump -u koha -p koha | gzip > $BACKUPDIR/backup.sql.gz
   (substituting appropriate user, password, and database name)
10. Go to the export page as a superlibrarian, and look at the "Export
    database" tab. If you are running the web server as your Koha user,
    and ran the above command as your Koha user, you should now see the
    file listed as an option for download.
11. If you *did* see the file listed, change the ownership to something
    else: sudo chown root:root $BACKUPDIR/backup.sql.gz
11a. Confirm that you no longer see the file listed when you look at the
     "Export database" tab.
12. Change the ownership on the file to your web server (or Koha) user:
    sudo chown www-data:www-data backup.sql.gz
13. Go to the export page as a superlibrarian, and look at the "Export
    database" tab. You should now see backup.sql.gz listed.
14. Choose to download backup.sql.gz
15. Confirm that the downloaded file is what you were expecting.

If you are interested, you can repeat the above steps but replace
<backup_db_via_tools> with <backup_conf_via_tools>, and instead of
creating an sql file, create a tar file.

To test packaging: run koha-dump, confirm that it still creates a
usable backup.

------

This signoff contains two changes:

10-1. If no backup/conf files were present, then the message telling you
so doesn't appear and the download button does. Made them behave
correctly.
10-2. The test for a file existing required it to be owned by the
webserver UID. This change makes it so it only has to be readable.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
2012-07-12 17:40:21 +02:00
f380a6c804 Bug 7848 - Issues data missing from circulation notices
For the CHECKIN and CHECKOUT notices, any data that is issue specific
does not show. For example, date due.

For CHECKOUT, this is caused not passing in the issues table as part
of the 'table' hash used by C4::Letters::GetPreparedLetter.

For CHECKIN notices, we need the old_issues table instead, as the item
has already been returned.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
passes tests, correct information shows in notices.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-10 13:50:10 +02:00
Paul Poulain
74f6e97396 Bug 8202 follow-up UNIMARC authority support
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-07-04 16:21:07 +02:00
Jared Camins-Esakov
986b887159 Bug 8202: Add authority export to tools/export.pl
Adds a separate tab on tools/export.pl for exporting authority records.

To test:
1. Try exporting authority records from the "Export data" tool

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tried different exports and everything worked nicely:
- removing fields from export (example: 942)
- limiting to one authority type
- changing the given file name
- exporting as MARC or XML
2012-07-04 16:21:06 +02:00
Dobrica Pavlinusic
622967b323 Bug 7961 - Local cover images should support CSV link files
Corrent code doesn't have support for filenames which contain spaces
or commans which breaks CSV files saved from spreadsheet similar to:

  12345, "conver image, with spaces.jpg"

This patch tweaks file parsing a bit. We are always splitting line to
only two values (to support commas as part of filename) and removing
spaces only on beginning and end of filename (to cover space after
comma in CSV example above while preserving spaces in filename).

With this change only invalid character in picture filename left
are quotes (") which are commonly used to quote strings with spaces.

Covers added will be logged in action_log, using CATALOGUING / MODIFY
action (which is shown as "Catalog" in tools > Log viewer)

Test scenario:

1. collect pictures with spaces and commas in name
2. dump file list into CSV file and add biblio number as first column
   (name of file is idlink.txt or datalink.txt)
3. create zip with CSV file and pictures
4. verify that all pictures got uploaded and linked to biblio records
5. verify that modification log includes cover image name

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-20 09:42:25 +02:00
Chris Nighswonger
f328a32402 Bug 7977: Fixing a bug which results in quote fields being incorrectly offset when saving uploaded quotes
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:15:05 +02:00
Chris Nighswonger
5c6129687b Bug 7977: Removing unused code from quotes_ajax.pl
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:59 +02:00
Chris Nighswonger
d78641e7c0 Bug 7977: Followup patch addressing items pointed out by Jonathan Druart
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:53 +02:00
Chris Nighswonger
12cb095bac Bug 7977: QOTD uploader to enable uploading csv files containing quotes
This series will add a DataTable's based upload/editor with which
to upload csv files containing quotes to be used by the QOTD
feature.

The file should be formatted thusly:

"source","text-of-quote"
"source","text-of-quote"
...

Note: This work serves as a good example of potential improvements
in all other "editor" and file upload areas of Koha.

This patch is a squash of the following work:

--Adding code to parse CSV file contents and push it into a DataTable
--Adding in jEditable to enable table editing
--Adding ajax to post data back to the server to be saved
--Fixing edit and adding delete functionality
--Adding some missing css as well as server feedback on save
--Fixing a bug which limited the number of quotes which could be uploaded
--Also fixing a minor bug with fnCSVToArray and doing some style cleanup.
--Adding sanity checks to verify file type and size
--Implements YUI button widget/toolbar
--Improved handling of hiding uploader UI
--Adds row selectability
--Adds multi-delete capability
--Adds YUI button/toolbar widget
--Fixing capitalization in quote uploader
--Implements improvments suggested by jcamins and oleonard

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:09 +02:00
Chris Nighswonger
eb7e930eea Bug 7977: Quote-of-the-day (QOTD) Feature for OPAC
This feature will add the option of displaying a select quote
for the day on the OPAC homepage. It will include the addition
of a QOTD editor in the tools section of the staff interface
which will allow the addition, editing, and deletion of quotes.
A single system preference will enable/disable the display of
the QOTD on the OPAC homepage. A new granular permission will
also be added to conrol user access to the QOTD editor tool.

Possible extentions to this would be code to allow alternate
quote selection algorithms to be added to vary how the currently
displayed quote is selected from the table of quotes.

This patch is a squash of the following work:

--Adding quotes table to kohastructure.sql and updatedatabase.pl

Note: This patch is intended for a MySQL based installation only.
That means that it includes backticks because that is what is required
at this point in history to install Koha correctly on a MySQL based
installation.

Feel free to port this over to the Pg stuff in the data/Pg directory.

--Adding system preference to control display of QOTD on OPAC main page
--Adding sample quote data

These quotes are taken from various US presidents. I'm not sure these
are applicable to the rest of the world, so I'm leaving it to translators
and others to add sample quote data for other languages.

--Adding edit_quotes user permissions
--Squash with other db related patches in this series
--Adding quotes editor pages to tools
--Adding QOTD editor link to tools homepage
--Integration of DataTables into QOTD Editor
--Impleminting jEditable into the quote editor
--Adding delete and add option to editor
--Fixing OPAC display so the QOTD div does not show if no quote is returned
--Also removing useless code from tools/quotes.pl
--Adding spans around QOTD foo in opac-main.tt
--Also fixing quote selection logic to accomodate the possibility of
    a single quote in the db a litte better.
--Changing timestamp column header to a more user-friendly 'Last Displayed'
--Fixing bug in quote selection logic. This bug caused a situation where
    when the table had only a single quote with an id greater than 1 in it,
    no quote would be selected.
--Fixing up sorting in the quote editor table. --jcamins
--Adding span element to quote separator --jcamins
--Overriding the default empty table message supplied by datatables-strings.inc
--Adds missing page heading
--Adds beginning of click-for-help elements.
--Refactors delete functionality to allow selecting of quotes to delete,
    enabling multi-delete.
--Refactors saving added quote functionality so that striking <Enter>
    saves the new quote.
--Refactors canceling aded quote functionality so that striking <Esc>
    cancels the new quote.
--Removing debug console.log statements
--Implementng the YUI button widget/toolbar used on other pages.
--Adds a 5px radius to all YUI buttons to bring them into
    conformity with the general trend toward rounded corners
--Fixes capitalization in quote editor
--Implements improvements suggested by jcamins and oleonard
--Adds DataTables Plugin dataTables.fnReloadAjax.js

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2012-05-24 14:14:05 +02:00
Jonathan Druart
b35d34e2ae Bug 5742: Followup: sort* fields can to be filled with an input text
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-15 17:45:12 +02:00
Jonathan Druart
a6c6946dfc But 5742: Batch edit patrons
new permission : edit_patrons

Plan test:
- Go on the page: tools > Patrons modification (modborrowers.pl)
- Enter a list of cardnumbers (or use a file)
- Modify one or more patron's fields (you can modify surname, firstname,
branchname, category, sort1, sort2, date of enrollment, date of expiry,
debarred date, debarred comment and borrower note)
- Save
- Check on the result page (or in database for non-displayed fields) if
modifications have been correctly made.
- re test with different attributes. For each attributes filled with an
authorized value category, you can select a value in a drop-down list.
Else it's a free input text. If your attribute is filled with a patron
category, the modification performs only on patrons belonging to this
category
- Save
- Verify on the result page

Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr>
Signed-off-by: Stéphane Delaye <stephane.delaye@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-15 17:44:19 +02:00
Amit Gupta
fcc9fcea4f Bug 7739 - Batch edit items of a title
A new option - Edit items in batch - is made available under the menu - Edit - in the catalog detail page. When this option is selected the tool batch item modification is called with all items under this biblio passed as parameters.

User can then edit all items of this biblio in batch. Once changes are saved the "done" link takes the user back to the catalog detail page of this biblio.

To test:
    Navigate to catalog detail page of any biblio with one or more item records. Use the option "Edit items in batch" from the "Edit" menu. Modify the items in batch, say the collction code or lost status. Press "Save", verify that changes have been effected in the confirmation screen. Use the "Done" link to navigate back to the catalog detail page.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-11 12:16:22 +02:00
Lyon3 Team
81f63a4d5d Replace itemnumber by barcode in links of patron modification log
in the ISSUE and RETURN links to item

http://bugs.koha-community.org/show_bug.cgi?id=7870
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Passes tests, works as expected. Perhaps for followup - items that have been deleted are linked, but do not work. If an itemnumber doesn't exist, it should not be linked.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-11 11:24:57 +02:00
Srdjan
b9f4a8cac6 bug 6372: moved background-job.inc to background-job-progressbar.js
Check for div 0 when calculating percentage

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
div0 no longer appears on 0 size jobs.
Passes t xt

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-05-07 23:00:34 +02:00
Katrin Fischer
b302e4a525 Bug 7833 - unique holiday link broken
As Nicole stated on the bug the branchcode was missing from the links.

To test:
- add unique holidays to calendar for different branches
- click on link and check that the date is opened in the right calendar

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

Clicked links for unique holidays and exceptions for
multiple branches and everything works perfectly.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-04-19 10:54:00 +02:00
Srdjan
12ff7355bb bug_7613: OCLC Connexion gateway
svc/import_bib:
* takes POST request with parameters in url and MARC XML as DATA
* pushes MARC XML to an impoort bach queue of type 'webservice'
* returns status and imported record XML
* is a drop-in replacement for svc/new_bib

misc/cronjobs/import_webservice_batch.pl:
* a cron job for processing impoort bach queues of type 'webservice'
* batches can also be processed through the UI

misc/bin/connexion_import_daemon.pl:
* a daemon that listens for OCLC Connexion requests and is compliant
  with OCLC Gateway spec
* takes request with MARC XML
* takes import batch params from a config file and forwards the lot to
  svc/import_bib
* returns status

ImportBatches:
* Added new import batch type of 'webservice'
* Changed interface to AddImportBatch() - now it takes a hashref
* Replaced batch_type = 'batch' with
  batch_type IN ( 'batch', 'webservice' ) in some SELECTs

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
2012-04-06 17:26:20 +02:00
Dobrica Pavlinusic
db312526b2 Bug 7775 - tools/upload-file.pl: scoping for plack
$uploaded_file is now scoped with our, and we set correct filename

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 18:17:45 +02:00
Dobrica Pavlinusic
8d7d8af618 Bug 7790 - tools/manage-marc-import.pl breaks with plack
transfer $template to add_matcher_list for correct scoping
and score $dbh and $runinbackground with our

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-26 18:10:20 +02:00
Dobrica Pavlinusic
843aabf5c1 Bug 7779 - tools/letter.pl: scope vars for plack
Signed-off-by: Alex Arnaud <alex@stephane-E5420>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-22 18:17:28 +01:00
2dc8a260c5 Bug 7310: Improving list permissions: Deleting patron
Implements following points from the wiki page List permissions:
5) Delete or move list information when deleting a patron.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
2012-03-21 16:47:03 +01:00
4d26038dd2 Bug 6027 - Delete biblios if deleting all their items in batch deletion
Optionally delete bibliographic record when batch deleting items, if no items remain on the record.

Adds deleting of reserves to DelBiblio. Since subscriptions are deleted automatically,
it made sense for deletion of reserves to maintain the same behavior.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
I like the way this works, and it does. Passes tests.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-21 14:31:38 +01:00
Srdjan Jankovic
c5b878697e Bug 7477: Copy holidays from one branch to another
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
2012-03-19 18:10:44 +01:00
Srdjan Jankovic
38e5e15153 bug_7001: protected are only all libraries letters
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
solves my comment 89: when you have a "mandatory" notice defined for a given library, it's not possible to delete it (and switch back to the "default" notification). isn't this a (small) bug ? was it intended ?

thanks!
2012-03-13 12:07:58 +01:00
Srdjan Jankovic
a9ded4fa00 bug_7001: Issue and Reserve slips are notices.
Branches can have their own version of notices - added branchcode to
letter table.
Support html notices - added is_html to letter table.
Support for borrower attributes in templates.
GetPreparedletter() is the interface for compiling letters (notices).
Sysprefs for notice and slips stylesheets
Added TRANSFERSLIP to the letters

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-03-09 10:11:20 +01:00
Sophie Meynieux
11efb334c2 Bug 3916 [follow-up] : Adding a default choice in every dropdown list, not only branches, to let the corresponding value unchanged
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Patch works as advertised

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-27 11:22:49 +01:00
Robin Sheat
5dd94487ac Bug 5373 - allow 'cardnumber' to appear on the patron import field list
For some reason, it was explicitly removed, however you need it if you
want to match up on cardnumber.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Easy to test and works nicely.
Before patch cardnumber is not shown in the list of fields on the
patron import page. After applying the patch it is.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-21 17:04:18 +01:00
78f2ac2862 Bug 7505 Superlibrarian can't export all biblios when IndependantBranches is enabled
When a Koha user has superlibrarian permissions, and if
IndependantBranches is enabled, in Tools > Export bibliographic and
holdings, this user can't export all biblio records. He will just export
the biblio from the branch he belongs to.

This patch fix that.

To test:

  - Do a ALL records export as superlibrian on a multi-branches Koha instance
  - Examine the resulting MARC file with the tool of your choice (MArcEdit,
    yaz-marcdump, etc.)
  - You will see that 952/995 contains exlusively items from your branch (as
    Koha user)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-02-10 15:56:15 +01:00
Colin Campbell
263dded818 Bug 6752: Be stricter with utf-8 encoding of output
use encoding(UTF-8) rather than utf-8 for stricter
encoding
Marking output as ':utf8' only flags the data as utf8
using :encoding(UTF-8) also checks it as valid utf-8
see binmode in perlfunc for more details
In accordance with the robustness principle input
filehandles have not been changed as code may make
the undocumented assumption that invalid utf-8 is present
in the imput
Fixes errors reported by t/00-testcritic.t
Where feasable some filehandles have been made lexical rather than
reusing global filehandle vars

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-27 12:11:06 +01:00
Jared Camins-Esakov
587e2e920e Bug 1633: QA follow-up
* Show the "Upload images" button when OPACLocalCoverImages is enabled but
LocalCoverImages (i.e. local cover images on the staff client) is not
* Correct copyright and license comments in new files
* perltidy and replace tabs by four spaces

Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-01-24 11:16:10 +01:00
Koustubha Kale
585a0024a1 Bug 1633: [SIGNED-OFF] Display local cover images
This patch adds display of local cover images in the following places:
1. OPAC Results page
2. OPAC Details page
3. Separate image viewer page for the OPAC
4. Intranet Details page
5. Separate image viewer page for the Intranet

Display in the Details and (OPAC) Results pages is handled via Javascript
rather than via direct embedding, to better handle the situation where most
records have local cover images, but a few do not.

Local cover images do not currently display in the Intranet Results page

How to use/test :
Assign user permission to the user Tools > (upload_local_cover_images Upload
local cover images).  In order to upload local  images, login to the staff
client. Go to Home > Tools > Upload Cover Images. Here you can upload cover
images either singly or in bulk in the form of a zip file.  If uploading
singly, click on image file, browse the image from your local disk, type in
the biblio number of the catalogue entry and press upload.  If uploading in
bulk as a zip file, the zip file must contain (in addition to cover images)
one text file named either datalink.txt OR idlink.txt. This file should
have mapping of biblionumber to image file name in the zip one per line
with comma or tab as delimiters. For example:

1, scanned_cover_image_of_bib_no_1.jpg
2, scanned_cover_image_of_bib_no_1.jpg

Cover images will be resized to a large image of 800x600 and a thumbnail of
200x140. Depending on the setting of AllowMultipleCovers, it is possible to
upload multiple images for a single bibliographic record. However, even if
multiple covers are permitted, you have the option of replacing the existing
covers by checking the "Replace existing covers" option on the upload screen.

1. The patch adds a menu link in Tools from where you can upload local cover
   images
2. It adds a user permission to enable access control to this menu item under
   Tools
3. It adds a system preference OPACLocalCoverImages under Enhanced Content.
   This needs to be turned on to show local cover images in OPAC.

Once you have uploaded local images, if you search for the biblio, the local
cover should show up in search as well as search detail pages in the OPAC, and
the details view in the Intranet.

Koustubha Kale is working on another patch which will allow us to set a cover
image source priority in system preferences, and which will then gracefully
fail over to the next source if image is not available from the first choice
source.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>

Rebased the patch because it was failing with koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css due to changes pushed in master.
Applies cleanly now.
2012-01-24 11:16:04 +01:00
Jared Camins-Esakov
b4fb5d4095 Bug 1633: [SIGNED-OFF] Add support for uploading images to Koha
A frequently-requested feature for Koha, especially by special libraries, is
the ability to upload local cover images into Koha.

This patch adds a bibliocoverimage table, and image handling code in the
C4::Images module. Key features of the implementation include:
1. The ability to have multiple cover images for a biblio
2. Handling for "full size" (800x600) and thumbnail-size (200x140) images
3. Uploading images directly from the record view

The image display functionality by Koustubha Kale of Anant Corporation will
follow in a second patch.

Special thanks to Koustubha Kale and Anant Corporation for the initial
implementation of local cover images, and to Chris Nighswonger of Foundation
Bible College for his prior work on patron images.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Will add comments on Bugzilla.

Patch failed to apply because installer/data/mysql/sysprefs.sql had changed in master.
Corrected the same with this new patch.
2012-01-24 11:16:02 +01:00
Jonathan Druart
b8e9829be5 Bug 5347: Adds columns claims_count and claimed_date in aqorders
This patch adds 2 columns in the aqorders table :
- claims_count : number of claims for an orders
- claimed_date : date of the lastest claim

In the lateorders.pl table, you can not select orders from different
supplier because there is just one letter sent after clicking the "Claim
order" button. So, it's logic that you want to select only orders from
this supplier.

Modification in C4/Letters.pm:
refactoring code for claimacquisition and claimissues letter type.
Now, fields for theses letters check the table name. It's not possible
to chooce aqorders.title, this field doesn't exist !
Furthermore, you can add a <order> tag around your item fields, like
this :

-- Begin example
<<LibrarianFirstname>>
<<LibrarianSurname>>

<<aqbooksellers.contact>>
<<aqbooksellers.address1>>
<<aqbooksellers.phone>>
<<aqbasket.basketno>>
<<aqbooksellers.phone>>
<order>Library : <<items.homebranch>>
In your possesssion : <<biblio.author>>. <<biblio.title>>.
<<biblioitems.publishercode>>, <<biblioitems.publicationyear>>.
Callnumber : <<items.itemcallnumber>>. doc type : <<items.itype>>
Barcode : <<items.barcode>>
Date for the return : <<items.onloan>>.</order>

<<LibrarianSurname>>
-- End example

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2012-01-20 14:12:27 +01:00
Christophe Croullebois
806fac60f4 Bug 6663: Features for holidays.pl with datepicker
Allow to select a range between 2 dates and in one "submit" creates holidays only on these days.
I have added also Holidays repeated yearly on a range.
On suggestions I have added a datepicker for "To Date".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-13 15:07:05 +01:00
d3c02c6bb6 Bug 7259 - Show a count of items pending approval on staff client home and tools pages
This patch adds count indicators on the staff client home page and
the tools page for the number of items pending approval. On the
home page this includes suggestions, comments, and tags. On the tools
page a count of pending comments and tags is shown.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Counts appear for all types of actionable items listed, all are clickable through to the proper place.

Nice work!
2011-12-08 12:04:28 +01:00
Srdjan Jankovic
1713133fdd bug_5211: LostItem() - added charge_fee param to control fee charging
Pass charge_fee = yes wherever is LostItem() called, which effectively
means tha there's no change.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-06 11:36:34 +01:00
Srdjan Jankovic
2b2e544f05 Bug 6303: Display Organisation and Parent Organisation names when viewing a borrower of type organisation
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as advertised, doesn't affect display for non-organisational patrons.

Note: Display change in OPAC only affects the summary tab.
It would be a little bit more consistent to make the name show the
same on all tabs in OPAC patron account.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I repeated Katrin's signoff here (with permission). The patch only changed for some minor rebasing and cosmetic QA requests. Passed QA now.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-11-24 11:30:08 +01:00
Frédérick Capovilla
906ef4b28c Bug 6854: Correct a double password encryption problem in import_borrowers.pl
When the CSV file has no password column and no default value was set for
the password :
If we try to modify an existing user, the password from the BD is sent
to ModMember, which then encrypts the already-encrypted password a
second time.

http://bugs.koha-community.org/show_bug.cgi?id=6854

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed bug on current master.
1) Import new patron with password provided
> OPAC login works
2) Overwrite patron record, password provided
> OPAC login works
3) Overwrite patron record, password not provided
Before patch: OPAC login broken, password in database changed
After patch: OPC login works with same password as before

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-21 04:47:05 +13:00
Srdjan Jankovic
4770555855 bug_5533: Slightly improved marking items as lost
Call LostItem() whenever item is lost.
LostItem() new arg - mark returned.
Disabled Lost Status on catalogue item edit.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

For follow up we need to explain how to hide the 952$1 (lost) from
the framework by putting it in the 'ignore' tab.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-18 09:01:39 +13:00
Ian Walls
973371a68b Bug 6733: change branchcode call in Labels to use userenv instead of LoginBranchname
In the 5 places in the label editor, the user's current branch is determined by taking
the LoginBranchname and doing a reverse look up for the branchcode.  This is an unnecessary
query, since C4::Context->userenv has the immediate access to the branchcode; this is how
it's summoned in all other points in the Koha code.

This addresses bug 6673 because, since the move to T:T, the call in tools/manage-marc-import.pl
has used in correct syntax:  $template->param('LoginBranchname') instead of $template->{VARS}->param('LoginBranchname')

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-28 20:29:39 +13:00
c9905750e5 Bug 6869 Batch item modification fails whit accented characters
Corrects a problem in batchMod.pl when accented characters are used.

When modifying multiple items in batchMod.pl, the batch modification
fails if accented characters are used in any of the fields of the
modification form.

This is a port of Frédérick Capovilla patch from 3.2 to 3.4 version

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-27 08:27:01 +13:00
MJ Ray
a746e11c14 Bug 6460: alternative fix, updating template and script instead of C4::Log
Add some test cases and fix a bug in C4::Log found by in review.
Thanks-to: Katrin Fischer.

Signed-off-by: Liz Rea <lrea@nekls.org>
Passes test, interface works as expected.

Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-24 10:01:09 +12:00
6b8be20497 Bug 6755 Problems with switching languages
This patch solves the situation that news is in another language than
the Koha interface AND makes that themelanguage routine is always called
the same way in order to prevent mixed display.

It fixes also a bug related to language preselection based on web
browser prefered language.

September 9: Adjusted with input of Frederic Demians.

Septembre 10: Avoid circular dependency, as pointed by Chris Cormack.
Templates related functions are moved from C4::Output to C4::Templates

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-23 09:47:09 +12:00
eb7456c685 Fix for Bug 4419 - cannot change module for notice templates
Adding a hidden form field to contain the original module
so that it can be used in the check for an existing entry.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-27 19:35:44 +12:00
Alex Arnaud
6466f57197 Bug #6068 - New feature: capability to blanking subfields in BatchMod
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Nicole Engard <nengard@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-16 09:10:54 +12:00
Chris Nighswonger
57155db213 Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices
Adding support for including fields from the Issues table in advanced due notices.
This is primarily to allow the inclusion of the due date for each item in the
advanced due notice, but will allow the inclusion of any field from the ISSUES
table.

This also adds code to exclude timestamp fields as these are irrelevant to the
end user in this context.

Note: Documentation should be updated to reflect the availability of the additional
fields in all circulation notices.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-02 12:44:42 +12:00
Colin Campbell
b5b71339f3 Bug 5453 Move declarations out of conditionals
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-15 15:50:23 +12:00