Commit graph

21429 commits

Author SHA1 Message Date
3bcc032181 Bug 11826: Use XSLT handler object in showmarc, Record.pm
Modifies showmarc and opac-showmarc to use new XSLT handler.
Removes cardview.pl as obsolete script.
Modifies C4/Record.pm and a typo in the test Record.t.

Test plan:
[1] catalogue/showmarc: Go to Cataloging. Search. Click Card.
[2] opac-showmarc: Go to opac detail, MARC view.
    Open URL for plain view in new tab.
    Change URL: Change viewas=html to viewas=card
[3] Verify that there are no references in the codebase to cardview.pl
[4] C4/Record.pm: Run the Record.t test in db_dependent.
    This test uses marc2modsxml, triggering the change.
    Additional: export to MODS from opac-detail.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Views Ok. Test pass. No more cardview. No koha-qa errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:52:45 +00:00
21df671131 Bug 11826: Use the XSLT handler in C4/XSLT module
Incorporate the new object into C4/XSLT module.
The handler object needed one adjustment to allow for passing URLs.
Removed the GetURI function; it is no longer needed.
Added some documentation lines.
Moved a file-level lexical upwards in the code for visibility.
Removed some tabs (on two lines).

Note: The handler could perhaps be moved up to the Context module, or
be saved in a global ('our') variable.  But I would rather not do that
now, making testing not too complex at this moment.

Test plan:
Enable XSLT preferences for opac and intranet.
Check result and detail pages.
Check individual list display (virtual shelves).
Force an XSLT error by editing one of your xsl files. Check the
corresponding display.
Put an URL in one the XSLT prefs (could just be to your own server).
Check the display.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Running XSLTParse4Display in a loop showed no significant performance
change.
One pass cost me around 0.012 sec (except for the first pass).

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Results, detail, url and list view Ok
No koha-qa errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:52:45 +00:00
93ba8d0b70 Bug 11826: Add unit tests for Koha::XSLT_Handler
Test plan:
Verify if XSLT_Handler.t passes.
You could also sabotage the test by removing one of the test xsl files.
Or you could 'repair' the bad xsl file (test02). Remove the second line
redefining the xsl variable.
In all those cases the unit test should fail now.. Discard your changes :)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass. No koha-qa errors.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:52:45 +00:00
41caa8e970 Bug 11826: Add XSLT handler object to Koha namespace
In achieving the goals of umbrella report 6536 (Z3950 improvements), this
report adds a XSLT handler object to the Koha namespace.
A follow-up adds unit tests for this module.
This patch does not yet incorporate the new object into Z3950 search. So
it does not change any behavior and is therefore harder to test.

Test plan:
Run the unit tests of the follow-up patch on report 11826.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I tested the new module in two additional ways:

[1] Made a simple script (four lines as below) that ran a larger xml file
    with 1500 records through a test XSLT file modifying the title.

    my $eng= Koha::XSLT_Handler->new;
    open my $fh1, '<', '_example_file';
    my @xml= <$fh1>;
    print $eng->transform( join('', @xml), '_example_xsl_file');

[2] Incorporated the object into my local changes of Breeding.pm (based on
    older work, not ready for submittal now).
    Ran transformation on Z3950 search results. Worked well :)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test runs Ok. No koha-qa errors.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:52:28 +00:00
Robin Sheat
1f5e92fec6 Bug 12312 - correctly upgrade under Apache 2.2
As the way we need to reference Apache instance names has now changed
between 2.2 and 2.4, we need to try it out both ways to make sure we get
it right.

This also allows koha-create/koha-disable to try the .conf version of
the name if the first one doesn't work.

To test:
* Create an instance on an Apache 2.2 system with koha < 3.16
* Upgrade to 3.16 with this patch, saying 'yes' to the renaming question
** Make sure you don't see the warning: Warning: problem enabling $site
   in Apache
* Do a 'service apache2 restart'
* Make sure you can still access the instance
* Make sure that /etc/apache2/sites-enabled/instance.conf exists as a link
  to /etc/apache2/sites-available/instance.conf
* Check that koha-create and koha-remove behave like you'd expect.

Note:
* If you need to make debconf forget that it asked you the question
  about renaming so that it'll do it again, then run:
  echo "unregister koha-common/rename-apache-vhost-files" | sudo debconf-communicate koha-common
* 'debconf-show koha-common' will show you the current debconf
  configuration.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:41:55 +00:00
Galen Charlton
0987f1670b Bug 11629: DBRev 3.17.00.007
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:28:46 +00:00
e95c0bf713 Bug 11629: (follow-up) fix message displayed when item is made available
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:26:02 +00:00
bcf27a9cf0 Bug 11629: (folllow-up) fix various issues
Changed the syspref.sql file to remove one of the doubled
up UNIMARCAuthrityField100 that slipped in with an earlier
patch on this bug.

Passes all tests and QA script, also t/db_dependent/Circulation_issue.t

Tested with items that had
- no notforloan value set
- notforloan value not used in updateNotforLoanStatusOnCheckin
- the notforloan value defined in UpdateNotForLoanStatusOnCheckin

Also verified it works the same, when the item was checked out or
not checked out on return.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:25:22 +00:00
ac1f1ed9dd Bug 11629: (follow-up) remove <strong> tags to ease translation
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:24:45 +00:00
a276d0a920 Bug 11629: (follow-up) add unit tests
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:24:21 +00:00
dea4ddb5bd Bug 11629: (follow-up) Add message for librarian that status was updated
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:23:37 +00:00
8967427ee2 Bug 11629 - Add ability to update not for loan status on checkin
Some libraries would like to streamline the cataloging process my
automatically updating notforloan values on checkin. For example, an
item is set to notforloan of -1 ( ordered ). The item, is received,
processed, and checked in for the first time before being shelved.
The checkin automatically changes the nfl value from -1 to 0. The
same workflow could be used for damaged items as well.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Set the new system preference UpdateNotForLoanStatusOnCheckin
   to the following:
-1: 0
0: 1
4) Create an item, set its notforloan value to -1
5) Check in the item, note its not for loan value is now 0
6) Check in the item again, note its not for loan value is now 1
7) Check in the item again, note its not for loan value reamins 1

Signed-off-by: Havilah Lyon <havilah@aflibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 03:21:53 +00:00
Galen Charlton
f09bdf7142 Bug 7720: (follow-up) restore CSS selectors for the current/home location columns
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 02:53:58 +00:00
Galen Charlton
f51cc2d5fb Bug 7720: (follow-up) fix issues in Bootstrap theme
- Fix breakage of tablesorting when OpacLocationBranchToDisplay
  is set to both.
- When displaying the home library, ensure that its correct
  name and URL are displayed
- Remove the attempt to display the "opac_info" tooltip for
  the home library, as it is not currently retrieved.

RM NOTE: Rather than add a GetOpacInfo function or the like
to the TT Branches plugin, simpler would be adding a
plugin function that fetches a DBIC result object for
a given branchcode, thereby allowing any column in the
branches table to be fetched into the template.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 02:51:45 +00:00
Galen Charlton
3ad3e0e984 Bug 7720: DBRev 3.17.00.006
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 02:22:33 +00:00
Galen Charlton
e194da51a3 Bug 7720: (follow-up) revert change to GetItemsInfo
The QA follow-up which adds GetURL to the TT branches
plugin means that GetItemsInfo no longer needs to be changed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 02:20:24 +00:00
6d32d66fdc Bug 7720: (follow-up) update Bootstrap theme
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 02:18:08 +00:00
025854d6d4 Bug 7720: (follow-up) fix various issues
[1] Fix capitalization
[2] Move logic for getting the home library name URL to the
    Branches TT plugin

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 02:17:17 +00:00
09ce37d349 Bug 7720: add options for controlling display of an item's home and/or holdings location
Currently, in opac-detail.pl, there exists a column named 'Location'.
This column lists the name of the holding branch, and the item's
location description. This can cause confusion to borrowers, as
they may assume that the holding branch is the *owning* branch
(homebranch) of an item.

This could cause a situation where a borrower waits for an
item to be returned to his or her library, only to find that
the library never owned that item, and it was transferred back
to its homebranch. It could also lead a borrower to falsely
assume that his or her home library does not own a copy of a
particular item because the borrower does not see an his or her
home library listed for any of the items on the record.

In addition, even when the holding branch is different
than the home branch, the item's shelving location is displayed,
even though that branch may not use that location.

This commit makes the item details table equivalent to the intranet
details page by adding a "Home Library" column, which displays the
item's home library, as well as the shelving location.

If singleBranchMode is enabled, this column disappears and the
"Location" column displays the shelving location only.

This commit adds two new system preferences:

OpacLocationBranchToDisplay, which defines whether
to display the holding library, the home library,
or both for the opac details page.

OpacLocationBranchToDisplayShelving, which defines
where the shelving location should be displayed,
under the home library, the holding library, or both.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Work as described. Tested all variations.
No koha-qa errors.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 02:12:06 +00:00
Galen Charlton
6f23ccf1cc Bug 12230: (follow-up) improve unit tests
[1] Clear holidays first to avoid throwing off the
    calculations
[2] Add descriptions for the tests

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 02:01:51 +00:00
Galen Charlton
66ee141fd0 Bug 12230: (follow-up) update DBIC classes
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:43:18 +00:00
Galen Charlton
3915bbbf71 Bug 12230: DBRev 3.17.00.005
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:41:46 +00:00
Jonathan Druart
cf77e13347 Bug 12230: (follow-up) maxsuspensiondays should be set to NULL if not set
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:40:15 +00:00
Jonathan Druart
3629f7a2d0 Bug 12230: DB changes - add issuingrules.maxsuspensiondays
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:39:48 +00:00
Jonathan Druart
aa6117da36 Bug 12230: Set a maximum suspension days as a new issuing rule
This patch adds a new issuing rule: maxsuspensiondays.

A new column "Max. suspension duration (day)" appears in the main table
of the issuing rules.

If this value is filled, on returning an item, a patron won't be
suspended longer than this cap.

Test plan:
1/ Set "suspension in days" to 2.
2/ Check an item out to a patron and specify a due date to today - 10
days.
3/ Check the item in and verify the patron is suspended until today + 10
* 2 days.
4/ Remove the suspension.
5/ Set "Max. suspension duration" to 10.
6/ Check an item out to a patron and specify a due date to today - 10
days.
7/ Check the item in and verify the patron is suspended until today + 10
days.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:39:19 +00:00
Galen Charlton
2ff88b27b8 Bug 6254: (follow-up) update DBIC classes using newer version of DBIx::Class::Schema::Loader
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:26:43 +00:00
Galen Charlton
68229cbbcd Bug 6254: DBrev 3.17.00.004
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:24:13 +00:00
1511c55cde Bug 6254: (follow-up) tidy admin/categorie.pl ( whitespace changes only )
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:23:00 +00:00
e4cd412f2e Bug 6254: (follow-up) update DBIC classes
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:20:57 +00:00
1a737dcee6 Bug 6254: make it possible to set default privacy setting for new patrons
There is currently no way to set the privacy setting for newly created
patrons. This patch adds a new field "default privacy" to the patron
categories such that each patron category may have a different default
privacy setting.

Test Plan:
1) Apply this patch
2) Edit a patron category, change the default privacy to "forever"
3) Create a new patron of that category
4) Log into the catalog as that patron, verify the privacy setting
   is set to "forever"
5) Repeat steps 2-4 with the settings "never" and "default"

Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Bug 6254 [QA Followup 1] - can't set patron privacy by default

* Adds default privacy column to summary table
* Adds default privacy to delete category summary
* Adds "AFTER categorycode" to the database update
* Whitespace cleanup and formatting for affected code blocks
* Switch basic DBI queries to DBIx::Class to simplify code
* Adds reference to misc/cronjobs/batch_anonymise.pl to description

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Bug 6254 [QA Followup 2] - can't set patron privacy by default

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Bug 6254: QA FIX: remove trailing whitespaces

This patch removes trailing whitespaces/tab and fix the fields order in
the updatedb entry (according to the kohastructure.pl).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:17:37 +00:00
Galen Charlton
d1e76b1d97 Bug 7825: DBrev 3.17.00.003
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:02:45 +00:00
Jonathan Druart
4ca89b6bc3 Bug 7825: (follow-up) do not preselect item when OpacItemHolds is 'force' - bootstrap
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Retested with all 3 themes, works as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:01:12 +00:00
Jonathan Druart
83ae892749 Bug 7825: (follow-up) do not preselect item when OpacItemHolds is 'force'
This patch changes the default behavior for the 'force' value.
If the pref is set to force, no item is preselected and the item list is
shown.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:01:12 +00:00
Jonathan Druart
976b1dbb7e Bug 7825: (follow-up) fix the force value for the bootstrap theme
If the pref was set to 'force', the item selection was not shown.
.copiesrow should be hidden before showing specific #copiesrow_ID

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

Works on template level, tested with Boostrap and Prog theme
with all 3 possible seetings of OPACItemHolds:

1) no = offer only title level holds
2) yes = offer both title and item level holds
3) force = offer only item level holds

Also ran some additional tests on the Boostrap theme with
deactivated Javascript.

Note: I like this, but I think when "force" is selected the
item list needs to be shown by default. I am also not happy about
preselecting the first item.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:01:12 +00:00
Jonathan Druart
0f657f7a5f Bug 7825: (follow-up) clarify the yes and no values
The value of the pref should be '1' (for yes) or '0' (for no).
The options could be kept as 'yes' and 'no': since the ImplicitTyping is
set, yes/no would become '1/0'. But I think it is preferable not to use
the yes/no value in order not to introduce a bug here if ImplicitTyping
is unset later.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 01:00:57 +00:00
Jonathan Druart
8ca8d182f3 Bug 7825: Changed OPACItemHolds syspref to be no|yes|force choice - bootstrap
Same test plan as previous patch but with the bootstrap theme set.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 00:57:20 +00:00
Jonathan Druart
c8f38bfb3d Bug 7825: Changed OPACItemHolds syspref to be no|yes|force choice
Currently, the Koha system preference OPACItemHolds allows a library
system to choose to allow patrons to place bib and item level holds from
the OPAC, or to allow patrons only to place bib level holds only from
the OPAC.

This patch set adds a third option, "force", which *requires* that
patrons place item level holds from the opac, with no option of making a
bib level hold.

This patch modifies the system preference OPACItemHolds to be of the
type "Choice", with the choices being "no", "yes", "force". The patch
does not alter the currently set value of OPACItemHolds for database
updates, only adding the additional option.

Test Plan:
1) Set OPACItemHolds to "no". Check that OPAC holds behave as it is now
(no "Place On" column, no "Select a specific copy" table, making a
reserve is successful)
2) Set OPACItemHolds to "yes". Check that OPAC holds behave as it is now
( "Place On" column is there, "Select a specific copy" table shows when
"A specific copy" is selected, making a reserve is successful)
3) Set OPACItemHolds to "force". Check that OPAC holds behave as follows:
  -  no "Place On" column is present
  -  "Select a specific copy" table is opened
  -  making a reserve is successful

This patch is a squashed patch of the 3 following patches:

Amended opac-reserve.tt accordingly

Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>

Bug 7825: Followup prevent submission without choosing an item

+ Fix some ergonomic issues in opac-reserve

Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>

Bug 7825: Updatedatabase should only change the type and options values.

The value field should not be changed. We have to keep '1' for 'yes' and ''
for 'no'.

Original patch is from Srdjan Jankovic.

Signed-off-by: Koha team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on 4th patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 00:55:49 +00:00
Robin Sheat
750a9ec97c Bug 8970 - fix MARC import under plack
There were database handles being shared between a parent and a child
process, which is a big no-no, and was leading to crazy crashes. Fine
under CGI, but not in a persistent environment. This causes the child to
make a new database handle to use. Also some small cleanups.

To test:
* In a plack environment,
* Tools -> stage MARC records for import
* Use a reasonable size file (but not too big as it all goes into RAM -
  I made one about 40MB.)
* Make sure that it works, and that the progress bars progress.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Tested with a 55M file, I reproduced the error and I confirm this patch
fixes it.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-25 23:51:12 +00:00
Galen Charlton
695c7f7bef Bug 3050: (follow-up) update DBIC schema classes
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-25 21:17:39 +00:00
Galen Charlton
b1b0146722 Bug 3050: DBRev 3.17.00.002
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-25 21:16:05 +00:00
Jonathan Druart
059107ca75 Bug 3050: QA follow-up
1/ Use the usual way for ordering dates in table
2/ Add a confirmation dialog box on deleting a file
3/ Add some UTs

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-25 21:15:03 +00:00
Jacek Ablewicz
9c38ed77d5 Bug 3050 - Add an option to upload scanned invoices #3/3
(part #3: DB updates + new syspref)

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>
2014-05-25 21:14:53 +00:00
Jacek Ablewicz
35d323ae72 Bug 3050 - Add an option to upload scanned invoices #2/3
(part #2: changes to existing acqui scripts & templates)

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>
2014-05-25 21:14:42 +00:00
Jacek Ablewicz
480847e81c Bug 3050 - Add an option to upload scanned invoices #1/3
(part #1: new module w/ UT + script + template)

New feature, adds an ability to attach arbitrary files to
acquisition records (currently: to the invoices - but it can
be extended to baskets, basketgroups, budgets etc.).

Note: this code is (heavily) based on "Bug 8130 - attach PDF
files to a patron record" by Kale M Hall, main difference being
that new table (misc_files) and new module (Koha/Misc/Files.pm)
are intended to be a little more generic solution - they allow to
store and manage files associated with great many kinds of records,
from arbitrary tables.

Test plan:
1) Apply patch[es]
2) Run installer/data/mysql/updatedatabase.pl
3) Enable system preference 'AcqEnableFiles' in acquisition
4) New option 'Manage invoice files' appears in the invoice
detail page
5) Upload/view/download/delete some files for some invoices
6) Try to delete invoice with files attached (files should
get deleted as well)
7) Try to merge 2+ invoices with files attached; after merge,
all files previously attached to individual invoices being
merged should be attached to resulting invoice (merge destination)
8) prove t/db_dependent/Koha_Misc_Files.t
9) Ensure there are no regressions of any kind in invoice detail
page (acqui/invoice.pl).

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>
2014-05-25 21:14:00 +00:00
Galen Charlton
7533b1c0a8 Bug 12110: (follow-up) improve whitespace
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-25 15:24:33 +00:00
Mathieu Saby
b2499288cd Bug 12110: (follow-up) add French and German translation
This followup
- translates "vendor note" in French and German.
- replaces "Notes for vendor" with "Note for vendor" in English template
  (as there can only be 1 note)
- fixes a typo in French template (Qte => Qté, for "Quantité")

Test plan :
[1] set OrderPdfFormat preference to "French 3-pages"
[2] Print a basketgroup containing an order with a vendornote, and check
    the note is displayed and introduced by "Notes pour le fournisseur"
[3] set OrderPdfFormat preference to "German 2-pages"
[4] Print a basketgroup containing an order with a vendornote, and check
    the note is displayed and introduced by "Lieferantennotiz"

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-25 15:22:52 +00:00
Mathieu Saby
2dab2cc223 Bug 12110: Display the order vendor note in basket and basketgroup CSV and PDF
This bug adds the "vendor note" for each order in the PDF for
basketgroups.  The note is displayed only if it exists, just under the
bibliographic information.

I added a separation line "--------" between bibliographic information
and the note, so that it could be visible at 1st glance.

It also replaces the internal note with the vendor in the CSV for basket
and basketgroup.  It is more logical and useful for libraries to export
the note made for vendor, as those files are destined to be sent to the
vendor.

Test plan :
- fill a basket with some orders, some with internal notes, some with
  vendor notes
- export the basket in CSV : only the vendor notes should be present
- put the basket in a basketgroup
- export the basketgroup in CSV : only the vendor notes should be
  present
- Select "English-2 pages" template for basketgroups in Sysprefs
- export the basket in PDF : the vendor notes should be present under
  the bibliographic information
- Select "English-3 pages" template for basketgroups in Sysprefs
- export the basket in PDF : the vendor notes should be present under
  the bibliographic information

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>
2014-05-25 15:21:22 +00:00
27f1df0670 Bug 9088: if there is only one active order, pre-select it when creating new orderings
This patch makes the following changes to the template:

[1] If you add an order line, and you have one active fund (and zero or
    more inactive funds), the only active fund is preselected.
[2] If you modify an order line while its fund is inactive, it now shows
    the label (inactive) behind the fund name. (Note that other inactive funds
    may come up when clicking 'Show all' as they did before.)
[3] Corrected some indentation in this template part.

Test plan:

[1] Add an order line while having one active fund. Is it selected?
[2] Add an order line while having two or more active funds. No fund
    should be preselected.
[3] Modify an order line with an active fund. Is it still selected?
[4] Modify an order line with an inactive fund F2 (while having one active
    fund F1; note that this test explicitly wants F1 to be before F2).
    Check if F2 is selected and is labeled inactive.
[5] (Bonus points:) Modify an order line that refers to a deleted fund.
    If you edit this order, the fund combo should say: Select a fund.
    (Note: if you delete a fund, the budget_id in aqorders remains.)

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
I test against master 3.15.00.051
I test against all the three options of the AcqCreateItem:
placing an order
receiving an order
cataloging the record
All is OK.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-25 15:07:49 +00:00
Galen Charlton
96b60b5140 Bug 12238: (follow-up) tweak descriptions of the ID list
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-23 15:53:21 +00:00
e3e38d6902 Bug 12238: (follow-up) PATH does not need to be absolute
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-23 15:50:23 +00:00