If error occurs when generating the pdf, it would be better to get an
encapsulated error instead of the "software error" message in the pdf
file.
To test this patch I added this change:
b/Koha/Borrower/Discharge.pm
-115,6 +115,7 @@ sub generate_as_pdf {
say $html_fh $html_content;
close $html_fh;
my $pdf = PDF::FromHTML->new( encoding => 'utf-8' );
+ $html_path .= "poeut";
$pdf->load_file( $html_path );
$pdf->convert;
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch should be applied to work with bug 11944.
If you don't have 11944 yet, just don't apply this patch.
Note that the line
binmode(STDOUT);
in pl files is mandatory.
It comes from bug 11944 that adds the line
binmode( STDOUT, ":utf8" );
in C4::Templates::gettemplate.
Signed-off-by: Lucie <lucie.rousseaux@dracenie.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Lucie <lucie.rousseaux@dracenie.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
HTML::HTMLDoc is required in order to generate the discharges in PDF format.
Signed-off-by: Lucie <lucie.rousseaux@dracenie.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Lucie <lucie.rousseaux@dracenie.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch is the main patch. It adds new package and files for the new
pages (opac-discharge, members/discharge and members/discharges).
At the intranet, it is now possible to generate a discharge for a patron.
At the opac, a patron can request a discharge and a discharge if it has
been validated by a librarian.
Requirements:
The perl module PDF::FromHTML
New sysprefs:
- useDischarge: Allows librarians to discharge borrowers and borrowers
to request a discharge
New letter with a letter_code DISCHARGE.
Test plan:
- Switch on the syspref useDischarge.
- Verify a new tab appears in the patron page (intranet and opac).
- Verify the discharge cannot be generated if the patron has issues.
- Verify the patron can request a discharge from it's opac area.
- The request appears on the main page (intranet).
- Generate the discharge from the intranet.
- Try to download it (from the opac and the intranet).
Signed-off-by: Lucie <lucie.rousseaux@dracenie.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adds:
- links to the new pages.
- syspref description
- links on the main page (intranet)
- the DISCHARGE type for debarment
Signed-off-by: Lucie <lucie.rousseaux@dracenie.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Lucie <lucie.rousseaux@dracenie.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adds:
- syspref useDischarge
- the new table discharges
- the discharge notice
Signed-off-by: Lucie <lucie.rousseaux@dracenie.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The debian/scripts/koha-translate script was still testing for the old naming
schema files. I also made sure all files are tested, to warn the user if
any of them is absent.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch implements separate PO files for
different MARC dialects.
It depends on correct filenames, i.e. it will build PO
files using files with/without "unimarc|normarc|marc21"
on their names.
Changes:
A) LangInstaller.pm
Added definitions to create or update xx-YY-{MARCFLAVOR}.po,
minor change to create and install procedure, and modification
of install procedure to handle multiple target dirs.
Updated documentation.
B) Standarization of filenames
STAFF po file is now xx-YY-staff-prog.po
MARC dialects po files are xx-YY-marc-{MARCFLAVOUR}.po
To test:
1) Update po files for your preferred language, ej. nn-NO
cd misc/translator
perl translate update nn-NO
2) Do some copying/renaming
cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-UNIMARC.po
cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-NORMARC.po
cp po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-marc-MARC21.po
mv po/nn-NO-i-staff-t-prog-v-3006000.po po/nn-NO-staff-prog.po
(most MARC dialect strings are on staff, so we use that as basis)
3) Apply the patch
4) Update again to fix translation files, verbose
perl translate update nn-NO -v
5) Install language, verbose, verify translations
perl translate install nn-NO -v
6) Create translation files
rm po/nn-NO*
perl translate create nn-NO
we must have this list:
po/nn-NO-marc-MARC21.po
po/nn-NO-marc-NORMARC.po
po/nn-NO-marc-UNIMARC.po
po/nn-NO-opac-bootstrap.po
po/nn-NO-pref.po
po/nn-NO-staff-help.po
po/nn-NO-staff-prog.po
Additional tests:
7) Number of msgids
7.a) Before patch and after upgrade, extract and count msgids
for i in $(ls po/nn-NO-*po); \
do msginit -i $i -o nn-old.po --no-translator --no-wrap --locale=nn_NO; \
egrep ^msgid nn-old.po >> old; \
done
sort old | uniq | tee s-old | wc -l > n-old
s-old: have all msgids
n-old: number of msgids
7.b) After patch and after creation of new files
Repeat procedure, diferent files (s-new, n-new)
7.c) Compare (diff s-old snew), they are the same
(save for a strange UNIMARC char in my case, but
it's present on corresponding PO file)
8) Installed dirs/files
8.a) List of EN dirs/files
cd koha-tmpl
find | egrep "/en/" > en
8.b) List of nn-NO dirs/files. After patch and language install
cd koha-tmpl
find | egrep "/nn-NO/" | sed 's|/nn-NO/|/en/|' > nn
8.c) Compare (diff en nn), they are the same
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Followed the steps outlined by Bernardo, and everything works as
expected. I think the most important points are that "perl translate
create nn-NO" produces the right files, and translating anything in
them, then doing "translate install" makes the translations show
up in the interface. The numbers msgids in the nn-NO correspond
well wit the number of msgids in other sets of .po files.
I bet y'all will be happy when you don't have to see the stupid
Norwegian strings when you translate! ;-)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Just moving the print statement for DEV updates to show them too for
the new perl format.
In the loop opendir..readdir is used; this might not be always in the
expected order. I added a sort to force the order.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13068 adds the ability to execute sql files from atomicupdates for
in process developments to reduce merge conflicts. We need to extend
this ability further to be able to handle perl code.
Revised Test Plan
-----------------
1) Run updatedatabase.pl
-- Expect output to be similar to:
$ ./installer/data/mysql/updatedatabase.pl
DEV atomic update : test.perl
Upgrade to XXX done (Bug 13893 - Add ability to execute perl scripts in atomicupdates)
2) Run koha qa test tools.
-- only need to check last commit (-c 1), because first commit is a
sample file which shouldn't be pushed.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Test plan :
- create a fresh database with installer
- check the presence of the syspref : select value from systempreferences where variable like 'CardnumberLength'
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected. Tested both upgrading and on a new install.
This patch rename the column auth_header.datemodified with modification_time.
Now this column will be automatically updated when a row will be
updated.
Test plan:
0/ Verify that la major part of your auth_header.datemodified is set to
null
1/ Execute the updatedb entry
2/ Verify that the column is renamed and the values have not been
changed.
3/ Update an authority and verify (using the sql cli) that this value
has been updated.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
In the absence of a coding guideline stipulating a preferred column
name for a timestamp, this modification_time works for me.
Null values are replaced by current time after db rev; other values
are left alone.
NOTE FOR RM: Please run update_dbix_class_files.pl.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adds the check in and standard catalog search to cataloging-search.inc
To test:
1 - Apply patch
2 - Go to More->Cataloging
3 - Search in each tab (Cataloging search / Check out / Check in / Standard
search) and ensure that all work as expected
Signed-off-by: Frederic Demians <f.demians@tamil.fr>
- Added search options work properly, and are consistently named.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Test Plan:
1) Apply this patch
2) Create one or more public lists
3) View the list in the opac
4) Note the new RSS icon next to the list name
5) Open the link in FireFox or an RSS reader
6) You should see an RSS feed of your list with the title
and author of each item as a hyperlink to the record details
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
----
Amended to resolve conflict in sysprefs.sql / mveron
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
To test:
Apply patch
Do a database update (e.g. by changing version number in kohaversion.pl)
Find new system preference 'addressformat' in I18N/L10N
Choose 'German style'
Go to Patrons and edit a patron / create new patron
Verify that Zip code appears above City
Change system preference to 'US style'
Verify that Zip code appears between State and Country.
BTW: New formats can be added by editing i18n_l10n.pref (add a new code, e.g. fr for "French style") and copy / modify the includes using the same code as postfix.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Patch amended to move street number after address. /Marc
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Amended do resolve conflict with updatedatabase.pl /Marc
Rebased for current master /Marc
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch displays the address information in the left column of the patron's pages using the new system preference.
The address is formatted in member-display-address-style-us.inc and member-display-address-style-de.inc
To test:
- Apply patch on top of 1st and 2nd patch
- Select 'German style' in system preference 'addressformat' in I18N/L10N
- Verify that the address information displays properly in the left column of all patron's pages.
- Verify that the address displays properly in the main area of moremember.pl as well (Note: In right column, Alternate address /contact are not yet touched))
- Switch system preference to US style, repeat checks
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
AMending without changes to put this patch at the end of the patch list / Marc
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch extracts the address blocks in memberentrygen.tt to include files.
To test: The overall functionality should remain the same with this patch.
In further steps, more country- or region-dependent includes could be added, along with functionality to select them using a system preference.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
to test...
1/ attempt to view a subscription-detail that has a NULL value for either it's 'startdate' or 'enddate'
an example url would be...
http://koha-admin.foo.org/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=1
observe error...
'Date::Calc::PP::Delta_Days(): Usage: Date::Calc::Delta_Days($year1,$month1,$day1,$year2,$month2,$day2) at /your/koha/C4/Serials.pm line 2325'
2/ apply patch
3/ repeat step 1/
observe that detail page displays OK
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I confirm the issue if startdate is null (can exist with old data,
before the js check on the form).
Amended patch: Remove trailing space char and the link to the bz number
(can be found using git log).
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch add the same behavior as previous patches for the xslt view.
Signed-off-by: valerie bertrand <valerie.bertrand@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: valerie bertrand <valerie.bertrand@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>