Merge branch 'bug_8977' into 3.12-master
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 9 Jan 2013 13:18:34 +0000 (08:18 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 9 Jan 2013 13:18:34 +0000 (08:18 -0500)
331 files changed:
C4/Accounts.pm
C4/Acquisition.pm
C4/Auth.pm
C4/AuthoritiesMarc.pm
C4/Biblio.pm
C4/Bookseller.pm
C4/Branch.pm
C4/Breeding.pm
C4/Budgets.pm
C4/Category.pm
C4/Circulation.pm
C4/Context.pm
C4/HTML5Media.pm [new file with mode: 0644]
C4/ILSDI/Services.pm
C4/Images.pm
C4/ImportBatch.pm
C4/Input.pm
C4/Installer/PerlDependencies.pm
C4/Items.pm
C4/Koha.pm
C4/Languages.pm
C4/Letters.pm
C4/Log.pm
C4/Members.pm
C4/Members/AttributeTypes.pm
C4/Members/Attributes.pm
C4/Reserves.pm
C4/SIP/ILS/Item.pm
C4/SIP/ILS/Patron.pm
C4/SIP/ILS/Transaction/Checkin.pm
C4/SIP/ILS/Transaction/Checkout.pm
C4/SIP/ILS/Transaction/FeePayment.pm
C4/SIP/ILS/Transaction/Hold.pm
C4/SIP/ILS/Transaction/Renew.pm
C4/SIP/ILS/Transaction/RenewAll.pm
C4/Search.pm
C4/Serials.pm
C4/Tags.pm
C4/VirtualShelves.pm
C4/VirtualShelves/Page.pm
Koha/Borrower/Modifications.pm [new file with mode: 0644]
Koha/Calendar.pm
Makefile.PL
acqui/basket.pl
acqui/neworderempty.pl
acqui/orderreceive.pl
acqui/parcel.pl
acqui/z3950_search.pl
admin/authorised_values.pl
admin/categorie.pl
admin/patron-attr-types.pl
basket/basket.pl
catalogue/detail.pl
catalogue/detailprint.pl [deleted file]
catalogue/search.pl
cataloguing/addbiblio.pl
cataloguing/additem.pl
cataloguing/z3950_search.pl
circ/bookcount.pl
circ/circulation-home.pl
circ/circulation.pl
circ/returns.pl
debian/docs/koha-shell.xml [new file with mode: 0644]
debian/koha-common.install
debian/rules
debian/scripts/koha-run-backups
debian/scripts/koha-shell [new file with mode: 0755]
docs/history.txt
etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml
etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl
etc/zebradb/marc_defs/marc21/authorities/record.abs
etc/zebradb/marc_defs/unimarc/authorities/record.abs
etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml
etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl
etc/zebradb/marc_defs/unimarc/biblios/record.abs
install_misc/install_koha_on_fresh_debian
installer/data/mysql/de-DE/mandatory/sample_notices.sql
installer/data/mysql/de-DE/mandatory/userpermissions.sql
installer/data/mysql/de-DE/optional/auth_val.sql
installer/data/mysql/de-DE/optional/patron_atributes.sql [new file with mode: 0644]
installer/data/mysql/de-DE/optional/patron_atributes.txt [new file with mode: 0644]
installer/data/mysql/de-DE/optional/sample_z3950_servers.txt
installer/data/mysql/en/mandatory/message_transport_types.txt
installer/data/mysql/en/mandatory/sample_notices.sql
installer/data/mysql/en/mandatory/sample_notices.txt
installer/data/mysql/en/mandatory/sample_notices_message_attributes.txt
installer/data/mysql/en/mandatory/sample_notices_message_transports.txt
installer/data/mysql/en/mandatory/subtag_registry.sql [changed mode: 0644->0755]
installer/data/mysql/en/mandatory/subtag_registry.txt
installer/data/mysql/en/optional/auth_val.sql
installer/data/mysql/en/optional/auth_val.txt
installer/data/mysql/en/optional/marc21_holdings_coded_values.txt
installer/data/mysql/en/optional/marc21_relatorterms.txt
installer/data/mysql/en/optional/patron_categories.txt
installer/data/mysql/en/optional/sample_creator_data.txt
installer/data/mysql/en/optional/sample_holidays.txt
installer/data/mysql/en/optional/sample_itemtypes.txt
installer/data/mysql/en/optional/sample_libraries.txt
installer/data/mysql/en/optional/sample_news.txt
installer/data/mysql/en/optional/sample_quotes.txt
installer/data/mysql/en/optional/sample_z3950_servers.txt
installer/data/mysql/es-ES/mandatory/sample_notices.sql
installer/data/mysql/es-ES/optional/sample_z3950_servers.txt
installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql
installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql
installer/data/mysql/it-IT/necessari/auth_val.sql
installer/data/mysql/it-IT/necessari/userpermissions.sql
installer/data/mysql/kohastructure.sql
installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql
installer/data/mysql/nb-NO/1-Obligatorisk/system_preferences.sql
installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql
installer/data/mysql/pl-PL/mandatory/sample_notices.sql
installer/data/mysql/pl-PL/optional/sample_z3950_servers.txt
installer/data/mysql/ru-RU/mandatory/sample_notices.sql
installer/data/mysql/sysprefs.sql
installer/data/mysql/uk-UA/mandatory/sample_notices.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css
koha-tmpl/intranet-tmpl/prog/en/css/preferences.css
koha-tmpl/intranet-tmpl/prog/en/css/print.css
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc [deleted file]
koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc
koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc
koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/subtypes_unimarc.inc
koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/js/acq.js
koha-tmpl/intranet-tmpl/prog/en/js/ajax.js
koha-tmpl/intranet-tmpl/prog/en/js/basket.js
koha-tmpl/intranet-tmpl/prog/en/js/members.js
koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js
koha-tmpl/intranet-tmpl/prog/en/lib/jquery/jquery-ui.css
koha-tmpl/intranet-tmpl/prog/en/lib/jquery/jquery-ui.js
koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/humanmsg.js
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detailprint.tt [deleted file]
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/didyoumean.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/smart-rules.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/authorities/authorities.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/branchoverdues.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/pendingreserves.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/returns.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/circ/view_holdsqueue.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/members/member.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/members/members-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/reports/guided_reports.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/holidays.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/letter.tt
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-recieve.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/article_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/audiovisual_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/binary_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/book_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/handwriting_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/map_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/periodical_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/picture_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/score_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/sons_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/sound_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/thesis_b.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/unknown_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/ccsr/en/css/opac.css
koha-tmpl/opac-tmpl/ccsr/en/css/sanop.css [deleted file]
koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc
koha-tmpl/opac-tmpl/ccsr/en/js/basket.js
koha-tmpl/opac-tmpl/ccsr/en/js/tags.js
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/css/sanop.css [deleted file]
koha-tmpl/opac-tmpl/prog/en/css/sco.css
koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc
koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
koha-tmpl/opac-tmpl/prog/en/includes/opac-authorities.inc
koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc
koha-tmpl/opac-tmpl/prog/en/includes/page-numbers.inc
koha-tmpl/opac-tmpl/prog/en/includes/subtypes_unimarc.inc
koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc
koha-tmpl/opac-tmpl/prog/en/js/basket.js
koha-tmpl/opac-tmpl/prog/en/js/script.js
koha-tmpl/opac-tmpl/prog/en/js/tags.js
koha-tmpl/opac-tmpl/prog/en/lib/jquery/images/ui-icons_888888_256x240.png [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-authorities-home.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadcart.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-downloadshelf.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-main.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry-update-submitted.tt [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-passwd.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-confirmation.tt [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-email-sent.tt [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-invalid.tt [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
koha-tmpl/opac-tmpl/prog/en/modules/sco/help.tt
koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt
koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/article_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/audiovisual_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/binary_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/book_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/handwriting_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/map_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/periodical_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/picture_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/score_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/sons_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/sound_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/thesis_b.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/unknown_b.gif [new file with mode: 0644]
kohaversion.pl
mainpage.pl
members/member.pl
members/members-home.pl
members/members-update-do.pl [new file with mode: 0755]
members/members-update.pl [new file with mode: 0755]
members/moremember.pl
members/paycollect.pl
members/setstatus.pl
misc/bin/koha-index-daemon-ctl.sh [new file with mode: 0755]
misc/cronjobs/backup.sh
misc/cronjobs/delete_expired_opac_registrations.pl [new file with mode: 0755]
misc/cronjobs/delete_unverified_opac_registrations.pl [new file with mode: 0755]
misc/cronjobs/overdue_notices.pl
misc/cronjobs/runreport.pl
misc/cronjobs/serialsUpdate.pl
misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl
misc/migration_tools/bulkmarcimport.pl
misc/migration_tools/rebuild_zebra.pl
misc/release_notes/release_notes_3_10_0.txt [new file with mode: 0644]
misc/translator/tmpl_process3.pl
misc/translator/xgettext.pl
opac/opac-authorities-home.pl
opac/opac-authoritiesdetail.pl
opac/opac-detail.pl
opac/opac-memberentry.pl [new file with mode: 0755]
opac/opac-passwd.pl
opac/opac-registration-verify.pl [new file with mode: 0755]
opac/opac-reserve.pl
opac/opac-search.pl
opac/opac-user.pl
opac/sco/help.pl
opac/sco/printslip.pl [new file with mode: 0755]
opac/sco/sco-main.pl
reports/acquisitions_stats.pl
reports/dictionary.pl
reports/serials_stats.pl
reserve/request.pl
serials/checkexpiration.pl
serials/serials-collection.pl
serials/serials-edit.pl
serials/serials-search.pl
serials/subscription-detail.pl
t/00-checkdatabase-version.t
t/00-load.t
t/Calendar.t
t/Makefile
t/Members_AttributeTypes.t
t/db_dependent/Context.t
t/db_dependent/Koha_borrower_modifications.t [new file with mode: 0755]
t/db_dependent/lib/KohaTest.pm
t/db_dependent/lib/KohaTest/Members.pm
tools/batchMod.pl
tools/cleanborrowers.pl
tools/export.pl
tools/import_borrowers.pl

index 8a0212f..5aa4fef 100644 (file)
@@ -768,13 +768,13 @@ sub makepartialpayment {
     return;
 }
 
-=head2 WriteOff
+=head2 WriteOffFee
 
-  WriteOff( $borrowernumber, $accountnum, $itemnum, $accounttype, $amount, $branch );
+  WriteOff( $borrowernumber, $accountline_id, $itemnum, $accounttype, $amount, $branch );
 
 Write off a fine for a patron.
 C<$borrowernumber> is the patron's borrower number.
-C<$accountnum> is the accountnumber of the fee to write off.
+C<$accountline_id> is the accountline_id of the fee to write off.
 C<$itemnum> is the itemnumber of of item whose fine is being written off.
 C<$accounttype> is the account type of the fine being written off.
 C<$amount> is a floating-point number, giving the amount that is being written off.
@@ -783,7 +783,7 @@ C<$branch> is the branchcode of the library where the writeoff occurred.
 =cut
 
 sub WriteOffFee {
-    my ( $borrowernumber, $accountnum, $itemnum, $accounttype, $amount, $branch ) = @_;
+    my ( $borrowernumber, $accountline_id, $itemnum, $accounttype, $amount, $branch ) = @_;
     $branch ||= C4::Context->userenv->{branch};
     my $manager_id = 0;
     $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv;
@@ -796,10 +796,10 @@ sub WriteOffFee {
 
     $query = "
         UPDATE accountlines SET amountoutstanding = 0
-        WHERE accountno = ? AND borrowernumber = ?
+        WHERE accountlines_id = ? AND borrowernumber = ?
     ";
     $sth = $dbh->prepare( $query );
-    $sth->execute( $accountnum, $borrowernumber );
+    $sth->execute( $accountline_id, $borrowernumber );
 
     $query ="
         INSERT INTO accountlines
index 83031be..17330e5 100644 (file)
@@ -1795,8 +1795,8 @@ sub GetLateOrders {
     my $having = "";
     if ($dbdriver eq "mysql") {
         $select .= "
-        aqorders.quantity - IFNULL(aqorders.quantityreceived,0)                 AS quantity,
-        (aqorders.quantity - IFNULL(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal,
+        aqorders.quantity - COALESCE(aqorders.quantityreceived,0)                 AS quantity,
+        (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal,
         DATEDIFF(CAST(now() AS date),closedate) AS latesince
         ";
         if ( defined $delay ) {
index 705eda0..2eb63f5 100644 (file)
@@ -462,6 +462,8 @@ sub get_template_and_user {
             SyndeticsSeries              => C4::Context->preference("SyndeticsSeries"),
             SyndeticsCoverImageSize      => C4::Context->preference("SyndeticsCoverImageSize"),
             OPACLocalCoverImages         => C4::Context->preference("OPACLocalCoverImages"),
+            PatronSelfRegistration       => C4::Context->preference("PatronSelfRegistration"),
+            PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
         );
 
         $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic"));
@@ -633,13 +635,15 @@ sub checkauth {
     if ( $userid = $ENV{'REMOTE_USER'} ) {
         # Using Basic Authentication, no cookies required
         $cookie = $query->cookie(
-            -name    => 'CGISESSID',
-            -value   => '',
-            -expires => ''
+            -name     => 'CGISESSID',
+            -value    => '',
+            -expires  => '',
+            -HttpOnly => 1,
         );
         $loggedin = 1;
     }
-    elsif ( $sessionID = $query->cookie("CGISESSID")) {     # assignment, not comparison
+    elsif ( $sessionID = $query->cookie("CGISESSID") )
+    {    # assignment, not comparison
         my $session = get_session($sessionID);
         C4::Context->_new_userenv($sessionID);
         my ($ip, $lasttime, $sessiontype);
@@ -705,8 +709,12 @@ sub checkauth {
             $userid    = undef;
         }
         else {
-            $cookie = $query->cookie( CGISESSID => $session->id );
-            $session->param('lasttime',time());
+            $cookie = $query->cookie(
+                -name     => 'CGISESSID',
+                -value    => $session->id,
+                -HttpOnly => 1
+            );
+            $session->param( 'lasttime', time() );
             unless ( $sessiontype && $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in...
                 $flags = haspermission($userid, $flagsrequired);
                 if ($flags) {
@@ -722,8 +730,12 @@ sub checkauth {
         my $session = get_session("") or die "Auth ERROR: Cannot get_session()";
         my $sessionID = $session->id;
         C4::Context->_new_userenv($sessionID);
-        $cookie = $query->cookie( CGISESSID => $sessionID );
-        $userid = $query->param('userid');
+        $cookie = $query->cookie(
+            -name     => 'CGISESSID',
+            -value    => $session->id,
+            -HttpOnly => 1
+        );
+    $userid = $query->param('userid');
         if (   ( $cas && $query->param('ticket') )
             || $userid
             || ( my $pki_field = C4::Context->preference('AllowPKIAuth') ) ne
@@ -914,7 +926,11 @@ sub checkauth {
     {
         # successful login
         unless ($cookie) {
-            $cookie = $query->cookie( CGISESSID => '' );
+            $cookie = $query->cookie(
+                -name     => 'CGISESSID',
+                -value    => '',
+                -HttpOnly => 1
+            );
         }
         return ( $userid, $cookie, $sessionID, $flags );
     }
@@ -932,17 +948,11 @@ sub checkauth {
         my $value = $query->param($name);
         push @inputs, { name => $name, value => $value };
     }
-    # get the branchloop, which we need for authentication
-    my $branches = GetBranches();
-    my @branch_loop;
-    for my $branch_hash (sort keys %$branches) {
-               push @branch_loop, {branchcode => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, };
-    }
 
     my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tmpl' : 'auth.tmpl';
     my $template = C4::Templates::gettemplate($template_name, $type, $query );
     $template->param(
-        branchloop           => \@branch_loop,
+        branchloop           => GetBranchesLoop(),
         opaccolorstylesheet  => C4::Context->preference("opaccolorstylesheet"),
         opaclayoutstylesheet => C4::Context->preference("opaclayoutstylesheet"),
         login                => 1,
@@ -967,10 +977,9 @@ sub checkauth {
         OpacAuthorities      => C4::Context->preference("OpacAuthorities"),
         OpacBrowser          => C4::Context->preference("OpacBrowser"),
         opacheader           => C4::Context->preference("opacheader"),
-        TagsEnabled                  => C4::Context->preference("TagsEnabled"),
+        TagsEnabled          => C4::Context->preference("TagsEnabled"),
         OPACUserCSS           => C4::Context->preference("OPACUserCSS"),
-        intranetcolorstylesheet =>
-                                                               C4::Context->preference("intranetcolorstylesheet"),
+        intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
         intranetstylesheet => C4::Context->preference("intranetstylesheet"),
         intranetbookbag    => C4::Context->preference("intranetbookbag"),
         IntranetNav        => C4::Context->preference("IntranetNav"),
@@ -978,7 +987,9 @@ sub checkauth {
         intranetuserjs     => C4::Context->preference("intranetuserjs"),
         IndependantBranches=> C4::Context->preference("IndependantBranches"),
         AutoLocation       => C4::Context->preference("AutoLocation"),
-               wrongip            => $info{'wrongip'},
+        wrongip            => $info{'wrongip'},
+        PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"),
+        PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
     );
 
     $template->param( OpacPublic => C4::Context->preference("OpacPublic"));
index db340ba..4a3392f 100644 (file)
@@ -292,9 +292,9 @@ sub SearchAuthorities {
         } elsif ($sortby eq 'HeadingDsc') {
             $orderstring = '@attr 7=2 @attr 1=Heading 0';
         } elsif ($sortby eq 'AuthidAsc') {
-            $orderstring = '@attr 7=1 @attr 1=Local-Number 0';
+            $orderstring = '@attr 7=1 @attr 4=109 @attr 1=Local-Number 0';
         } elsif ($sortby eq 'AuthidDsc') {
-            $orderstring = '@attr 7=2 @attr 1=Local-Number 0';
+            $orderstring = '@attr 7=2 @attr 4=109 @attr 1=Local-Number 0';
         }
         $query=($query?$query:"\@attr 1=_ALLRECORDS \@attr 2=103 ''");
         $query="\@or $orderstring $query" if $orderstring;
@@ -359,8 +359,10 @@ sub SearchAuthorities {
                     }
                 }
                 my $thisauthtype = GetAuthType(GetAuthTypeCode($authid));
-                $thisauthtype |= GetAuthType($authtypecode) if $authtypecode;
-                $newline{authtype}     = defined ($thisauthtype) ?
+                unless (defined $thisauthtype) {
+                    $thisauthtype = GetAuthType($authtypecode) if $authtypecode;
+                }
+                $newline{authtype}     = defined($thisauthtype) ?
                                             $thisauthtype->{'authtypetext'} : '';
                 $newline{summary}      = $summary;
                 $newline{even}         = $counter % 2;
index eb213d5..7d28ccd 100644 (file)
@@ -90,6 +90,7 @@ BEGIN {
       &GetAuthorisedValueDesc
       &GetMarcStructure
       &GetMarcFromKohaField
+      &GetMarcSubfieldStructureFromKohaField
       &GetFrameworkCode
       &TransformKohaToMarc
       &PrepHostMarcField
@@ -1214,6 +1215,38 @@ sub GetMarcFromKohaField {
     return (0, undef);
 }
 
+=head2 GetMarcSubfieldStructureFromKohaField
+
+    my $subfield_structure = &GetMarcSubfieldStructureFromKohaField($kohafield, $frameworkcode);
+
+Returns a hashref where keys are marc_subfield_structure column names for the
+row where kohafield=$kohafield for the given framework code.
+
+$frameworkcode is optional. If not given, then the default framework is used.
+
+=cut
+
+sub GetMarcSubfieldStructureFromKohaField {
+    my ($kohafield, $frameworkcode) = @_;
+
+    return undef unless $kohafield;
+    $frameworkcode //= '';
+
+    my $dbh = C4::Context->dbh;
+    my $query = qq{
+        SELECT *
+        FROM marc_subfield_structure
+        WHERE kohafield = ?
+          AND frameworkcode = ?
+    };
+    my $sth = $dbh->prepare($query);
+    $sth->execute($kohafield, $frameworkcode);
+    my $result = $sth->fetchrow_hashref;
+    $sth->finish;
+
+    return $result;
+}
+
 =head2 GetMarcBiblio
 
   my $record = GetMarcBiblio($biblionumber, [$embeditems]);
@@ -1255,7 +1288,7 @@ sub GetMarcBiblio {
   my $marcxml = GetXmlBiblio($biblionumber);
 
 Returns biblioitems.marcxml of the biblionumber passed in parameter.
-The XML contains both biblio & item datas
+The XML should only contain biblio information (item information is no longer stored in marcxml field)
 
 =cut
 
@@ -1686,15 +1719,19 @@ sub GetMarcNotes {
     my $note = "";
     my $tag  = "";
     my $marcnote;
+    my %blacklist = map { $_ => 1 } split(/,/,C4::Context->preference('NotesBlacklist'));
     foreach my $field ( $record->field($scope) ) {
-        my $value = $field->as_string();
-        if ( $note ne "" ) {
-            $marcnote = { marcnote => $note, };
-            push @marcnotes, $marcnote;
-            $note = $value;
-        }
-        if ( $note ne $value ) {
-            $note = $note . " " . $value;
+        my $tag = $field->tag();
+        if (!$blacklist{$tag}) {
+            my $value = $field->as_string();
+            if ( $note ne "" ) {
+                $marcnote = { marcnote => $note, };
+                push @marcnotes, $marcnote;
+                $note = $value;
+            }
+            if ( $note ne $value ) {
+                $note = $note . " " . $value;
+            }
         }
     }
 
@@ -2841,6 +2878,8 @@ sub EmbedItemsInMarcBiblio {
     my ($marc, $biblionumber, $itemnumbers) = @_;
     croak "No MARC record" unless $marc;
 
+    $itemnumbers = [] unless defined $itemnumbers;
+
     my $frameworkcode = GetFrameworkCode($biblionumber);
     _strip_item_fields($marc, $frameworkcode);
 
@@ -2851,7 +2890,7 @@ sub EmbedItemsInMarcBiblio {
     my @item_fields;
     my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", $frameworkcode );
     while (my ($itemnumber) = $sth->fetchrow_array) {
-        next if $itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
+        next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
         require C4::Items;
         my $item_marc = C4::Items::GetMarcItem($biblionumber, $itemnumber);
         push @item_fields, $item_marc->field($itemtag);
index 5874a93..c8389a3 100644 (file)
@@ -125,7 +125,7 @@ sub GetBooksellersWithLateOrders {
             )
             AND aqorders.rrp <> 0
             AND aqorders.ecost <> 0
-            AND aqorders.quantity - IFNULL(aqorders.quantityreceived,0) <> 0
+            AND aqorders.quantity - COALESCE(aqorders.quantityreceived,0) <> 0
             AND aqbasket.closedate IS NOT NULL
     ";
     if ( defined $delay ) {
index d765c99..fe67e0c 100644 (file)
@@ -160,11 +160,12 @@ sub GetBranchesLoop {  # since this is what most pages want anyway
     my $onlymine = @_ ? shift : onlymine();
     my $branches = GetBranches($onlymine);
     my @loop;
-    foreach ( sort { uc($branches->{$a}->{branchname}) cmp uc($branches->{$b}->{branchname}) } keys %$branches ) {
+    foreach my $branchcode ( sort { uc($branches->{$a}->{branchname}) cmp uc($branches->{$b}->{branchname}) } keys %$branches ) {
         push @loop, {
-            value => $_,
-            selected => ($_ eq $branch) ? 1 : 0, 
-            branchname => $branches->{$_}->{branchname},
+            value      => $branchcode,
+            branchcode => $branchcode,
+            selected   => ($branchcode eq $branch) ? 1 : 0,
+            branchname => $branches->{$branchcode}->{branchname},
         };
     }
     return \@loop;
index 9dedc4d..f82ecf8 100644 (file)
@@ -33,7 +33,7 @@ BEGIN {
     $VERSION = 3.07.00.049;
        require Exporter;
        @ISA = qw(Exporter);
-       @EXPORT = qw(&ImportBreeding &BreedingSearch);
+    @EXPORT = qw(&ImportBreeding &BreedingSearch &Z3950Search);
 }
 
 =head1 NAME
@@ -213,6 +213,216 @@ sub BreedingSearch {
     return($count, @results);
 } # sub breedingsearch
 
+
+=head2 Z3950Search
+
+Z3950Search($pars, $template);
+
+Parameters for Z3950 search are all passed via the $pars hash. It may contain isbn, title, author, dewey, subject, lccall, controlnumber, stdid, srchany.
+Also it should contain an arrayref id that points to a list of id's of the z3950 targets to be queried (see z3950servers table).
+This code is used in acqui/z3950_search and cataloging/z3950_search.
+The second parameter $template is a Template object. The routine uses this parameter to store the found values into the template.
+
+=cut
+
+sub Z3950Search {
+    my ($pars, $template)= @_;
+
+    my $dbh   = C4::Context->dbh;
+    my @id= @{$pars->{id}};
+    my $random= $pars->{random};
+    my $page= $pars->{page};
+    my $biblionumber= $pars->{biblionumber};
+
+    my $isbn= $pars->{isbn};
+    my $issn= $pars->{issn};
+    my $title= $pars->{title};
+    my $author= $pars->{author};
+    my $dewey= $pars->{dewey};
+    my $subject= $pars->{subject};
+    my $lccn= $pars->{lccn};
+    my $lccall= $pars->{lccall};
+    my $controlnumber= $pars->{controlnumber};
+
+    my $show_next       = 0;
+    my $total_pages     = 0;
+
+    my $attr = '';
+    my $term;
+    my $host;
+    my $server;
+    my $database;
+    my $port;
+    my $marcdata;
+    my @encoding;
+    my @results;
+    my $count;
+    my $record;
+    my $oldbiblio;
+    my @serverhost;
+    my @servername;
+    my @breeding_loop = ();
+
+    my @oConnection;
+    my @oResult;
+    my @errconn;
+    my $s = 0;
+    my $query;
+    my $nterms=0;
+    if ($isbn) {
+        $term=$isbn;
+        $query .= " \@attr 1=7 \@attr 5=1 \"$term\" ";
+        $nterms++;
+    }
+    if ($issn) {
+        $term=$issn;
+        $query .= " \@attr 1=8 \@attr 5=1 \"$term\" ";
+        $nterms++;
+    }
+    if ($title) {
+        utf8::decode($title);
+        $query .= " \@attr 1=4 \"$title\" ";
+        $nterms++;
+    }
+    if ($author) {
+        utf8::decode($author);
+        $query .= " \@attr 1=1003 \"$author\" ";
+        $nterms++;
+    }
+    if ($dewey) {
+        $query .= " \@attr 1=16 \"$dewey\" ";
+        $nterms++;
+    }
+    if ($subject) {
+        utf8::decode($subject);
+        $query .= " \@attr 1=21 \"$subject\" ";
+        $nterms++;
+    }
+    if ($lccn) {
+        $query .= " \@attr 1=9 $lccn ";
+        $nterms++;
+    }
+    if ($lccall) {
+        $query .= " \@attr 1=16 \@attr 2=3 \@attr 3=1 \@attr 4=1 \@attr 5=1 \@attr 6=1 \"$lccall\" ";
+        $nterms++;
+    }
+    if ($controlnumber) {
+        $query .= " \@attr 1=12 \"$controlnumber\" ";
+        $nterms++;
+    }
+    for my $i (1..$nterms-1) {
+        $query = "\@and " . $query;
+    }
+
+    foreach my $servid (@id) {
+        my $sth = $dbh->prepare("select * from z3950servers where id=?");
+        $sth->execute($servid);
+        while ( $server = $sth->fetchrow_hashref ) {
+            my $option1      = new ZOOM::Options();
+            $option1->option( 'async' => 1 );
+            $option1->option( 'elementSetName', 'F' );
+            $option1->option( 'databaseName',   $server->{db} );
+            $option1->option( 'user', $server->{userid} ) if $server->{userid};
+            $option1->option( 'password', $server->{password} )
+              if $server->{password};
+            $option1->option( 'preferredRecordSyntax', $server->{syntax} );
+            $option1->option( 'timeout', $server->{timeout} ) if $server->{timeout};
+            $oConnection[$s] = create ZOOM::Connection($option1);
+            $oConnection[$s]->connect( $server->{host}, $server->{port} );
+            $serverhost[$s] = $server->{host};
+            $servername[$s] = $server->{name};
+            $encoding[$s]   = ($server->{encoding}?$server->{encoding}:"iso-5426");
+            $s++;
+        }    ## while fetch
+    }    # foreach
+    my $nremaining  = $s;
+
+    for ( my $z = 0 ; $z < $s ; $z++ ) {
+        $oResult[$z] = $oConnection[$z]->search_pqf($query);
+    }
+
+    while ( $nremaining-- ) {
+        my $k;
+        my $event;
+        while ( ( $k = ZOOM::event( \@oConnection ) ) != 0 ) {
+            $event = $oConnection[ $k - 1 ]->last_event();
+            last if $event == ZOOM::Event::ZEND;
+        }
+
+        if ( $k != 0 ) {
+            $k--;
+            my ($error, $errmsg, $addinfo, $diagset)= $oConnection[$k]->error_x();
+            if ($error) {
+                if ($error =~ m/^(10000|10007)$/ ) {
+                    push(@errconn, {'server' => $serverhost[$k]});
+                }
+            }
+            else {
+                my $numresults = $oResult[$k]->size();
+                my $i;
+                my $result = '';
+                if ( $numresults > 0  and $numresults >= (($page-1)*20)) {
+                    $show_next = 1 if $numresults >= ($page*20);
+                    $total_pages = int($numresults/20)+1 if $total_pages < ($numresults/20);
+                    for ($i = ($page-1)*20; $i < (($numresults < ($page*20)) ? $numresults : ($page*20)); $i++) {
+                        my $rec = $oResult[$k]->record($i);
+                        if ($rec) {
+                            my $marcrecord;
+                            $marcdata   = $rec->raw();
+                            my ($charset_result, $charset_errors);
+                            ($marcrecord, $charset_result, $charset_errors)= MarcToUTF8Record($marcdata, C4::Context->preference('marcflavour'), $encoding[$k]);
+                            # Normalize the record so it doesn't have separated diacritics
+                            SetUTF8Flag($marcrecord);
+                            my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" );
+                            $oldbiblio->{isbn}   =~ s/ |-|\.//g if $oldbiblio->{isbn};
+                            # pad | and ( with spaces to allow line breaks in the HTML
+                            $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn};
+                            $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn};
+                            $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn};
+                            # pad | and ( with spaces to allow line breaks in the HTML
+                            $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn};
+                            $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn};
+                            my ($notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid)= ImportBreeding( $marcdata, 2, $serverhost[$k], $encoding[$k], $random, 'z3950' );
+                            my %row_data;
+                            $row_data{server}       = $servername[$k];
+                            $row_data{isbn}         = $oldbiblio->{isbn};
+                            $row_data{lccn}         = $oldbiblio->{lccn};
+                            $row_data{title}        = $oldbiblio->{title};
+                            $row_data{author}       = $oldbiblio->{author};
+                            $row_data{date}         = $oldbiblio->{copyrightdate};
+                            $row_data{edition}      = $oldbiblio->{editionstatement};
+                            $row_data{breedingid}   = $breedingid;
+                            $row_data{biblionumber} = $biblionumber;
+                            push( @breeding_loop, \%row_data );
+                        }
+                        else {
+                            push(@breeding_loop,{'server'=>$servername[$k],'title'=>join(': ',$oConnection[$k]->error_x()),'breedingid'=>-1,'biblionumber'=>-1});
+                        }
+                    }
+                }    #if $numresults
+            }
+        }    # if $k !=0
+
+        $template->param(
+            numberpending => $nremaining,
+            current_page => $page,
+            total_pages => $total_pages,
+            show_nextbutton => $show_next?1:0,
+            show_prevbutton => $page!=1,
+        );
+    } # while nremaining
+
+    my @servers = ();
+    foreach my $id (@id) {
+        push @servers, {id => $id};
+    }
+    $template->param(
+        breeding_loop => \@breeding_loop,
+        servers => \@servers,
+        errconn       => \@errconn
+    );
+}
+
 1;
 __END__
 
index d07dc75..7b553e6 100644 (file)
@@ -379,19 +379,32 @@ sub GetBudgetAuthCats  {
 # -------------------------------------------------------------------
 sub GetAuthvalueDropbox {
     my ( $authcat, $default ) = @_;
+    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
     my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare(
-        'SELECT authorised_value,lib FROM authorised_values
-        WHERE category = ? ORDER BY lib'
-    );
-    $sth->execute( $authcat );
+
+    my $query = qq{
+        SELECT *
+        FROM authorised_values
+    };
+    $query .= qq{
+          LEFT JOIN authorised_values_branches ON ( id = av_id )
+    } if $branch_limit;
+    $query .= qq{
+        WHERE category = ?
+    };
+    $query .= " AND ( branchcode = ? OR branchcode IS NULL )" if $branch_limit;
+    $query .= " GROUP BY lib ORDER BY category, lib, lib_opac";
+    my $sth = $dbh->prepare($query);
+    $sth->execute( $authcat, $branch_limit ? $branch_limit : () );
+
+
     my $option_list = [];
     my @authorised_values = ( q{} );
-    while (my ($value, $lib) = $sth->fetchrow_array) {
+    while (my $av = $sth->fetchrow_hashref) {
         push @{$option_list}, {
-            value => $value,
-            label => $lib,
-            default => ($default eq $value),
+            value => $av->{authorised_value},
+            label => $av->{lib},
+            default => ($default eq $av->{authorised_value}),
         };
     }
 
index 8cadc8b..255db2b 100644 (file)
@@ -74,13 +74,24 @@ C<description>.
 =cut
 
 sub all {
-    my $class = shift;
-    map {
-        utf8::encode($_->{description});
-        $class->new($_);
-    } @{C4::Context->dbh->selectall_arrayref(
-        "SELECT * FROM categories ORDER BY description", { Slice => {} }
-    )};
+    my ( $class ) = @_;
+    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
+    my $dbh = C4::Context->dbh;
+    # The categories table is small enough for
+    # `SELECT *` to be harmless.
+    my $query = "SELECT categories.* FROM categories";
+    $query .= qq{
+        LEFT JOIN categories_branches ON categories_branches.categorycode = categories.categorycode
+        WHERE categories_branches.branchcode = ? OR categories_branches.branchcode IS NULL
+    } if $branch_limit;
+    $query .= " ORDER BY description";
+    return map { $class->new($_) } @{
+        $dbh->selectall_arrayref(
+            $query,
+            { Slice => {} },
+            $branch_limit ? $branch_limit : ()
+        )
+    };
 }
 
 
index 5cbc211..71fe20f 100644 (file)
@@ -83,6 +83,7 @@ BEGIN {
                &GetBiblioIssues
                &GetOpenIssue
                &AnonymiseIssueHistory
+        &CheckIfIssuedToPatron
        );
 
        # subs to deal with returns
@@ -1252,7 +1253,9 @@ sub AddIssue {
 
         ## If item was lost, it has now been found, reverse any list item charges if neccessary.
         if ( $item->{'itemlost'} ) {
-            _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
+            if ( C4::Context->preference('RefundLostItemFeeOnReturn' ) ) {
+                _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} );
+            }
         }
 
         ModItem({ issues           => $item->{'issues'},
@@ -1813,9 +1816,13 @@ sub AddReturn {
     }
 
     # fix up the accounts.....
-    if ($item->{'itemlost'}) {
-        _FixAccountForLostAndReturned($item->{'itemnumber'}, $borrowernumber, $barcode);    # can tolerate undef $borrowernumber
+    if ( $item->{'itemlost'} ) {
         $messages->{'WasLost'} = 1;
+
+        if ( C4::Context->preference('RefundLostItemFeeOnReturn' ) ) {
+            _FixAccountForLostAndReturned($item->{'itemnumber'}, $borrowernumber, $barcode);    # can tolerate undef $borrowernumber
+            $messages->{'LostItemFeeRefunded'} = 1;
+        }
     }
 
     # fix up the overdues in accounts...
@@ -2575,6 +2582,27 @@ sub AddRenewal {
             "Renewal of Rental Item $item->{'title'} $item->{'barcode'}",
             'Rent', $charge, $itemnumber );
     }
+
+    # Send a renewal slip according to checkout alert preferencei
+    if ( C4::Context->preference('RenewalSendNotice') eq '1') {
+       my $borrower = C4::Members::GetMemberDetails( $borrowernumber, 0 );
+       my $circulation_alert = 'C4::ItemCirculationAlertPreference';
+       my %conditions = (
+               branchcode   => $branch,
+               categorycode => $borrower->{categorycode},
+               item_type    => $item->{itype},
+               notification => 'CHECKOUT',
+       );
+       if ($circulation_alert->is_enabled_for(\%conditions)) {
+               SendCirculationAlert({
+                       type     => 'RENEWAL',
+                       item     => $item,
+               borrower => $borrower,
+               branch   => $branch,
+               });
+       }
+    }
+
     # Log the renewal
     UpdateStats( $branch, 'renew', $charge, '', $itemnumber, $item->{itype}, $borrowernumber, undef, $item->{'ccode'});
        return $datedue;
@@ -2896,12 +2924,13 @@ sub SendCirculationAlert {
     my %message_name = (
         CHECKIN  => 'Item_Check_in',
         CHECKOUT => 'Item_Checkout',
+       RENEWAL  => 'Item_Checkout',
     );
     my $borrower_preferences = C4::Members::Messaging::GetMessagingPreferences({
         borrowernumber => $borrower->{borrowernumber},
         message_name   => $message_name{$type},
     });
-    my $issues_table = ( $type eq 'CHECKOUT' ) ? 'issues' : 'old_issues';
+    my $issues_table = ( $type eq 'CHECKOUT' || $type eq 'RENEWAL' ) ? 'issues' : 'old_issues';
     my $letter =  C4::Letters::GetPreparedLetter (
         module => 'circulation',
         letter_code => $type,
@@ -3014,13 +3043,14 @@ sub CalcDateDue {
               ->truncate( to => 'minute' );
             if ( $loanlength->{lengthunit} eq 'hours' ) {
                 $dt->add( hours => $loanlength->{issuelength} );
-                return $dt;
             } else {    # days
                 $dt->add( days => $loanlength->{issuelength} );
                 $dt->set_hour(23);
                 $dt->set_minute(59);
-                return $dt;
             }
+            # break
+            return $dt;
+
         } else {
             my $dur;
             if ($loanlength->{lengthunit} eq 'hours') {
@@ -3416,6 +3446,26 @@ sub TransferSlip {
     );
 }
 
+=head2 CheckIfIssuedToPatron
+
+  CheckIfIssuedToPatron($borrowernumber, $biblionumber)
+
+  Return 1 if any record item is issued to patron, otherwise return 0
+
+=cut
+
+sub CheckIfIssuedToPatron {
+    my ($borrowernumber, $biblionumber) = @_;
+
+    my $items = GetItemsByBiblioitemnumber($biblionumber);
+
+    foreach my $item (@{$items}) {
+        return 1 if ($item->{borrowernumber} && $item->{borrowernumber} eq $borrowernumber);
+    }
+
+    return;
+}
+
 
 1;
 
index 7de3f94..4e6c5fb 100644 (file)
@@ -220,6 +220,18 @@ sub KOHAVERSION {
     do $cgidir."/kohaversion.pl" || die "NO $cgidir/kohaversion.pl";
     return kohaversion();
 }
+
+=head2 final_linear_version
+
+Returns the version number of the final update to run in updatedatabase.pl.
+This number is equal to the version in kohaversion.pl
+
+=cut
+
+sub final_linear_version {
+    return KOHAVERSION;
+}
+
 =head2 read_config_file
 
 Reads the specified Koha config file. 
@@ -787,8 +799,23 @@ sub _new_dbh
     my $db_user   = $context->config("user");
     my $db_passwd = $context->config("pass");
     # MJR added or die here, as we can't work without dbh
-    my $dbh= DBI->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",
+    my $dbh = DBI->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",
     $db_user, $db_passwd, {'RaiseError' => $ENV{DEBUG}?1:0 }) or die $DBI::errstr;
+
+    # Check for the existence of a systempreference table; if we don't have this, we don't
+    # have a valid database and should not set RaiseError in order to allow the installer
+    # to run; installer will not run otherwise since we raise all db errors
+
+    eval {
+                local $dbh->{PrintError} = 0;
+                local $dbh->{RaiseError} = 1;
+                $dbh->do(qq{SELECT * FROM systempreferences WHERE 1 = 0 });
+    };
+
+    if ($@) {
+        $dbh->{RaiseError} = 0;
+    }
+
        my $tz = $ENV{TZ};
     if ( $db_driver eq 'mysql' ) { 
         # Koha 3.0 is utf-8, so force utf8 communication between mySQL and koha, whatever the mysql default config.
diff --git a/C4/HTML5Media.pm b/C4/HTML5Media.pm
new file mode 100644 (file)
index 0000000..89620d3
--- /dev/null
@@ -0,0 +1,223 @@
+package C4::HTML5Media;
+
+# Copyright 2012 Mirko Tietgen
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use strict;
+use warnings;
+
+use C4::Context;
+use MARC::Field;
+
+
+=head1 HTML5Media
+
+C4::HTML5Media
+
+=head1 Description
+
+This module gets the relevant data from field 856 (MARC21/UNIMARC) to create a HTML5 audio or video element containing the file(s) catalogued in 856.
+
+=cut
+
+=head2 gethtml5media
+
+Get all relevant data from field 856. Takes a $record in the subroutine call, sets appropriate params.
+
+=cut
+
+sub gethtml5media {
+    my $self = shift;
+    my $record = shift;
+    my @HTML5Media_sets = ();
+    my @HTML5Media_fields = $record->field(856);
+    my $HTML5MediaParent;
+    my $HTML5MediaWidth;
+    my @HTML5MediaExtensions = split( /\|/, C4::Context->preference("HTML5MediaExtensions") );
+    my $marcflavour          = C4::Context->preference("marcflavour");
+    foreach my $HTML5Media_field (@HTML5Media_fields) {
+        my %HTML5Media;
+        # protocol
+        if ( $HTML5Media_field->indicator(1) eq '1' ) {
+            $HTML5Media{protocol} = 'ftp';
+        }
+        elsif ( $HTML5Media_field->indicator(1) eq '4' ) {
+            $HTML5Media{protocol} = 'http';
+        }
+        elsif ( $HTML5Media_field->indicator(1) eq '7' ) {
+            if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC') {
+                $HTML5Media{protocol} = $HTML5Media_field->subfield('2');
+            }
+            elsif ($marcflavour eq 'UNIMARC') {
+                $HTML5Media{protocol} = $HTML5Media_field->subfield('y');
+            }
+        }
+        else {
+            $HTML5Media{protocol} = 'http';
+        }
+        # user
+        if ( $HTML5Media_field->subfield('l') ) {
+            $HTML5Media{username} = $HTML5Media_field->subfield('l'); # yes, that is arbitrary if h and l are not the same. originally i flipped a coin in that case.
+        }
+        elsif ( $HTML5Media_field->subfield('h') ) {
+            $HTML5Media{username} = $HTML5Media_field->subfield('h');
+        }
+        # user/pass
+        if ( $HTML5Media{username} && $HTML5Media_field->subfield('k') ) {
+            $HTML5Media{loginblock} = $HTML5Media{username} . ':' . $HTML5Media_field->subfield('k') . '@';
+        }
+        elsif ( $HTML5Media{username} ) {
+            $HTML5Media{loginblock} = $HTML5Media{username} . '@';
+        }
+        else {
+            $HTML5Media{loginblock} = '';
+        }
+        # port
+        if ( $HTML5Media_field->subfield('p') ) {
+            $HTML5Media{portblock} = ':' . $HTML5Media_field->subfield('k');
+        }
+        else {
+            $HTML5Media{portblock} = '';
+        }
+        # src
+        if ( $HTML5Media_field->subfield('u') ) {
+            $HTML5Media{srcblock} = $HTML5Media_field->subfield('u');
+        }
+        elsif ( $HTML5Media_field->subfield('a') && $HTML5Media_field->subfield('d') && $HTML5Media_field->subfield('f') ) {
+            $HTML5Media{host}        = $HTML5Media_field->subfield('a');
+            $HTML5Media{host}        =~ s/(^\/|\/$)//g;
+            $HTML5Media{path}        = $HTML5Media_field->subfield('d');
+            $HTML5Media{path}        =~ s/(^\/|\/$)//g;
+            $HTML5Media{file}        = $HTML5Media_field->subfield('f');
+            $HTML5Media{srcblock}    = $HTML5Media{protocol} . '://' . $HTML5Media{loginblock} . $HTML5Media{host} . $HTML5Media{portblock} . '/' . $HTML5Media{path} . '/' . $HTML5Media{file};
+        }
+        else {
+            next; # no file to play
+        }
+        # extension
+        $HTML5Media{extension} = ($HTML5Media{srcblock} =~ m/([^.]+)$/)[0];
+        if ( !grep /$HTML5Media{extension}/, @HTML5MediaExtensions ) {
+            next; # not a specified media file
+        }
+        # mime
+        if ( $HTML5Media_field->subfield('c') ) {
+            $HTML5Media{codecs} = $HTML5Media_field->subfield('c');
+        }
+        ### from subfield q…
+        if ( $HTML5Media_field->subfield('q') ) {
+            $HTML5Media{mime} = $HTML5Media_field->subfield('q');
+        }
+        ### …or from file extension and codecs…
+        elsif ( $HTML5Media{codecs} ) {
+            if ( $HTML5Media{codecs} =~ /theora.*vorbis/ ) {
+                $HTML5Media{mime} = 'video/ogg';
+            }
+            elsif ( $HTML5Media{codecs} =~ /vp8.*vorbis/ ) {
+                $HTML5Media{mime} = 'video/webm';
+            }
+            elsif ( ($HTML5Media{codecs} =~ /^vorbis$/) && ($HTML5Media{extension} eq 'ogg') ) {
+                $HTML5Media{mime} = 'audio/ogg';
+            }
+            elsif ( ($HTML5Media{codecs} =~ /^vorbis$/) && ($HTML5Media{extension} eq 'webm') ) {
+                $HTML5Media{mime} = 'audio/webm';
+            }
+        }
+        ### …or just from file extension
+        else {
+            if ( $HTML5Media{extension} eq 'ogv' ) {
+                $HTML5Media{mime} = 'video/ogg';
+                $HTML5Media{codecs} = 'theora,vorbis';
+            }
+            if ( $HTML5Media{extension} eq 'oga' ) {
+                $HTML5Media{mime} = 'audio/ogg';
+              $HTML5Media{codecs} = 'vorbis';
+            }
+            elsif ( $HTML5Media{extension} eq 'spx' ) {
+                $HTML5Media{mime} = 'audio/ogg';
+                $HTML5Media{codecs} = 'speex';
+            }
+            elsif ( $HTML5Media{extension} eq 'opus' ) {
+                $HTML5Media{mime} = 'audio/ogg';
+                $HTML5Media{codecs} = 'opus';
+            }
+            elsif ( $HTML5Media{extension} eq 'vtt' ) {
+                $HTML5Media{mime} = 'text/vtt';
+            }
+        }
+        # codecs
+        if ( $HTML5Media{codecs} ) {
+            $HTML5Media{codecblock} = '; codecs="' . $HTML5Media{codecs} . '"';
+        }
+        else {
+            $HTML5Media{codecblock} = '';
+        }
+        # type
+        if ( $HTML5Media{mime} ) {
+            $HTML5Media{typeblock} = ' type=\'' . $HTML5Media{mime} . $HTML5Media{codecblock} . '\'';
+        }
+        else {
+          $HTML5Media{typeblock} = '';
+        }
+        # element
+        if ( $HTML5Media{mime} =~ /audio/ ) {
+            $HTML5Media{type} = 'audio';
+        }
+        elsif ( $HTML5Media{mime} =~ /video/ ) {
+            $HTML5Media{type} = 'video';
+        }
+        elsif ( $HTML5Media{mime} =~ /text/ ) {
+            $HTML5Media{type} = 'track';
+        }
+        # push
+        if ( $HTML5Media{srcblock} && $HTML5Media{type} ) {
+            push (@HTML5Media_sets, \%HTML5Media);
+        }
+    }
+    # parent element
+    for my $media ( @HTML5Media_sets ) {
+        if ( ($media->{mime}) && ($media->{mime} =~ /audio/) ) {
+            if ( $HTML5MediaParent ne 'video' ) {
+                $HTML5MediaParent = 'audio';
+                $HTML5MediaWidth = '';
+            }
+        }
+        elsif ( ($media->{mime}) && ($media->{mime} =~ /video/) ) {
+            $HTML5MediaParent = 'video';
+            $HTML5MediaWidth = ' width="480"';
+        }
+    }
+    # child element
+    for my $media ( @HTML5Media_sets ) {
+        if ( ($media->{type}) && ( ($media->{type} eq 'video') || ($media->{type} eq 'audio') ) ) {
+            if ( $media->{type} eq $HTML5MediaParent ) {
+                $media->{child} = 'source';
+            }
+        }
+        else {
+            $media->{child} = $media->{type};
+        }
+    }
+
+    return (
+        HTML5MediaEnabled  => ( (scalar(@HTML5Media_sets) > 0) && ($HTML5MediaParent) ),
+        HTML5MediaSets     => \@HTML5Media_sets,
+        HTML5MediaParent   => $HTML5MediaParent,
+        HTML5MediaWidth    => $HTML5MediaWidth,
+    );
+}
+
+1;
index 5a62954..68cbdb3 100644 (file)
@@ -197,6 +197,12 @@ sub GetRecords {
             $biblioitem->{code} = "RecordNotFound";
         }
 
+        my $embed_items = 1;
+        my $record = GetMarcBiblio($biblionumber, $embed_items);
+        if ($record) {
+            $biblioitem->{marcxml} = $record->as_xml_record();
+        }
+
         # We don't want MARC to be displayed
         delete $biblioitem->{'marc'};
 
index 8b17f1c..4bae00c 100644 (file)
@@ -131,16 +131,10 @@ sub ListImagesForBiblio {
     my $query = 'SELECT imagenumber FROM biblioimages WHERE biblionumber = ?';
     my $sth   = $dbh->prepare($query);
     $sth->execute($biblionumber);
-    warn "Database error!" if $sth->errstr;
-    if ( !$sth->errstr && $sth->rows > 0 ) {
-        while ( my $row = $sth->fetchrow_hashref ) {
-            push @imagenumbers, $row->{'imagenumber'};
-        }
-        return @imagenumbers;
-    }
-    else {
-        return undef;
+    while ( my $row = $sth->fetchrow_hashref ) {
+        push @imagenumbers, $row->{'imagenumber'};
     }
+    return @imagenumbers;
 }
 
 =head2 DelImage
index 15f1acb..5f46613 100644 (file)
@@ -621,6 +621,7 @@ sub BatchCommitRecords {
 
                 # remove item fields so that they don't get
                 # added again if record is reverted
+                # FIXME: GetXmlBiblio output should not contain item info any more! So the next foreach should not be needed. Does not hurt either; may remove old 952s that should not have been there anymore.
                 my $old_marc = MARC::Record->new_from_xml(StripNonXmlChars($oldxml), 'UTF-8', $rowref->{'encoding'}, $marc_type);
                 foreach my $item_field ($old_marc->field($item_tag)) {
                     $old_marc->delete_field($item_field);
index 2e84dc2..ba30460 100644 (file)
@@ -119,33 +119,48 @@ Returns NULL if no authorised values found
 =cut
 
 sub buildCGIsort {
-       my ($name,$input_name,$data) = @_;
-       my $dbh=C4::Context->dbh;
-       my $query=qq{SELECT * FROM authorised_values WHERE category=? order by lib};
-       my $sth=$dbh->prepare($query);
-       $sth->execute($name);
-       my $CGISort;
-       if ($sth->rows>0){
-               my @values;
-               my %labels;
-
-               for (my $i =0;$i<$sth->rows;$i++){
-                       my $results = $sth->fetchrow_hashref;
-                       push @values, $results->{authorised_value};
-                       $labels{$results->{authorised_value}}=$results->{lib};
-               }
-               $CGISort= CGI::scrolling_list(
-                                       -name => $input_name,
-                                       -id =>   $input_name,
-                                       -values => \@values,
-                                       -labels => \%labels,
-                                       -default=> $data,
-                                       -size => 1,
-                                       -multiple => 0);
-       }
-       $sth->finish;
-       return $CGISort;
+    my ( $name, $input_name, $data ) = @_;
+    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
+
+    my $dbh=C4::Context->dbh;
+    my $query = qq{
+        SELECT *
+        FROM authorised_values
+    };
+    $query .= qq{
+          LEFT JOIN authorised_values_branches ON ( id = av_id )
+    } if $branch_limit;
+    $query .= qq{
+        WHERE category = ?
+    };
+    $query .= qq{ AND ( branchcode = ? OR branchcode IS NULL )} if $branch_limit;
+    $query .= qq{ GROUP BY lib ORDER BY lib};
+
+    my $sth=$dbh->prepare($query);
+    $sth->execute( $name, $branch_limit ? $branch_limit : () );
+    my $CGISort;
+    if ($sth->rows>0){
+        my @values;
+        my %labels;
+
+        for (my $i =0;$i<$sth->rows;$i++){
+            my $results = $sth->fetchrow_hashref;
+            push @values, $results->{authorised_value};
+            $labels{$results->{authorised_value}}=$results->{lib};
+        }
+        $CGISort= CGI::scrolling_list(
+                    -name => $input_name,
+                    -id =>   $input_name,
+                    -values => \@values,
+                    -labels => \%labels,
+                    -default=> $data,
+                    -size => 1,
+                    -multiple => 0);
+    }
+    $sth->finish;
+    return $CGISort;
 }
+
 END { }       # module clean-up code here (global destructor)
 
 1;
index 71f35d4..41fa8db 100644 (file)
@@ -629,6 +629,11 @@ our $PERL_DEPS = {
         'required' => '0',
         'min_ver'  => '1.09',
       },
+    'String::Random' => {
+        'usage'    => 'OpacSelfRegistration',
+        'required' => '0',
+        'min_ver'  => '0.22',
+    },
 };
 
 1;
index 253078d..012ec8a 100644 (file)
@@ -2602,7 +2602,20 @@ sub PrepareItemrecordDisplay {
         $itemrecord = C4::Items::GetMarcItem( $bibnum, $itemnum );
     }
     my @loop_data;
-    my $authorised_values_sth = $dbh->prepare( "SELECT authorised_value,lib FROM authorised_values WHERE category=? ORDER BY lib" );
+
+    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
+    my $query = qq{
+        SELECT authorised_value,lib FROM authorised_values
+    };
+    $query .= qq{
+        LEFT JOIN authorised_values_branches ON ( id = av_id )
+    } if $branch_limit;
+    $query .= qq{
+        WHERE category = ?
+    };
+    $query .= qq{ AND ( branchcode = ? OR branchcode IS NULL )} if $branch_limit;
+    $query .= qq{ ORDER BY lib};
+    my $authorised_values_sth = $dbh->prepare( $query );
     foreach my $tag ( sort keys %{$tagslib} ) {
         my $previous_tag = '';
         if ( $tag ne '' ) {
@@ -2707,6 +2720,7 @@ sub PrepareItemrecordDisplay {
                                 $authorised_lib{$branchcode} = $branchname;
                             }
                         }
+                        $defaultvalue = C4::Context->userenv->{branch};
 
                         #----- itemtypes
                     } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) {
@@ -2734,7 +2748,10 @@ sub PrepareItemrecordDisplay {
 
                         #---- "true" authorised value
                     } else {
-                        $authorised_values_sth->execute( $tagslib->{$tag}->{$subfield}->{authorised_value} );
+                        $authorised_values_sth->execute(
+                            $tagslib->{$tag}->{$subfield}->{authorised_value},
+                            $branch_limit ? $branch_limit : ()
+                        );
                         push @authorised_values, ""
                           unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
                         while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
index d38729a..3892468 100644 (file)
@@ -1036,28 +1036,50 @@ C<$opac> If set to a true value, displays OPAC descriptions rather than normal o
 =cut
 
 sub GetAuthorisedValues {
-    my ($category,$selected,$opac) = @_;
+    my ( $category, $selected, $opac ) = @_;
+    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
     my @results;
     my $dbh      = C4::Context->dbh;
-    my $query    = "SELECT * FROM authorised_values";
-    $query .= " WHERE category = '" . $category . "'" if $category;
-    $query .= " ORDER BY category, lib, lib_opac";
+    my $query = qq{
+        SELECT *
+        FROM authorised_values
+    };
+    $query .= qq{
+          LEFT JOIN authorised_values_branches ON ( id = av_id )
+    } if $branch_limit;
+    my @where_strings;
+    my @where_args;
+    if($category) {
+        push @where_strings, "category = ?";
+        push @where_args, $category;
+    }
+    if($branch_limit) {
+        push @where_strings, "( branchcode = ? OR branchcode IS NULL )";
+        push @where_args, $branch_limit;
+    }
+    if(@where_strings > 0) {
+        $query .= " WHERE " . join(" AND ", @where_strings);
+    }
+    $query .= " GROUP BY lib ORDER BY category, lib, lib_opac";
+
     my $sth = $dbh->prepare($query);
-    $sth->execute;
+
+    $sth->execute( @where_args );
     while (my $data=$sth->fetchrow_hashref) {
-        if ( (defined($selected)) && ($selected eq $data->{'authorised_value'}) ) {
-            $data->{'selected'} = 1;
+        if ( defined $selected and $selected eq $data->{authorised_value} ) {
+            $data->{selected} = 1;
         }
         else {
-            $data->{'selected'} = 0;
+            $data->{selected} = 0;
         }
-        if ($opac && $data->{'lib_opac'}) {
-            $data->{'lib'} = $data->{'lib_opac'};
+
+        if ($opac && $data->{lib_opac}) {
+            $data->{lib} = $data->{lib_opac};
         }
         push @results, $data;
     }
-    #my $data = $sth->fetchall_arrayref({});
-    return \@results; #$data;
+    $sth->finish;
+    return \@results;
 }
 
 =head2 GetAuthorisedValueCategories
index d0eed69..3a5ee2a 100644 (file)
@@ -119,7 +119,6 @@ Returns a reference to an array of hashes:
 sub getTranslatedLanguages {
     my ($interface, $theme, $current_language, $which) = @_;
     my $htdocs;
-    my $all_languages = getAllLanguages();
     my @languages;
     my @enabled_languages;
  
@@ -161,7 +160,7 @@ sub getTranslatedLanguages {
         $seen{$_}++ for @languages;
         @languages = keys %seen;
     }
-    return _build_languages_arrayref($all_languages,\@languages,$current_language,\@enabled_languages);
+    return _build_languages_arrayref(\@languages,$current_language,\@enabled_languages);
 }
 
 =head2 getAllLanguages
@@ -179,19 +178,35 @@ Returns a reference to an array of hashes:
 =cut
 
 sub getAllLanguages {
+    my $lang = shift;
+# if no parameter is passed to the function, it returns english languages names
+# if a $lang parameter conforming to RFC4646 syntax is passed, the function returns languages names translated in $lang
+# if a language name is not translated in $lang in database, the function returns english language name
     my @languages_loop;
     my $dbh=C4::Context->dbh;
-    my $current_language = shift || 'en';
+    my $default_language = 'en';
+    my $current_language = $default_language;
+    if ($lang) {
+        $current_language = regex_lang_subtags($lang)->{'language'};
+    }
     my $sth = $dbh->prepare('SELECT * FROM language_subtag_registry WHERE type=\'language\'');
     $sth->execute();
     while (my $language_subtag_registry = $sth->fetchrow_hashref) {
-
-        # pull out all the script descriptions for each language
+        my $desc;
+        # check if language name is stored in current language
+        my $sth4= $dbh->prepare("SELECT description FROM language_descriptions WHERE type='language' AND subtag =? AND lang = ?");
+        $sth4->execute($language_subtag_registry->{subtag},$current_language);
+        while (my $language_desc = $sth4->fetchrow_hashref) {
+             $desc=$language_desc->{description};
+        }
         my $sth2= $dbh->prepare("SELECT * FROM language_descriptions LEFT JOIN language_rfc4646_to_iso639 on language_rfc4646_to_iso639.rfc4646_subtag = language_descriptions.subtag WHERE type='language' AND subtag =? AND language_descriptions.lang = ?");
-        $sth2->execute($language_subtag_registry->{subtag},$current_language);
-
+        if ($desc) {
+            $sth2->execute($language_subtag_registry->{subtag},$current_language);
+        }
+        else {
+            $sth2->execute($language_subtag_registry->{subtag},$default_language);
+        }
         my $sth3 = $dbh->prepare("SELECT description FROM language_descriptions WHERE type='language' AND subtag=? AND lang=?");
-
         # add the correct description info
         while (my $language_descriptions = $sth2->fetchrow_hashref) {
             $sth3->execute($language_subtag_registry->{subtag},$language_subtag_registry->{subtag});
@@ -276,7 +291,7 @@ FIXME: this could be rewritten and simplified using map
 =cut
 
 sub _build_languages_arrayref {
-        my ($all_languages,$translated_languages,$current_language,$enabled_languages) = @_;
+        my ($translated_languages,$current_language,$enabled_languages) = @_;
         my @translated_languages = @$translated_languages;
         my @languages_loop; # the final reference to an array of hashrefs
         my @enabled_languages = @$enabled_languages;
index f646241..36e6213 100644 (file)
@@ -31,7 +31,6 @@ use C4::SMS;
 use C4::Debug;
 use Date::Calc qw( Add_Delta_Days );
 use Encode;
-use Unicode::Normalize;
 use Carp;
 
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
@@ -117,33 +116,6 @@ sub GetLetters {
     return \%letters;
 }
 
-=head2 GetLetter( %params )
-
-    retrieves the letter template
-
-    %params hash:
-      module => letter module, mandatory
-      letter_code => letter code, mandatory
-      branchcode => for letter selection, if missing default system letter taken
-    Return value:
-      letter fields hashref (title & content useful)
-
-=cut
-
-sub GetLetter {
-    my %params = @_;
-
-    my $module      = $params{module} or croak "No module";
-    my $letter_code = $params{letter_code} or croak "No letter_code";
-    my $branchcode  = $params{branchcode} || '';
-
-    my $letter = getletter( $module, $letter_code, $branchcode )
-        or warn( "No $module $letter_code letter"),
-            return;
-
-    return $letter;
-}
-
 my %letter;
 sub getletter {
     my ( $module, $code, $branchcode ) = @_;
@@ -440,8 +412,6 @@ sub SendAlerts {
 
 =head2 GetPreparedLetter( %params )
 
-    retrieves letter template and performs substituion processing
-
     %params hash:
       module => letter module, mandatory
       letter_code => letter code, mandatory
@@ -469,65 +439,14 @@ sub GetPreparedLetter {
     my $module      = $params{module} or croak "No module";
     my $letter_code = $params{letter_code} or croak "No letter_code";
     my $branchcode  = $params{branchcode} || '';
-    my $tables = $params{tables};
-    my $substitute = $params{substitute};
-    my $repeat = $params{repeat};
 
     my $letter = getletter( $module, $letter_code, $branchcode )
         or warn( "No $module $letter_code letter"),
             return;
 
-    my $prepared_letter = GetProcessedLetter(
-        module => $module,
-        letter_code => $letter_code,
-        letter => $letter,
-        branchcode => $branchcode,
-        tables => $tables,
-        substitute => $substitute,
-        repeat => $repeat
-    );
-
-    return $prepared_letter;
-}
-
-=head2 GetProcessedLetter( %params )
-
-    given a letter, with possible pre-processing do standard processing
-    allows one to perform letter template processing beforehand
-
-    %params hash:
-      module => letter module, mandatory
-      letter_code => letter code, mandatory
-      letter => letter, mandatory
-      branchcode => for letter selection, if missing default system letter taken
-      tables => a hashref with table names as keys. Values are either:
-        - a scalar - primary key value
-        - an arrayref - primary key values
-        - a hashref - full record
-      substitute => custom substitution key/value pairs
-      repeat => records to be substituted on consecutive lines:
-        - an arrayref - tries to guess what needs substituting by
-          taking remaining << >> tokensr; not recommended
-        - a hashref token => @tables - replaces <token> << >> << >> </token>
-          subtemplate for each @tables row; table is a hashref as above
-      want_librarian => boolean,  if set to true triggers librarian details
-        substitution from the userenv
-    Return value:
-      letter fields hashref (title & content useful)
-
-=cut
-
-sub GetProcessedLetter {
-    my %params = @_;
-
-    my $module      = $params{module} or croak "No module";
-    my $letter_code = $params{letter_code} or croak "No letter_code";
-    my $letter = $params{letter} or croak "No letter";
-    my $branchcode  = $params{branchcode} || '';
     my $tables = $params{tables};
     my $substitute = $params{substitute};
     my $repeat = $params{repeat};
-
     $tables || $substitute || $repeat
       or carp( "ERROR: nothing to substitute - both 'tables' and 'substitute' are empty" ),
          return;
@@ -540,6 +459,9 @@ sub GetProcessedLetter {
        }
     }
 
+    my $OPACBaseURL = C4::Context->preference('OPACBaseURL');
+    $letter->{content} =~ s/<<OPACBaseURL>>/$OPACBaseURL/go;
+
     if ($want_librarian) {
         # parsing librarian name
         my $userenv = C4::Context->userenv;
@@ -638,18 +560,19 @@ sub _parseletter_sth {
     # check cache first
     (defined $handles{$table}) and return $handles{$table};
     my $query = 
-    ($table eq 'biblio'       ) ? "SELECT * FROM $table WHERE   biblionumber = ?"                                 :
-    ($table eq 'biblioitems'  ) ? "SELECT * FROM $table WHERE   biblionumber = ?"                                 :
-    ($table eq 'items'        ) ? "SELECT * FROM $table WHERE     itemnumber = ?"                                 :
-    ($table eq 'issues'       ) ? "SELECT * FROM $table WHERE     itemnumber = ?"                                 :
-    ($table eq 'old_issues'   ) ? "SELECT * FROM $table WHERE     itemnumber = ? ORDER BY timestamp DESC LIMIT 1" :
-    ($table eq 'reserves'     ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?"            :
-    ($table eq 'borrowers'    ) ? "SELECT * FROM $table WHERE borrowernumber = ?"                                 :
-    ($table eq 'branches'     ) ? "SELECT * FROM $table WHERE     branchcode = ?"                                 :
-    ($table eq 'suggestions'  ) ? "SELECT * FROM $table WHERE   suggestionid = ?"                                 :
-    ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE             id = ?"                                 :
-    ($table eq 'aqorders'     ) ? "SELECT * FROM $table WHERE    ordernumber = ?"                                 :
-    ($table eq 'opac_news'    ) ? "SELECT * FROM $table WHERE          idnew = ?"                                 :
+    ($table eq 'biblio'       ) ? "SELECT * FROM $table WHERE   biblionumber = ?"                                  :
+    ($table eq 'biblioitems'  ) ? "SELECT * FROM $table WHERE   biblionumber = ?"                                  :
+    ($table eq 'items'        ) ? "SELECT * FROM $table WHERE     itemnumber = ?"                                  :
+    ($table eq 'issues'       ) ? "SELECT * FROM $table WHERE     itemnumber = ?"                                  :
+    ($table eq 'old_issues'   ) ? "SELECT * FROM $table WHERE     itemnumber = ? ORDER BY timestamp DESC LIMIT 1"  :
+    ($table eq 'reserves'     ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?"             :
+    ($table eq 'borrowers'    ) ? "SELECT * FROM $table WHERE borrowernumber = ?"                                  :
+    ($table eq 'branches'     ) ? "SELECT * FROM $table WHERE     branchcode = ?"                                  :
+    ($table eq 'suggestions'  ) ? "SELECT * FROM $table WHERE   suggestionid = ?"                                  :
+    ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE             id = ?"                                  :
+    ($table eq 'aqorders'     ) ? "SELECT * FROM $table WHERE    ordernumber = ?"                                  :
+    ($table eq 'opac_news'    ) ? "SELECT * FROM $table WHERE          idnew = ?"                                  :
+    ($table eq 'borrower_modifications') ? "SELECT * FROM $table WHERE borrowernumber = ? OR verification_token =?":
     undef ;
     unless ($query) {
         warn "ERROR: No _parseletter_sth query for table '$table'";
@@ -756,7 +679,7 @@ sub EnqueueLetter {
     my $params = shift or return;
 
     return unless exists $params->{'letter'};
-    return unless exists $params->{'borrowernumber'};
+#   return unless exists $params->{'borrowernumber'};
     return unless exists $params->{'message_transport_type'};
 
     my $content = $params->{letter}->{content};
@@ -766,12 +689,6 @@ sub EnqueueLetter {
         return;
     }
 
-    # It was found that the some utf8 codes, cause the text to be truncated from that point onward when stored,
-    # so we normalize utf8 with NFC so that mysql will store 'all' of the content in its TEXT column type
-    # Note: It is also done in _add_attachments accordingly.
-    $params->{'letter'}->{'title'} = NFC($params->{'letter'}->{'title'});     # subject
-    $params->{'letter'}->{'content'} = NFC($params->{'letter'}->{'content'});
-
     # If we have any attachments we should encode then into the body.
     if ( $params->{'attachments'} ) {
         $params->{'letter'} = _add_attachments(
@@ -942,17 +859,11 @@ sub _add_attachments {
     $message->attach(
         Type => $letter->{'content-type'} || 'TEXT',
         Data => $letter->{'is_html'}
-            ? _wrap_html($letter->{'content'}, NFC($letter->{'title'}))
-            : NFC($letter->{'content'}),
+            ? _wrap_html($letter->{'content'}, $letter->{'title'})
+            : $letter->{'content'},
     );
 
     foreach my $attachment ( @$attachments ) {
-
-        if ($attachment->{'content'} =~ m/text/o) { # NFC normailze any "text" related  content-type attachments
-            $attachment->{'content'} = NFC($attachment->{'content'});
-        }
-        $attachment->{'filename'} = NFC($attachment->{'filename'});
-
         $message->attach(
             Type     => $attachment->{'type'},
             Data     => $attachment->{'content'},
index 14448e3..671fcdb 100644 (file)
--- a/C4/Log.pm
+++ b/C4/Log.pm
@@ -73,6 +73,7 @@ sub logaction {
     # the scalar '0'.
     my $userenv = C4::Context->userenv();
     my $usernumber = (ref($userenv) eq 'HASH') ? $userenv->{'number'} : 0;
+    $usernumber ||= 0;
 
     my $dbh = C4::Context->dbh;
     my $sth=$dbh->prepare("Insert into action_logs (timestamp,user,module,action,object,info) values (now(),?,?,?,?,?)");
index b2f45b9..6388a0f 100644 (file)
@@ -25,6 +25,7 @@ use strict;
 use C4::Context;
 use C4::Dates qw(format_date_in_iso format_date);
 use Digest::MD5 qw(md5_base64);
+use String::Random qw( random_string );
 use Date::Calc qw/Today Add_Delta_YM check_date Date_to_Days/;
 use C4::Log; # logaction
 use C4::Overdues;
@@ -88,7 +89,7 @@ BEGIN {
         GetBorrowerCategorycode
         &GetBorrowercategoryList
 
-        &GetBorrowersWhoHaveNotBorrowedSince
+        &GetBorrowersToExpunge
         &GetBorrowersWhoHaveNeverBorrowed
         &GetBorrowersWithIssuesHistoryOlderThan
 
@@ -118,6 +119,7 @@ BEGIN {
     #Insert data
     push @EXPORT, qw(
         &AddMember
+        &AddMember_Opac
         &add_member_orgs
         &MoveMemberToDeleted
         &ExtendMemberSubscriptionTo
@@ -751,11 +753,25 @@ Returns as undef upon any db error without further processing
 sub AddMember {
     my (%data) = @_;
     my $dbh = C4::Context->dbh;
-       # generate a proper login if none provided
-       $data{'userid'} = Generate_Userid($data{'borrowernumber'}, $data{'firstname'}, $data{'surname'}) if $data{'userid'} eq '';
-       # create a disabled account if no password provided
-       $data{'password'} = ($data{'password'})? md5_base64($data{'password'}) : '!';
-       $data{'borrowernumber'}=InsertInTable("borrowers",\%data);      
+
+    # generate a proper login if none provided
+    $data{'userid'} = Generate_Userid($data{'borrowernumber'}, $data{'firstname'}, $data{'surname'}) if $data{'userid'} eq '';
+
+    # add expiration date if it isn't already there
+    unless ( $data{'dateexpiry'} ) {
+        $data{'dateexpiry'} = GetExpiryDate( $data{'categorycode'}, C4::Dates->new()->output("iso") );
+    }
+
+    # add enrollment date if it isn't already there
+    unless ( $data{'dateenrolled'} ) {
+        $data{'dateenrolled'} = C4::Dates->new()->output("iso");
+    }
+
+    # create a disabled account if no password provided
+    $data{'password'} = ($data{'password'})? md5_base64($data{'password'}) : '!';
+    $data{'borrowernumber'}=InsertInTable("borrowers",\%data);
+
+
     # mysql_insertid is probably bad.  not necessarily accurate and mysql-specific at best.
     logaction("MEMBERS", "CREATE", $data{'borrowernumber'}, "") if C4::Context->preference("BorrowersLog");
     
@@ -1374,20 +1390,35 @@ to category descriptions.
 
 #'
 sub GetborCatFromCatType {
-    my ( $category_type, $action ) = @_;
-       # FIXME - This API  seems both limited and dangerous. 
+    my ( $category_type, $action, $no_branch_limit ) = @_;
+
+    my $branch_limit = $no_branch_limit
+        ? 0
+        : C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
+
+    # FIXME - This API  seems both limited and dangerous.
     my $dbh     = C4::Context->dbh;
-    my $request = qq|   SELECT categorycode,description 
-            FROM categories 
-            $action
-            ORDER BY categorycode|;
-    my $sth = $dbh->prepare($request);
-       if ($action) {
-        $sth->execute($category_type);
-    }
-    else {
-        $sth->execute();
+
+    my $request = qq{
+        SELECT categories.categorycode, categories.description
+        FROM categories
+    };
+    $request .= qq{
+        LEFT JOIN categories_branches ON categories.categorycode = categories_branches.categorycode
+    } if $branch_limit;
+    if($action) {
+        $request .= " $action ";
+        $request .= " AND (branchcode = ? OR branchcode IS NULL) GROUP BY description" if $branch_limit;
+    } else {
+        $request .= " WHERE branchcode = ? OR branchcode IS NULL GROUP BY description" if $branch_limit;
     }
+    $request .= " ORDER BY categorycode";
+
+    my $sth = $dbh->prepare($request);
+    $sth->execute(
+        $action ? $category_type : (),
+        $branch_limit ? $branch_limit : ()
+    );
 
     my %labels;
     my @codes;
@@ -1396,6 +1427,7 @@ sub GetborCatFromCatType {
         push @codes, $data->{'categorycode'};
         $labels{ $data->{'categorycode'} } = $data->{'description'};
     }
+    $sth->finish;
     return ( \@codes, \%labels );
 }
 
@@ -1454,16 +1486,21 @@ If no category code provided, the function returns all the categories.
 =cut
 
 sub GetBorrowercategoryList {
+    my $no_branch_limit = @_ ? shift : 0;
+    my $branch_limit = $no_branch_limit
+        ? 0
+        : C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
     my $dbh       = C4::Context->dbh;
-    my $sth       =
-    $dbh->prepare(
-    "SELECT * 
-    FROM categories 
-    ORDER BY description"
-        );
-    $sth->execute;
-    my $data =
-    $sth->fetchall_arrayref({});
+    my $query = "SELECT categories.* FROM categories";
+    $query .= qq{
+        LEFT JOIN categories_branches ON categories.categorycode = categories_branches.categorycode
+        WHERE branchcode = ? OR branchcode IS NULL GROUP BY description
+    } if $branch_limit;
+    $query .= " ORDER BY description";
+    my $sth = $dbh->prepare( $query );
+    $sth->execute( $branch_limit ? $branch_limit : () );
+    my $data = $sth->fetchall_arrayref( {} );
+    $sth->finish;
     return $data;
 }    # sub getborrowercategory
 
@@ -1901,52 +1938,65 @@ WHERE roadtypeid=?|;
     return ($roadtype);
 }
 
-=head2 GetBorrowersWhoHaveNotBorrowedSince
+=head2 GetBorrowersToExpunge
 
-  &GetBorrowersWhoHaveNotBorrowedSince($date)
+  $borrowers = &GetBorrowersToExpunge(
+      not_borrowered_since => $not_borrowered_since,
+      expired_before       => $expired_before,
+      category_code        => $category_code,
+      branchcode           => $branchcode
+  );
 
-this function get all borrowers who haven't borrowed since the date given on input arg.
+  This function get all borrowers based on the given criteria.
 
 =cut
 
-sub GetBorrowersWhoHaveNotBorrowedSince {
-    my $filterdate = shift||POSIX::strftime("%Y-%m-%d",localtime());
-    my $filterexpiry = shift;
-    my $filterbranch = shift || 
+sub GetBorrowersToExpunge {
+    my $params = shift;
+
+    my $filterdate     = $params->{'not_borrowered_since'};
+    my $filterexpiry   = $params->{'expired_before'};
+    my $filtercategory = $params->{'category_code'};
+    my $filterbranch   = $params->{'branchcode'} ||
                         ((C4::Context->preference('IndependantBranches') 
                              && C4::Context->userenv 
                              && C4::Context->userenv->{flags} % 2 !=1 
                              && C4::Context->userenv->{branch})
                          ? C4::Context->userenv->{branch}
                          : "");  
+
     my $dbh   = C4::Context->dbh;
     my $query = "
         SELECT borrowers.borrowernumber,
-               max(old_issues.timestamp) as latestissue,
-               max(issues.timestamp) as currentissue
+               MAX(old_issues.timestamp) AS latestissue,
+               MAX(issues.timestamp) AS currentissue
         FROM   borrowers
         JOIN   categories USING (categorycode)
         LEFT JOIN old_issues USING (borrowernumber)
         LEFT JOIN issues USING (borrowernumber) 
         WHERE  category_type <> 'S'
-        AND borrowernumber NOT IN (SELECT guarantorid FROM borrowers WHERE guarantorid IS NOT NULL AND guarantorid <> 0) 
+        AND borrowernumber NOT IN (SELECT guarantorid FROM borrowers WHERE guarantorid IS NOT NULL AND guarantorid <> 0)
    ";
     my @query_params;
-    if ($filterbranch && $filterbranch ne ""){ 
-        $query.=" AND borrowers.branchcode= ?";
-        push @query_params,$filterbranch;
+    if ( $filterbranch && $filterbranch ne "" ) {
+        $query.= " AND borrowers.branchcode = ? ";
+        push( @query_params, $filterbranch );
     }
-    if($filterexpiry){
+    if ( $filterexpiry ) {
         $query .= " AND dateexpiry < ? ";
-        push @query_params,$filterdate;
+        push( @query_params, $filterexpiry );
+    }
+    if ( $filtercategory ) {
+        $query .= " AND categorycode = ? ";
+        push( @query_params, $filtercategory );
     }
-    $query.=" GROUP BY borrowers.borrowernumber";
-    if ($filterdate){ 
-        $query.=" HAVING (latestissue < ? OR latestissue IS NULL) 
-                  AND currentissue IS NULL";
+    $query.=" GROUP BY borrowers.borrowernumber HAVING currentissue IS NULL ";
+    if ( $filterdate ) {
+        $query.=" AND ( latestissue < ? OR latestissue IS NULL ) ";
         push @query_params,$filterdate;
     }
     warn $query if $debug;
+
     my $sth = $dbh->prepare($query);
     if (scalar(@query_params)>0){  
         $sth->execute(@query_params);
@@ -2358,6 +2408,22 @@ sub GetBorrowersWithEmail {
     return @result;
 }
 
+sub AddMember_Opac {
+    my ( %borrower ) = @_;
+
+    $borrower{'categorycode'} = C4::Context->preference('PatronSelfRegistrationDefaultCategory');
+
+    my $sr = new String::Random;
+    $sr->{'A'} = [ 'A'..'Z', 'a'..'z' ];
+    my $password = $sr->randpattern("AAAAAAAAAA");
+    $borrower{'password'} = $password;
+
+    $borrower{'cardnumber'} = fixup_cardnumber();
+
+    my $borrowernumber = AddMember(%borrower);
+
+    return ( $borrowernumber, $password );
+}
 
 END { }    # module clean-up code here (global destructor)
 
index 3e33694..1754099 100644 (file)
@@ -69,12 +69,24 @@ If $all_fields is true, then each hashref also contains the other fields from bo
 =cut
 
 sub GetAttributeTypes {
-    my ($all) = @_;
-    my $select = $all ? '*' : 'code, description, class';
+    my $all    = @_   ? shift : 0;
+    my $no_branch_limit = @_ ? shift : 0;
+    my $branch_limit = $no_branch_limit
+        ? 0
+        : C4::Context->userenv ? C4::Context->userenv->{"branch"} : 0;
+    my $select = $all ? '*'   : 'DISTINCT(code), description, class';
+
     my $dbh = C4::Context->dbh;
-    my $sth = $dbh->prepare("SELECT $select FROM borrower_attribute_types ORDER by code");
-    $sth->execute();
+    my $query = "SELECT $select FROM borrower_attribute_types";
+    $query .= qq{
+        LEFT JOIN borrower_attribute_types_branches ON bat_code = code
+        WHERE b_branchcode = ? OR b_branchcode IS NULL
+    } if $branch_limit;
+    $query .= " ORDER BY code";
+    my $sth    = $dbh->prepare($query);
+    $sth->execute( $branch_limit ? $branch_limit : () );
     my $results = $sth->fetchall_arrayref({});
+    $sth->finish;
     return @$results;
 }
 
@@ -166,6 +178,13 @@ sub fetch {
     $self->{'category_description'}      = $row->{'category_description'};
     $self->{'class'}                     = $row->{'class'};
 
+    $sth = $dbh->prepare("SELECT branchcode, branchname FROM borrower_attribute_types_branches, branches WHERE b_branchcode = branchcode AND bat_code = ?;");
+    $sth->execute( $code );
+    while ( my $data = $sth->fetchrow_hashref ) {
+        push @{ $self->{branches} }, $data;
+    }
+    $sth->finish();
+
     bless $self, $class;
     return $self;
 }
@@ -219,6 +238,22 @@ sub store {
     $sth->bind_param(11, $self->{'code'});
     $sth->execute;
 
+    if ( defined $$self{branches} ) {
+        $sth = $dbh->prepare("DELETE FROM borrower_attribute_types_branches WHERE bat_code = ?");
+        $sth->execute( $$self{code} );
+        $sth = $dbh->prepare(
+            "INSERT INTO borrower_attribute_types_branches
+                        ( bat_code, b_branchcode )
+                        VALUES ( ?, ? )"
+        );
+        for my $branchcode ( @{$$self{branches}} ) {
+            next if not $branchcode;
+            $sth->bind_param( 1, $$self{code} );
+            $sth->bind_param( 2, $branchcode );
+            $sth->execute;
+        }
+    }
+    $sth->finish;
 }
 
 =head2 code
@@ -250,6 +285,20 @@ sub description {
     @_ ? $self->{'description'} = shift : $self->{'description'};
 }
 
+=head2 branches
+
+my $branches = $attr_type->branches();
+$attr_type->branches($branches);
+
+Accessor.
+
+=cut
+
+sub branches {
+    my $self = shift;
+    @_ ? $self->{branches} = shift : $self->{branches};
+}
+
 =head2 repeatable
 
   my $repeatable = $attr_type->repeatable();
@@ -324,13 +373,9 @@ sub staff_searchable {
 
 =head2 display_checkout
 
-=over 4
-
 my $display_checkout = $attr_type->display_checkout();
 $attr_type->display_checkout($display_checkout);
 
-=back
-
 Accessor.  The C<$display_checkout> argument
 is interpreted as a Perl boolean.
 
@@ -357,13 +402,9 @@ sub authorised_value_category {
 
 =head2 category_code
 
-=over 4
-
 my $category_code = $attr_type->category_code();
 $attr_type->category_code($category_code);
 
-=back
-
 Accessor.
 
 =cut
@@ -375,13 +416,9 @@ sub category_code {
 
 =head2 category_description
 
-=over 4
-
 my $category_description = $attr_type->category_description();
 $attr_type->category_description($category_description);
 
-=back
-
 Accessor.
 
 =cut
@@ -393,13 +430,9 @@ sub category_description {
 
 =head2 class
 
-=over 4
-
 my $class = $attr_type->class();
 $attr_type->class($class);
 
-=back
-
 Accessor.
 
 =cut
@@ -432,6 +465,7 @@ sub delete {
     my $dbh = C4::Context->dbh;
     my $sth = $dbh->prepare_cached("DELETE FROM borrower_attribute_types WHERE code = ?");
     $sth->execute($code);
+    $sth->finish;
 }
 
 =head2 num_patrons
index e175915..f0ec07f 100644 (file)
@@ -71,6 +71,7 @@ marked for OPAC display are returned.
 sub GetBorrowerAttributes {
     my $borrowernumber = shift;
     my $opac_only = @_ ? shift : 0;
+    my $branch_limit = @_ ? shift : 0;
 
     my $dbh = C4::Context->dbh();
     my $query = "SELECT code, description, attribute, lib, password, display_checkout, category_code, class
@@ -95,6 +96,7 @@ sub GetBorrowerAttributes {
             class             => $row->{'class'},
         }
     }
+    $sth->finish;
     return \@results;
 }
 
index 1dc6f72..a380bf0 100644 (file)
@@ -2007,7 +2007,10 @@ sub MoveReserve {
             ModReserveFill($borr_res);
         }
 
-        if ($cancelreserve) { # cancel reserves on this item
+        if ( $cancelreserve eq 'revert' ) { ## Revert waiting reserve to priority 1
+            RevertWaitingStatus({ itemnumber => $itemnumber });
+        }
+        elsif ( $cancelreserve eq 'cancel' || $cancelreserve ) { # cancel reserves on this item
             CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
             CancelReserve($res->{'biblionumber'}, 0, $res->{'borrowernumber'});
         }
@@ -2058,6 +2061,66 @@ sub MergeHolds {
     }
 }
 
+=head2 RevertWaitingStatus
+
+  $success = RevertWaitingStatus({ itemnumber => $itemnumber });
+
+  Reverts a 'waiting' hold back to a regular hold with a priority of 1.
+
+  Caveat: Any waiting hold fixed with RevertWaitingStatus will be an
+          item level hold, even if it was only a bibliolevel hold to
+          begin with. This is because we can no longer know if a hold
+          was item-level or bib-level after a hold has been set to
+          waiting status.
+
+=cut
+
+sub RevertWaitingStatus {
+    my ( $params ) = @_;
+    my $itemnumber = $params->{'itemnumber'};
+
+    return unless ( $itemnumber );
+
+    my $dbh = C4::Context->dbh;
+
+    ## Get the waiting reserve we want to revert
+    my $query = "
+        SELECT * FROM reserves
+        WHERE itemnumber = ?
+        AND found IS NOT NULL
+    ";
+    my $sth = $dbh->prepare( $query );
+    $sth->execute( $itemnumber );
+    my $reserve = $sth->fetchrow_hashref();
+
+    ## Increment the priority of all other non-waiting
+    ## reserves for this bib record
+    $query = "
+        UPDATE reserves
+        SET
+          priority = priority + 1
+        WHERE
+          biblionumber =  ?
+        AND
+          priority > 0
+    ";
+    $sth = $dbh->prepare( $query );
+    $sth->execute( $reserve->{'biblionumber'} );
+
+    ## Fix up the currently waiting reserve
+    $query = "
+    UPDATE reserves
+    SET
+      priority = 1,
+      found = NULL,
+      waitingdate = NULL
+    WHERE
+      reserve_id = ?
+    ";
+    $sth = $dbh->prepare( $query );
+    return $sth->execute( $reserve->{'reserve_id'} );
+}
+
 =head2 ReserveSlip
 
   ReserveSlip($branchcode, $borrowernumber, $biblionumber)
index 6bf7192..ba85cd7 100644 (file)
@@ -22,14 +22,7 @@ use C4::Circulation;
 use C4::Members;
 use C4::Reserves;
 
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-
-BEGIN {
-    $VERSION = 3.07.00.049;
-       require Exporter;
-       @ISA = qw(Exporter);
-       @EXPORT_OK = qw();
-}
+our $VERSION = 3.07.00.049;
 
 =head1 EXAMPLE
 
@@ -140,7 +133,7 @@ my %fields = (
 );
 
 sub next_hold {
-    my $self = shift or return;
+    my $self = shift;
     # use Data::Dumper; warn "next_hold() hold_shelf: " . Dumper($self->{hold_shelf}); warn "next_hold() pending_queue: " . $self->{pending_queue};
     foreach (@{$self->hold_shelf}) {    # If this item was taken from the hold shelf, then that reserve still governs
         next unless ($_->{itemnumber} and $_->{itemnumber} == $self->{itemnumber});
@@ -168,7 +161,7 @@ sub hold_patron_id {
 
 }
 sub hold_patron_name {
-    my $self = shift or return;
+    my $self = shift;
     my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return;
     my $holder = GetMember(borrowernumber=>$borrowernumber);
     unless ($holder) {
@@ -186,7 +179,7 @@ sub hold_patron_name {
 }
 
 sub hold_patron_bcode {
-    my $self = shift or return;
+    my $self = shift;
     my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return;
     my $holder = GetMember(borrowernumber => $borrowernumber);
     if ($holder) {
@@ -257,9 +250,11 @@ sub sip_circulation_status {
 }
 
 sub sip_security_marker {
+    my $self = shift;
     return '02';       # FIXME? 00-other; 01-None; 02-Tattle-Tape Security Strip (3M); 03-Whisper Tape (3M)
 }
 sub sip_fee_type {
+    my $self = shift;
     return '01';    # FIXME? 01-09 enumerated in spec.  We just use O1-other/unknown.
 }
 
@@ -354,7 +349,7 @@ sub _barcode_to_borrowernumber {
     return $member->{borrowernumber};
 }
 sub barcode_is_borrowernumber {    # because hold_queue only has borrowernumber...
-    my $self = shift;   # not really used
+    my $self = shift;
     my $barcode = shift;
     my $number  = shift or return;    # can't be zero
     return unless defined $barcode; # might be 0 or 000 or 000000
index d3a9762..8c00a11 100644 (file)
@@ -23,32 +23,26 @@ use C4::Reserves;
 use C4::Branch qw(GetBranchName);
 use Digest::MD5 qw(md5_base64);
 
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+our $VERSION = 3.07.00.049;
 
-BEGIN {
-    $VERSION = 3.07.00.049;
-       @ISA = qw(Exporter);
-       @EXPORT_OK = qw(invalid_patron);
-}
-
-our $kp;       # koha patron
+our $kp;    # koha patron
 
 sub new {
-       my ($class, $patron_id) = @_;
+    my ($class, $patron_id) = @_;
     my $type = ref($class) || $class;
     my $self;
-       $kp = GetMember(cardnumber=>$patron_id);
-       $debug and warn "new Patron (GetMember): " . Dumper($kp);
+    $kp = GetMember(cardnumber=>$patron_id) || GetMember(userid=>$patron_id);
+    $debug and warn "new Patron (GetMember): " . Dumper($kp);
     unless (defined $kp) {
-               syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);
+        syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);
         return;
-       }
-       $kp = GetMemberDetails(undef,$patron_id);
-       $debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
-       my $pw        = $kp->{password};  ### FIXME - md5hash -- deal with . 
-       my $flags     = $kp->{flags};     # or warn "Warning: No flags from patron object for '$patron_id'"; 
-       my $debarred  = $kp->{debarred};  # 1 if ($kp->{flags}->{DBARRED}->{noissues});
-       $debug and warn sprintf("Debarred = %s : ", ($debarred||'undef')) . Dumper(%{$kp->{flags}});
+    }
+    $kp = GetMemberDetails($kp->{borrowernumber});
+    $debug and warn "new Patron (GetMemberDetails): " . Dumper($kp);
+    my $pw        = $kp->{password};  ### FIXME - md5hash -- deal with .
+    my $flags     = $kp->{flags};     # or warn "Warning: No flags from patron object for '$patron_id'";
+    my $debarred  = $kp->{debarred};  # 1 if ($kp->{flags}->{DBARRED}->{noissues});
+    $debug and warn sprintf("Debarred = %s : ", ($debarred||'undef')) . Dumper(%{$kp->{flags}});
     my ($day, $month, $year) = (localtime)[3,4,5];
     my $today    = sprintf '%04d-%02d-%02d', $year+1900, $month+1, $day;
     my $expired  = ($today gt $kp->{dateexpiry}) ? 1 : 0;
@@ -58,18 +52,16 @@ sub new {
         }
         $kp->{opacnote} .= 'PATRON EXPIRED';
     }
-       my %ilspatron;
-       my $adr     = $kp->{streetnumber} || '';
-       my $address = $kp->{address}      || ''; 
+    my %ilspatron;
+    my $adr     = _get_address($kp);
     my $dob     = $kp->{dateofbirth};
     $dob and $dob =~ s/-//g;    # YYYYMMDD
     my $dexpiry     = $kp->{dateexpiry};
     $dexpiry and $dexpiry =~ s/-//g;    # YYYYMMDD
-       $adr .= ($adr && $address) ? " $address" : $address;
     my $fines_amount = $flags->{CHARGES}->{amount};
     $fines_amount = ($fines_amount and $fines_amount > 0) ? $fines_amount : 0;
     {
-       no warnings;    # any of these $kp->{fields} being concat'd could be undef
+    no warnings;    # any of these $kp->{fields} being concat'd could be undef
     %ilspatron = (
         getmemberdetails_object => $kp,
         name => $kp->{firstname} . " " . $kp->{surname},
@@ -109,24 +101,24 @@ sub new {
     );
     }
     $debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}";
-       for (qw(EXPIRED CHARGES CREDITS GNA LOST DBARRED NOTES)) {
-               ($flags->{$_}) or next;
+    for (qw(EXPIRED CHARGES CREDITS GNA LOST DBARRED NOTES)) {
+        ($flags->{$_}) or next;
         if ($_ ne 'NOTES' and $flags->{$_}->{message}) {
             $ilspatron{screen_msg} .= " -- " . $flags->{$_}->{message};  # show all but internal NOTES
         }
-               if ($flags->{$_}->{noissues}) {
-                       foreach my $toggle (qw(charge_ok renew_ok recall_ok hold_ok inet)) {
-                               $ilspatron{$toggle} = 0;    # if we get noissues, disable everything
-                       }
-               }
-       }
+        if ($flags->{$_}->{noissues}) {
+            foreach my $toggle (qw(charge_ok renew_ok recall_ok hold_ok inet)) {
+                $ilspatron{$toggle} = 0;    # if we get noissues, disable everything
+            }
+        }
+    }
 
     # FIXME: populate fine_items recall_items
 #   $ilspatron{hold_items}    = (GetReservesFromBorrowernumber($kp->{borrowernumber},'F'));
-       $ilspatron{unavail_holds} = [(GetReservesFromBorrowernumber($kp->{borrowernumber}))];
-       $ilspatron{items} = GetPendingIssues($kp->{borrowernumber});
-       $self = \%ilspatron;
-       $debug and warn Dumper($self);
+    $ilspatron{unavail_holds} = [(GetReservesFromBorrowernumber($kp->{borrowernumber}))];
+    $ilspatron{items} = GetPendingIssues($kp->{borrowernumber});
+    $self = \%ilspatron;
+    $debug and warn Dumper($self);
     syslog("LOG_DEBUG", "new ILS::Patron(%s): found patron '%s'", $patron_id,$self->{id});
     bless $self, $type;
     return $self;
@@ -184,24 +176,24 @@ sub AUTOLOAD {
     $name =~ s/.*://;
 
     unless (exists $fields{$name}) {
-               croak "Cannot access '$name' field of class '$class'";
+        croak "Cannot access '$name' field of class '$class'";
     }
 
-       if (@_) {
+    if (@_) {
         $fields{$name} or croak "Field '$name' of class '$class' is READ ONLY.";
-               return $self->{$name} = shift;
-       } else {
-               return $self->{$name};
-       }
+        return $self->{$name} = shift;
+    } else {
+        return $self->{$name};
+    }
 }
 
 sub check_password {
     my ($self, $pwd) = @_;
-       my $md5pwd = $self->{password};
-       # warn sprintf "check_password for %s: '%s' vs. '%s'",($self->{name}||''),($self->{password}||''),($pwd||'');
-       (defined $pwd   ) or return 0;          # you gotta give me something (at least ''), or no deal
-       (defined $md5pwd) or return($pwd eq '');        # if the record has a NULL password, accept '' as match
-       return (md5_base64($pwd) eq $md5pwd);
+    my $md5pwd = $self->{password};
+    # warn sprintf "check_password for %s: '%s' vs. '%s'",($self->{name}||''),($self->{password}||''),($pwd||'');
+    (defined $pwd   ) or return 0;        # you gotta give me something (at least ''), or no deal
+    (defined $md5pwd) or return($pwd eq '');    # if the record has a NULL password, accept '' as match
+    return (md5_base64($pwd) eq $md5pwd);
 }
 
 # A few special cases, not in AUTOLOADed %fields
@@ -235,17 +227,17 @@ sub expired {
 sub drop_hold {
     my ($self, $item_id) = @_;
     return if !$item_id;
-       my $result = 0;
-       foreach (qw(hold_items unavail_holds)) {
-               $self->{$_} or next;
-               for (my $i = 0; $i < scalar @{$self->{$_}}; $i++) {
-                       my $held_item = $self->{$_}[$i]->{item_id} or next;
-                       if ($held_item eq $item_id) {
-                               splice @{$self->{$_}}, $i, 1;
-                               $result++;
-                       }
-               }
-       }
+    my $result = 0;
+    foreach (qw(hold_items unavail_holds)) {
+        $self->{$_} or next;
+        for (my $i = 0; $i < scalar @{$self->{$_}}; $i++) {
+            my $held_item = $self->{$_}[$i]->{item_id} or next;
+            if ($held_item eq $item_id) {
+                splice @{$self->{$_}}, $i, 1;
+                $result++;
+            }
+        }
+    }
     return $result;
 }
 
@@ -253,10 +245,10 @@ sub drop_hold {
 # from the SIP request.  Note those incoming values are 1-indexed, not 0-indexed.
 #
 sub x_items {
-    my $self      = shift or return;
+    my $self      = shift;
     my $array_var = shift or return;
     my ($start, $end) = @_;
-       $self->{$array_var} or return [];
+    $self->{$array_var} or return [];
     $start = 1 unless defined($start);
     $end   = scalar @{$self->{$array_var}} unless defined($end);
     # syslog("LOG_DEBUG", "$array_var: start = %d, end = %d; items(%s)", $start, $end, join(', ', @{$self->{items}}));
@@ -268,35 +260,35 @@ sub x_items {
 # List of outstanding holds placed
 #
 sub hold_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('hold_items', @_);
 }
 
 sub overdue_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('overdue_items', @_);
 }
 sub charged_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('items', @_);
 }
 sub fine_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('fine_items', @_);
 }
 sub recall_items {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('recall_items', @_);
 }
 sub unavail_holds {
-    my $self = shift or return;
+    my $self = shift;
     return $self->x_items('unavail_holds', @_);
 }
 
 sub block {
     my ($self, $card_retained, $blocked_card_msg) = @_;
     foreach my $field ('charge_ok', 'renew_ok', 'recall_ok', 'hold_ok', 'inet') {
-               $self->{$field} = 0;
+        $self->{$field} = 0;
     }
     $self->{screen_msg} = "Block feature not implemented";  # $blocked_card_msg || "Card Blocked.  Please contact library staff";
     # TODO: not really affecting patron record
@@ -306,11 +298,11 @@ sub block {
 sub enable {
     my $self = shift;
     foreach my $field ('charge_ok', 'renew_ok', 'recall_ok', 'hold_ok', 'inet') {
-               $self->{$field} = 1;
+        $self->{$field} = 1;
     }
     syslog("LOG_DEBUG", "Patron(%s)->enable: charge: %s, renew:%s, recall:%s, hold:%s",
-          $self->{id}, $self->{charge_ok}, $self->{renew_ok},
-          $self->{recall_ok}, $self->{hold_ok});
+       $self->{id}, $self->{charge_ok}, $self->{renew_ok},
+       $self->{recall_ok}, $self->{hold_ok});
     $self->{screen_msg} = "Enable feature not implemented."; # "All privileges restored.";   # TODO: not really affecting patron record
     return $self;
 }
@@ -321,16 +313,16 @@ sub inet_privileges {
 }
 
 sub fee_limit {
-    my $self = shift;
+    my $self = shift;
     return C4::Context->preference("noissuescharge") || 5;
 }
 
 sub excessive_fees {
-    my $self = shift or return;
+    my $self = shift;
     return ($self->fee_amount and $self->fee_amount > $self->fee_limit);
 }
 sub excessive_fines {
-    my $self = shift or return;
+    my $self = shift;
     return $self->excessive_fees;   # excessive_fines is the same thing as excessive_fees for Koha
 }
     
@@ -346,48 +338,68 @@ sub library_name {
 #
 
 sub invalid_patron {
+    my $self = shift;
     return "Please contact library staff";
 }
 
 sub charge_denied {
+    my $self = shift;
     return "Please contact library staff";
 }
 
+sub _get_address {
+    my $patron = shift;
+
+    my $address = $patron->{streetnumber} || q{};
+    for my $field (qw( roaddetails address address2 city state zipcode country))
+    {
+        next unless $patron->{$field};
+        if ($address) {
+            $address .= q{ };
+            $address .= $patron->{$field};
+        }
+        else {
+            $address .= $patron->{$field};
+        }
+    }
+    return $address;
+}
+
 1;
 __END__
 
 =head1 EXAMPLES
 
   our %patron_example = (
-                 djfiander => {
-                     name => "David J. Fiander",
-                     id => 'djfiander',
-                     password => '6789',
-                     ptype => 'A', # 'A'dult.  Whatever.
-                     birthdate => '19640925',
-                     address => '2 Meadowvale Dr. St Thomas, ON',
-                     home_phone => '(519) 555 1234',
-                     email_addr => 'djfiander@hotmail.com',
-                     charge_ok => 1,
-                     renew_ok => 1,
-                     recall_ok => 0,
-                     hold_ok => 1,
-                     card_lost => 0,
-                     claims_returned => 0,
-                     fines => 100,
-                     fees => 0,
-                     recall_overdue => 0,
-                     items_billed => 0,
-                     screen_msg => '',
-                     print_line => '',
-                     items => [],
-                     hold_items => [],
-                     overdue_items => [],
-                     fine_items => ['Computer Time'],
-                     recall_items => [],
-                     unavail_holds => [],
-                     inet => 1,
-                 },
+          djfiander => {
+              name => "David J. Fiander",
+              id => 'djfiander',
+              password => '6789',
+              ptype => 'A', # 'A'dult.  Whatever.
+              birthdate => '19640925',
+              address => '2 Meadowvale Dr. St Thomas, ON',
+              home_phone => '(519) 555 1234',
+              email_addr => 'djfiander@hotmail.com',
+              charge_ok => 1,
+              renew_ok => 1,
+              recall_ok => 0,
+              hold_ok => 1,
+              card_lost => 0,
+              claims_returned => 0,
+              fines => 100,
+              fees => 0,
+              recall_overdue => 0,
+              items_billed => 0,
+              screen_msg => '',
+              print_line => '',
+              items => [],
+              hold_items => [],
+              overdue_items => [],
+              fine_items => ['Computer Time'],
+              recall_items => [],
+              unavail_holds => [],
+              inet => 1,
+          },
   );
 
  From borrowers table:
@@ -467,26 +479,26 @@ __END__
 
  $flags->{KEY}
  {CHARGES}
-       {message}     Message showing patron's credit or debt
-       {noissues}    Set if patron owes >$5.00
- {GNA}                 Set if patron gone w/o address
-       {message}     "Borrower has no valid address"
-       {noissues}    Set.
- {LOST}                Set if patron's card reported lost
-       {message}     Message to this effect
-       {noissues}    Set.
- {DBARRED}             Set if patron is debarred
-       {message}     Message to this effect
-       {noissues}    Set.
- {NOTES}               Set if patron has notes
-       {message}     Notes about patron
- {ODUES}               Set if patron has overdue books
-       {message}     "Yes"
-       {itemlist}    ref-to-array: list of overdue books
-       {itemlisttext}    Text list of overdue items
- {WAITING}             Set if there are items available that the patron reserved
-       {message}     Message to this effect
-       {itemlist}    ref-to-array: list of available items
+    {message}     Message showing patron's credit or debt
+    {noissues}    Set if patron owes >$5.00
+ {GNA}             Set if patron gone w/o address
+    {message}     "Borrower has no valid address"
+    {noissues}    Set.
+ {LOST}            Set if patron's card reported lost
+    {message}     Message to this effect
+    {noissues}    Set.
+ {DBARRED}         Set if patron is debarred
+    {message}     Message to this effect
+    {noissues}    Set.
+ {NOTES}           Set if patron has notes
+    {message}     Notes about patron
+ {ODUES}           Set if patron has overdue books
+    {message}     "Yes"
+    {itemlist}    ref-to-array: list of overdue books
+    {itemlisttext}    Text list of overdue items
+ {WAITING}         Set if there are items available that the patron reserved
+    {message}     Message to this effect
+    {itemlist}    ref-to-array: list of available items
 
 =cut
 
index 47bd85d..49ce926 100644 (file)
@@ -17,7 +17,7 @@ use C4::Reserves qw( ModReserveAffect );
 use C4::Items qw( ModItemTransfer );
 use C4::Debug;
 
-our @ISA = qw(ILS::Transaction);
+use parent qw(ILS::Transaction);
 
 my %fields = (
     magnetic => 0,
index da7a1b0..c61eca6 100644 (file)
@@ -20,13 +20,11 @@ use C4::Circulation;
 use C4::Members;
 use C4::Reserves qw(ModReserveFill);
 use C4::Debug;
+use parent qw(ILS::Transaction);
 
-use vars qw($VERSION @ISA $debug);
+our $debug;
 
-BEGIN {
-    $VERSION = 3.07.00.049;
-       @ISA = qw(ILS::Transaction);
-}
+our $VERSION = 3.07.00.049;
 
 # Most fields are handled by the Transaction superclass
 my %fields = (
index 19bdd04..52619f4 100644 (file)
@@ -22,9 +22,8 @@ use strict;
 
 use C4::Accounts qw(recordpayment);
 use ILS;
-use base qw(ILS::Transaction);
+use parent qw(ILS::Transaction);
 
-use vars qw($VERSION @ISA $debug);
 
 our $debug   = 0;
 our $VERSION = 3.07.00.049;
index 3352c1c..a2ca13e 100644 (file)
@@ -12,13 +12,10 @@ use ILS::Transaction;
 use C4::Reserves;      # AddReserve
 use C4::Members;       # GetMember
 use C4::Biblio;                # GetBiblioFromItemNumber GetBiblioItemByBiblioNumber
+use parent qw(ILS::Transaction);
 
-use vars qw($VERSION @ISA);
 
-BEGIN {
-    $VERSION = 3.07.00.049;
-           @ISA = qw(ILS::Transaction);
-}
+our $VERSION = 3.07.00.049;
 
 my %fields = (
        expiration_date => 0,
index 1f0f567..aa300d4 100644 (file)
@@ -12,7 +12,7 @@ use ILS;
 use C4::Circulation;
 use C4::Members;
 
-use base qw(ILS::Transaction);
+use parent qw(ILS::Transaction);
 
 my %fields = (
     renewal_ok => 0,
index c7be96b..7cdb4bb 100644 (file)
@@ -12,7 +12,7 @@ use ILS::Item;
 
 use C4::Members qw( GetMember );
 
-use base qw(ILS::Transaction::Renew);
+use parent qw(ILS::Transaction::Renew);
 
 my %fields = (
     renewed   => [],
index f95cb83..50f7d2b 100644 (file)
@@ -254,28 +254,29 @@ sub SimpleSearch {
                 return ( $error, undef, undef );
             }
         }
-        while ( ( my $i = ZOOM::event( \@zconns ) ) != 0 ) {
-            my $event = $zconns[ $i - 1 ]->last_event();
-            if ( $event == ZOOM::Event::ZEND ) {
 
-                my $first_record = defined( $offset ) ? $offset+1 : 1;
+        _ZOOM_event_loop(
+            \@zconns,
+            \@tmpresults,
+            sub {
+                my ($i, $size) = @_;
+                my $first_record = defined($offset) ? $offset + 1 : 1;
                 my $hits = $tmpresults[ $i - 1 ]->size();
                 $total_hits += $hits;
                 my $last_record = $hits;
                 if ( defined $max_results && $offset + $max_results < $hits ) {
-                    $last_record  = $offset + $max_results;
+                    $last_record = $offset + $max_results;
                 }
 
-                for my $j ( $first_record..$last_record ) {
-                    my $record = $tmpresults[ $i - 1 ]->record( $j-1 )->raw(); # 0 indexed
+                for my $j ( $first_record .. $last_record ) {
+                    my $record =
+                      $tmpresults[ $i - 1 ]->record( $j - 1 )->raw()
+                      ;    # 0 indexed
                     push @{$results}, $record;
                 }
             }
-        }
+        );
 
-        foreach my $result (@tmpresults) {
-            $result->destroy();
-        }
         foreach my $zoom_query (@zoom_queries) {
             $zoom_query->destroy();
         }
@@ -410,12 +411,11 @@ sub getRecords {
     }    # finished looping through servers
 
     # The big moment: asynchronously retrieve results from all servers
-    while ( ( my $i = ZOOM::event( \@zconns ) ) != 0 ) {
-        my $ev = $zconns[ $i - 1 ]->last_event();
-        if ( $ev == ZOOM::Event::ZEND ) {
-            next unless $results[ $i - 1 ];
-            my $size = $results[ $i - 1 ]->size();
-            if ( $size > 0 ) {
+        _ZOOM_event_loop(
+            \@zconns,
+            \@results,
+            sub {
+                my ( $i, $size ) = @_;
                 my $results_hash;
 
                 # loop through the results
@@ -444,16 +444,26 @@ sub getRecords {
                         my $tmpauthor;
 
                 # the minimal record in author/title (depending on MARC flavour)
-                        if (C4::Context->preference("marcflavour") eq "UNIMARC") {
-                            $tmptitle = MARC::Field->new('200',' ',' ', a => $term, f => $occ);
+                        if ( C4::Context->preference("marcflavour") eq
+                            "UNIMARC" )
+                        {
+                            $tmptitle = MARC::Field->new(
+                                '200', ' ', ' ',
+                                a => $term,
+                                f => $occ
+                            );
                             $tmprecord->append_fields($tmptitle);
-                        } else {
-                            $tmptitle  = MARC::Field->new('245',' ',' ', a => $term,);
-                            $tmpauthor = MARC::Field->new('100',' ',' ', a => $occ,);
+                        }
+                        else {
+                            $tmptitle =
+                              MARC::Field->new( '245', ' ', ' ', a => $term, );
+                            $tmpauthor =
+                              MARC::Field->new( '100', ' ', ' ', a => $occ, );
                             $tmprecord->append_fields($tmptitle);
                             $tmprecord->append_fields($tmpauthor);
                         }
-                        $results_hash->{'RECORDS'}[$j] = $tmprecord->as_usmarc();
+                        $results_hash->{'RECORDS'}[$j] =
+                          $tmprecord->as_usmarc();
                     }
 
                     # not an index scan
@@ -467,143 +477,179 @@ sub getRecords {
                 }
                 $results_hashref->{ $servers[ $i - 1 ] } = $results_hash;
 
-                # Fill the facets while we're looping, but only for the biblioserver and not for a scan
+# Fill the facets while we're looping, but only for the biblioserver and not for a scan
                 if ( !$scan && $servers[ $i - 1 ] =~ /biblioserver/ ) {
 
-                    my $jmax = $size>$facets_maxrecs? $facets_maxrecs: $size;
-                    for my $facet ( @$facets ) {
-                               for ( my $j = 0 ; $j < $jmax ; $j++ ) {
-                                   my $render_record = $results[ $i - 1 ]->record($j)->render();
+                    my $jmax =
+                      $size > $facets_maxrecs ? $facets_maxrecs : $size;
+                    for my $facet (@$facets) {
+                        for ( my $j = 0 ; $j < $jmax ; $j++ ) {
+                            my $render_record =
+                              $results[ $i - 1 ]->record($j)->render();
                             my @used_datas = ();
-                            foreach my $tag ( @{$facet->{tags}} ) {
+                            foreach my $tag ( @{ $facet->{tags} } ) {
+
                                 # avoid first line
-                                my $tag_num = substr($tag, 0, 3);
-                                my $letters = substr($tag, 3);
-                                my $field_pattern = '\n' . $tag_num . ' ([^z][^\n]+)';
-                                $field_pattern = '\n' . $tag_num . ' ([^\n]+)' if (int($tag_num) < 10);
-                                my @field_tokens = ( $render_record =~ /$field_pattern/g ) ;
+                                my $tag_num = substr( $tag, 0, 3 );
+                                my $letters = substr( $tag, 3 );
+                                my $field_pattern =
+                                  '\n' . $tag_num . ' ([^z][^\n]+)';
+                                $field_pattern = '\n' . $tag_num . ' ([^\n]+)'
+                                  if ( int($tag_num) < 10 );
+                                my @field_tokens =
+                                  ( $render_record =~ /$field_pattern/g );
                                 foreach my $field_token (@field_tokens) {
-                                    my @subf = ( $field_token =~ /\$([a-zA-Z0-9]) ([^\$]+)/g );
+                                    my @subf = ( $field_token =~
+                                          /\$([a-zA-Z0-9]) ([^\$]+)/g );
                                     my @values;
-                                    for (my $i = 0; $i < @subf; $i += 2) {
+                                    for ( my $i = 0 ; $i < @subf ; $i += 2 ) {
                                         if ( $letters =~ $subf[$i] ) {
-                                             my $value = $subf[$i+1];
-                                             $value =~ s/^ *//;
-                                             $value =~ s/ *$//;
-                                             push @values, $value;
+                                            my $value = $subf[ $i + 1 ];
+                                            $value =~ s/^ *//;
+                                            $value =~ s/ *$//;
+                                            push @values, $value;
                                         }
                                     }
-                                    my $data = join($facet->{sep}, @values);
+                                    my $data = join( $facet->{sep}, @values );
                                     unless ( $data ~~ @used_datas ) {
-                                        $facets_counter->{ $facet->{idx} }->{$data}++;
+                                        $facets_counter->{ $facet->{idx} }
+                                          ->{$data}++;
                                         push @used_datas, $data;
                                     }
-                                } # fields
-                            } # field codes
-                        } # records
-                        $facets_info->{ $facet->{idx} }->{label_value} = $facet->{label};
-                        $facets_info->{ $facet->{idx} }->{expanded} = $facet->{expanded};
-                    } # facets
+                                }    # fields
+                            }    # field codes
+                        }    # records
+                        $facets_info->{ $facet->{idx} }->{label_value} =
+                          $facet->{label};
+                        $facets_info->{ $facet->{idx} }->{expanded} =
+                          $facet->{expanded};
+                    }    # facets
                 }
-            }
 
-            # warn "connection ", $i-1, ": $size hits";
-            # warn $results[$i-1]->record(0)->render() if $size > 0;
+                # warn "connection ", $i-1, ": $size hits";
+                # warn $results[$i-1]->record(0)->render() if $size > 0;
 
-            # BUILD FACETS
-            if ( $servers[ $i - 1 ] =~ /biblioserver/ ) {
-                for my $link_value (
-                    sort { $facets_counter->{$b} <=> $facets_counter->{$a} }
-                        keys %$facets_counter )
-                {
-                    my $expandable;
-                    my $number_of_facets;
-                    my @this_facets_array;
-                    for my $one_facet (
-                        sort {
-                             $facets_counter->{$link_value}->{$b}
-                         <=> $facets_counter->{$link_value}->{$a}
-                        } keys %{ $facets_counter->{$link_value} }
+                # BUILD FACETS
+                if ( $servers[ $i - 1 ] =~ /biblioserver/ ) {
+                    for my $link_value (
+                        sort { $facets_counter->{$b} <=> $facets_counter->{$a} }
+                        keys %$facets_counter
                       )
                     {
-                        $number_of_facets++;
-                        if (   ( $number_of_facets < 6 )
-                            || ( $expanded_facet eq $link_value )
-                            || ( $facets_info->{$link_value}->{'expanded'} ) )
+                        my $expandable;
+                        my $number_of_facets;
+                        my @this_facets_array;
+                        for my $one_facet (
+                            sort {
+                                $facets_counter->{$link_value}
+                                  ->{$b} <=> $facets_counter->{$link_value}
+                                  ->{$a}
+                            } keys %{ $facets_counter->{$link_value} }
+                          )
                         {
+                            $number_of_facets++;
+                            if (   ( $number_of_facets < 6 )
+                                || ( $expanded_facet eq $link_value )
+                                || ( $facets_info->{$link_value}->{'expanded'} )
+                              )
+                            {
+
+# Sanitize the link value : parenthesis, question and exclamation mark will cause errors with CCL
+                                my $facet_link_value = $one_facet;
+                                $facet_link_value =~ s/[()!?¡¿؟]/ /g;
+
+                                # fix the length that will display in the label,
+                                my $facet_label_value = $one_facet;
+                                my $facet_max_length  = C4::Context->preference(
+                                    'FacetLabelTruncationLength')
+                                  || 20;
+                                $facet_label_value =
+                                  substr( $one_facet, 0, $facet_max_length )
+                                  . "..."
+                                  if length($facet_label_value) >
+                                      $facet_max_length;
 
-                      # Sanitize the link value : parenthesis, question and exclamation mark will cause errors with CCL
-                            my $facet_link_value = $one_facet;
-                            $facet_link_value =~ s/[()!?¡¿؟]/ /g;
+                            # if it's a branch, label by the name, not the code,
+                                if ( $link_value =~ /branch/ ) {
+                                    if (   defined $branches
+                                        && ref($branches) eq "HASH"
+                                        && defined $branches->{$one_facet}
+                                        && ref( $branches->{$one_facet} ) eq
+                                        "HASH" )
+                                    {
+                                        $facet_label_value =
+                                          $branches->{$one_facet}
+                                          ->{'branchname'};
+                                    }
+                                    else {
+                                        $facet_label_value = "*";
+                                    }
+                                }
 
-                            # fix the length that will display in the label,
-                            my $facet_label_value = $one_facet;
-                            my $facet_max_length =
-                                C4::Context->preference('FacetLabelTruncationLength') || 20;
-                            $facet_label_value =
-                              substr( $one_facet, 0, $facet_max_length ) . "..."
-                                if length($facet_label_value) > $facet_max_length;
+                          # if it's a itemtype, label by the name, not the code,
+                                if ( $link_value =~ /itype/ ) {
+                                    if (   defined $itemtypes
+                                        && ref($itemtypes) eq "HASH"
+                                        && defined $itemtypes->{$one_facet}
+                                        && ref( $itemtypes->{$one_facet} ) eq
+                                        "HASH" )
+                                    {
+                                        $facet_label_value =
+                                          $itemtypes->{$one_facet}
+                                          ->{'description'};
+                                    }
+                                }
 
-                            # if it's a branch, label by the name, not the code,
-                            if ( $link_value =~ /branch/ ) {
-                                                               if (defined $branches
-                                                                       && ref($branches) eq "HASH"
-                                                                       && defined $branches->{$one_facet}
-                                                                       && ref ($branches->{$one_facet}) eq "HASH")
-                                                               {
-                                       $facet_label_value =
-                                               $branches->{$one_facet}->{'branchname'};
-                                                               }
-                                                               else {
-                                                                       $facet_label_value = "*";
-                                                               }
-                            }
-                            # if it's a itemtype, label by the name, not the code,
-                            if ( $link_value =~ /itype/ ) {
-                                if (defined $itemtypes
-                                    && ref($itemtypes) eq "HASH"
-                                    && defined $itemtypes->{$one_facet}
-                                    && ref ($itemtypes->{$one_facet}) eq "HASH")
-                                {
+               # also, if it's a location code, use the name instead of the code
+                                if ( $link_value =~ /location/ ) {
                                     $facet_label_value =
-                                        $itemtypes->{$one_facet}->{'description'};
+                                      GetKohaAuthorisedValueLib( 'LOC',
+                                        $one_facet, $opac );
                                 }
-                            }
 
-                            # also, if it's a location code, use the name instead of the code
-                            if ( $link_value =~ /location/ ) {
-                                $facet_label_value = GetKohaAuthorisedValueLib('LOC', $one_facet, $opac);
+                # but we're down with the whole label being in the link's title.
+                                push @this_facets_array,
+                                  {
+                                    facet_count =>
+                                      $facets_counter->{$link_value}
+                                      ->{$one_facet},
+                                    facet_label_value => $facet_label_value,
+                                    facet_title_value => $one_facet,
+                                    facet_link_value  => $facet_link_value,
+                                    type_link_value   => $link_value,
+                                  }
+                                  if ($facet_label_value);
                             }
-
-                            # but we're down with the whole label being in the link's title.
-                            push @this_facets_array, {
-                                facet_count       => $facets_counter->{$link_value}->{$one_facet},
-                                facet_label_value => $facet_label_value,
-                                facet_title_value => $one_facet,
-                                facet_link_value  => $facet_link_value,
-                                type_link_value   => $link_value,
-                            } if ( $facet_label_value );
                         }
-                    }
 
-                    # handle expanded option
-                    unless ( $facets_info->{$link_value}->{'expanded'} ) {
-                        $expandable = 1
-                          if ( ( $number_of_facets > 6 )
-                            && ( $expanded_facet ne $link_value ) );
+                        # handle expanded option
+                        unless ( $facets_info->{$link_value}->{'expanded'} ) {
+                            $expandable = 1
+                              if ( ( $number_of_facets > 6 )
+                                && ( $expanded_facet ne $link_value ) );
+                        }
+                        push @facets_loop,
+                          {
+                            type_link_value => $link_value,
+                            type_id         => $link_value . "_id",
+                            "type_label_"
+                              . $facets_info->{$link_value}->{'label_value'} =>
+                              1,
+                            facets     => \@this_facets_array,
+                            expandable => $expandable,
+                            expand     => $link_value,
+                          }
+                          unless (
+                            (
+                                $facets_info->{$link_value}->{'label_value'} =~
+                                /Libraries/
+                            )
+                            and ( C4::Context->preference('singleBranchMode') )
+                          );
                     }
-                    push @facets_loop, {
-                        type_link_value => $link_value,
-                        type_id         => $link_value . "_id",
-                        "type_label_" . $facets_info->{$link_value}->{'label_value'} => 1,
-                        facets     => \@this_facets_array,
-                        expandable => $expandable,
-                        expand     => $link_value,
-                    } unless ( ($facets_info->{$link_value}->{'label_value'} =~ /Libraries/) and (C4::Context->preference('singleBranchMode')) );
                 }
             }
-        }
-    }
+        );
     return ( undef, $results_hashref, \@facets_loop );
 }
 
@@ -1849,13 +1895,23 @@ sub searchResults {
                     $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan};
 
                     # can place hold on item ?
-                    if ((!$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems'))
-                      && !$item->{itemlost}
-                      && !$item->{withdrawn}
-                    ) {
-                        $can_place_holds = 1;
+                    if ( !$item->{itemlost} ) {
+                        if ( !$item->{wthdrawn} ){
+                            if ( $item->{damaged} ){
+                                if ( C4::Context->preference('AllowHoldsOnDamagedItems') ){
+                                    # can place a hold on a damaged item if AllowHoldsOnDamagedItems is true
+                                    if ( ( !$item->{notforloan} || $item->{notforloan} < 0 ) ){
+                                        # item is either for loan or has notforloan < 0
+                                        $can_place_holds = 1;
+                                    }
+                                }
+                            } elsif ( $item->{notforloan} < 0 ) {
+                                # item is not damaged and notforloan is < 0
+                                $can_place_holds = 1;
+                            }
+                        }
                     }
-                    
+
                     $other_count++;
 
                     my $key = $prefix . $item->{status};
@@ -2806,24 +2862,53 @@ sub GetDistinctValues {
                }
                # The big moment: asynchronously retrieve results from all servers
                my @elements;
-               while ( ( my $i = ZOOM::event( \@zconns ) ) != 0 ) {
-                       my $ev = $zconns[ $i - 1 ]->last_event();
-                       if ( $ev == ZOOM::Event::ZEND ) {
-                               next unless $results[ $i - 1 ];
-                               my $size = $results[ $i - 1 ]->size();
-                               if ( $size > 0 ) {
-                      for (my $j=0;$j<$size;$j++){
-                                               my %hashscan;
-                                               @hashscan{qw(value cnt)}=$results[ $i - 1 ]->display_term($j);
-                                               push @elements, \%hashscan;
-                                         }
-                               }
-                       }
-               }
+        _ZOOM_event_loop(
+            \@zconns,
+            \@results,
+            sub {
+                my ( $i, $size ) = @_;
+                for ( my $j = 0 ; $j < $size ; $j++ ) {
+                    my %hashscan;
+                    @hashscan{qw(value cnt)} =
+                      $results[ $i - 1 ]->display_term($j);
+                    push @elements, \%hashscan;
+                }
+            }
+        );
                return \@elements;
    }
 }
 
+=head2 _ZOOM_event_loop
+
+    _ZOOM_event_loop(\@zconns, \@results, sub {
+        my ( $i, $size ) = @_;
+        ....
+    } );
+
+Processes a ZOOM event loop and passes control to a closure for
+processing the results, and destroying the resultsets.
+
+=cut
+
+sub _ZOOM_event_loop {
+    my ($zconns, $results, $callback) = @_;
+    while ( ( my $i = ZOOM::event( $zconns ) ) != 0 ) {
+        my $ev = $zconns->[ $i - 1 ]->last_event();
+        if ( $ev == ZOOM::Event::ZEND ) {
+            next unless $results->[ $i - 1 ];
+            my $size = $results->[ $i - 1 ]->size();
+            if ( $size > 0 ) {
+                $callback->($i, $size);
+            }
+        }
+    }
+
+    foreach my $result (@$results) {
+        $result->destroy();
+    }
+}
+
 
 END { }    # module clean-up code here (global destructor)
 
index cedbcff..0c4b60e 100644 (file)
@@ -93,7 +93,13 @@ sub GetSuppliersWithLateIssues {
     FROM            subscription
     LEFT JOIN       serial ON serial.subscriptionid=subscription.subscriptionid
     LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id
-    WHERE id > 0 AND ((planneddate < now() AND serial.status=1) OR serial.STATUS = 3 OR serial.STATUS = 4) ORDER BY name|;
+    WHERE id > 0
+        AND (
+            (planneddate < now() AND serial.status=1)
+            OR serial.STATUS = 3 OR serial.STATUS = 4
+        )
+        AND subscription.closed = 0
+    ORDER BY name|;
     return $dbh->selectall_arrayref($query, { Slice => {} });
 }
 
@@ -122,6 +128,7 @@ sub GetLateIssues {
             LEFT JOIN  aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id
             WHERE      ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3)
             AND        subscription.aqbooksellerid=?
+            AND        subscription.closed = 0
             ORDER BY   title
         |;
         $sth = $dbh->prepare($query);
@@ -134,6 +141,7 @@ sub GetLateIssues {
             LEFT JOIN  biblio ON biblio.biblionumber = subscription.biblionumber
             LEFT JOIN  aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id
             WHERE      ((planneddate < now() AND serial.STATUS =1) OR serial.STATUS = 3)
+            AND        subscription.closed = 0
             ORDER BY   title
         |;
         $sth = $dbh->prepare($query);
@@ -662,8 +670,16 @@ sub SearchSubscriptions {
         push @where_args, $args->{biblionumber};
     }
     if( $args->{title} ){
-        push @where_strs, "biblio.title LIKE ?";
-        push @where_args, "%$args->{title}%";
+        my @words = split / /, $args->{title};
+        my (@strs, @args);
+        foreach my $word (@words) {
+            push @strs, "biblio.title LIKE ?";
+            push @args, "%$word%";
+        }
+        if (@strs) {
+            push @where_strs, '(' . join (' AND ', @strs) . ')';
+            push @where_args, @args;
+        }
     }
     if( $args->{issn} ){
         push @where_strs, "biblioitems.issn LIKE ?";
@@ -685,7 +701,10 @@ sub SearchSubscriptions {
         push @where_strs, "subscription.branchcode = ?";
         push @where_args, "$args->{branch}";
     }
-
+    if( defined $args->{closed} ){
+        push @where_strs, "subscription.closed = ?";
+        push @where_args, "$args->{closed}";
+    }
     if(@where_strs){
         $query .= " WHERE " . join(" AND ", @where_strs);
     }
@@ -2465,6 +2484,54 @@ sub is_barcode_in_use {
     return @{$occurences};
 }
 
+=head2 CloseSubscription
+Close a subscription given a subscriptionid
+=cut
+sub CloseSubscription {
+    my ( $subscriptionid ) = @_;
+    return unless $subscriptionid;
+    my $dbh = C4::Context->dbh;
+    my $sth = $dbh->prepare( qq{
+        UPDATE subscription
+        SET closed = 1
+        WHERE subscriptionid = ?
+    } );
+    $sth->execute( $subscriptionid );
+
+    # Set status = missing when status = stopped
+    $sth = $dbh->prepare( qq{
+        UPDATE serial
+        SET status = 8
+        WHERE subscriptionid = ?
+        AND status = 1
+    } );
+    $sth->execute( $subscriptionid );
+}
+
+=head2 ReopenSubscription
+Reopen a subscription given a subscriptionid
+=cut
+sub ReopenSubscription {
+    my ( $subscriptionid ) = @_;
+    return unless $subscriptionid;
+    my $dbh = C4::Context->dbh;
+    my $sth = $dbh->prepare( qq{
+        UPDATE subscription
+        SET closed = 0
+        WHERE subscriptionid = ?
+    } );
+    $sth->execute( $subscriptionid );
+
+    # Set status = expected when status = stopped
+    $sth = $dbh->prepare( qq{
+        UPDATE serial
+        SET status = 1
+        WHERE subscriptionid = ?
+        AND status = 8
+    } );
+    $sth->execute( $subscriptionid );
+}
+
 1;
 __END__
 
index d74dbf8..b6b319b 100644 (file)
@@ -26,9 +26,11 @@ use Exporter;
 use C4::Context;
 use C4::Debug;
 #use Data::Dumper;
+use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created);
+use constant TAG_SELECT => "SELECT " . join(',', TAG_FIELDS) . "\n FROM   tags_all\n";
 
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-use vars qw($ext_dict $select_all @fields);
+our $ext_dict;
 
 BEGIN {
     $VERSION = 3.07.00.049;
@@ -70,8 +72,6 @@ More verose debugging messages are sent in the presence of non-zero $ENV{"DEBUG"
 INIT {
     $ext_dict and $Lingua::Ispell::path = $ext_dict;
     $debug and print STDERR "\$Lingua::Ispell::path = $Lingua::Ispell::path\n";
-       @fields = qw(tag_id borrowernumber biblionumber term language date_created);
-       $select_all = "SELECT " . join(',',@fields) . "\n FROM   tags_all\n";
 }
 
 sub get_filters {
@@ -181,7 +181,7 @@ sub delete_tag_rows_by_ids {
 
 sub get_tag_rows {
        my $hash = shift || {};
-       my @ok_fields = @fields;
+    my @ok_fields = TAG_FIELDS;
        push @ok_fields, 'limit';       # push the limit! :)
        my $wheres;
        my $limit  = "";
@@ -208,7 +208,7 @@ sub get_tag_rows {
                        push @exe_args, $hash->{$key};
                }
        }
-       my $query = $select_all . ($wheres||'') . $limit;
+    my $query = TAG_SELECT . ($wheres||'') . $limit;
        $debug and print STDERR "get_tag_rows query:\n $query\n",
                                                        "get_tag_rows query args: ", join(',', @exe_args), "\n";
        my $sth = C4::Context->dbh->prepare($query);
@@ -491,7 +491,7 @@ sub add_tag_index {
 
 sub get_tag {          # by tag_id
        (@_) or return;
-       my $sth = C4::Context->dbh->prepare("$select_all WHERE tag_id = ?");
+    my $sth = C4::Context->dbh->prepare(TAG_SELECT . "WHERE tag_id = ?");
        $sth->execute(shift);
        return $sth->fetchrow_hashref;
 }
index 90a00a5..0bb4b56 100644 (file)
@@ -50,8 +50,6 @@ BEGIN {
 }
 
 
-my $dbh = C4::Context->dbh;
-
 =head1 NAME
 
 C4::VirtualShelves - Functions for manipulating Koha virtual shelves
@@ -101,6 +99,7 @@ sub GetShelves {
     my ($category, $row_count, $offset, $owner) = @_;
     my @params;
     my $total = _shelf_count($owner, $category);
+    my $dbh = C4::Context->dbh;
     my $query = qq{
         SELECT vs.shelfnumber, vs.shelfname,vs.owner,
         bo.surname,bo.firstname,vs.category,vs.sortfield,
@@ -155,6 +154,7 @@ the submitted parameters.
 sub GetAllShelves {
     my ($category,$owner,$adding_allowed) = @_;
     my @params;
+    my $dbh = C4::Context->dbh;
     my $query = 'SELECT vs.* FROM virtualshelves vs ';
     if($category==1) {
         $query.= qq{
@@ -184,6 +184,7 @@ Returns shelf names and numbers for Add to combo of search results and Lists but
 sub GetSomeShelfNames {
     my ($owner, $purpose, $adding_allowed)= @_;
     my ($bar, $pub, @params);
+    my $dbh = C4::Context->dbh;
 
     my $bquery = 'SELECT vs.shelfnumber, vs.shelfname FROM virtualshelves vs ';
     my $limit= ShelvesMax($purpose);
@@ -223,6 +224,7 @@ Returns the above-mentioned fields for passed virtual shelf number.
 
 sub GetShelf {
     my ($shelfnumber) = @_;
+    my $dbh = C4::Context->dbh;
     my $query = qq(
         SELECT shelfnumber, shelfname, owner, category, sortfield,
             allow_add, allow_delete_own, allow_delete_other
@@ -264,11 +266,12 @@ sub GetShelfContents {
         ($sortfield) = $sth2->fetchrow_array;
     }
     my $query =
-       " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*,
+       " SELECT DISTINCT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*,
             biblio.*, biblioitems.itemtype, biblioitems.publicationyear as year, biblioitems.publishercode, biblioitems.place, biblioitems.size, biblioitems.pages
          FROM   virtualshelfcontents vc
          JOIN biblio      ON      vc.biblionumber =      biblio.biblionumber
          LEFT JOIN biblioitems ON  biblio.biblionumber = biblioitems.biblionumber
+         LEFT JOIN items ON items.biblionumber=vc.biblionumber
          LEFT JOIN itemtypes   ON biblioitems.itemtype = itemtypes.itemtype
          WHERE  vc.shelfnumber=? ";
     my @params = ($shelfnumber);
@@ -306,6 +309,7 @@ Returns a code to know what's happen.
 
 sub AddShelf {
     my ($hashref, $owner)= @_;
+    my $dbh = C4::Context->dbh;
 
     #initialize missing hash values to silence warnings
     foreach('shelfname','category', 'sortfield', 'allow_add', 'allow_delete_own', 'allow_delete_other' ) {
@@ -343,6 +347,7 @@ C<$shelfnumber>, unless that bib is already on that shelf.
 sub AddToShelf {
     my ($biblionumber, $shelfnumber, $borrowernumber) = @_;
     return unless $biblionumber;
+    my $dbh = C4::Context->dbh;
     my $query = qq(
         SELECT *
         FROM   virtualshelfcontents
@@ -382,6 +387,7 @@ Returns 1 if the action seemed to be successful.
 
 sub ModShelf {
     my ($shelfnumber,$hashref) = @_;
+    my $dbh = C4::Context->dbh;
 
     my $query= "SELECT * FROM virtualshelves WHERE shelfnumber=?";
     my $sth = $dbh->prepare($query);
@@ -453,8 +459,9 @@ sub ShelfPossibleAction {
 
     return 0 unless defined($shelfnumber);
 
+    my $dbh = C4::Context->dbh;
     my $query = qq/
-        SELECT IFNULL(owner,0) AS owner, category, allow_add, allow_delete_own, allow_delete_other, IFNULL(sh.borrowernumber,0) AS borrowernumber
+        SELECT COALESCE(owner,0) AS owner, category, allow_add, allow_delete_own, allow_delete_other, COALESCE(sh.borrowernumber,0) AS borrowernumber
         FROM virtualshelves vs
         LEFT JOIN virtualshelfshares sh ON sh.shelfnumber=vs.shelfnumber
         AND sh.borrowernumber=?
@@ -500,6 +507,7 @@ Returns 0 if no items have been deleted.
 
 sub DelFromShelf {
     my ($bibref, $shelfnumber, $user) = @_;
+    my $dbh = C4::Context->dbh;
     my $query = qq(SELECT allow_delete_own, allow_delete_other FROM virtualshelves WHERE shelfnumber=?);
     my $sth= $dbh->prepare($query);
     $sth->execute($shelfnumber);
@@ -544,6 +552,7 @@ ShelfPossibleAction with manage parameter.
 sub DelShelf {
     my ($shelfnumber)= @_;
     return unless $shelfnumber && $shelfnumber =~ /^\d+$/;
+    my $dbh = C4::Context->dbh;
     my $sth = $dbh->prepare("DELETE FROM virtualshelves WHERE shelfnumber=?");
     return $sth->execute($shelfnumber);
 }
@@ -629,6 +638,7 @@ sub _shelf_count {
     my @params;
     # Find out how many shelves total meet the submitted criteria...
 
+    my $dbh = C4::Context->dbh;
     my $query = "SELECT count(*) FROM virtualshelves vs ";
     if($category==1) {
         $query.= qq{
@@ -661,6 +671,7 @@ sub _biblionumber_sth { #only used in obsolete sub below
 sub _CheckShelfName {
     my ($name, $cat, $owner, $number)= @_;
 
+    my $dbh = C4::Context->dbh;
     my $query = qq(
         SELECT DISTINCT shelfnumber
         FROM   virtualshelves
index 988244c..6a4d431 100644 (file)
@@ -214,7 +214,6 @@ sub shelfpage {
                 my $member = GetMember( 'borrowernumber' => $owner );
                 my $ownername = defined($member) ? $member->{firstname} . " " . $member->{surname} : '';
                 $edit = 1;
-                $sortfield='' unless $sortfield;
                 $template->param(
                     edit                => 1,
                     display             => $displaymode,
@@ -224,7 +223,7 @@ sub shelfpage {
                     ownername           => $ownername,
                     "category$category" => 1,
                     category            => $category,
-                    "sort_$sortfield"   => 1,
+                    sortfield           => $sortfield,
                     allow_add           => $allow_add,
                     allow_delete_own    => $allow_delete_own,
                     allow_delete_other  => $allow_delete_other,
@@ -248,17 +247,9 @@ sub shelfpage {
             #check that the user can view the shelf
             if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'view' ) ) {
                 my $items;
-                my $authorsort;
-                my $yearsort;
                 my $tag_quantity;
                 my $sortfield = ( $sorton ? $sorton : 'title' );
-                if ( $sortfield eq 'author' ) {
-                    $authorsort = 'author';
-                }
-                if ( $sortfield eq 'year' ) {
-                    $yearsort = 'year';
-                }
-                ( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset, $sortfield eq 'year' ? 'copyrightdate' : $sortfield );
+                ( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset, $sortfield );
                 for my $this_item (@$items) {
                     my $biblionumber = $this_item->{'biblionumber'};
                     my $record = GetMarcBiblio($biblionumber);
@@ -302,8 +293,7 @@ sub shelfpage {
                     shelfname           => $shelfname,
                     shelfnumber         => $shelfnumber,
                     viewshelf           => $shelfnumber,
-                    authorsort          => $authorsort,
-                    yearsort            => $yearsort,
+                    sortfield           => $sortfield,
                     manageshelf         => $manageshelf,
                     allowremovingitems  => ShelfPossibleAction( $loggedinuser, $shelfnumber, 'delete'),
                     allowaddingitem     => ShelfPossibleAction( $loggedinuser, $shelfnumber, 'add'),
@@ -412,14 +402,6 @@ sub shelfpage {
         my $category  = $shelflist->{$element}->{'category'};
         my $owner     = $shelflist->{$element}->{'owner'}||0;
         my $canmanage = ShelfPossibleAction( $loggedinuser, $element, 'manage' );
-        my $sortfield = $shelflist->{$element}->{'sortfield'};
-        if ( $sortfield ){
-            if ( $sortfield eq 'author' ) {
-                $shelflist->{$element}->{"authorsort"} = 'author';
-            } elsif ( $sortfield eq 'year' ) {
-                $shelflist->{$element}->{"yearsort"} = 'year';
-            }
-        }
         $shelflist->{$element}->{"viewcategory$category"} = 1;
         $shelflist->{$element}->{manageshelf} = $canmanage;
         if($canmanage || ($loggedinuser && $owner==$loggedinuser)) {
diff --git a/Koha/Borrower/Modifications.pm b/Koha/Borrower/Modifications.pm
new file mode 100644 (file)
index 0000000..1d32d16
--- /dev/null
@@ -0,0 +1,322 @@
+package Koha::Borrower::Modifications;
+
+# Copyright 2012 ByWater Solutions
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+=head1 NAME
+
+C4::Borrowers::Modifications
+
+=cut
+
+use Modern::Perl;
+
+use C4::Context;
+use C4::Debug;
+use C4::SQLHelper qw(InsertInTable UpdateInTable);
+
+sub new {
+    my ( $class, %args ) = @_;
+
+    return bless( \%args, $class );
+}
+
+=head2 AddModifications
+
+Koha::Borrower::Modifications->AddModifications( $data );
+
+Adds or updates modifications for a borrower.
+
+Requires either the key borrowernumber, or verification_token
+to be part of the passed in hash.
+
+=cut
+
+sub AddModifications {
+    my ( $self, $data ) = @_;
+
+    if ( $self->{'borrowernumber'} ) {
+        delete $data->{'borrowernumber'};
+
+        if ( keys %$data ) {
+            $data->{'borrowernumber'} = $self->{'borrowernumber'};
+            my $dbh = C4::Context->dbh;
+
+            my $query = "
+                SELECT COUNT(*) AS count
+                FROM borrower_modifications
+                WHERE borrowernumber = ?
+            ";
+
+            my $sth = $dbh->prepare($query);
+            $sth->execute( $self->{'borrowernumber'} );
+            my $result = $sth->fetchrow_hashref();
+
+            if ( $result->{'count'} ) {
+                $data->{'verification_token'} = q{};
+                return UpdateInTable( "borrower_modifications", $data );
+            }
+            else {
+                return InsertInTable( "borrower_modifications", $data );
+            }
+        }
+
+    }
+    elsif ( $self->{'verification_token'} ) {
+        delete $data->{'borrowernumber'};
+        $data->{'verification_token'} = $self->{'verification_token'};
+
+        return InsertInTable( "borrower_modifications", $data );
+    }
+    else {
+        return;
+    }
+}
+
+=head2 Verify
+
+$verified = Koha::Borrower::Modifications->Verify( $verification_token );
+
+Returns true if the passed in token is valid.
+
+=cut
+
+sub Verify {
+    my ( $self, $verification_token ) = @_;
+
+    $verification_token =
+      ($verification_token)
+      ? $verification_token
+      : $self->{'verification_token'};
+
+    my $dbh   = C4::Context->dbh;
+    my $query = "
+        SELECT COUNT(*) AS count
+        FROM borrower_modifications
+        WHERE verification_token = ?
+    ";
+    my $sth = $dbh->prepare($query);
+    $sth->execute($verification_token);
+    my $result = $sth->fetchrow_hashref();
+
+    return $result->{'count'};
+}
+
+=head2 GetPendingModificationsCount
+
+$count = Koha::Borrower::Modifications->GetPendingModificationsCount();
+
+Returns the number of pending modifications for existing borrowers.
+=cut
+
+sub GetPendingModificationsCount {
+    my ( $self, $branchcode ) = @_;
+
+    my $dbh   = C4::Context->dbh;
+    my $query = "
+        SELECT COUNT(*) AS count
+        FROM borrower_modifications, borrowers
+        WHERE borrower_modifications.borrowernumber > 0
+        AND borrower_modifications.borrowernumber = borrowers.borrowernumber
+    ";
+
+    my @params;
+    if ($branchcode) {
+        $query .= " AND borrowers.branchcode = ? ";
+        push( @params, $branchcode );
+    }
+
+    my $sth = $dbh->prepare($query);
+    $sth->execute(@params);
+    my $result = $sth->fetchrow_hashref();
+
+    return $result->{'count'};
+}
+
+=head2 GetPendingModifications
+
+$arrayref = Koha::Borrower::Modifications->GetPendingModifications();
+
+Returns an arrayref of hashrefs for all pending modifications for existing borrowers.
+
+=cut
+
+sub GetPendingModifications {
+    my ( $self, $branchcode ) = @_;
+
+    my $dbh   = C4::Context->dbh;
+    my $query = "
+        SELECT borrower_modifications.*
+        FROM borrower_modifications, borrowers
+        WHERE borrower_modifications.borrowernumber > 0
+        AND borrower_modifications.borrowernumber = borrowers.borrowernumber
+    ";
+
+    my @params;
+    if ($branchcode) {
+        $query .= " AND borrowers.branchcode = ? ";
+        push( @params, $branchcode );
+    }
+    $query .= " ORDER BY borrowers.surname, borrowers.firstname";
+    my $sth = $dbh->prepare($query);
+    $sth->execute(@params);
+
+    my @m;
+    while ( my $row = $sth->fetchrow_hashref() ) {
+        foreach my $key ( keys %$row ) {
+            delete $row->{$key} unless defined $row->{$key};
+        }
+
+        push( @m, $row );
+    }
+
+    return \@m;
+}
+
+=head2 ApproveModifications
+
+Koha::Borrower::Modifications->ApproveModifications( $borrowernumber );
+
+Commits the pending modifications to the borrower record and removes
+them from the modifications table.
+
+=cut
+
+sub ApproveModifications {
+    my ( $self, $borrowernumber ) = @_;
+
+    $borrowernumber =
+      ($borrowernumber) ? $borrowernumber : $self->{'borrowernumber'};
+
+    return unless $borrowernumber;
+
+    my $data = $self->GetModifications({ borrowernumber => $borrowernumber });
+
+    if ( UpdateInTable( "borrowers", $data ) ) {
+        $self->DelModifications({ borrowernumber => $borrowernumber });
+    }
+}
+
+=head2 DenyModifications
+
+Koha::Borrower::Modifications->DenyModifications( $borrowernumber );
+
+Removes the modifications from the table for the given borrower,
+without commiting the changes to the borrower record.
+
+=cut
+
+sub DenyModifications {
+    my ( $self, $borrowernumber ) = @_;
+
+    $borrowernumber =
+      ($borrowernumber) ? $borrowernumber : $self->{'borrowernumber'};
+
+    return unless $borrowernumber;
+
+    return $self->DelModifications({ borrowernumber => $borrowernumber });
+}
+
+=head2 DelModifications
+
+Koha::Borrower::Modifications->DelModifications({
+  [ borrowernumber => $borrowernumber ],
+  [ verification_token => $verification_token ]
+});
+
+Deletes the modifications for the given borrowernumber or verification token.
+
+=cut
+
+sub DelModifications {
+    my ( $self, $params ) = @_;
+
+    my ( $field, $value );
+
+    if ( $params->{'borrowernumber'} ) {
+        $field = 'borrowernumber';
+        $value = $params->{'borrowernumber'};
+    }
+    elsif ( $params->{'verification_token'} ) {
+        $field = 'verification_token';
+        $value = $params->{'verification_token'};
+    }
+
+    return unless $value;
+
+    my $dbh = C4::Context->dbh;
+
+    $field = $dbh->quote_identifier($field);
+
+    my $query = "
+        DELETE
+        FROM borrower_modifications
+        WHERE $field = ?
+    ";
+
+    my $sth = $dbh->prepare($query);
+    return $sth->execute($value);
+}
+
+=head2 GetModifications
+
+$hashref = Koha::Borrower::Modifications->GetModifications({
+  [ borrowernumber => $borrowernumber ],
+  [ verification_token => $verification_token ]
+});
+
+Gets the modifications for the given borrowernumber or verification token.
+
+=cut
+
+sub GetModifications {
+    my ( $self, $params ) = @_;
+
+    my ( $field, $value );
+
+    if ( defined( $params->{'borrowernumber'} ) ) {
+        $field = 'borrowernumber';
+        $value = $params->{'borrowernumber'};
+    }
+    elsif ( defined( $params->{'verification_token'} ) ) {
+        $field = 'verification_token';
+        $value = $params->{'verification_token'};
+    }
+
+    return unless $value;
+
+    my $dbh = C4::Context->dbh;
+
+    $field = $dbh->quote_identifier($field);
+
+    my $query = "
+        SELECT *
+        FROM borrower_modifications
+        WHERE $field = ?
+    ";
+
+    my $sth = $dbh->prepare($query);
+    $sth->execute($value);
+    my $data = $sth->fetchrow_hashref();
+
+    foreach my $key ( keys %$data ) {
+        delete $data->{$key} unless ( defined( $data->{$key} ) );
+    }
+
+    return $data;
+}
+
+1;
index d4ea77e..45841be 100644 (file)
@@ -33,28 +33,31 @@ sub _init {
     my $self       = shift;
     my $branch     = $self->{branchcode};
     my $dbh        = C4::Context->dbh();
-    my $repeat_sth = $dbh->prepare(
-'SELECT * from repeatable_holidays WHERE branchcode = ? AND ISNULL(weekday) = ?'
+    my $weekly_closed_days_sth = $dbh->prepare(
+'SELECT weekday FROM repeatable_holidays WHERE branchcode = ? AND weekday IS NOT NULL'
     );
-    $repeat_sth->execute( $branch, 0 );
+    $weekly_closed_days_sth->execute( $branch );
     $self->{weekly_closed_days} = [ 0, 0, 0, 0, 0, 0, 0 ];
     Readonly::Scalar my $sunday => 7;
-    while ( my $tuple = $repeat_sth->fetchrow_hashref ) {
+    while ( my $tuple = $weekly_closed_days_sth->fetchrow_hashref ) {
         $self->{weekly_closed_days}->[ $tuple->{weekday} ] = 1;
     }
-    $repeat_sth->execute( $branch, 1 );
+    my $day_month_closed_days_sth = $dbh->prepare(
+'SELECT day, month FROM repeatable_holidays WHERE branchcode = ? AND weekday IS NULL'
+    );
+    $day_month_closed_days_sth->execute( $branch );
     $self->{day_month_closed_days} = {};
-    while ( my $tuple = $repeat_sth->fetchrow_hashref ) {
+    while ( my $tuple = $day_month_closed_days_sth->fetchrow_hashref ) {
         $self->{day_month_closed_days}->{ $tuple->{month} }->{ $tuple->{day} } =
           1;
     }
 
-    my $special = $dbh->prepare(
-'SELECT day, month, year FROM special_holidays WHERE branchcode = ? AND isexception = ?'
+    my $exception_holidays_sth = $dbh->prepare(
+'SELECT day, month, year FROM special_holidays WHERE branchcode = ? AND isexception = 1'
     );
-    $special->execute( $branch, 1 );
+    $exception_holidays_sth->execute( $branch );
     my $dates = [];
-    while ( my ( $day, $month, $year ) = $special->fetchrow ) {
+    while ( my ( $day, $month, $year ) = $exception_holidays_sth->fetchrow ) {
         push @{$dates},
           DateTime->new(
             day       => $day,
@@ -66,9 +69,12 @@ sub _init {
     $self->{exception_holidays} =
       DateTime::Set->from_datetimes( dates => $dates );
 
-    $special->execute( $branch, 0 );
+    my $single_holidays_sth = $dbh->prepare(
+'SELECT day, month, year FROM special_holidays WHERE branchcode = ? AND isexception = 0'
+    );
+    $single_holidays_sth->execute( $branch );
     $dates = [];
-    while ( my ( $day, $month, $year ) = $special->fetchrow ) {
+    while ( my ( $day, $month, $year ) = $single_holidays_sth->fetchrow ) {
         push @{$dates},
           DateTime->new(
             day       => $day,
@@ -85,79 +91,124 @@ sub _init {
 
 sub addDate {
     my ( $self, $startdate, $add_duration, $unit ) = @_;
-    my $base_date = $startdate->clone();
+
+    # Default to days duration (legacy support I guess)
     if ( ref $add_duration ne 'DateTime::Duration' ) {
         $add_duration = DateTime::Duration->new( days => $add_duration );
     }
-    $unit ||= q{};    # default days ?
-    my $days_mode = $self->{days_mode};
-    Readonly::Scalar my $return_by_hour => 10;
-    my $day_dur = DateTime::Duration->new( days => 1 );
-    if ( $add_duration->is_negative() ) {
-        $day_dur = DateTime::Duration->new( days => -1 );
+
+    $unit ||= 'days'; # default days ?
+    my $dt;
+
+    if ( $unit eq 'hours' ) {
+        # Fixed for legacy support. Should be set as a branch parameter
+        Readonly::Scalar my $return_by_hour => 10;
+
+        $dt = $self->addHours($startdate, $add_duration, $return_by_hour);
+    } else {
+        # days
+        $dt = $self->addDays($startdate, $add_duration);
     }
-    if ( $days_mode eq 'Datedue' ) {
 
-        my $dt = $base_date + $add_duration;
-        while ( $self->is_holiday($dt) ) {
+    return $dt;
+}
 
-            $dt->add_duration($day_dur);
-            if ( $unit eq 'hours' ) {
-                $dt->set_hour($return_by_hour);    # Staffs specific
-            }
+sub addHours {
+    my ( $self, $startdate, $hours_duration, $return_by_hour ) = @_;
+    my $base_date = $startdate->clone();
+
+    $base_date->add_duration($hours_duration);
+
+    # If we are using the calendar behave for now as if Datedue
+    # was the chosen option (current intended behaviour)
+
+    if ( $self->{days_mode} ne 'Days' &&
+          $self->is_holiday($base_date) ) {
+
+        if ( $hours_duration->is_negative() ) {
+            $base_date = $self->prev_open_day($base_date);
+        } else {
+            $base_date = $self->next_open_day($base_date);
         }
-        return $dt;
-    } elsif ( $days_mode eq 'Calendar' ) {
-        if ( $unit eq 'hours' ) {
-            $base_date->add_duration($add_duration);
-            while ( $self->is_holiday($base_date) ) {
-                $base_date->add_duration($day_dur);
 
-            }
+        $base_date->set_hour($return_by_hour);
+
+    }
+
+    return $base_date;
+}
+
+sub addDays {
+    my ( $self, $startdate, $days_duration ) = @_;
+    my $base_date = $startdate->clone();
+
+    if ( $self->{days_mode} eq 'Calendar' ) {
+        # use the calendar to skip all days the library is closed
+        # when adding
+        my $days = abs $days_duration->in_units('days');
 
+        if ( $days_duration->is_negative() ) {
+            while ($days) {
+                $base_date = $self->prev_open_day($base_date);
+                --$days;
+            }
         } else {
-            my $days = abs $add_duration->in_units('days');
             while ($days) {
-                $base_date->add_duration($day_dur);
-                if ( $self->is_holiday($base_date) ) {
-                    next;
-                } else {
-                    --$days;
-                }
+                $base_date = $self->next_open_day($base_date);
+                --$days;
             }
         }
-        if ( $unit eq 'hours' ) {
-            my $dt = $base_date->clone()->subtract( days => 1 );
-            if ( $self->is_holiday($dt) ) {
-                $base_date->set_hour($return_by_hour);    # Staffs specific
+
+    } else { # Days or Datedue
+        # use straight days, then use calendar to push
+        # the date to the next open day if Datedue
+        $base_date->add_duration($days_duration);
+
+        if ( $self->{days_mode} eq 'Datedue' ) {
+            # Datedue, then use the calendar to push
+            # the date to the next open day if holiday
+            if ( $self->is_holiday($base_date) ) {
+                if ( $days_duration->is_negative() ) {
+                    $base_date = $self->prev_open_day($base_date);
+                } else {
+                    $base_date = $self->next_open_day($base_date);
+                }
             }
         }
-        return $base_date;
-    } else {    # Days
-        return $base_date + $add_duration;
     }
+
+    return $base_date;
 }
 
 sub is_holiday {
     my ( $self, $dt ) = @_;
     my $localdt = $dt->clone();
+    my $day   = $localdt->day;
+    my $month = $localdt->month;
+
+    $localdt->truncate( to => 'day' );
+
+    if ( $self->{exception_holidays}->contains($localdt) ) {
+        # exceptions are not holidays
+        return 0;
+    }
+
     my $dow = $localdt->day_of_week;
+    # Representation fix
+    # TODO: Shouldn't we shift the rest of the $dow also?
     if ( $dow == 7 ) {
         $dow = 0;
     }
+
     if ( $self->{weekly_closed_days}->[$dow] == 1 ) {
         return 1;
     }
-    $localdt->truncate( to => 'day' );
-    my $day   = $localdt->day;
-    my $month = $localdt->month;
+
     if ( exists $self->{day_month_closed_days}->{$month}->{$day} ) {
         return 1;
     }
-    if ( $self->{exception_holidays}->contains($dt) ) {
-        return 1;
-    }
-    if ( $self->{single_holidays}->contains($dt) ) {
+
+    if ( $self->{single_holidays}->contains($localdt) ) {
         return 1;
     }
 
@@ -165,6 +216,32 @@ sub is_holiday {
     return 0;
 }
 
+sub next_open_day {
+    my ( $self, $dt ) = @_;
+    my $base_date = $dt->clone();
+
+    $base_date->add(days => 1);
+
+    while ($self->is_holiday($base_date)) {
+        $base_date->add(days => 1);
+    }
+
+    return $base_date;
+}
+
+sub prev_open_day {
+    my ( $self, $dt ) = @_;
+    my $base_date = $dt->clone();
+
+    $base_date->add(days => -1);
+
+    while ($self->is_holiday($base_date)) {
+        $base_date->add(days => -1);
+    }
+
+    return $base_date;
+}
+
 sub days_between {
     my $self     = shift;
     my $start_dt = shift;
@@ -228,7 +305,12 @@ sub _mockinit {
     );
     push @{$dates}, $special;
     $self->{single_holidays} = DateTime::Set->from_datetimes( dates => $dates );
-    $self->{days_mode} = 'Calendar';
+
+    # if not defined, days_mode defaults to 'Calendar'
+    if ( !defined($self->{days_mode}) ) {
+        $self->{days_mode} = 'Calendar';
+    }
+
     $self->{test} = 1;
     return;
 }
@@ -253,9 +335,9 @@ sub clear_weekly_closed_days {
 sub add_holiday {
     my $self = shift;
     my $new_dt = shift;
-    my @dt = $self->{exception_holidays}->as_list;
+    my @dt = $self->{single_holidays}->as_list;
     push @dt, $new_dt;
-    $self->{exception_holidays} =
+    $self->{single_holidays} =
       DateTime::Set->from_datetimes( dates => \@dt );
 
     return;
@@ -274,9 +356,9 @@ This documentation refers to Koha::Calendar version 0.0.1
 
 =head1 SYNOPSIS
 
-  use Koha::Calendat
+  use Koha::Calendar
 
-  my $c = Koha::Calender->new( branchcode => 'MAIN' );
+  my $c = Koha::Calendar->new( branchcode => 'MAIN' );
   my $dt = DateTime->now();
 
   # are we open
@@ -312,11 +394,36 @@ Currently unit is only used to invoke Staffs return Monday at 10 am rule this
 parameter will be removed when issuingrules properly cope with that
 
 
+=head2 addHours
+
+    my $dt = $calendar->addHours($date, $dur, $return_by_hour )
+
+C<$date> is a DateTime object representing the starting date of the interval.
+
+C<$offset> is a DateTime::Duration to add to it
+
+C<$return_by_hour> is an integer value representing the opening hour for the branch
+
+
+=head2 addDays
+
+    my $dt = $calendar->addDays($date, $dur)
+
+C<$date> is a DateTime object representing the starting date of the interval.
+
+C<$offset> is a DateTime::Duration to add to it
+
+C<$unit> is a string value 'days' or 'hours' toflag granularity of duration
+
+Currently unit is only used to invoke Staffs return Monday at 10 am rule this
+parameter will be removed when issuingrules properly cope with that
+
+
 =head2 is_holiday
 
 $yesno = $calendar->is_holiday($dt);
 
-passed at DateTime object returns 1 if it is a closed day
+passed a DateTime object returns 1 if it is a closed day
 0 if not according to the calendar
 
 =head2 days_between
@@ -327,6 +434,22 @@ Passed two dates returns a DateTime::Duration object measuring the length betwee
 ignoring closed days. Always returns a positive number irrespective of the
 relative order of the parameters
 
+=head2 next_open_day
+
+$datetime = $calendar->next_open_day($duedate_dt)
+
+Passed a Datetime returns another Datetime representing the next open day. It is
+intended for use to calculate the due date when useDaysMode syspref is set to either
+'Datedue' or 'Calendar'.
+
+=head2 prev_open_day
+
+$datetime = $calendar->prev_open_day($duedate_dt)
+
+Passed a Datetime returns another Datetime representing the previous open day. It is
+intended for use to calculate the due date when useDaysMode syspref is set to either
+'Datedue' or 'Calendar'.
+
 =head2 set_daysmode
 
 For testing only allows the calling script to change days mode
index ca9e4f0..6c6e186 100644 (file)
@@ -523,6 +523,7 @@ if ($config{'INSTALL_ZEBRA'} eq "yes") {
     push @{ $pl_files->{'rewrite-config.PL'} }, (
         'blib/SCRIPT_DIR/koha-zebra-ctl.sh',
         'blib/SCRIPT_DIR/koha-pazpar2-ctl.sh',
+        'blib/SCRIPT_DIR/koha-index-daemon-ctl.sh',
     );
     if ($config{'INSTALL_PAZPAR2'} eq 'yes') {
         push @{ $pl_files->{'rewrite-config.PL'} }, (
index 7163bf4..f203af2 100755 (executable)
@@ -206,13 +206,14 @@ if ( $op eq 'delete_confirm' ) {
         }
     }
 #if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups
-    my $basketgroups;
+    my ($basketgroup, $basketgroups);
     my $member = GetMember(borrowernumber => $loggedinuser);
     if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) {
         $basketgroups = GetBasketgroups($basket->{booksellerid});
         for my $bg ( @{$basketgroups} ) {
             if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){
                 $bg->{default} = 1;
+                $basketgroup = $bg;
             }
         }
         my %emptygroup = ( id   =>   undef,
@@ -339,6 +340,7 @@ if ( $op eq 'delete_confirm' ) {
         currency             => $cur->{'currency'},
         listincgst           => $bookseller->{listincgst},
         basketgroups         => $basketgroups,
+        basketgroup          => $basketgroup,
         grouped              => $basket->{basketgroupid},
         unclosable           => @orders ? 0 : 1, 
         has_budgets          => $has_budgets,
index 90b4732..807a82b 100755 (executable)
@@ -336,8 +336,6 @@ my @gst_values = map {
     option => $_
 }, split( '\|', C4::Context->preference("gist") );
 
-my $cur = GetCurrency();
-
 $template->param(
     existing         => $biblionumber,
     ordernumber           => $ordernumber,
@@ -371,7 +369,6 @@ $template->param(
     cur_active_sym   => $active_currency->{'symbol'},
     cur_active       => $active_currency->{'currency'},
     loop_currencies  => \@loop_currency,
-    currency_rate    => $cur->{rate},
     orderexists      => ( $new eq 'yes' ) ? 0 : 1,
     title            => $data->{'title'},
     author           => $data->{'author'},
index 17c2d5e..f25b5a9 100755 (executable)
@@ -38,8 +38,6 @@ It permit to write a new order as 'received'.
 
 to know on what supplier this script has to display receive order.
 
-=item receive
-
 =item invoiceid
 
 the id of this invoice.
@@ -88,12 +86,12 @@ my $booksellerid   = $invoice->{booksellerid};
 my $freight      = $invoice->{shipmentcost};
 my $datereceived = $invoice->{shipmentdate};
 my $ordernumber  = $input->param('ordernumber');
-my $search       = $input->param('receive');
 
 $datereceived = $datereceived ? C4::Dates->new($datereceived, 'iso') : C4::Dates->new();
 
 my $bookseller = GetBookSellerFromId($booksellerid);
-my $results = SearchOrder($ordernumber,$search);
+my $results;
+$results = SearchOrder($ordernumber) if $ordernumber;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
@@ -106,148 +104,129 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
-my $count = scalar @$results;
+unless ( $results and @$results) {
+    output_html_with_http_headers $input, $cookie, $template->output;
+    exit;
+}
+
 # prepare the form for receiving
-if ( $count == 1 ) {
-    my $order = $results->[0];
+my $order = $results->[0];
 
-    # Check if ACQ framework exists
-    my $acq_fw = GetMarcStructure(1, 'ACQ');
-    unless($acq_fw) {
-        $template->param('NoACQframework' => 1);
-    }
+# Check if ACQ framework exists
+my $acq_fw = GetMarcStructure(1, 'ACQ');
+unless($acq_fw) {
+    $template->param('NoACQframework' => 1);
+}
 
-    my $AcqCreateItem = C4::Context->preference('AcqCreateItem');
-    if ($AcqCreateItem eq 'receiving') {
-        $template->param(
-            AcqCreateItemReceiving => 1,
-            UniqueItemFields => C4::Context->preference('UniqueItemFields'),
-        );
-    } elsif ($AcqCreateItem eq 'ordering') {
-        my $fw = ($acq_fw) ? 'ACQ' : '';
-        my @itemnumbers = GetItemnumbersFromOrder($order->{ordernumber});
-        my @items;
-        foreach (@itemnumbers) {
-            my $item = GetItem($_);
-            if($item->{homebranch}) {
-                $item->{homebranchname} = GetBranchName($item->{homebranch});
-            }
-            if($item->{holdingbranch}) {
-                $item->{holdingbranchname} = GetBranchName($item->{holdingbranch});
-            }
-            if(my $code = GetAuthValCode("items.notforloan", $fw)) {
-                $item->{notforloan} = GetKohaAuthorisedValueLib($code, $item->{notforloan});
-            }
-            if(my $code = GetAuthValCode("items.restricted", $fw)) {
-                $item->{restricted} = GetKohaAuthorisedValueLib($code, $item->{restricted});
-            }
-            if(my $code = GetAuthValCode("items.location", $fw)) {
-                $item->{location} = GetKohaAuthorisedValueLib($code, $item->{location});
-            }
-            if(my $code = GetAuthValCode("items.ccode", $fw)) {
-                $item->{collection} = GetKohaAuthorisedValueLib($code, $item->{ccode});
-            }
-            if(my $code = GetAuthValCode("items.materials", $fw)) {
-                $item->{materials} = GetKohaAuthorisedValueLib($code, $item->{materials});
-            }
-            my $itemtype = getitemtypeinfo($item->{itype});
-            $item->{itemtype} = $itemtype->{description};
-            push @items, $item;
+my $AcqCreateItem = C4::Context->preference('AcqCreateItem');
+if ($AcqCreateItem eq 'receiving') {
+    $template->param(
+        AcqCreateItemReceiving => 1,
+        UniqueItemFields => C4::Context->preference('UniqueItemFields'),
+    );
+} elsif ($AcqCreateItem eq 'ordering') {
+    my $fw = ($acq_fw) ? 'ACQ' : '';
+    my @itemnumbers = GetItemnumbersFromOrder($order->{ordernumber});
+    my @items;
+    foreach (@itemnumbers) {
+        my $item = GetItem($_);
+        if($item->{homebranch}) {
+            $item->{homebranchname} = GetBranchName($item->{homebranch});
         }
-        $template->param(items => \@items);
-    }
-
-    $order->{quantityreceived} = '' if $order->{quantityreceived} == 0;
-    $order->{unitprice} = '' if $order->{unitprice} == 0;
-
-    my $rrp;
-    my $ecost;
-    my $unitprice;
-    if ( $bookseller->{listincgst} ) {
-        if ( $bookseller->{invoiceincgst} ) {
-            $rrp = $order->{rrp};
-            $ecost = $order->{ecost};
-            $unitprice = $order->{unitprice};
-        } else {
-            $rrp = $order->{rrp} / ( 1 + $order->{gstrate} );
-            $ecost = $order->{ecost} / ( 1 + $order->{gstrate} );
-            $unitprice = $order->{unitprice} / ( 1 + $order->{gstrate} );
+        if($item->{holdingbranch}) {
+            $item->{holdingbranchname} = GetBranchName($item->{holdingbranch});
         }
-    } else {
-        if ( $bookseller->{invoiceincgst} ) {
-            $rrp = $order->{rrp} * ( 1 + $order->{gstrate} );
-            $ecost = $order->{ecost} * ( 1 + $order->{gstrate} );
-            $unitprice = $order->{unitprice} * ( 1 + $order->{gstrate} );
-        } else {
-            $rrp = $order->{rrp};
-            $ecost = $order->{ecost};
-            $unitprice = $order->{unitprice};
+        if(my $code = GetAuthValCode("items.notforloan", $fw)) {
+            $item->{notforloan} = GetKohaAuthorisedValueLib($code, $item->{notforloan});
         }
-     }
-
-    my $suggestion = GetSuggestionInfoFromBiblionumber($order->{biblionumber});
-
-    my $authorisedby = $order->{authorisedby};
-    my $member = GetMember( borrowernumber => $authorisedby );
-
-    my $budget = GetBudget( $order->{budget_id} );
-
-    $template->param(
-        AcqCreateItem         => $AcqCreateItem,
-        count                 => 1,
-        biblionumber          => $order->{'biblionumber'},
-        ordernumber           => $order->{'ordernumber'},
-        biblioitemnumber      => $order->{'biblioitemnumber'},
-        booksellerid          => $order->{'booksellerid'},
-        freight               => $freight,
-        gstrate               => $order->{gstrate} || $bookseller->{gstrate} || C4::Context->preference("gist") || 0,
-        name                  => $bookseller->{'name'},
-        date                  => format_date($order->{entrydate}),
-        title                 => $order->{'title'},
-        author                => $order->{'author'},
-        copyrightdate         => $order->{'copyrightdate'},
-        isbn                  => $order->{'isbn'},
-        seriestitle           => $order->{'seriestitle'},
-        bookfund              => $budget->{budget_name},
-        quantity              => $order->{'quantity'},
-        quantityreceivedplus1 => $order->{'quantityreceived'} + 1,
-        quantityreceived      => $order->{'quantityreceived'},
-        rrp                   => sprintf( "%.2f", $rrp ),
-        ecost                 => sprintf( "%.2f", $ecost ),
-        unitprice             => sprintf( "%.2f", $unitprice),
-        memberfirstname       => $member->{firstname} || "",
-        membersurname         => $member->{surname} || "",
-        invoiceid             => $invoice->{invoiceid},
-        invoice               => $invoice->{invoicenumber},
-        datereceived          => $datereceived->output(),
-        datereceived_iso      => $datereceived->output('iso'),
-        notes                 => $order->{notes},
-        suggestionid          => $suggestion->{suggestionid},
-        surnamesuggestedby    => $suggestion->{surnamesuggestedby},
-        firstnamesuggestedby  => $suggestion->{firstnamesuggestedby},
-    );
+        if(my $code = GetAuthValCode("items.restricted", $fw)) {
+            $item->{restricted} = GetKohaAuthorisedValueLib($code, $item->{restricted});
+        }
+        if(my $code = GetAuthValCode("items.location", $fw)) {
+            $item->{location} = GetKohaAuthorisedValueLib($code, $item->{location});
+        }
+        if(my $code = GetAuthValCode("items.ccode", $fw)) {
+            $item->{collection} = GetKohaAuthorisedValueLib($code, $item->{ccode});
+        }
+        if(my $code = GetAuthValCode("items.materials", $fw)) {
+            $item->{materials} = GetKohaAuthorisedValueLib($code, $item->{materials});
+        }
+        my $itemtype = getitemtypeinfo($item->{itype});
+        $item->{itemtype} = $itemtype->{description};
+        push @items, $item;
+    }
+    $template->param(items => \@items);
 }
-else {
-    my @loop;
-    for ( my $i = 0 ; $i < $count ; $i++ ) {
-        my %line = %{ @$results[$i] };
-
-        $line{invoice}      = $invoice->{invoicenumber};
-        $line{datereceived} = $datereceived->output();
-        $line{freight}      = $freight;
-        $line{gstrate}      = @$results[$i]->{'gstrate'} || $bookseller->{gstrate} || C4::Context->preference("gist") || 0;
-        $line{title}        = @$results[$i]->{'title'};
-        $line{author}       = @$results[$i]->{'author'};
-        $line{booksellerid} = $booksellerid;
-        push @loop, \%line;
+
+$order->{quantityreceived} = '' if $order->{quantityreceived} == 0;
+$order->{unitprice} = '' if $order->{unitprice} == 0;
+
+my $rrp;
+my $ecost;
+my $unitprice;
+if ( $bookseller->{listincgst} ) {
+    if ( $bookseller->{invoiceincgst} ) {
+        $rrp = $order->{rrp};
+        $ecost = $order->{ecost};
+        $unitprice = $order->{unitprice};
+    } else {
+        $rrp = $order->{rrp} / ( 1 + $order->{gstrate} );
+        $ecost = $order->{ecost} / ( 1 + $order->{gstrate} );
+        $unitprice = $order->{unitprice} / ( 1 + $order->{gstrate} );
+    }
+} else {
+    if ( $bookseller->{invoiceincgst} ) {
+        $rrp = $order->{rrp} * ( 1 + $order->{gstrate} );
+        $ecost = $order->{ecost} * ( 1 + $order->{gstrate} );
+        $unitprice = $order->{unitprice} * ( 1 + $order->{gstrate} );
+    } else {
+        $rrp = $order->{rrp};
+        $ecost = $order->{ecost};
+        $unitprice = $order->{unitprice};
     }
+ }
+
+my $suggestion = GetSuggestionInfoFromBiblionumber($order->{biblionumber});
+
+my $authorisedby = $order->{authorisedby};
+my $member = GetMember( borrowernumber => $authorisedby );
+
+my $budget = GetBudget( $order->{budget_id} );
+
+$template->param(
+    AcqCreateItem         => $AcqCreateItem,
+    count                 => 1,
+    biblionumber          => $order->{'biblionumber'},
+    ordernumber           => $order->{'ordernumber'},
+    biblioitemnumber      => $order->{'biblioitemnumber'},
+    booksellerid          => $order->{'booksellerid'},
+    freight               => $freight,
+    name                  => $bookseller->{'name'},
+    date                  => format_date($order->{entrydate}),
+    title                 => $order->{'title'},
+    author                => $order->{'author'},
+    copyrightdate         => $order->{'copyrightdate'},
+    isbn                  => $order->{'isbn'},
+    seriestitle           => $order->{'seriestitle'},
+    bookfund              => $budget->{budget_name},
+    quantity              => $order->{'quantity'},
+    quantityreceivedplus1 => $order->{'quantityreceived'} + 1,
+    quantityreceived      => $order->{'quantityreceived'},
+    rrp                   => sprintf( "%.2f", $rrp ),
+    ecost                 => sprintf( "%.2f", $ecost ),
+    unitprice             => sprintf( "%.2f", $unitprice),
+    memberfirstname       => $member->{firstname} || "",
+    membersurname         => $member->{surname} || "",
+    invoiceid             => $invoice->{invoiceid},
+    invoice               => $invoice->{invoicenumber},
+    datereceived          => $datereceived->output(),
+    datereceived_iso      => $datereceived->output('iso'),
+    notes                 => $order->{notes},
+    suggestionid          => $suggestion->{suggestionid},
+    surnamesuggestedby    => $suggestion->{surnamesuggestedby},
+    firstnamesuggestedby  => $suggestion->{firstnamesuggestedby},
+);
 
-    $template->param(
-        loop         => \@loop,
-        booksellerid => $booksellerid,
-        invoiceid    => $invoice->{invoiceid},
-    );
-}
 my $op = $input->param('op');
 if ($op and $op eq 'edit'){
     $template->param(edit   =>   1);
index 0e0f41b..15578a9 100755 (executable)
@@ -333,7 +333,6 @@ $template->param(
     booksellerid          => $bookseller->{id},
     countreceived         => $countlines,
     loop_received         => \@loop_received,
-    booksellerid          => $booksellerid,
     loop_orders           => \@loop_orders,
     book_foot_loop        => \@book_foot_loop,
     totalprice            => sprintf($cfstr, $totalprice),
index 68cd0d6..37ebe2c 100755 (executable)
@@ -25,32 +25,15 @@ use CGI;
 
 use C4::Auth;
 use C4::Output;
-use C4::Biblio;
 use C4::Context;
 use C4::Breeding;
 use C4::Koha;
-use C4::Charset;
 use C4::Bookseller qw/ GetBookSellerFromId /;
-use ZOOM;
-
-my $input        = new CGI;
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "acqui/z3950_search.tmpl",
-        query           => $input,
-        type            => "intranet",
-        authnotrequired => 1,
-        flagsrequired   => { acquisition => 'order_manage' },
-        debug           => 1,
-    }
-);
-
 
+my $input           = new CGI;
 my $dbh             = C4::Context->dbh;
-my $error           = $input->param('error');
-my $biblionumber    = $input->param('biblionumber');
-$biblionumber       = 0 unless $biblionumber;
-my $frameworkcode   = $input->param('frameworkcode');
+my $biblionumber    = $input->param('biblionumber')||0;
+my $frameworkcode   = $input->param('frameworkcode')||'';
 my $title           = $input->param('title');
 my $author          = $input->param('author');
 my $isbn            = $input->param('isbn');
@@ -60,40 +43,11 @@ my $lccall          = $input->param('lccall');
 my $subject         = $input->param('subject');
 my $dewey           = $input->param('dewey');
 my $controlnumber   = $input->param('controlnumber');
-my $op              = $input->param('op');
+my $op              = $input->param('op')||'';
 my $booksellerid    = $input->param('booksellerid');
 my $basketno        = $input->param('basketno');
-
 my $page            = $input->param('current_page') || 1;
 $page               = $input->param('goto_page') if $input->param('changepage_goto');
-my $show_next       = 0;
-my $total_pages     = 0;
-
-my $noconnection;
-my $attr = '';
-my $term;
-my $host;
-my $server;
-my $database;
-my $port;
-my $marcdata;
-my @encoding;
-my @results;
-my $count;
-my $toggle;
-my $record;
-my $oldbiblio;
-my $errmsg;
-my @serverhost;
-my @servername;
-my @breeding_loop = ();
-my $random        = $input->param('random');
-unless ($random)
-{    # this var is not useful anymore just kept to keep rel2_2 compatibility
-    $random = rand(1000000000);
-}
-
-my $DEBUG = $ENV{DEBUG} || 0;    # if set to 1, many debug message are send on syslog.
 
 # get framework list
 my $frameworks = getframeworks;
@@ -110,25 +64,32 @@ foreach my $thisframeworkcode ( keys %$frameworks ) {
 }
 
 my $vendor = GetBookSellerFromId($booksellerid);
-$template->param( frameworkcode => $frameworkcode, 
-                                    frameworkcodeloop => \@frameworkcodeloop,
-                                    booksellerid => $booksellerid,
-                                    basketno => $basketno,
-                                    name => $vendor->{'name'}
-                                    );
-                                    
 
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "acqui/z3950_search.tmpl",
+        query           => $input,
+        type            => "intranet",
+        authnotrequired => 1,
+        flagsrequired   => { acquisition => 'order_manage' },
+    }
+);
 $template->param(
-    isbn         => $isbn,
-    issn         => $issn,
-    lccn         => $lccn,
-    lccall       => $lccall,
-    title        => $title,
-    author       => $author,
-    controlnumber=> $controlnumber,
-    biblionumber => $biblionumber,
-    dewey        => $dewey,
-    subject      => $subject,
+        frameworkcode => $frameworkcode,
+        frameworkcodeloop => \@frameworkcodeloop,
+        booksellerid => $booksellerid,
+        basketno     => $basketno,
+        name         => $vendor->{'name'},
+        isbn         => $isbn,
+        issn         => $issn,
+        lccn         => $lccn,
+        lccall       => $lccall,
+        title        => $title,
+        author       => $author,
+        controlnumber=> $controlnumber,
+        biblionumber => $biblionumber,
+        dewey        => $dewey,
+        subject      => $subject,
 );
 
 if ( $op ne "do_search" ) {
@@ -143,214 +104,27 @@ if ( $op ne "do_search" ) {
     exit;
 }
 
-    my @id = $input->param('id');
-
-    if ( not @id ) {
-        # empty server list -> report and exit
-        $template->param( emptyserverlist => 1 );
-        output_html_with_http_headers $input, $cookie, $template->output;
-        exit;
-    }
-
-    my @oConnection;
-    my @oResult;
-    my @errconn;
-    my $s = 0;
-    my $query;
-    my $nterms;
-    if ($isbn) {
-        $term=$isbn;
-        $query .= " \@attr 1=7 \@attr 5=1 \"$term\" ";
-        $nterms++;
-    }
-    if ($issn) {
-        $term=$issn;
-        $query .= " \@attr 1=8 \@attr 5=1 \"$term\" ";
-        $nterms++;
-    }
-    if ($title) {
-        utf8::decode($title);
-        $query .= " \@attr 1=4 \"$title\" ";
-        $nterms++;
-    }
-    if ($author) {
-        utf8::decode($author);
-        $query .= " \@attr 1=1003 \"$author\" ";
-        $nterms++;
-    }
-    if ($dewey) {
-        $query .= " \@attr 1=16 \"$dewey\" ";
-        $nterms++;
-    }
-    if ($subject) {
-        utf8::decode($subject);
-        $query .= " \@attr 1=21 \"$subject\" ";
-        $nterms++;
-    }
-    if ($lccn) {
-        $query .= " \@attr 1=9 $lccn ";
-        $nterms++;
-    }
-    if ($lccall) {
-        $query .= " \@attr 1=16 \@attr 2=3 \@attr 3=1 \@attr 4=1 \@attr 5=1 \@attr 6=1 \"$lccall\" ";
-        $nterms++;
-    }
-    if ($controlnumber) {
-        $query .= " \@attr 1=12 \"$controlnumber\" ";
-        $nterms++;
-    }
-for my $i (1..$nterms-1) {
-    $query = "\@and " . $query;
+my @id = $input->param('id');
+if (@id==0) {
+    $template->param( emptyserverlist => 1 );
+    output_html_with_http_headers $input, $cookie, $template->output;
+    exit;
 }
-warn "query ".$query  if $DEBUG;
-
-    foreach my $servid (@id) {
-        my $sth = $dbh->prepare("select * from z3950servers where id=?");
-        $sth->execute($servid);
-        while ( $server = $sth->fetchrow_hashref ) {
-            warn "serverinfo ".join(':',%$server) if $DEBUG;
-            my $option1      = new ZOOM::Options();
-            $option1->option( 'async' => 1 );
-            $option1->option( 'elementSetName', 'F' );
-            $option1->option( 'databaseName',   $server->{db} );
-            $option1->option( 'user', $server->{userid} ) if $server->{userid};
-            $option1->option( 'password', $server->{password} )
-              if $server->{password};
-            $option1->option( 'preferredRecordSyntax', $server->{syntax} );
-            $oConnection[$s] = create ZOOM::Connection($option1)
-              || $DEBUG
-              && warn( "" . $oConnection[$s]->errmsg() );
-            warn( "server data", $server->{name}, $server->{port} ) if $DEBUG;
-            $oConnection[$s]->connect( $server->{host}, $server->{port} )
-              || $DEBUG
-              && warn( "" . $oConnection[$s]->errmsg() );
-            $serverhost[$s] = $server->{host};
-            $servername[$s] = $server->{name};
-            $encoding[$s]   = ($server->{encoding}?$server->{encoding}:"iso-5426");
-            $s++;
-        }    ## while fetch
-    }    # foreach
-    my $nremaining  = $s;
-    my $firstresult = 1;
-
-    for ( my $z = 0 ; $z < $s ; $z++ ) {
-        warn "doing the search" if $DEBUG;
-        $oResult[$z] = $oConnection[$z]->search_pqf($query)
-          || $DEBUG
-          && warn( "somthing went wrong: " . $oConnection[$s]->errmsg() );
-
-        # $oResult[$z] = $oConnection[$z]->search_pqf($query);
-    }
-
-  warn "# nremaining = $nremaining\n" if $DEBUG;
-
-  while ( $nremaining-- ) {
-
-    my $k;
-    my $event;
-    while ( ( $k = ZOOM::event( \@oConnection ) ) != 0 ) {
-        $event = $oConnection[ $k - 1 ]->last_event();
-        warn( "connection ", $k - 1, ": event $event (",
-            ZOOM::event_str($event), ")\n" )
-          if $DEBUG;
-        last if $event == ZOOM::Event::ZEND;
-    }
 
-    if ( $k != 0 ) {
-        $k--;
-        warn "event from $k server = ",$serverhost[$k] if $DEBUG;
-        my ( $error, $errmsg, $addinfo, $diagset ) =
-          $oConnection[$k]->error_x();
-        if ($error) {
-            if ($error =~ m/^(10000|10007)$/ ) {
-                push(@errconn, {'server' => $serverhost[$k]});
-            }
-            $DEBUG and warn "$k $serverhost[$k] error $query: $errmsg ($error) $addinfo\n";
-        }
-        else {
-            my $numresults = $oResult[$k]->size();
-            warn "numresults = $numresults" if $DEBUG;
-            my $i;
-            my $result = '';
-            if ( $numresults > 0  and $numresults >= (($page-1)*20)) {
-                $show_next = 1 if $numresults >= ($page*20);
-                $total_pages = int($numresults/20)+1 if $total_pages < ($numresults/20);
-                for ($i = ($page-1)*20; $i < (($numresults < ($page*20)) ? $numresults : ($page*20)); $i++) {
-                    my $rec = $oResult[$k]->record($i);
-                    if ($rec) {
-                        my $marcrecord;
-                        $marcdata   = $rec->raw();
-
-                        my ($charset_result, $charset_errors);
-                        ($marcrecord, $charset_result, $charset_errors) = 
-                          MarcToUTF8Record($marcdata, C4::Context->preference('marcflavour'), $encoding[$k]);
-####WARNING records coming from Z3950 clients are in various character sets MARC8,UTF8,UNIMARC etc
-## In HEAD i change everything to UTF-8
-# In rel2_2 i am not sure what encoding is so no character conversion is done here
-##Add necessary encoding changes to here -TG
-
-                        # Normalize the record so it doesn't have separated diacritics
-                        SetUTF8Flag($marcrecord);
-
-                        my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" );
-                        $oldbiblio->{isbn}   =~ s/ |-|\.//g if $oldbiblio->{isbn};
-                        # pad | and ( with spaces to allow line breaks in the HTML
-                        $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn};
-                        $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn};
-
-                        $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn};
-                        # pad | and ( with spaces to allow line breaks in the HTML
-                        $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn};
-                        $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn};
-                          my (
-                            $notmarcrecord, $alreadyindb, $alreadyinfarm,
-                            $imported,      $breedingid
-                          )
-                          = ImportBreeding( $marcdata, 2, $serverhost[$k], $encoding[$k], $random, 'z3950' );
-                        my %row_data;
-                        $row_data{server}       = $servername[$k];
-                        $row_data{isbn}         = $oldbiblio->{isbn};
-                        $row_data{lccn}         = $oldbiblio->{lccn};
-                        $row_data{title}        = $oldbiblio->{title};
-                        $row_data{author}       = $oldbiblio->{author};
-                        $row_data{breedingid}   = $breedingid;
-                        $row_data{biblionumber} = $biblionumber;
-                        push( @breeding_loop, \%row_data );
-
-                    } else {
-                        push(@breeding_loop,{'server'=>$servername[$k],'title'=>join(': ',$oConnection[$k]->error_x()),'breedingid'=>-1,'biblionumber'=>-1});
-                    } # $rec
-                }    # upto 5 results
-            }    #$numresults
-        }
-    }    # if $k !=0
-    my $numberpending = $nremaining - 1;
-
-    my @servers = ();
-    foreach my $id (@id) {
-        push(@servers,{id => $id});
-    }
-
-    $template->param(
-        breeding_loop => \@breeding_loop,
-        server        => $servername[$k],
-        numberpending => $numberpending,
-        current_page => $page,
-        servers => \@servers,
-        total_pages => $total_pages,
-    );
-    $template->param(show_nextbutton=>1) if $show_next;
-    $template->param(show_prevbutton=>1) if $page != 1;
-
-    #  print  $template->output  if $firstresult !=1;
-    $firstresult++;
-
-  } # while nremaining
-
-$template->param(
-breeding_loop => \@breeding_loop,
-#server        => $servername[$k],
-numberpending => $nremaining > 0 ? $nremaining : 0,
-errconn       => \@errconn
-);
+my $pars= {
+        random => $input->param('random') || rand(1000000000),
+        biblionumber => $biblionumber,
+        page => $page,
+        id => \@id,
+        isbn => $isbn,
+        title => $title,
+        author => $author,
+        dewey => $dewey,
+        subject => $subject,
+        lccall => $lccall,
+        controlnumber => $controlnumber,
+        stdid => 0,
+        srchany => 0,
+};
+Z3950Search($pars, $template);
 output_html_with_http_headers $input, $cookie, $template->output;
index 17917ce..c00bb64 100755 (executable)
@@ -22,6 +22,7 @@ use warnings;
 
 use CGI;
 use C4::Auth;
+use C4::Branch;
 use C4::Context;
 use C4::Koha;
 use C4::Output;
@@ -67,13 +68,32 @@ $template->param(  script_name => $script_name,
 # called by default. Used to create form to add or  modify a record
 if ($op eq 'add_form') {
        my $data;
+    my @selected_branches;
        if ($id) {
                my $sth=$dbh->prepare("select id, category, authorised_value, lib, lib_opac, imageurl from authorised_values where id=?");
                $sth->execute($id);
                $data=$sth->fetchrow_hashref;
+        $sth = $dbh->prepare("SELECT b.branchcode, b.branchname FROM authorised_values_branches AS avb, branches AS b WHERE avb.branchcode = b.branchcode AND avb.av_id = ?;");
+        $sth->execute( $id );
+        while ( my $branch = $sth->fetchrow_hashref ) {
+            push @selected_branches, $branch;
+        }
        } else {
                $data->{'category'} = $input->param('category');
        }
+
+    my $branches = GetBranches;
+    my @branches_loop;
+
+    foreach my $branch (sort keys %$branches) {
+        my $selected = ( grep {$_->{branchcode} eq $branch} @selected_branches ) ? 1 : 0;
+        push @branches_loop, {
+            branchcode => $branches->{$branch}{branchcode},
+            branchname => $branches->{$branch}{branchname},
+            selected => $selected,
+        };
+    }
+
        if ($id) {
                $template->param(action_modify => 1);
                $template->param('heading_modify_authorized_value_p' => 1);
@@ -92,6 +112,7 @@ if ($op eq 'add_form') {
                          id               => $data->{'id'},
                          imagesets        => C4::Koha::getImageSets( checked => $data->{'imageurl'} ),
                          offset           => $offset,
+                         branches_loop    => \@branches_loop,
                      );
                           
 ################## ADD_VALIDATE ##################################
@@ -102,6 +123,7 @@ if ($op eq 'add_form') {
     my $imageurl     = $input->param( 'imageurl' ) || '';
        $imageurl = '' if $imageurl =~ /removeImage/;
     my $duplicate_entry = 0;
+    my @branches = $input->param('branches');
 
     if ( $id ) { # Update
         my $sth = $dbh->prepare( "SELECT category, authorised_value FROM authorised_values WHERE id = ? ");
@@ -125,7 +147,21 @@ if ($op eq 'add_form') {
             my $lib_opac = $input->param('lib_opac');
             undef $lib if ($lib eq ""); # to insert NULL instead of a blank string
             undef $lib_opac if ($lib_opac eq ""); # to insert NULL instead of a blank string
-            $sth->execute($new_category, $new_authorised_value, $lib, $lib_opac, $imageurl, $id);          
+            $sth->execute($new_category, $new_authorised_value, $lib, $lib_opac, $imageurl, $id);
+            if ( @branches ) {
+                $sth = $dbh->prepare("DELETE FROM authorised_values_branches WHERE av_id = ?");
+                $sth->execute( $id );
+                $sth = $dbh->prepare(
+                    "INSERT INTO authorised_values_branches
+                                ( av_id, branchcode )
+                                VALUES ( ?, ? )"
+                );
+                for my $branchcode ( @branches ) {
+                    next if not $branchcode;
+                    $sth->execute($id, $branchcode);
+                }
+            }
+            $sth->finish;
             print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authorised_values.pl?searchfield=".$new_category."&offset=$offset\"></html>";
             exit;
         }
@@ -137,13 +173,25 @@ if ($op eq 'add_form') {
         ($duplicate_entry) = $sth->fetchrow_array();
         unless ( $duplicate_entry ) {
             my $sth=$dbh->prepare( 'INSERT INTO authorised_values
-                                    ( id, category, authorised_value, lib, lib_opac, imageurl )
-                                    values (?, ?, ?, ?, ?, ?)' );
+                                    ( category, authorised_value, lib, lib_opac, imageurl )
+                                    values (?, ?, ?, ?, ?)' );
            my $lib = $input->param('lib');
            my $lib_opac = $input->param('lib_opac');
            undef $lib if ($lib eq ""); # to insert NULL instead of a blank string
            undef $lib_opac if ($lib_opac eq ""); # to insert NULL instead of a blank string
-           $sth->execute($id, $new_category, $new_authorised_value, $lib, $lib_opac, $imageurl );
+            $sth->execute( $new_category, $new_authorised_value, $lib, $lib_opac, $imageurl );
+            $id = $dbh->{'mysql_insertid'};
+            if ( @branches ) {
+                $sth = $dbh->prepare(
+                    "INSERT INTO authorised_values_branches
+                                ( av_id, branchcode )
+                                VALUES ( ?, ? )"
+                );
+                for my $branchcode ( @branches ) {
+                    next if not $branchcode;
+                    $sth->execute($id, $branchcode);
+                }
+            }
            print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=authorised_values.pl?searchfield=".$input->param('category')."&offset=$offset\"></html>";
            exit;
         }
@@ -219,7 +267,14 @@ sub default_form {
     my $count = scalar(@$results);
        my @loop_data = ();
        # builds value list
+    my $dbh = C4::Context->dbh;
+    $sth = $dbh->prepare("SELECT b.branchcode, b.branchname FROM authorised_values_branches AS avb, branches AS b WHERE avb.branchcode = b.branchcode AND avb.av_id = ?");
        for (my $i=0; $i < $count; $i++){
+        $sth->execute( $results->[$i]{id} );
+        my @selected_branches;
+        while ( my $branch = $sth->fetchrow_hashref ) {
+            push @selected_branches, $branch;
+        }
                my %row_data;  # get a fresh hash for the row data
                $row_data{category}              = $results->[$i]{'category'};
                $row_data{authorised_value}      = $results->[$i]{'authorised_value'};
@@ -228,6 +283,7 @@ sub default_form {
                $row_data{imageurl}              = getitemtypeimagelocation( 'intranet', $results->[$i]{'imageurl'} );
                $row_data{edit}                  = "$script_name?op=add_form&amp;id=".$results->[$i]{'id'}."&amp;offset=$offset";
                $row_data{delete}                = "$script_name?op=delete_confirm&amp;searchfield=$searchfield&amp;id=".$results->[$i]{'id'}."&amp;offset=$offset";
+        $row_data{branches}              = \@selected_branches;
                push(@loop_data, \%row_data);
        }
 
index 63d629c..4964158 100755 (executable)
 # with Koha; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-use strict;
-#use warnings; FIXME - Bug 2505
+use Modern::Perl;
+
 use CGI;
 use C4::Context;
 use C4::Auth;
+use C4::Branch;
 use C4::Output;
 use C4::Dates;
 use C4::Form::MessagingPreferences;
@@ -90,16 +91,34 @@ if ($op eq 'add_form') {
        
        #---- if primkey exists, it's a modify action, so read values to modify...
        my $data;
+    my @selected_branches;
        if ($categorycode) {
                my $dbh = C4::Context->dbh;
                my $sth=$dbh->prepare("select categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,issuelimit,reservefee,hidelostitems,overduenoticerequired,category_type from categories where categorycode=?");
                $sth->execute($categorycode);
                $data=$sth->fetchrow_hashref;
-               $sth->finish;
-       }
+
+        $sth = $dbh->prepare("SELECT b.branchcode, b.branchname FROM categories_branches AS cb, branches AS b WHERE cb.branchcode = b.branchcode AND cb.categorycode = ?");
+        $sth->execute( $categorycode );
+        while ( my $branch = $sth->fetchrow_hashref ) {
+            push @selected_branches, $branch;
+        }
+        $sth->finish;
+    }
 
     $data->{'enrolmentperioddate'} = undef if ($data->{'enrolmentperioddate'} eq '0000-00-00');
 
+    my $branches = GetBranches;
+    my @branches_loop;
+    foreach my $branch (sort keys %$branches) {
+        my $selected = ( grep {$$_{branchcode} eq $branch} @selected_branches ) ? 1 : 0;
+        push @branches_loop, {
+            branchcode => $$branches{$branch}{branchcode},
+            branchname => $$branches{$branch}{branchname},
+            selected => $selected,
+        };
+    }
+
        $template->param(description        => $data->{'description'},
                                enrolmentperiod         => $data->{'enrolmentperiod'},
                                enrolmentperioddate     => C4::Dates::format_date($data->{'enrolmentperioddate'}),
@@ -115,6 +134,7 @@ if ($op eq 'add_form') {
                 SMSSendDriver => C4::Context->preference("SMSSendDriver"),
                 TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"),
                                "type_".$data->{'category_type'} => 1,
+                branches_loop           => \@branches_loop,
                                );
     if (C4::Context->preference('EnhancedMessagingPreferences')) {
         C4::Form::MessagingPreferences::set_form_values({ categorycode => $categorycode } , $template);
@@ -133,6 +153,22 @@ if ($op eq 'add_form') {
        if ($is_a_modif) {
             my $sth=$dbh->prepare("UPDATE categories SET description=?,enrolmentperiod=?, enrolmentperioddate=?,upperagelimit=?,dateofbirthrequired=?,enrolmentfee=?,reservefee=?,hidelostitems=?,overduenoticerequired=?,category_type=? WHERE categorycode=?");
             $sth->execute(map { $input->param($_) } ('description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','hidelostitems','overduenoticerequired','category_type','categorycode'));
+            my @branches = $input->param("branches");
+            if ( @branches ) {
+                $sth = $dbh->prepare("DELETE FROM categories_branches WHERE categorycode = ?");
+                $sth->execute( $input->param( "categorycode" ) );
+                $sth = $dbh->prepare(
+                    "INSERT INTO categories_branches
+                                ( categorycode, branchcode )
+                                VALUES ( ?, ? )"
+                );
+                for my $branchcode ( @branches ) {
+                    next if not $branchcode;
+                    $sth->bind_param( 1, $input->param( "categorycode" ) );
+                    $sth->bind_param( 2, $branchcode );
+                    $sth->execute;
+                }
+            }
             $sth->finish;
         } else {
             my $sth=$dbh->prepare("INSERT INTO categories  (categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,reservefee,hidelostitems,overduenoticerequired,category_type) values (?,?,?,?,?,?,?,?,?,?,?)");
@@ -197,7 +233,14 @@ if ($op eq 'add_form') {
        $template->param(else => 1);
        my @loop;
        my ($count,$results)=StringSearch($searchfield,'web');
+    my $dbh = C4::Context->dbh;
+    my $sth = $dbh->prepare("SELECT b.branchcode, b.branchname FROM categories_branches AS cb, branches AS b WHERE cb.branchcode = b.branchcode AND cb.categorycode = ?");
        for (my $i=0; $i < $count; $i++){
+        $sth->execute( $results->[$i]{'categorycode'} );
+        my @selected_branches;
+        while ( my $branch = $sth->fetchrow_hashref ) {
+            push @selected_branches, $branch;
+        }
                my %row = (
                        categorycode            => $results->[$i]{'categorycode'},
                                description             => $results->[$i]{'description'},
@@ -211,7 +254,9 @@ if ($op eq 'add_form') {
                                reservefee              => sprintf("%.2f",$results->[$i]{'reservefee'}),
                                 hidelostitems           => $results->[$i]{'hidelostitems'},
                                category_type           => $results->[$i]{'category_type'},
-                               "type_".$results->[$i]{'category_type'} => 1);
+                "type_".$results->[$i]{'category_type'} => 1,
+                branches                => \@selected_branches,
+        );
         if (C4::Context->preference('EnhancedMessagingPreferences')) {
             my $brief_prefs = _get_brief_messaging_prefs($results->[$i]{'categorycode'});
             $row{messaging_prefs} = $brief_prefs if @$brief_prefs;
@@ -220,8 +265,7 @@ if ($op eq 'add_form') {
        }
        $template->param(loop => \@loop);
        # check that I (institution) and C (child) exists. otherwise => warning to the user
-       my $dbh = C4::Context->dbh;
-       my $sth=$dbh->prepare("select category_type from categories where category_type='C'");
+    $sth=$dbh->prepare("select category_type from categories where category_type='C'");
        $sth->execute;
        my ($categoryChild) = $sth->fetchrow;
        $template->param(categoryChild => $categoryChild);
index c0ad1f7..3935f40 100755 (executable)
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
-use strict;
-use warnings;
+use Modern::Perl;
+
 use CGI;
 use List::MoreUtils qw/uniq/;
 
 use C4::Auth;
+use C4::Branch;
 use C4::Context;
 use C4::Output;
 use C4::Koha;
@@ -82,10 +83,20 @@ exit 0;
 sub add_attribute_type_form {
     my $template = shift;
 
+    my $branches = GetBranches;
+    my @branches_loop;
+    foreach my $branch (sort keys %$branches) {
+        push @branches_loop, {
+            branchcode => $$branches{$branch}{branchcode},
+            branchname => $$branches{$branch}{branchname},
+        };
+    }
+
     $template->param(
         attribute_type_form => 1,
         confirm_op => 'add_attribute_type_confirmed',
         categories => GetBorrowercategoryList,
+        branches_loop => \@branches_loop,
     );
     authorised_value_category_list($template);
     pa_classes($template);
@@ -162,6 +173,8 @@ sub add_update_attribute_type {
     $attr_type->display_checkout($display_checkout);
     $attr_type->category_code($input->param('category_code'));
     $attr_type->class($input->param('class'));
+    my @branches = $input->param('branches');
+    $attr_type->branches( \@branches );
 
     if ($op eq 'edit') {
         $template->param(edited_attribute_type => $attr_type->code());
@@ -244,6 +257,20 @@ sub edit_attribute_type_form {
     authorised_value_category_list($template, $attr_type->authorised_value_category());
     pa_classes( $template, $attr_type->class );
 
+
+    my $branches = GetBranches;
+    my @branches_loop;
+    my $selected_branches = $attr_type->branches;
+    foreach my $branch (sort keys %$branches) {
+        my $selected = ( grep {$$_{branchcode} eq $branch} @$selected_branches ) ? 1 : 0;
+        push @branches_loop, {
+            branchcode => $branches->{$branch}{branchcode},
+            branchname => $branches->{$branch}{branchname},
+            selected => $selected,
+        };
+    }
+    $template->param( branches_loop => \@branches_loop );
+
     $template->param ( category_code => $attr_type->category_code );
     $template->param ( category_description => $attr_type->category_description );
 
@@ -259,21 +286,26 @@ sub edit_attribute_type_form {
 sub patron_attribute_type_list {
     my $template = shift;
 
-    my @attr_types = C4::Members::AttributeTypes::GetAttributeTypes();
-    my @classes = uniq( map {$_->{class}} @attr_types );
+    my @attr_types = C4::Members::AttributeTypes::GetAttributeTypes( 1, 1 );
+
+    my @classes = uniq( map { $_->{class} } @attr_types );
     @classes = sort @classes;
 
     my @attributes_loop;
     for my $class (@classes) {
-        my @items;
+        my ( @items, $branches );
         for my $attr (@attr_types) {
-            push @items, $attr if $attr->{class} eq $class
+            next if $attr->{class} ne $class;
+            my $attr_type = C4::Members::AttributeTypes->fetch($attr->{code});
+            $attr->{branches} = $attr_type->branches;
+            push @items, $attr;
         }
         my $lib = GetAuthorisedValueByCode( 'PA_CLASS', $class ) || $class;
         push @attributes_loop, {
             class => $class,
             items => \@items,
             lib   => $lib,
+            branches => $branches,
         };
     }
     $template->param(available_attribute_types => \@attributes_loop);
index 8fc15e4..d33216c 100755 (executable)
@@ -24,6 +24,7 @@ use C4::Biblio;
 use C4::Items;
 use C4::Auth;
 use C4::Output;
+use C4::Csv;
 
 my $query = new CGI;
 
@@ -120,6 +121,8 @@ my $resultsarray = \@results;
 
 $template->param(
     BIBLIO_RESULTS => $resultsarray,
+    csv_profiles => GetCsvProfilesLoop(),
+    bib_list => $bib_list,
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;
index 67e9c99..9379704 100755 (executable)
@@ -40,6 +40,7 @@ use C4::VirtualShelves;
 use C4::XSLT;
 use C4::Images;
 use Koha::DateUtils;
+use C4::HTML5Media;
 
 # use Smart::Comments;
 
@@ -155,6 +156,8 @@ foreach my $subscription (@subscriptions) {
     $cell{branchcode}        = $subscription->{branchcode};
     $cell{branchname}        = GetBranchName($subscription->{branchcode});
     $cell{hasalert}          = $subscription->{hasalert};
+    $cell{callnumber}        = $subscription->{callnumber};
+    $cell{closed}            = $subscription->{closed};
     #get the three latest serials.
        $serials_to_display = $subscription->{staffdisplaycount};
        $serials_to_display = C4::Context->preference('StaffSerialIssueDisplayCount') unless $serials_to_display;
@@ -175,15 +178,20 @@ $dat->{'hiddencount'} = scalar @all_items + @hostitems - scalar @items;
 my $shelflocations = GetKohaAuthorisedValues('items.location', $fw);
 my $collections    = GetKohaAuthorisedValues('items.ccode'   , $fw);
 my $copynumbers    = GetKohaAuthorisedValues('items.copynumber', $fw);
-my (@itemloop, %itemfields);
+my (@itemloop, @otheritemloop, %itemfields);
 my $norequests = 1;
 my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw);
 my $authvalcode_items_damaged  = GetAuthValCode('items.damaged', $fw);
 
 my $analytics_flag;
 my $materials_flag; # set this if the items have anything in the materials field
+my $currentbranch = C4::Context->userenv ? C4::Context->userenv->{branch} : undef;
+if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
+    $template->param(SeparateHoldings => 1);
+}
+my $separatebranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch';
 foreach my $item (@items) {
-
+    my $itembranchcode = $item->{$separatebranch};
     $item->{homebranch}        = GetBranchName($item->{homebranch});
 
     # can place holds defaults to yes
@@ -257,16 +265,27 @@ foreach my $item (@items) {
        $item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title};
     }
        
-       #count if item is used in analytical bibliorecords
-       my $countanalytics= GetAnalyticsCount($item->{itemnumber});
-       if ($countanalytics > 0){
-               $analytics_flag=1;
-               $item->{countanalytics} = $countanalytics;
-       }
+    #count if item is used in analytical bibliorecords
+    my $countanalytics= GetAnalyticsCount($item->{itemnumber});
+    if ($countanalytics > 0){
+        $analytics_flag=1;
+        $item->{countanalytics} = $countanalytics;
+    }
+
     if (defined($item->{'materials'}) && $item->{'materials'} =~ /\S/){
        $materials_flag = 1;
     }
-    push @itemloop, $item;
+
+    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
+    and C4::Context->preference('SeparateHoldings')) {
+        if ($itembranchcode and $itembranchcode eq $currentbranch) {
+            push @itemloop, $item;
+        } else {
+            push @otheritemloop, $item;
+        }
+    } else {
+        push @itemloop, $item;
+    }
 }
 
 $template->param( norequests => $norequests );
@@ -330,6 +349,7 @@ foreach ( keys %{$dat} ) {
 $template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("AmazonCoverImages"));
 $template->param(
     itemloop        => \@itemloop,
+    otheritemloop   => \@otheritemloop,
     biblionumber        => $biblionumber,
     ($analyze? 'analyze':'detailview') =>1,
     subscriptions       => \@subs,
@@ -360,6 +380,12 @@ if ( C4::Context->preference("LocalCoverImages") == 1 ) {
     $template->{VARS}->{localimages} = \@images;
 }
 
+# HTML5 Media
+if ( (C4::Context->preference("HTML5MediaEnabled") eq 'both') or (C4::Context->preference("HTML5MediaEnabled") eq 'staff') ) {
+    $template->param( C4::HTML5Media->gethtml5media($record));
+}
+
+
 # Get OPAC URL
 if (C4::Context->preference('OPACBaseURL')){
      $template->param( OpacUrl => C4::Context->preference('OPACBaseURL') );
diff --git a/catalogue/detailprint.pl b/catalogue/detailprint.pl
deleted file mode 100755 (executable)
index fe92fe5..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/perl
-
-# Copyright 2000-2002 Katipo Communications
-#
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-use strict;
-#use warnings; FIXME - Bug 2505
-
-use C4::Context;
-use CGI;
-use C4::Auth;
-use C4::Biblio;
-use C4::Items;
-use C4::Output;
-use C4::Dates;
-
-my $query = new CGI;
-my $type  = $query->param('type');
-($type) || ( $type = 'intra' );
-
-my $biblionumber = $query->param('biblionumber');
-
-# change back when ive fixed request.pl
-my @items = GetItemsInfo( $biblionumber );
-my $norequests = 1;
-foreach my $itm (@items) {
-    $norequests = 0 unless $itm->{'notforloan'};
-}
-
-my $dat         = GetBiblioData($biblionumber);
-my $record      = GetMarcBiblio($biblionumber);
-my $addauthor   = GetMarcAuthors($record,C4::Context->preference("marcflavour"));
-my $authorcount = scalar @$addauthor;
-
-$dat->{'additional'} = "";
-foreach (@$addauthor) {
-    $dat->{'additional'} .= "|" . $_->{'a'};
-}    # for
-
-$dat->{'count'}      = @items;
-$dat->{'norequests'} = $norequests;
-
-my @results;
-
-$results[0] = $dat;
-
-my $resultsarray = \@results;
-my $itemsarray   = \@items;
-
-my $startfrom = $query->param('startfrom');
-($startfrom) || ( $startfrom = 0 );
-
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => ('catalogue/detailprint.tmpl'),
-        query           => $query,
-        type            => "intranet",
-        authnotrequired => ( $type eq 'opac' ),
-        flagsrequired   => { catalogue => 1 },
-    }
-);
-
-my $count = 1;
-
-# now to get the items into a hash we can use and whack that thru
-
-my $nextstartfrom = ( $startfrom + 20 < $count - 20 ) ? ( $startfrom + 20 ) : ( $count - 20 );
-my $prevstartfrom = ( $startfrom - 20 > 0 ) ? ( $startfrom - 20 ) : (0);
-
-$template->param(
-    startfrom      => $startfrom + 1,
-    endat          => $startfrom + 20,
-    numrecords     => $count,
-    nextstartfrom  => $nextstartfrom,
-    prevstartfrom  => $prevstartfrom,
-    BIBLIO_RESULTS => $resultsarray,
-    ITEM_RESULTS   => $itemsarray,
-    loggedinuser   => $loggedinuser,
-    biblionumber   => $biblionumber,
-);
-
-output_html_with_http_headers $query, $cookie, $template->output;
index 8b1234b..d1a3ca2 100755 (executable)
@@ -158,7 +158,7 @@ use CGI qw('-no_undef_params');
 my $cgi = new CGI;
 
 my ($template,$borrowernumber,$cookie);
-
+my $lang = C4::Templates::getlanguage($cgi, 'intranet');
 # decide which template to use
 my $template_name;
 my $template_type;
@@ -334,7 +334,7 @@ if ( $template_type eq 'advsearch' ) {
                       search_boxes_loop => \@search_boxes_array);
 
     # load the language limits (for search)
-    my $languages_limit_loop = getAllLanguages();
+    my $languages_limit_loop = getAllLanguages($lang);
     $template->param(search_languages_loop => $languages_limit_loop,);
 
     # Expanded search options in advanced search:
@@ -472,7 +472,6 @@ my ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit
 my @results;
 
 ## I. BUILD THE QUERY
-my $lang = C4::Templates::getlanguage($cgi, 'intranet');
 ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by,$scan,$lang);
 
 ## parse the query_cgi string and put it into a form suitable for <input>s
index 2d591c6..caacd91 100755 (executable)
@@ -219,8 +219,11 @@ sub build_authorized_values_list {
         $value = $default_source unless $value;
     }
     else {
+        my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
         $authorised_values_sth->execute(
-            $tagslib->{$tag}->{$subfield}->{authorised_value} );
+            $tagslib->{$tag}->{$subfield}->{authorised_value},
+            $branch_limit ? $branch_limit : (),
+        );
 
         push @authorised_values, ""
           unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
@@ -230,6 +233,7 @@ sub build_authorized_values_list {
             $authorised_lib{$value} = $lib;
         }
     }
+    $authorised_values_sth->finish;
     return CGI::scrolling_list(
         -name     => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield,
         -values   => \@authorised_values,
@@ -508,12 +512,15 @@ sub build_tabs {
     my @loop_data = ();
     my $tag;
 
-    my $authorised_values_sth = $dbh->prepare(
-        "select authorised_value,lib
-        from authorised_values
-        where category=? order by lib"
-    );
-    
+    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
+    my $query = "SELECT authorised_value, lib
+                FROM authorised_values";
+    $query .= qq{ LEFT JOIN authorised_values_branches ON ( id = av_id )} if $branch_limit;
+    $query .= " WHERE category = ?";
+    $query .= " AND ( branchcode = ? OR branchcode IS NULL )" if $branch_limit;
+    $query .= " GROUP BY lib ORDER BY lib, lib_opac";
+    my $authorised_values_sth = $dbh->prepare( $query );
+
     # in this array, we will push all the 10 tabs
     # to avoid having 10 tabs in the template : they will all be in the same BIG_LOOP
     my @BIG_LOOP;
@@ -698,6 +705,7 @@ sub build_tabs {
             };
         }
     }
+    $authorised_values_sth->finish;
     $template->param( BIG_LOOP => \@BIG_LOOP );
 }
 
index 79a717c..c9875ca 100755 (executable)
@@ -107,8 +107,7 @@ sub generate_subfield_form {
   
   my $frameworkcode = &GetFrameworkCode($biblionumber);
         my %subfield_data;
-        my $dbh = C4::Context->dbh;        
-        my $authorised_values_sth = $dbh->prepare("SELECT authorised_value,lib FROM authorised_values WHERE category=? ORDER BY lib");
+        my $dbh = C4::Context->dbh;
         
         my $index_subfield = int(rand(1000000)); 
         if ($subfieldtag eq '@'){
@@ -203,11 +202,11 @@ sub generate_subfield_form {
                   #---- "true" authorised value
             }
             else {
-                  push @authorised_values, "" unless ( $subfieldlib->{mandatory} );
-                  $authorised_values_sth->execute( $subfieldlib->{authorised_value} );
-                  while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
-                      push @authorised_values, $value;
-                      $authorised_lib{$value} = $lib;
+                  push @authorised_values, qq{} unless ( $subfieldlib->{mandatory} );
+                  my $av = GetAuthorisedValues( $subfieldlib->{authorised_value} );
+                  for my $r ( @$av ) {
+                      push @authorised_values, $r->{authorised_value};
+                      $authorised_lib{$r->{authorised_value}} = $r->{lib};
                   }
             }
 
index fd4eff9..9fc9d68 100755 (executable)
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 use strict;
-#use warnings; FIXME - Bug 2505
+use warnings;
 use CGI;
 
 use C4::Auth;
 use C4::Output;
-use C4::Biblio;
 use C4::Context;
 use C4::Breeding;
 use C4::Koha;
-use C4::Charset;
-use ZOOM;
 
 my $input        = new CGI;
 my $dbh          = C4::Context->dbh;
@@ -44,37 +41,13 @@ my $lccn          = $input->param('lccn');
 my $lccall        = $input->param('lccall');
 my $subject       = $input->param('subject');
 my $dewey         = $input->param('dewey');
-my $controlnumber      = $input->param('controlnumber');
-my $stdid                      = $input->param('stdid');
-my $srchany                    = $input->param('srchany');
-my $random        = $input->param('random') || rand(1000000000); # this var is not useful anymore just kept for rel2_2 compatibility
-my $op            = $input->param('op');
+my $controlnumber = $input->param('controlnumber');
+my $stdid         = $input->param('stdid');
+my $srchany       = $input->param('srchany');
+my $op            = $input->param('op')||'';
 
 my $page            = $input->param('current_page') || 1;
 $page = $input->param('goto_page') if $input->param('changepage_goto');
-my $show_next = 0;
-my $total_pages = 0;
-
-my $numberpending;
-my $attr = '';
-my $term;
-my $host;
-my $server;
-my $database;
-my $port;
-my $marcdata;
-my @encoding;
-my @results;
-my $count;
-my $record;
-my $oldbiblio;
-my $errmsg;
-my @serverloop = ();
-my @serverhost;
-my @servername;
-my @breeding_loop = ();
-
-my $DEBUG = 0;    # if set to 1, many debug message are send on syslog.
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
         template_name   => "cataloguing/z3950_search.tmpl",
@@ -82,11 +55,10 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
         type            => "intranet",
         authnotrequired => 1,
         flagsrequired   => { catalogue => 1 },
-        debug           => 1,
 });
 
-$template->param( frameworkcode => $frameworkcode, );
 $template->param(
+    frameworkcode => $frameworkcode,
     isbn         => $isbn,
     issn         => $issn,
     lccn         => $lccn,
@@ -110,222 +82,31 @@ if ( $op ne "do_search" ) {
         opsearch     => "search",
     );
     output_html_with_http_headers $input, $cookie, $template->output;
+    exit;
 }
-else {
-    my @id = $input->param('id');
 
-    if ( not defined @id ) {
+my @id = $input->param('id');
+if ( @id==0 ) {
         # empty server list -> report and exit
         $template->param( emptyserverlist => 1 );
         output_html_with_http_headers $input, $cookie, $template->output;
         exit;
-    }
-
-    my @oConnection;
-    my @oResult;
-    my @errconn;
-    my $s = 0;
-    my $query = '';
-    my $nterms;
-    if ($isbn) {
-        $term=$isbn;
-        $query .= " \@attr 1=7 \@attr 5=1 \"$term\" ";
-        $nterms++;
-    }
-    if ($issn) {
-        $term=$issn;
-        $query .= " \@attr 1=8 \@attr 5=1 \"$term\" ";
-        $nterms++;
-    }
-    if ($title) {
-        utf8::decode($title);
-        $query .= " \@attr 1=4 \"$title\" ";
-        $nterms++;
-    }
-    if ($author) {
-        utf8::decode($author);
-        $query .= " \@attr 1=1003 \"$author\" ";
-        $nterms++;
-    }
-    if ($dewey) {
-        $query .= " \@attr 1=16 \"$dewey\" ";
-        $nterms++;
-    }
-    if ($subject) {
-        utf8::decode($subject);
-        $query .= " \@attr 1=21 \"$subject\" ";
-        $nterms++;
-    }
-       if ($lccn) {    
-        $query .= " \@attr 1=9 $lccn ";
-        $nterms++;
-    }
-    if ($lccall) {
-        $query .= " \@attr 1=16 \@attr 2=3 \@attr 3=1 \@attr 4=1 \@attr 5=1 \@attr 6=1 \"$lccall\" ";
-        $nterms++;
-    }
-    if ($controlnumber) {
-        $query .= " \@attr 1=12 \"$controlnumber\" ";
-        $nterms++;
-    }
-    if ($stdid) {
-        $query .= " \@attr 1=1007 \"$stdid\" ";
-        $nterms++;
-    }
-    if ($srchany) {
-        $query .= " \@attr 1=1016 \"$srchany\" ";
-        $nterms++;
-    }
-for my $i (1..$nterms-1) {
-    $query = "\@and " . $query;
 }
-warn "query ".$query  if $DEBUG;
-
-    foreach my $servid (@id) {
-        my $sth = $dbh->prepare("SELECT * FROM z3950servers WHERE id=? ORDER BY rank, name");
-        $sth->execute($servid);
-        while ( $server = $sth->fetchrow_hashref ) {
-            warn "serverinfo ".join(':',%$server) if $DEBUG;
-            my $option1      = new ZOOM::Options();
-            $option1->option('async' => 1);
-            $option1->option('elementSetName', 'F');
-            $option1->option('databaseName', $server->{db});
-            $option1->option('user',         $server->{userid}  ) if $server->{userid};
-            $option1->option('password',     $server->{password}) if $server->{password};
-            $option1->option('preferredRecordSyntax', $server->{syntax});
-            $option1->option( 'timeout', $server->{timeout} ) if ($server->{timeout});
-            $oConnection[$s] = create ZOOM::Connection($option1)
-              || $DEBUG
-              && warn( "" . $oConnection[$s]->errmsg() );
-            warn( "server data", $server->{name}, $server->{port} ) if $DEBUG;
-            $oConnection[$s]->connect( $server->{host}, $server->{port} )
-              || $DEBUG
-              && warn( "" . $oConnection[$s]->errmsg() );
-            $serverhost[$s] = $server->{host};
-            $servername[$s] = $server->{name};
-            $encoding[$s]   = ($server->{encoding}?$server->{encoding}:"iso-5426");
-            $s++;
-        }    ## while fetch
-    }    # foreach
-    my $nremaining  = $s;
-    my $firstresult = 1;
-
-    for ( my $z = 0 ; $z < $s ; $z++ ) {
-        warn "doing the search" if $DEBUG;
-        $oResult[$z] = $oConnection[$z]->search_pqf($query)
-          || $DEBUG
-          && warn( "somthing went wrong: " . $oConnection[$s]->errmsg() );
-
-        # $oResult[$z] = $oConnection[$z]->search_pqf($query);
-    }
-
-  AGAIN:
-    my $k;
-    my $event;
-    while ( ( $k = ZOOM::event( \@oConnection ) ) != 0 ) {
-        $event = $oConnection[ $k - 1 ]->last_event();
-        warn( "connection ", $k - 1, ": event $event (",
-            ZOOM::event_str($event), ")\n" )
-          if $DEBUG;
-        last if $event == ZOOM::Event::ZEND;
-    }
-
-    if ( $k != 0 ) {
-        $k--;
-        warn $serverhost[$k] if $DEBUG;
-        my ( $error, $errmsg, $addinfo, $diagset ) =
-          $oConnection[$k]->error_x();
-        if ($error) {
-            if ($error =~ m/^(10000|10007)$/ ) {
-                push(@errconn, {'server' => $serverhost[$k], 'error' => $error});
-            }
-            $DEBUG and warn "$k $serverhost[$k] error $query: $errmsg ($error) $addinfo\n";
-        }
-        else {
-            my $numresults = $oResult[$k]->size();
-            my $i;
-            my $result = '';
-            if ( $numresults > 0  and $numresults >= (($page-1)*20)) {
-                $show_next = 1 if $numresults >= ($page*20);
-                $total_pages = int($numresults/20)+1 if $total_pages < ($numresults/20);
-                for ($i = ($page-1)*20; $i < (($numresults < ($page*20)) ? $numresults : ($page*20)); $i++) {
-                    my $rec = $oResult[$k]->record($i);
-                    if ($rec) {
-                        my $marcrecord;
-                        $marcdata   = $rec->raw();
-
-                        my ($charset_result, $charset_errors);
-                        ($marcrecord, $charset_result, $charset_errors) = 
-                          MarcToUTF8Record($marcdata, C4::Context->preference('marcflavour'), $encoding[$k]);
-####WARNING records coming from Z3950 clients are in various character sets MARC8,UTF8,UNIMARC etc
-## In HEAD i change everything to UTF-8
-# In rel2_2 i am not sure what encoding is so no character conversion is done here
-##Add necessary encoding changes to here -TG
-
-                        # Normalize the record so it doesn't have separated diacritics
-                        SetUTF8Flag($marcrecord);
-
-                        my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" );
-                        $oldbiblio->{isbn}   =~ s/ |-|\.//g if $oldbiblio->{isbn};
-                        # pad | and ( with spaces to allow line breaks in the HTML
-                        $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn};
-                        $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn};
-
-                        $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn};
-                        # pad | and ( with spaces to allow line breaks in the HTML
-                        $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn};
-                        $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn};
-                          my (
-                            $notmarcrecord, $alreadyindb, $alreadyinfarm,
-                            $imported,      $breedingid
-                          )
-                          = ImportBreeding( $marcdata, 2, $serverhost[$k], $encoding[$k], $random, 'z3950' );
-                        my %row_data;
-                        $row_data{server}       = $servername[$k];
-                        $row_data{isbn}         = $oldbiblio->{isbn};
-                        $row_data{lccn}         = $oldbiblio->{lccn};
-                        $row_data{title}        = $oldbiblio->{title};
-                        $row_data{author}       = $oldbiblio->{author};
-                        $row_data{date}         = $oldbiblio->{copyrightdate};
-                        $row_data{edition}      = $oldbiblio->{editionstatement};
-                        $row_data{breedingid}   = $breedingid;
-                        $row_data{biblionumber} = $biblionumber;
-                        push( @breeding_loop, \%row_data );
-                           
-                    } else {
-                        push(@breeding_loop,{'server'=>$servername[$k],'title'=>join(': ',$oConnection[$k]->error_x()),'breedingid'=>-1,'biblionumber'=>-1});
-                    } # $rec
-                }
-            }    #$numresults
-        }
-    }    # if $k !=0
-    $numberpending = $nremaining - 1;
-
-    my @servers = ();
-    foreach my $id (@id) {
-        push(@servers,{id => $id});
-    }
-
-    $template->param(
-        breeding_loop => \@breeding_loop,
-        server        => $servername[$k],
-        numberpending => $numberpending,
-        biblionumber  => $biblionumber,
-        errconn       => \@errconn,
-        current_page => $page,
-        servers => \@servers,
-        total_pages => $total_pages,
-    );
-    $template->param(show_nextbutton=>1) if $show_next;
-    $template->param(show_prevbutton=>1) if $page != 1;
-    
-    output_html_with_http_headers $input, $cookie, $template->output if $numberpending == 0;
-
-    #          print  $template->output  if $firstresult !=1;
-    $firstresult++;
 
-  MAYBE_AGAIN:
-    if ( --$nremaining > 0 ) {
-        goto AGAIN;
-    }
-}    ## if op=search
+my $pars= {
+        random => $input->param('random') || rand(1000000000),
+        biblionumber => $biblionumber,
+        page => $page,
+        id => \@id,
+        isbn => $isbn,
+        title => $title,
+        author => $author,
+        dewey => $dewey,
+        subject => $subject,
+        lccall => $lccall,
+        controlnumber => $controlnumber,
+        stdid => 0,
+        srchany => 0,
+};
+Z3950Search($pars, $template);
+output_html_with_http_headers $input, $cookie, $template->output;
index 228772e..75bf319 100755 (executable)
@@ -45,12 +45,11 @@ my $data  = GetBiblioItemData($bi);
 my $homebranch    = $branches->{ $idata->{'homebranch'}    }->{'branchname'};
 my $holdingbranch = $branches->{ $idata->{'holdingbranch'} }->{'branchname'};
 
-my ( $lastmove, $message ) = lastmove($itm);
+my $lastmove = lastmove($itm);
 
 my $lastdate;
 my $count;
 if ( not $lastmove ) {
-#    $lastdate = $message;
     $count = issuessince( $itm, 0 );
 } else {
     $lastdate = $lastmove->{'datearrived'};
@@ -79,8 +78,6 @@ foreach (@$branchloop) {
     $_->{seentime}   = $timechunk;
 }
 
-### $lastdate
-
 $template->param(
     biblionumber            => $biblionumber,
     title                   => $data->{'title'},
@@ -89,7 +86,7 @@ $template->param(
     biblioitemnumber        => $bi,
     homebranch              => $homebranch,
     holdingbranch           => $holdingbranch,
-    lastdate                => $lastdate ?  format_date($lastdate) : $message,
+    lastdate                => $lastdate ?  format_date($lastdate) : 0,
     count                   => $count,
     branchloop              => $branchloop,
 );
@@ -112,14 +109,14 @@ sub lastmove {
     );
     $sth->execute($itemnumber);
     my ($date) = $sth->fetchrow_array;
-    return ( 0, "Item has no branch transfers record" ) if not $date;
+    return 0 unless $date;
     $sth = $dbh->prepare(
 "SELECT * FROM branchtransfers WHERE branchtransfers.itemnumber=? and branchtransfers.datearrived=?"
     );
     $sth->execute( $itemnumber, $date );
     my ($data) = $sth->fetchrow_hashref;
-    return ( 0, "Item has no branch transfers record" ) if not $data;
-    return ( $data, "" );
+    return 0 unless $data;
+    return $data;
 }
 
 sub issuessince {
@@ -165,7 +162,7 @@ sub lastseenat {
     "SELECT MAX(transfer) FROM (SELECT max(datearrived) AS transfer FROM branchtransfers WHERE itemnumber=? AND tobranch = ?
      UNION ALL
      SELECT max(datesent) AS transfer FROM branchtransfers WHERE itemnumber=? AND frombranch = ?
-       ) tmp"
+    ) tmp"
     );
     $sth->execute( $itm, $brc, $itm, $brc );
     my ($date2) = $sth->fetchrow_array;
@@ -179,7 +176,6 @@ sub lastseenat {
 sub slashdate {
     my ($date) = @_;
     $date or return;
-    # warn "slashdate($date)...";
     return (
         format_date($date),
         substr($date,11,5)
index 842f8d9..5eee81b 100755 (executable)
@@ -25,7 +25,7 @@ use C4::Context;
 use C4::Koha;
 
 my $query = new CGI;
-my ($template, $loggedinuser, $cookie)
+my ($template, $loggedinuser, $cookie, $flags)
 = get_template_and_user({template_name => "circ/circulation-home.tmpl",
                                query => $query,
                                type => "intranet",
@@ -37,5 +37,8 @@ my ($template, $loggedinuser, $cookie)
 my $fa = getframeworkinfo('FA');
 $template->param( fast_cataloging => 1 ) if (defined $fa);
 
+# Checking if the transfer page needs to be displayed
+$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependantBranches") == 0) );
+
 
 output_html_with_http_headers $query, $cookie, $template->output;
index 2a6214a..91fd1a2 100755 (executable)
@@ -101,7 +101,7 @@ my @failedreturns = $query->param('failedreturn');
 our %return_failed = ();
 for (@failedreturns) { $return_failed{$_} = 1; }
 
-my $findborrower = $query->param('findborrower');
+my $findborrower = $query->param('findborrower') || q{};
 $findborrower =~ s|,| |g;
 my $borrowernumber = $query->param('borrowernumber');
 
@@ -122,7 +122,7 @@ if (C4::Context->preference("UseTablesortForCirc")) {
     $template->param(UseTablesortForCirc => 1);
 }
 
-my $barcode        = $query->param('barcode') || '';
+my $barcode        = $query->param('barcode') || q{};
 $barcode =~  s/^\s*|\s*$//g; # remove leading/trailing whitespace
 
 $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
@@ -131,7 +131,7 @@ my $duedatespec    = $query->param('duedatespec')   || $session->param('stickydu
 my $issueconfirmed = $query->param('issueconfirmed');
 my $cancelreserve  = $query->param('cancelreserve');
 my $organisation   = $query->param('organisations');
-my $print          = $query->param('print');
+my $print          = $query->param('print') || q{};
 my $newexpiry      = $query->param('dateexpiry');
 my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
 
index d93b7cd..9472797 100755 (executable)
@@ -418,6 +418,9 @@ foreach my $code ( keys %$messages ) {
     elsif ( $code eq 'WasLost' ) {
         $err{waslost} = 1;
     }
+    elsif ( $code eq 'LostItemFeeRefunded' ) {
+        $template->param( LostItemFeeRefunded => 1 );
+    }
     elsif ( $code eq 'ResFound' ) {
         ;    # FIXME... anything to do here?
     }
@@ -465,72 +468,6 @@ foreach my $code ( keys %$messages ) {
 }
 $template->param( errmsgloop => \@errmsgloop );
 
-# patrontable ....
-if ($borrower) {
-    my $flags = $borrower->{'flags'};
-    my @flagloop;
-    my $flagset;
-    foreach my $flag ( sort keys %$flags ) {
-        my %flaginfo;
-        unless ($flagset) { $flagset = 1; }
-        $flaginfo{redfont} = ( $flags->{$flag}->{'noissues'} );
-        $flaginfo{flag}    = $flag;
-        if ( $flag eq 'CHARGES' ) {
-            $flaginfo{msg}            = $flag;
-            $flaginfo{charges}        = 1;
-            $flaginfo{chargeamount}   = $flags->{$flag}->{amount};
-            $flaginfo{borrowernumber} = $borrower->{borrowernumber};
-        }
-        elsif ( $flag eq 'WAITING' ) {
-            $flaginfo{msg}     = $flag;
-            $flaginfo{waiting} = 1;
-            my @waitingitemloop;
-            my $items = $flags->{$flag}->{'itemlist'};
-            foreach my $item (@$items) {
-                my $biblio = GetBiblioFromItemNumber( $item->{'itemnumber'});
-                push @waitingitemloop, {
-                    biblionum => $biblio->{'biblionumber'},
-                    barcode   => $biblio->{'barcode'},
-                    title     => $biblio->{'title'},
-                    brname    => $branches->{ $biblio->{'holdingbranch'} }->{'branchname'},
-                };
-            }
-            $flaginfo{itemloop} = \@waitingitemloop;
-        }
-        elsif ( $flag eq 'ODUES' ) {
-            my $items = $flags->{$flag}->{'itemlist'};
-            my @itemloop;
-            foreach my $item ( sort { $a->{'date_due'} cmp $b->{'date_due'} }
-                @$items )
-            {
-                my $biblio = GetBiblioFromItemNumber( $item->{'itemnumber'});
-                push @itemloop, {
-                    duedate   => format_sqldatetime($item->{date_due}),
-                    biblionum => $biblio->{'biblionumber'},
-                    barcode   => $biblio->{'barcode'},
-                    title     => $biblio->{'title'},
-                    brname    => $branches->{ $biblio->{'holdingbranch'} }->{'branchname'},
-                };
-            }
-            $flaginfo{itemloop} = \@itemloop;
-            $flaginfo{overdue}  = 1;
-        }
-        else {
-            $flaginfo{other} = 1;
-            $flaginfo{msg}   = $flags->{$flag}->{'message'};
-        }
-        push( @flagloop, \%flaginfo );
-    }
-    $template->param(
-        flagset          => $flagset,
-        flagloop         => \@flagloop,
-        riborrowernumber => $borrower->{'borrowernumber'},
-        riborcnum        => $borrower->{'cardnumber'},
-        riborsurname     => $borrower->{'surname'},
-        ribortitle       => $borrower->{'title'},
-        riborfirstname   => $borrower->{'firstname'}
-    );
-}
 #set up so only the last 8 returned items display (make for faster loading pages)
 my $returned_counter = ( C4::Context->preference('numReturnedItemsToShow') ) ? C4::Context->preference('numReturnedItemsToShow') : 8;
 my $count = 0;
diff --git a/debian/docs/koha-shell.xml b/debian/docs/koha-shell.xml
new file mode 100644 (file)
index 0000000..a9029f7
--- /dev/null
@@ -0,0 +1,112 @@
+<article xmlns='http://docbook.org/ns/docbook'>
+    <title>koha-shell</title>
+    <info>
+        <productname>Koha</productname> is the first free software library automation package.
+        <author>
+            <personname>
+                <firstname>Robin</firstname>
+                <surname>Sheat</surname>
+            </personname>
+            <affiliation>
+                <orgname>Catalyst IT</orgname>
+                <uri>http://www.catalyst.net.nz</uri>
+            </affiliation>
+            <contrib>Author</contrib>
+        </author>
+    </info>
+
+    <refentry xml:id="koha-shell">
+
+        <refmeta>
+            <refentrytitle>koha-shell</refentrytitle>
+            <manvolnum>8</manvolnum>
+        </refmeta>
+
+        <refnamediv>
+            <refname>koha-shell</refname>
+            <refpurpose>Gives you a shell with the user and environment set to make it easy to do koha operations.</refpurpose>
+            <refclass>UNIX/Linux</refclass>
+        </refnamediv>
+
+        <refsynopsisdiv>
+            <cmdsynopsis>
+                <command>koha-shell</command>
+                <arg><option>--command|-c</option> COMMAND</arg>
+                <arg><option>--help|-h</option></arg>
+                <arg><option>--login|-l</option></arg>
+                <arg><option>--preserve-environment|-p|-m</option></arg>
+                <arg><option>--shell|-s</option> SHELL</arg>
+                <arg><option>--verbose|-v</option></arg>
+                <arg choice="req" rep="norepeat"><replaceable>instancename</replaceable></arg>
+            </cmdsynopsis>
+        </refsynopsisdiv>
+
+        <refsect1><title>Options</title>
+            <variablelist>
+                <varlistentry>
+                    <term><option>--command</option></term>
+                    <listitem>
+                        <para>Run the specified command rather than launching a shell.</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><option>--help</option></term>
+                    <listitem>
+                        <para>Show a usage synopsis.</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><option>--login</option></term>
+                    <listitem>
+                        <para>Make the shell a login shell.</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><option>--preserve-environment</option></term>
+                    <listitem>
+                        <para>Preserve the current environment (note that if you run it through 'sudo', this may not work as you'd expect.)</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><option>--shell</option></term>
+                    <listitem>
+                        <para>Run the specified shell. The default is the shell of the current environment, followed by /bin/sh.</para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term><option>--verbose</option></term>
+                    <listitem>
+                        <para>Show the command that is going to be run.</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+        </refsect1>
+
+        <refsect1><title>Description</title>
+            <para>This launches a shell with the user and required environment variables set in such a way that running any Koha commands will
+                work correctly. With the use of '-c', it can be used to easily run commands in the correct environment.</para>
+            <para>It behaves mostly as a wrapper for <command>su(1)</command>, so a deeper discussion of the options can be found in there.</para>
+        </refsect1>
+
+        <refsect1>
+            <title>Examples</title>
+            <para>
+                To get a shell:
+            </para>
+            <para><command>$ sudo koha-shell library</command></para>
+            <para>
+                To run a command:
+            </para>
+            <para><command>$ sudo koha-shell -c "/usr/share/koha/bin/migration_tools/bulkmarcimport.pl -b -file data.marc" library</command></para>
+        </refsect1>
+
+        <refsect1><title>See also</title>
+            <simplelist type="inline">
+                <member><command>koha-foreach(8)</command></member>
+                <member><command>su(1)</command></member>
+            </simplelist>
+        </refsect1>
+
+    </refentry>
+
+</article>
index 50affbd..2a5573e 100644 (file)
@@ -24,6 +24,7 @@ debian/scripts/koha-reset-passwd            usr/sbin
 debian/scripts/koha-restart-zebra           usr/sbin
 debian/scripts/koha-restore                 usr/sbin
 debian/scripts/koha-run-backups             usr/sbin
+debian/scripts/koha-shell                   usr/sbin
 debian/scripts/koha-start-zebra             usr/sbin
 debian/scripts/koha-stop-zebra              usr/sbin
 debian/scripts/koha-upgrade-schema          usr/sbin
index cb2eee3..0b75d09 100755 (executable)
@@ -92,10 +92,12 @@ override_dh_auto_install:
                $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
        install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/sprite.png  \
                $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
+       sed -i -e 's:url(.*/reset-fonts-grids.css.*):url("/opac-tmpl/lib/yui/reset-fonts-grids/reset-fonts-grids.css"):' \
+                  -e 's:url(.*/skin.css.*):url("/opac-tmpl/lib/yui/assets/skins/sam/skin.css"):' \
+               $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/opac.css \
+               $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/sco.css
        sed -i -e 's:url(.*/reset-fonts-grids.css.*):url(reset-fonts-grids.css):' \
                   -e 's:url(.*/skin.css.*):url(skin.css):' \
-               $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/opac.css \
-               $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/sco.css \
                $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css/staff-global*.css
        mkdir -p $(TMP)/debian/tmp_docbook
        xsltproc --output $(TMP)/debian/tmp_docbook/ \
index 0aafc52..74f879b 100755 (executable)
@@ -58,7 +58,7 @@ done
 for name in $(koha-list --enabled | grep -Fxv demo)
 do
     koha-dump "$name" > /dev/null
-    if [ -z "$dirname"]; then
+    if [ -z "$dirname" ]; then
         backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' /etc/koha/sites/$name/koha-conf.xml )";
     else
         backupdir="$dirname/$name";
diff --git a/debian/scripts/koha-shell b/debian/scripts/koha-shell
new file mode 100755 (executable)
index 0000000..8d05b51
--- /dev/null
@@ -0,0 +1,88 @@
+#!/usr/bin/perl
+# koha-shell -- put you in a shell with a koha environment set up
+# Copyright 2012  Catalyst IT, Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use Getopt::Long;
+use Modern::Perl;
+
+Getopt::Long::Configure("bundling");
+
+my %opts;
+my $res = GetOptions( \%opts, "command|c=s", "help|h", "login|l", "shell|s=s",
+    "preserve-environment|p|m", "verbose|v" );
+
+if ( !$res || $opts{help} ) {
+    show_help( !$res );
+    exit( !$res );
+}
+
+if ( !@ARGV ) {
+    show_help( 1, "An instance name must be supplied." );
+    exit(1);
+}
+my $instance = shift @ARGV;
+if ( !-e "/etc/koha/sites/$instance" ) {
+    show_help( 1, "The instance doesn't exist: $instance" );
+    exit(1);
+}
+my $shell = $opts{shell} || $ENV{SHELL} || '/bin/sh';
+
+# Now we're set up, build the 'su' command
+my @su_args;
+push @su_args, '/bin/su';
+push @su_args, '--preserve-environment' if $opts{'preserve-environment'};
+push @su_args, '--login' if $opts{login};
+push @su_args, '--command',
+    "env "
+  . "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml "
+  . "PERL5LIB=/usr/share/koha/lib $shell"
+  . ( $opts{command} ? " -c '$opts{command}'" : '' );
+push @su_args, "$instance-koha";
+
+print "Command: '".join("' '",@su_args)."'\n" if $opts{verbose};
+system(@su_args);
+if ( $? == -1 ) {
+    print STDERR "failed to execute: $!\n";
+}
+elsif ( $? & 127 ) {
+    printf STDERR "child died with signal %d, %s coredump\n",
+      ( $? & 127 ), ( $? & 128 ) ? 'with' : 'without';
+}
+
+sub show_help {
+    my ( $err, $msg ) = @_;
+
+    my $fh = $err ? *STDERR : *STDOUT;
+    say $fh "Error: " . $msg if $msg;
+    print $fh $_ while <DATA>;
+}
+
+__DATA__
+koha-shell -- gives you a shell with your Koha environment set up
+
+Usage: koha-shell [options] [instance name]
+
+Options:
+    -c, --command COMMAND   pass COMMAND to the invoked shell
+    -h, --help              show this help and quit
+    -l, --login             make the shell a login shell
+    -m, -p,
+    --preserve-environment  do not reset environment variables
+    -s, --shell SHELL       use SHELL instead of the one from your environment
+    -v, --verbose           output the full command that will be executed
+
+The default shell is the one currently in use. Refer to su(1) for more detail
+on these options.
index f547042..d1d94c2 100644 (file)
@@ -640,4 +640,10 @@ October 22 2012    Mathieu Saby becomes the 193rd developer to have a patch pushed
 October 22 2012        Koha 3.8.6 released     releases
 October 23 2012        Koha 3.6.10 released    releases
 October 26 2012        Robert Williams becomes the 194th developer to have a patch pushed
+November 22 2012       Koha 3.8.7 released     releases
+November 23 2012       Koha 3.10.0 released    releases
+December 12 2012       Romina Racca becomes the 195th developer to have a patch pushed
+December 17 2012       Vitor Fernandes becomes the 196th developer to have a patch pushed
+December 21 2012       Nadia Nicolaides becomes the 197th developer to have a patch pushed
+December 27 2012       Bernardo Gonzalez Kriegel becomes the 198th developer to have a patch pushed
 
index 5a34eb2..752cd57 100644 (file)
@@ -24,6 +24,7 @@ authority-zebra-indexdefs.xsl`
   <!-- Original record ID -->
   <kohaidx:index_control_field tag="001">
     <kohaidx:target_index>Local-Number:w</kohaidx:target_index>
+    <kohaidx:target_index>Local-Number:n</kohaidx:target_index>
     <kohaidx:target_index>Local-Number:s</kohaidx:target_index>
   </kohaidx:index_control_field>
   
index 02509b3..1a9257b 100644 (file)
@@ -50,7 +50,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
     </z:index>
   </xslo:template>
   <xslo:template match="marc:controlfield[@tag='001']">
-    <z:index name="Local-Number:w Local-Number:s">
+    <z:index name="Local-Number:w Local-Number:n Local-Number:s">
       <xslo:value-of select="."/>
     </z:index>
   </xslo:template>
index dcd2c24..f185887 100644 (file)
@@ -19,7 +19,7 @@ systag sysno rank
 xpath enable
 
 all any
-melm 001 Local-Number,Local-Number:s
+melm 001 Local-Number,Local-Number:n,Local-Number:s
 melm 942$a authtype:w,authtype:p
 
 # Personal Name
@@ -46,6 +46,12 @@ melm 130 Title-uniform:w,Title-uniform:p,Title-uniform:s,Heading:w,Heading:p,Hea
 melm 431 Title-uniform-see-from:w,Title-uniform-see-from:p,Title-uniform-see-from:s,See-from:w,See-from:p,See-from:s,Match:w,Match:p
 melm 531 Title-uniform-see-also-from:w,Title-uniform-see-also-from:p,Title-uniform-see-also-from:s,See-also-from:w,See-also-from:p,See-also-from:s,Match:w,Match:p
 
+# Chronological Term
+melm 148$a Chronological-term-heading:w,Chronological-term-heading:p,Chronological-term-heading:s,Chronological-term:w,Chronological-term:p,Heading:w,Heading:p,Heading:s,Heading-Main:w,Heading-Main:p,Heading-Main:s
+melm 148 Chronological-term:w,Chronological-term:p,Chronological-term:s,Heading:w,Heading:p,Heading:s
+melm 448 Chronological-term-see-from:w,Chronological-term-see-from:p,Chronological-term-see-from:s,See-from:w,See-from:p,See-from:s
+melm 548 Chronological-term-see-also-from:w,Chronological-term-see-also-from:p,Chronological-term-see-also-from:s,See-also-from:w,See-also-from:p,See-also-from:s
+
 # Topical Term
 melm 150$a Subject-topical-heading:w,Subject-topical-heading:p,Subject-topical-heading:s,Subject-topical:w,Subject-topical:p,Heading:w,Heading:p,Heading:s,Heading-Main:w,Heading-Main:p,Heading-Main:s,Match:w,Match:p,Match-heading:w,Match-heading:p
 melm 150 Subject-topical:w,Subject-topical:p,Subject-topical:s,Heading:w,Heading:p,Heading:s,Match:w,Match:p,Match-heading:w,Match-heading:p
index 18245c0..c6ed01f 100644 (file)
@@ -11,7 +11,7 @@ systag sysno rank
 xpath enable
 
 all any
-melm 001 Local-Number,Local-Number:s
+melm 001 Local-Number,Local-Number:n,Local-Number:s
 melm 942$a authtype
 melm 152$b authtype:w,authtype:p
 
index 8eecf1c..ceaba51 100644 (file)
     <target_index>ISSN:w</target_index>
     <target_index>Identifier-standard:w</target_index>
   </index_subfields>
-  <!--record.abs line 42: melm 200$b      itemtype:w,itemtype:p,itype:w,itype:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="200" subfields="b">
-    <target_index>itemtype:w</target_index>
-    <target_index>itemtype:p</target_index>
-    <target_index>itype:w</target_index>
-    <target_index>itype:p</target_index>
+  <!--record.abs line 44: melm 011$f    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="011" subfields="f">
+    <target_index>Identifier-standard:w</target_index>
   </index_subfields>
-  <!--record.abs line 43: melm 995$r      itemtype:w,itemtype:p,itype:w,itype:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="995" subfields="r">
-    <target_index>itemtype:w</target_index>
-    <target_index>itemtype:p</target_index>
-    <target_index>itype:w</target_index>
-    <target_index>itype:p</target_index>
+  <!--record.abs line 45: melm 011$g    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="011" subfields="g">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 47: melm 012$a    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="012" subfields="a">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 49: melm 013$a    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="013" subfields="a">
+    <target_index>Identifier-standard:w</target_index>
   </index_subfields>
-  <!--record.abs line 44: melm 071$a       Music-number:w,Identifier-standard:w-->
+  <!--record.abs line 50: melm 013$z    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="013" subfields="z">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 52: melm 014$a    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="014" subfields="a">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 53: melm 014$z    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="014" subfields="z">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 55: melm 015$a    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="015" subfields="a">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 56: melm 015$z    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="015" subfields="z">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 58: melm 016$a    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="016" subfields="a">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 59: melm 016$z    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="016" subfields="z">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 61: melm 017$a    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="017" subfields="a">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 62: melm 017$z    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="017" subfields="z">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 72: melm 040$a    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="040" subfields="a">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 73: melm 040$z    Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="040" subfields="z">
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 75: melm 071$a       Music-number:w,Identifier-standard:w-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="071" subfields="a">
     <target_index>Music-number:w</target_index>
     <target_index>Identifier-standard:w</target_index>
   </index_subfields>
-  <!--record.abs line 45: melm 072$a   UPC:w,Identifier-standard:w-->
+  <!--record.abs line 76: melm 071$z       Music-number:w,Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="071" subfields="z">
+    <target_index>Music-number:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 77: melm 071$b       Publisher,Publisher:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="071" subfields="b">
+    <target_index>Publisher:w</target_index>
+    <target_index>Publisher:p</target_index>
+  </index_subfields>
+  <!--record.abs line 79: melm 072$a   UPC:w,Identifier-standard:w-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="072" subfields="a">
     <target_index>UPC:w</target_index>
     <target_index>Identifier-standard:w</target_index>
   </index_subfields>
-  <!--record.abs line 46: melm 073$a       EAN:w,Identifier-standard:w-->
+  <!--record.abs line 80: melm 072$z   UPC:w,Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="072" subfields="z">
+    <target_index>UPC:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 82: melm 073$a       EAN:w,Identifier-standard:w-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="073" subfields="a">
     <target_index>EAN:w</target_index>
     <target_index>Identifier-standard:w</target_index>
   </index_subfields>
+  <!--record.abs line 83: melm 073$z       EAN:w,Identifier-standard:w-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="073" subfields="z">
+    <target_index>EAN:w</target_index>
+    <target_index>Identifier-standard:w</target_index>
+  </index_subfields>
+  <!--record.abs line 86: melm 200$b      itemtype:w,itemtype:p,itype:w,itype:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="200" subfields="b">
+    <target_index>itemtype:w</target_index>
+    <target_index>itemtype:p</target_index>
+    <target_index>itype:w</target_index>
+    <target_index>itype:p</target_index>
+  </index_subfields>
+  <!--record.abs line 87: melm 995$r      itemtype:w,itemtype:p,itype:w,itype:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="995" subfields="r">
+    <target_index>itemtype:w</target_index>
+    <target_index>itemtype:p</target_index>
+    <target_index>itype:w</target_index>
+    <target_index>itype:p</target_index>
+  </index_subfields>
   <!--record.abs line 48: melm 100$a      tpubdate:s:range(data,8,1),ta:w:range(data,17,1),ta:w:range(data,18,1),ta:w:range(data,19,1),Modified-code:n:range(data,21,1),ln:s:range(data,22,3),char-encoding:n:range(data,26,2),char-encoding:n:range(data,28,2),char-encoding:n:range(data,30,2),script-Title:n:range(data,34,2)-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="100" subfields="a">
     <target_index>tpubdate:s</target_index>
     <target_index>Graphics-support:w</target_index>
     <target_index>Graphics-support:w</target_index>
   </index_subfields>
-  <!--record.abs line 82: melm 680$b           LC-call-number:s-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="680" subfields="b">
-    <target_index>LC-call-number:s</target_index>
-  </index_subfields>
-  <!--record.abs line 83: melm 680             LC-call-number-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="680">
-    <target_index>LC-call-number:w</target_index>
-  </index_data_field>
-  <!--record.abs line 86: melm 200$b      itype:w,itype:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="200" subfields="b">
-    <target_index>itype:w</target_index>
-    <target_index>itype:p</target_index>
-  </index_subfields>
   <!--record.abs line 92: melm 200$f           Author:w,Author:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="200" subfields="f">
     <target_index>Author:w</target_index>
     <target_index>Corporate-name:p</target_index>
     <target_index>Conference-name:p</target_index>
   </index_data_field>
+  <!--record.abs line 147: melm 716$9        Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="716" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
+  <!--record.abs line 148: melm 716    Author:w,Author:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="716">
+    <target_index>Author:w</target_index>
+    <target_index>Author:p</target_index>
+  </index_data_field>
+  <!--record.abs line 151: melm 720$9        Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="720" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
+  <!--record.abs line 152: melm 720    Author:w,Author:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="720">
+    <target_index>Author:w</target_index>
+    <target_index>Author:p</target_index>
+  </index_data_field>
+  <!--record.abs line 153: melm 721$9        Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="721" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
+  <!--record.abs line 154: melm 721    Author:w,Author:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="721">
+    <target_index>Author:w</target_index>
+    <target_index>Author:p</target_index>
+  </index_data_field>
+  <!--record.abs line 155: melm 722$9        Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="722" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
+  <!--record.abs line 156: melm 722    Author:w,Author:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="722">
+    <target_index>Author:w</target_index>
+    <target_index>Author:p</target_index>
+  </index_data_field>
+  <!--record.abs line 159: melm 730$9        Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="730" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
+  <!--record.abs line 160: melm 730    Author:w,Author:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="730">
+    <target_index>Author:w</target_index>
+    <target_index>Author:p</target_index>
+  </index_data_field>
   <!--record.abs line 115: melm 200$a          Title:w,Title:p,Title:s,Title-cover:w,Title-cover:p,Title-cover:s-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="200" subfields="a">
     <target_index>Title:w</target_index>
     <target_index>Title-cover:w</target_index>
     <target_index>Title-cover:p</target_index>
   </index_subfields>
-  <!--record.abs line 123: melm 200$i          title:w,title:p,Title-cover:w,Title-cover:p-->
+  <!--record.abs line 123: melm 200$i          Title:w,Title:p,Title-cover:w,Title-cover:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="200" subfields="i">
-    <target_index>title:w</target_index>
-    <target_index>title:p</target_index>
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
     <target_index>Title-cover:w</target_index>
     <target_index>Title-cover:p</target_index>
   </index_subfields>
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_data_field>
-  <!--record.abs line 127: melm 208    Serials,Serials:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="208">
+  <!--record.abs line 127: melm 207    Serials,Serials:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="207">
     <target_index>Serials:w</target_index>
     <target_index>Serials:p</target_index>
   </index_data_field>
-  <!--record.abs line 128: melm 207    Printed-music,Printed-music:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="207">
+  <!--record.abs line 128: melm 208    Printed-music,Printed-music:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="208">
     <target_index>Printed-music:w</target_index>
     <target_index>Printed-music:p</target_index>
   </index_data_field>
+  <!--record.abs line 186: melm 230$a      Electronic-ressource-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="230" subfields="a">
+    <target_index>Electronic-ressource:w</target_index>
+  </index_subfields>
   <!--record.abs line 132: melm 210$a    pl,pl:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="210" subfields="a">
     <target_index>pl:w</target_index>
     <target_index>Title-series:w</target_index>
     <target_index>Title-series:p</target_index>
   </index_subfields>
-  <!--record.abs line 148: melm 225$i      Title-series,Title-series:p -->
+  <!--record.abs line 148: melm 225$i      Title-series,Title-series:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="225" subfields="i">
     <target_index>Title-series:w</target_index>
     <target_index>Title-series:p</target_index>
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="225" subfields="x">
     <target_index>ISSN:w</target_index>
   </index_subfields>
-  <!--record.abs line 153: melm 230$a      Electronic-ressource-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="230" subfields="a">
-    <target_index>Electronic-ressource:w</target_index>
-  </index_subfields>
   <!--record.abs line 156: melm 300$a    Note,Note:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="300" subfields="a">
     <target_index>Note:w</target_index>
     <target_index>Note:w</target_index>
     <target_index>Note:p</target_index>
   </index_data_field>
-  <!--record.abs line 165: melm 308$a    Note,Note:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="308" subfields="a">
-    <target_index>Note:w</target_index>
-    <target_index>Note:p</target_index>
-  </index_subfields>
   <!--record.abs line 166: melm 310$a    Note,Note:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="310" subfields="a">
     <target_index>Note:w</target_index>
     <target_index>Note:w</target_index>
     <target_index>Note:p</target_index>
   </index_data_field>
-  <!--record.abs line 184: melm 328$a    Note,Note:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="328" subfields="a">
-    <target_index>Note:w</target_index>
-    <target_index>Note:p</target_index>
-  </index_subfields>
   <!--record.abs line 185: melm 330$a    Abstract,Note:w,Abstract:p,Note:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="330" subfields="a">
     <target_index>Abstract:w</target_index>
     <target_index>Note:w</target_index>
     <target_index>Note:p</target_index>
   </index_subfields>
+  <!--record.abs line 273: melm 334$a    Note,Note:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="334" subfields="a">
+    <target_index>Note:w</target_index>
+    <target_index>Note:p</target_index>
+  </index_subfields>
   <!--record.abs line 188: melm 336$a    Note,Note:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="336" subfields="a">
     <target_index>Note:w</target_index>
     <target_index>Note:w</target_index>
     <target_index>Note:p</target_index>
   </index_subfields>
-  <!--record.abs line 195: melm 400$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="400" subfields="t">
+  <!--record.abs line 198: melm 410$t    Title-series,Title-series:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="410" subfields="t">
+    <target_index>Title-series:w</target_index>
+    <target_index>Title-series:p</target_index>
+  </index_subfields>
+  <!--record.abs line 284: melm 411$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="411" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 196: melm 401$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="401" subfields="t">
+  <!--record.abs line 199: melm 412$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="412" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 197: melm 403$t    Title,Title:p,Title-Uniform,Title-Uniform:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="403" subfields="t">
+  <!--record.abs line 286: melm 413$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="413" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
-    <target_index>Title-Uniform:w</target_index>
-    <target_index>Title-Uniform:p</target_index>
   </index_subfields>
-  <!--record.abs line 198: melm 410$t    Title-series,Title-series:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="410" subfields="t">
-    <target_index>Title-series:w</target_index>
-    <target_index>Title-series:p</target_index>
+  <!--record.abs line 287: melm 421$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="421" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 199: melm 412$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="412" subfields="t">
+  <!--record.abs line 288: melm 422$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="422" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 200: melm 413$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="413" subfields="t">
+  <!--record.abs line 289: melm 423$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="423" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 201: melm 414$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="414" subfields="t">
+  <!--record.abs line 290: melm 424$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="424" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 202: melm 415$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="415" subfields="t">
+  <!--record.abs line 291: melm 425$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="425" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 203: melm 416$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="416" subfields="t">
+  <!--record.abs line 292: melm 430$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="430" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 204: melm 417$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="417" subfields="t">
+  <!--record.abs line 293: melm 431$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="431" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 205: melm 418$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="418" subfields="t">
+  <!--record.abs line 294: melm 432$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="432" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 206: melm 419$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="419" subfields="t">
+  <!--record.abs line 295: melm 433$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="433" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 207: melm 420$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="420" subfields="t">
+  <!--record.abs line 296: melm 434$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="434" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 208: melm 430$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="430" subfields="t">
+  <!--record.abs line 297: melm 435$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="435" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 209: melm 431$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="431" subfields="t">
+  <!--record.abs line 298: melm 436$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="436" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 210: melm 432$t    Title,Title:p-->
-  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="432" subfields="t">
+  <!--record.abs line 299: melm 437$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="437" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 213: melm 445$t    Title,Title:p-->
+  <!--record.abs line 302: melm 442$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="442" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 303: melm 443$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="443" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 304: melm 444$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="444" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 305: melm 445$t    Title,Title:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="445" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
-  <!--record.abs line 214: melm 461$t    Title,Title-host:w,title-host:p-->
+  <!--record.abs line 306: melm 446$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="446" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 307: melm 447$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="447" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 308: melm 448$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="448" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 309: melm 451$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="451" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 310: melm 452$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="452" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 311: melm 453$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="453" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 312: melm 454$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="454" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 313: melm 455$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="455" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 314: melm 456$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="456" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 316: melm 461$t    Title,Title-host:w,title-host:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="461" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title-host:w</target_index>
     <target_index>title-host:p</target_index>
   </index_subfields>
-  <!--record.abs line 215: melm 464$t    Title,Title-host:w,title-host:p,Title:p-->
+  <!--record.abs line 317: melm 462$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="462" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 318: melm 463$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="463" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 320: melm 464$t    Title,Title-host:w,title-host:p,Title:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="464" subfields="t">
     <target_index>Title:w</target_index>
     <target_index>Title-host:w</target_index>
     <target_index>title-host:p</target_index>
     <target_index>Title:p</target_index>
   </index_subfields>
+  <!--record.abs line 321: melm 470$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="470" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 322: melm 481$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="481" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 323: melm 482$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="482" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 324: melm 488$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="488" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 328: melm 461$9    Host-Item-Number-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="461" subfields="9">
+    <target_index>Host-Item-Number:w</target_index>
+  </index_subfields>
+  <!--record.abs line 331: melm 400$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="400" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 332: melm 401$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="401" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 333: melm 403$t    Title,Title:p,Title-Uniform,Title-Uniform:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="403" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+    <target_index>Title-Uniform:w</target_index>
+    <target_index>Title-Uniform:p</target_index>
+  </index_subfields>
+  <!--record.abs line 334: melm 414$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="414" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 335: melm 415$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="415" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 336: melm 416$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="416" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 337: melm 417$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="417" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 338: melm 418$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="418" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 339: melm 419$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="419" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
+  <!--record.abs line 340: melm 420$t    Title,Title:p-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="420" subfields="t">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_subfields>
   <!--record.abs line 217: melm 400$d    pubdate:n-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="400" subfields="d">
     <target_index>pubdate:n</target_index>
     <target_index>Koha-Auth-Number:w</target_index>
     <target_index>Koha-Auth-Number:n</target_index>
   </index_subfields>
+  <!--record.abs melm 560$9    Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="560" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
   <!--record.abs line 262: melm 500            Title,Title:p-->
   <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="500">
     <target_index>Title:w</target_index>
     <target_index>Title:w</target_index>
     <target_index>Title:p</target_index>
   </index_data_field>
+  <!--record.abs melm 560              Title,Title:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="560">
+    <target_index>Title:w</target_index>
+    <target_index>Title:p</target_index>
+  </index_data_field>
   <!--record.abs line 283: melm 600$9      Koha-Auth-Number,Koha-Auth-Number:n-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="600" subfields="9">
     <target_index>Koha-Auth-Number:w</target_index>
     <target_index>Koha-Auth-Number:w</target_index>
     <target_index>Koha-Auth-Number:n</target_index>
   </index_subfields>
+  <!--record.abs melm 608$9      Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="608" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
   <!--record.abs line 291: melm 610$9      Koha-Auth-Number,Koha-Auth-Number:n-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="610" subfields="9">
     <target_index>Koha-Auth-Number:w</target_index>
     <target_index>Koha-Auth-Number:n</target_index>
   </index_subfields>
+  <!--record.abs melm 615$9      Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="615" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
+  <!--record.abs melm 616$9      Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="616" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
+  <!--record.abs melm 617$9      Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="617" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
+  <!--record.abs melm 620$9      Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="620" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
+  <!--record.abs melm 621$9      Koha-Auth-Number,Koha-Auth-Number:n-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="621" subfields="9">
+    <target_index>Koha-Auth-Number:w</target_index>
+    <target_index>Koha-Auth-Number:n</target_index>
+  </index_subfields>
   <!--record.abs line 292: melm 630$9      Koha-Auth-Number,Koha-Auth-Number:n-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="630" subfields="9">
     <target_index>Koha-Auth-Number:w</target_index>
     <target_index>Koha-Auth-Number:w</target_index>
     <target_index>Koha-Auth-Number:n</target_index>
   </index_subfields>
-  <!--record.abs line 300: melm 600$a          Personal-name,Personal-name:p,Subject,Subject:p-->
+  <!--record.abs line 300: melm 600$a          Personal-name,Personal-name:p,Subject,Subject:p-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="600" subfields="a">
     <target_index>Personal-name:w</target_index>
     <target_index>Personal-name:p</target_index>
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 306: melm 604            Subject,Subject:p-->
+  <!--record.abs line 306: melm 604            Subject,Subject:p-->
   <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="604">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 310: melm 630            Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="630">
+  <!--record.abs line 445: melm 608                Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="608">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 311: melm 631            Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="631">
+  <!--record.abs line 446: melm 610                Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="610">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 312: melm 632            Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="632">
+  <!--record.abs line 447: melm 615                Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="615">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 313: melm 633            Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="633">
+  <!--record.abs line 448: melm 616                Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="616">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 314: melm 634            Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="634">
+  <!--record.abs line 449: melm 617                Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="617">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 315: melm 635            Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="635">
+  <!--record.abs line 450: melm 620                Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="620">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 316: melm 636            Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="636">
+  <!--record.abs line 451: melm 621                Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="621">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 317: melm 610            Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="610">
+  <!--record.abs line 460: melm 603      Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="603">
+    <target_index>Subject:w</target_index>
+    <target_index>Subject:p</target_index>
+  </index_data_field>
+  <!--record.abs line 310: melm 630            Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="630">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 318: melm 640        Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="640">
+  <!--record.abs line 311: melm 631            Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="631">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 319: melm 641        Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="641">
+  <!--record.abs line 312: melm 632            Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="632">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 320: melm 642        Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="642">
+  <!--record.abs line 313: melm 633            Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="633">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 321: melm 643        Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="643">
+  <!--record.abs line 314: melm 634            Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="634">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 322: melm 644        Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="644">
+  <!--record.abs line 315: melm 635            Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="635">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 323: melm 645        Subject,Subject:p-->
-  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="645">
+  <!--record.abs line 316: melm 636            Subject,Subject:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="636">
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
     <target_index>Subject:w</target_index>
     <target_index>Subject:p</target_index>
   </index_data_field>
-  <!--record.abs line 328: melm 676$a          Dewey-classification:w,Dewey-classification:s-->
+  <!--record.abs line 471: melm 670            Subject-precis:w,Subject-precis:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="670">
+    <target_index>Subject-precis:w</target_index>
+    <target_index>Subject-precis:p</target_index>
+  </index_data_field>
+  <!--record.abs line 473: melm 675$a          UDC-classification:w,UDC-classification:p,UDC-classification:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="675" subfields="a">
+    <target_index>UDC-classification:w</target_index>
+    <target_index>UDC-classification:p</target_index>
+    <target_index>UDC-classification:s</target_index>
+  </index_subfields>
+  <!--record.abs line 328: melm 676$a          Dewey-classification:w,Dewey-classification:p,Dewey-classification:s-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="676" subfields="a">
     <target_index>Dewey-classification:w</target_index>
+    <target_index>Dewey-classification:p</target_index>
     <target_index>Dewey-classification:s</target_index>
   </index_subfields>
+  <!--record.abs line 477: melm 680$b          LC-call-number:s-->
+  <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="680" subfields="b">
+    <target_index>LC-call-number:s</target_index>
+  </index_subfields>
+  <!--record.abs line 478: melm 680            LC-call-number:w,LC-call-number:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="680">
+    <target_index>LC-call-number:w</target_index>
+    <target_index>LC-call-number:p</target_index>
+  </index_data_field>
+  <!--record.abs line 480: melm 686            Local-classification:w,Local-classification:p-->
+  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs" tag="686">
+    <target_index>Local-classification:w</target_index>
+    <target_index>Local-classification:p</target_index>
+  </index_data_field>
   <!--record.abs line 331: melm 995$2          lost,lost:n,item-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="995" subfields="2">
     <target_index>lost:w</target_index>
     <target_index>Record-Source:w</target_index>
     <target_index>item:w</target_index>
   </index_subfields>
-  <!--record.abs line 335: melm 995$d          holdingbranch,Record-Source,item-->
+  <!--record.abs line 335: melm 995$d          holdingbranch,Record-Source,item-->
   <index_subfields xmlns="http://www.koha-community.org/schemas/index-defs" tag="995" subfields="d">
     <target_index>holdingbranch:w</target_index>
     <target_index>Record-Source:w</target_index>
index 46e190f..f1e82e3 100644 (file)
@@ -127,18 +127,185 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
         </z:index>
       </xslo:if>
     </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('f', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('g', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='200']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='012']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='013']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('z', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='014']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('z', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='015']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('z', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='016']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('z', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='017']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('z', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='040']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('z', @code)">
+        <z:index name="Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='071']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Music-number:w Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('z', @code)">
+        <z:index name="Music-number:w Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('b', @code)">
-        <z:index name="itemtype:w itemtype:p itype:w itype:p">
+        <z:index name="Publisher:w Publisher:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='072']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="UPC:w Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('z', @code)">
+        <z:index name="UPC:w Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='073']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="EAN:w Identifier-standard:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('z', @code)">
+        <z:index name="EAN:w Identifier-standard:w">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='200']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('b', @code)">
-        <z:index name="itype:w itype:p">
+        <z:index name="itemtype:w itemtype:p itype:w itype:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -187,7 +354,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
     </xslo:for-each>
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('i', @code)">
-        <z:index name="title:w title:p Title-cover:w Title-cover:p">
+        <z:index name="Title:w Title:p Title-cover:w Title-cover:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -286,115 +453,122 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='071']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="Music-number:w Identifier-standard:w">
+        <z:index name="tpubdate:s ta:w ta:w ta:w Modified-code:n ln:s char-encoding:n char-encoding:n char-encoding:n script-Title:n">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='072']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='101']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="UPC:w Identifier-standard:w">
+        <z:index name="ln:w">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='073']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='102']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="EAN:w Identifier-standard:w">
+        <z:index name="Country-heading:w">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='105']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="tpubdate:s ta:w ta:w ta:w Modified-code:n ln:s char-encoding:n char-encoding:n char-encoding:n script-Title:n">
+        <z:index name="Illustration-code:w Content-type:w Content-type:w Content-type:w Content-type:w Conference-code:w Festschrift-indicator:w Index-indicator:w Literature-Code:w Biography-Code:w">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='101']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='106']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="ln:w">
+        <z:index name="itype:w itype:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='102']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="Country-heading:w">
+        <z:index name="Type-Of-Serial:w Frequency-code:w Regularity-code:w Content-type:w Content-type:w Conference-publication-Code:w Title-Page-availability-Code:w Index-availability-Code:w Cumulative-Index-availability-Code:w">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='105']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='115']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="Illustration-code:w Content-type:w Content-type:w Content-type:w Content-type:w Conference-code:w Festschrift-indicator:w Index-indicator:w Literature-Code:w Biography-Code:w">
+        <z:index name="Video-mt:w">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='106']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='116']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="itype:w itype:p">
+        <z:index name="Graphics-type:w Graphics-support:w Graphics-support:w">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="Type-Of-Serial:w Frequency-code:w Regularity-code:w Content-type:w Content-type:w Conference-publication-Code:w Title-Page-availability-Code:w Index-availability-Code:w Cumulative-Index-availability-Code:w">
+        <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:w Author:s">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='115']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='701']">
     <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('a', @code)">
-        <z:index name="Video-mt:w">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='116']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='702']">
     <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('a', @code)">
-        <z:index name="Graphics-type:w Graphics-support:w Graphics-support:w">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='680']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='710']">
     <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('b', @code)">
-        <z:index name="LC-call-number:s">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='711']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
         <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
@@ -402,15 +576,17 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
         </z:index>
       </xslo:if>
     </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='712']">
     <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('a', @code)">
-        <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:w Author:s">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='701']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='716']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
         <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
@@ -419,7 +595,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='702']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='720']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
         <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
@@ -428,7 +604,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='710']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='721']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
         <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
@@ -437,7 +613,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='711']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='722']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
         <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
@@ -446,7 +622,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='712']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='730']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
         <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
@@ -455,6 +631,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='230']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="Electronic-ressource:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='210']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
@@ -536,15 +721,6 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='230']">
-    <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('a', @code)">
-        <z:index name="Electronic-ressource:w">
-          <xslo:value-of select="."/>
-        </z:index>
-      </xslo:if>
-    </xslo:for-each>
-  </xslo:template>
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='300']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
@@ -617,15 +793,6 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='308']">
-    <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('a', @code)">
-        <z:index name="Note:w Note:p">
-          <xslo:value-of select="."/>
-        </z:index>
-      </xslo:if>
-    </xslo:for-each>
-  </xslo:template>
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='310']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
@@ -779,25 +946,25 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='328']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='330']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="Note:w Note:p">
+        <z:index name="Abstract:w Note:w Abstract:p Note:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='330']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='332']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="Abstract:w Note:w Abstract:p Note:p">
+        <z:index name="Note:w Note:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='332']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='333']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
         <z:index name="Note:w Note:p">
@@ -806,7 +973,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='333']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='334']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
         <z:index name="Note:w Note:p">
@@ -842,7 +1009,32 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='400']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='410']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title-series:w Title-series:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('d', @code)">
+        <z:index name="pubdate:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='411']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='412']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -858,7 +1050,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='401']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='413']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -874,10 +1066,55 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='403']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='421']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
-        <z:index name="Title:w Title:p Title-Uniform:w Title-Uniform:p">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='422']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='423']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='424']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='425']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='430']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -890,10 +1127,10 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='410']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='431']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
-        <z:index name="Title-series:w Title-series:p">
+        <z:index name="Title:w Title:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -906,7 +1143,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='412']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='432']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -922,7 +1159,52 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='413']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='433']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='434']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='435']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='436']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='437']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='440']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -938,7 +1220,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='414']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='441']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -954,7 +1236,34 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='415']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='442']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='443']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='444']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='445']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -970,7 +1279,79 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='416']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='446']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='447']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='448']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='451']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='452']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='453']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='454']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='455']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='456']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -978,6 +1359,22 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
         </z:index>
       </xslo:if>
     </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='461']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title-host:w title-host:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Host-Item-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('d', @code)">
         <z:index name="pubdate:n">
@@ -985,8 +1382,42 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
         </z:index>
       </xslo:if>
     </xslo:for-each>
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Host-Item-Number:w">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='417']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='462']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='463']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='464']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title-host:w title-host:p Title:p">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='470']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -994,15 +1425,17 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
         </z:index>
       </xslo:if>
     </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='481']">
     <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('d', @code)">
-        <z:index name="pubdate:n">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='418']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='482']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -1010,15 +1443,17 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
         </z:index>
       </xslo:if>
     </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='488']">
     <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('d', @code)">
-        <z:index name="pubdate:n">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='419']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='400']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -1034,7 +1469,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='420']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='401']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -1050,10 +1485,10 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='430']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='403']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
-        <z:index name="Title:w Title:p">
+        <z:index name="Title:w Title:p Title-Uniform:w Title-Uniform:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -1066,7 +1501,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='431']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='414']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -1082,7 +1517,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='432']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='415']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -1098,7 +1533,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='440']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='416']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -1114,7 +1549,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='441']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='417']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -1130,7 +1565,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='445']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='418']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
         <z:index name="Title:w Title:p">
@@ -1146,10 +1581,10 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='461']">
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='419']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('t', @code)">
-        <z:index name="Title:w Title-host:w title-host:p">
+        <z:index name="Title:w Title:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -1161,18 +1596,18 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
         </z:index>
       </xslo:if>
     </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='420']">
     <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('9', @code)">
-        <z:index name="Host-Item-Number:w">
+      <xslo:if test="contains('t', @code)">
+        <z:index name="Title:w Title:p">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
     </xslo:for-each>
-  </xslo:template>
-  <xslo:template mode="index_subfields" match="marc:datafield[@tag='464']">
     <xslo:for-each select="marc:subfield">
-      <xslo:if test="contains('t', @code)">
-        <z:index name="Title:w Title-host:w title-host:p Title:p">
+      <xslo:if test="contains('d', @code)">
+        <z:index name="pubdate:n">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -1349,6 +1784,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='560']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='600']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
@@ -1442,6 +1886,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='608']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='610']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
@@ -1451,6 +1904,51 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='615']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='616']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='617']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='620']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='621']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('9', @code)">
+        <z:index name="Koha-Auth-Number:w Koha-Auth-Number:n">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='630']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('9', @code)">
@@ -1514,10 +2012,28 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='675']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('a', @code)">
+        <z:index name="UDC-classification:w UDC-classification:p UDC-classification:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
   <xslo:template mode="index_subfields" match="marc:datafield[@tag='676']">
     <xslo:for-each select="marc:subfield">
       <xslo:if test="contains('a', @code)">
-        <z:index name="Dewey-classification:w Dewey-classification:s">
+        <z:index name="Dewey-classification:w Dewey-classification:p Dewey-classification:s">
+          <xslo:value-of select="."/>
+        </z:index>
+      </xslo:if>
+    </xslo:for-each>
+  </xslo:template>
+  <xslo:template mode="index_subfields" match="marc:datafield[@tag='680']">
+    <xslo:for-each select="marc:subfield">
+      <xslo:if test="contains('b', @code)">
+        <z:index name="LC-call-number:s">
           <xslo:value-of select="."/>
         </z:index>
       </xslo:if>
@@ -1532,8 +2048,8 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </xslo:if>
     </xslo:for-each>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='680']">
-    <z:index name="LC-call-number:w">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='700']">
+    <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
           <xslo:if test="position() &gt; 1">
@@ -1545,7 +2061,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='700']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='701']">
     <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -1558,7 +2074,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='701']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='702']">
     <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -1571,8 +2087,8 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='702']">
-    <z:index name="Author:w Personal-name:w Author:p Personal-name:p Personal-name:p">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='710']">
+    <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
           <xslo:if test="position() &gt; 1">
@@ -1584,7 +2100,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='710']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='711']">
     <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -1597,7 +2113,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='711']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='712']">
     <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -1610,8 +2126,60 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='712']">
-    <z:index name="Author:w Author-name-corporate:w Author-name-conference:w Corporate-name:w Conference-name:w Author:p Author-name-corporate:p Author-name-conference:p Corporate-name:p Conference-name:p">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='716']">
+    <z:index name="Author:w Author:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='720']">
+    <z:index name="Author:w Author:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='721']">
+    <z:index name="Author:w Author:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='722']">
+    <z:index name="Author:w Author:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='730']">
+    <z:index name="Author:w Author:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
           <xslo:if test="position() &gt; 1">
@@ -1636,7 +2204,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='208']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='207']">
     <z:index name="Serials:w Serials:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -1649,7 +2217,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='207']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='208']">
     <z:index name="Printed-music:w Printed-music:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -1948,6 +2516,19 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='560']">
+    <z:index name="Title:w Title:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
   <xslo:template mode="index_data_field" match="marc:datafield[@tag='600']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
@@ -2039,7 +2620,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='630']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='608']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2052,7 +2633,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='631']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='610']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2065,7 +2646,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='632']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='615']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2078,7 +2659,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='633']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='616']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2091,7 +2672,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='634']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='617']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2104,7 +2685,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='635']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='620']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2117,7 +2698,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='636']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='621']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2130,7 +2711,20 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='610']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='603']">
+    <z:index name="Subject:w Subject:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='630']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2143,7 +2737,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='640']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='631']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2156,7 +2750,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='641']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='632']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2169,7 +2763,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='642']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='633']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2182,7 +2776,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='643']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='634']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2195,7 +2789,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='644']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='635']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2208,7 +2802,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
-  <xslo:template mode="index_data_field" match="marc:datafield[@tag='645']">
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='636']">
     <z:index name="Subject:w Subject:p">
       <xslo:variable name="raw_heading">
         <xslo:for-each select="marc:subfield">
@@ -2234,6 +2828,45 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="normalize-space($raw_heading)"/>
     </z:index>
   </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='670']">
+    <z:index name="Subject-precis:w Subject-precis:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='680']">
+    <z:index name="LC-call-number:w LC-call-number:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
+  <xslo:template mode="index_data_field" match="marc:datafield[@tag='686']">
+    <z:index name="Local-classification:w Local-classification:p">
+      <xslo:variable name="raw_heading">
+        <xslo:for-each select="marc:subfield">
+          <xslo:if test="position() &gt; 1">
+            <xslo:value-of select="substring(' ', 1, 1)"/>
+          </xslo:if>
+          <xslo:value-of select="."/>
+        </xslo:for-each>
+      </xslo:variable>
+      <xslo:value-of select="normalize-space($raw_heading)"/>
+    </z:index>
+  </xslo:template>
   <xslo:template mode="index_data_field" match="marc:datafield[@tag='995']">
     <z:index name="item # just to index every subfield:w">
       <xslo:variable name="raw_heading">
index dcbc7a1..44a5bbe 100644 (file)
@@ -21,6 +21,7 @@ systag sysno rank
 xpath disable
 
 all any
+############ IDENTIFICATION NUMBERS ##################
 melm 001        Local-number,Local-number:n
 # Local-number (biblionumber can be either in 090$9 or, on some setup, on 001)
 melm 009      Identifier-standard:w,Identifier-standard:n
@@ -29,22 +30,63 @@ melm 099$c      date-entered-on-file:s,date-entered-on-file:n,date-entered-on-fi
 melm 099$d      Date/time-last-modified:s,Date/time-last-modified:n,Date/time-last-modified:y
 melm 099$t      ccode:w
 
-
+# ISBN
 melm 010$a    ISBN:w
 # wrong ISBN
 melm 010$z    ISBN:w,Identifier-standard:w
+# ISSN
 melm 011$a    ISSN:w,Identifier-standard:w
 # cancelled ISSN
 melm 011$y    ISSN:w,Identifier-standard:w
 # wrong ISSN
 melm 011$z    ISSN:w,Identifier-standard:w
-
-melm 200$b      itemtype:w,itemtype:p,itype:w,itype:p
-melm 995$r      itemtype:w,itemtype:p,itype:w,itype:p
+# L-ISSN
+melm 011$f    Identifier-standard:w
+melm 011$g    Identifier-standard:w
+# Fingerprint (ancient books)
+melm 012$a    Identifier-standard:w
+# ISMN
+melm 013$a    Identifier-standard:w
+melm 013$z    Identifier-standard:w
+# Article indentifier
+melm 014$a    Identifier-standard:w
+melm 014$z    Identifier-standard:w
+# ISRN
+melm 015$a    Identifier-standard:w
+melm 015$z    Identifier-standard:w
+# ISRC
+melm 016$a    Identifier-standard:w
+melm 016$z    Identifier-standard:w
+# Other identifiers (DOI...)
+melm 017$a    Identifier-standard:w
+melm 017$z    Identifier-standard:w
+# National bibliography
+# uncomment to index
+# melm 020$a    Identifier-standard:w
+# melm 020$z    Identifier-standard:w
+# Legal deposit
+# uncomment to index
+# melm 021$a    Identifier-standard:w
+# melm 021$z    Identifier-standard:w
+# CODEN
+melm 040$a    Identifier-standard:w
+melm 040$z    Identifier-standard:w
+# Publisher's number (for music)
 melm 071$a         Music-number:w,Identifier-standard:w
+melm 071$z         Music-number:w,Identifier-standard:w
+melm 071$b         Publisher,Publisher:p
+# UPC
 melm 072$a     UPC:w,Identifier-standard:w
+melm 072$z     UPC:w,Identifier-standard:w
+# EAN
 melm 073$a         EAN:w,Identifier-standard:w
+melm 073$z         EAN:w,Identifier-standard:w
+
+############ ITEM TYPE ##################
+melm 200$b      itemtype:w,itemtype:p,itype:w,itype:p
+melm 995$r      itemtype:w,itemtype:p,itype:w,itype:p
 
+############ CODED INFORMATIONS ##################
 melm 100$a      tpubdate:s:range(data,8,1),ta:w:range(data,17,1),ta:w:range(data,18,1),ta:w:range(data,19,1),Modified-code:n:range(data,21,1),ln:s:range(data,22,3),char-encoding:n:range(data,26,2),char-encoding:n:range(data,28,2),char-encoding:n:range(data,30,2),script-Title:n:range(data,34,2)
 melm 101$a     ln
 melm 102$a     Country-heading
@@ -78,15 +120,6 @@ melm 115$a     Video-mt:w:range(data,0,1)
 
 melm 116$a     Graphics-type:w:range(data,0,1),Graphics-support:w:range(data,1,1),Graphics-support:w:range(data,2,1),
 
-
-melm 680$b             LC-call-number:s
-melm 680               LC-call-number
-#melm 001              Identifier-standard:w
-
-melm 200$b      itype:w,itype:p
-
-#melm 100$9            Cross-Reference !:w
-
 ############ AUTHORS ##################
 # main Author
 melm 200$f             Author:w,Author:p
@@ -110,32 +143,57 @@ melm 711    Author,Author-name-corporate,Author-name-conference,Corporate-name,C
 melm 712$9        Koha-Auth-Number,Koha-Auth-Number:n
 melm 712    Author,Author-name-corporate,Author-name-conference,Corporate-name,Conference-name,Author:p,Author-name-corporate:p,Author-name-conference:p,Corporate-name:p,Conference-name:p
 
+# trademark Author : 716
+melm 716$9        Koha-Auth-Number,Koha-Auth-Number:n
+melm 716    Author:w,Author:p
+
+# family Author : 72X
+melm 720$9        Koha-Auth-Number,Koha-Auth-Number:n
+melm 720    Author:w,Author:p
+melm 721$9        Koha-Auth-Number,Koha-Auth-Number:n
+melm 721    Author:w,Author:p
+melm 722$9        Koha-Auth-Number,Koha-Auth-Number:n
+melm 722    Author:w,Author:p
+
+# name-responsabily Author
+melm 730$9        Koha-Auth-Number,Koha-Auth-Number:n
+melm 730    Author:w,Author:p
+
+# 740-742 = uniform and conventional headings for legal and religious texts. Use not recommended in France (503 used instead, see http://multimedia.bnf.fr/unimarcb_trad/B7XX-6-2011.pdf )
+
 ############## TITLE ##################
 # main Title
+# Keep Title-cover (used for in query weighting algorithm)
 melm 200$a             Title:w,Title:p,Title:s,Title-cover:w,Title-cover:p,Title-cover:s
-# Title 2
+# Title from an other author
 melm 200$c             Title:w,Title:p
-# // Title
+# Parallel title
 melm 200$d             Title:w,Title:p
-# subTitle
+# subtitle
 melm 200$e             Title:w,Title:p,Title-cover:w,Title-cover:p
+# volume : do not index
+# melm 200$h           Title:w,Title:p
 # part title
-melm 200$i             title:w,title:p,Title-cover:w,Title-cover:p
+melm 200$i             Title:w,Title:p,Title-cover:w,Title-cover:p
 
+# edition statement
 melm 205        Title,Title:p
 
-melm 208    Serials,Serials:p
-melm 207    Printed-music,Printed-music:p
-
-
+########## MATERIAL SPECIFIC AREA #################
+# TODO 206
+melm 207    Serials,Serials:p
+melm 208    Printed-music,Printed-music:p
+melm 230$a      Electronic-ressource
 
+########## PUBLISHER #################
 melm 210$a    pl,pl:p
 melm 210$c    Publisher,Publisher:p
 melm 210$d    pubdate:n,pubdate:y,pubdate:s
 
+########## DESCRIPTION #################
 melm 215        Extent
 
-#Series
+########## SERIES #################
 melm 225$a      Title-series,Title-series:p
 melm 225$d      Title-series,Title-series:p
 #SubTit
@@ -150,69 +208,136 @@ melm 225$i      Title-series,Title-series:p
 melm 225$v      Title-series,Title-series:p
 melm 225$x      ISSN
 
-melm 230$a      Electronic-ressource
-
 ########## NOTES #################
+# General Note
 melm 300$a    Note,Note:p
+# Notes Pertaining to Identification Numbers
 melm 301$a    Note,Note:p
+# Notes Pertaining to Coded Information (languages...)
 melm 302$a    Note,Note:p
+# Notes Pertaining to Descriptive Information
 melm 303$a    Note,Note:p
+# Notes Pertaining to Title and Statement of Responsibility
 melm 304$a    Note,Note:p
+# Notes Pertaining to Edition and Bibliographic History
 melm 305$a    Note,Note:p
+# Notes Pertaining to Publication, Distribution, etc.
 melm 306$a    Note,Note:p
+# Notes Pertaining to Physical Description
 melm 307$a    Note,Note:p
+# Notes Pertaining to Series
 melm 308      Note,Note:p
-melm 308$a    Note,Note:p
+# Notes Pertaining to Binding and Availability
 melm 310$a    Note,Note:p
+# Notes Pertaining to Linking Fields
 melm 311$a    Note,Note:p
+# Notes Pertaining to Related Titles
 melm 312$a    Note,Note:p
+# Notes Pertaining to Subject Access
 melm 313$a    Note,Note:p
+# Notes Pertaining to Intellectual Responsability (in Sudoc catalogue, may contains the 4th, 5th etc. authors)
 melm 314$a    Note,Note:p
+# Notes Pertaining to Material (or Type of Publication) Specific Information
 melm 315$a    Note,Note:p
+# Note Relating to the Copy in Hand (ancient books)
 melm 316$a    Note,Note:p
+# Provenance Note (ancient books)
 melm 317$a    Note,Note:p
+# Action Note
 melm 318$a    Note,Note:p
+# Internal Bibliographies/Indexes Note
 melm 320$a    Note,Note:p
+# External Indexes/Abstracts/References Note
 melm 321$a    Note,Note:p
+# Credits Note (Projected and Video Material and Sound Recordings)
 melm 322$a    Note,Note:p
+# Cast Note (Projected and Video Material and Sound Recordings)
 melm 323$a    Note,Note:p
+# Facsimile Note
 melm 324$a    Note,Note:p
+# Reproduction Note
 melm 325$a    Note,Note:p
+# Frequency Statement Note (Serials)
 melm 326$a    Note,Note:p
+# Contents Note
 melm 327$a    Note,Note:p
-melm 328      Note,Note:p
-melm 328$a    Note,Note:p
-melm 330$a    Abstract,Note:w,Abstract:p,Note:p
+# Dissertation note
+melm 328    Note,Note:p
+# Summary or Abstract
+melm 330$a    Abstract:w,Note:w,Abstract:p,Note:p
+# Preferred Citation of Described Materials
 melm 332$a    Note,Note:p
+# Users/Intended Audience Note
 melm 333$a    Note,Note:p
+# Awards note
+melm 334$a    Note,Note:p
+# Type of electronic ressource note
 melm 336$a    Note,Note:p
+# System requirements note
 melm 337$a    Note,Note:p
+# Acquisition Information Note
 melm 345$a    Note,Note:p
 
-
 ############## 4XX - LINKING ##################
-# Authorities Title,Title:p
-melm 400$t    Title,Title:p
-melm 401$t    Title,Title:p
-melm 403$t    Title,Title:p,Title-Uniform,Title-Uniform:p
+# All 4XX indexed as Title, except for 410
 melm 410$t    Title-series,Title-series:p
+melm 411$t    Title,Title:p
 melm 412$t    Title,Title:p
 melm 413$t    Title,Title:p
-melm 414$t    Title,Title:p
-melm 415$t    Title,Title:p
-melm 416$t    Title,Title:p
-melm 417$t    Title,Title:p
-melm 418$t    Title,Title:p
-melm 419$t    Title,Title:p
-melm 420$t    Title,Title:p
+melm 421$t    Title,Title:p
+melm 422$t    Title,Title:p
+melm 423$t    Title,Title:p
+melm 424$t    Title,Title:p
+melm 425$t    Title,Title:p
 melm 430$t    Title,Title:p
 melm 431$t    Title,Title:p
 melm 432$t    Title,Title:p
+melm 433$t    Title,Title:p
+melm 434$t    Title,Title:p
+melm 435$t    Title,Title:p
+melm 436$t    Title,Title:p
+melm 437$t    Title,Title:p
 melm 440$t    Title,Title:p
 melm 441$t    Title,Title:p
+melm 442$t    Title,Title:p
+melm 443$t    Title,Title:p
+melm 444$t    Title,Title:p
 melm 445$t    Title,Title:p
+melm 446$t    Title,Title:p
+melm 447$t    Title,Title:p
+melm 448$t    Title,Title:p
+melm 451$t    Title,Title:p
+melm 452$t    Title,Title:p
+melm 453$t    Title,Title:p
+melm 454$t    Title,Title:p
+melm 455$t    Title,Title:p
+melm 456$t    Title,Title:p
+# FIXME Warning : field used by Koha for analytics, but also in Sudoc network
 melm 461$t    Title,Title-host:w,title-host:p
+melm 462$t    Title,Title:p
+melm 463$t    Title,Title:p
+# FIXME Warning : field used by Koha for analytics, but also in Sudoc network
 melm 464$t    Title,Title-host:w,title-host:p,Title:p
+melm 470$t    Title,Title:p
+melm 481$t    Title,Title:p
+melm 482$t    Title,Title:p
+melm 488$t    Title,Title:p
+
+# Linking ids (Koha analytics)
+# FIXME Warning : field used by Koha for analytics, but also in Sudoc network
+melm 461$9    Host-Item-Number
+
+#FIXME Fields 400, 401, 403, 414, 415, 416, 417, 418, 419, 420 are not defined in Unimarc, but may be used by some libraries.
+melm 400$t    Title,Title:p
+melm 401$t    Title,Title:p
+melm 403$t    Title,Title:p,Title-Uniform,Title-Uniform:p
+melm 414$t    Title,Title:p
+melm 415$t    Title,Title:p
+melm 416$t    Title,Title:p
+melm 417$t    Title,Title:p
+melm 418$t    Title,Title:p
+melm 419$t    Title,Title:p
+melm 420$t    Title,Title:p
 
 melm 400$d    pubdate:n
 melm 401$d    pubdate:n
@@ -235,10 +360,7 @@ melm 441$d    pubdate:n
 melm 445$d    pubdate:n
 melm 461$d    pubdate:n
 
-#Linking ids
-melm 461$9    Host-Item-Number
-
-# Authorities Title
+############## 5XX - TITLES ##################
 melm 500$9    Koha-Auth-Number,Koha-Auth-Number:n
 melm 501$9    Koha-Auth-Number,Koha-Auth-Number:n
 melm 503$9    Koha-Auth-Number,Koha-Auth-Number:n
@@ -258,6 +380,7 @@ melm 532$9    Koha-Auth-Number,Koha-Auth-Number:n
 melm 540$9    Koha-Auth-Number,Koha-Auth-Number:n
 melm 541$9    Koha-Auth-Number,Koha-Auth-Number:n
 melm 545$9    Koha-Auth-Number,Koha-Auth-Number:n
+melm 560$9    Koha-Auth-Number,Koha-Auth-Number:n
 
 melm 500               Title,Title:p
 melm 501               Title,Title:p
@@ -278,17 +401,29 @@ melm 532          Title,Title:p
 melm 540               Title,Title:p
 melm 541               Title,Title:p
 melm 545               Title,Title:p
+melm 560               Title,Title:p
 
 ########### SUBJECTS (6xx) ##################
 melm 600$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 601$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 602$9      Koha-Auth-Number,Koha-Auth-Number:n
-melm 603$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 604$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 605$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 606$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 607$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 608$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 610$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 615$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 616$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 617$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 620$9      Koha-Auth-Number,Koha-Auth-Number:n
+melm 621$9      Koha-Auth-Number,Koha-Auth-Number:n
+# melm 626$9      Koha-Auth-Number,Koha-Auth-Number:n
+# melm 660$9      Koha-Auth-Number,Koha-Auth-Number:n
+# melm 661$9      Koha-Auth-Number,Koha-Auth-Number:n
+
+#FIXME Fields 603, 630, 631, 632, 633, 634, 635, 636, 646 are not defined in Unimarc, but may be used by some libraries.
+melm 603$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 630$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 631$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 632$9      Koha-Auth-Number,Koha-Auth-Number:n
@@ -297,35 +432,53 @@ melm 634$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 635$9      Koha-Auth-Number,Koha-Auth-Number:n
 melm 636$9      Koha-Auth-Number,Koha-Auth-Number:n
 
-melm 600$a             Personal-name,Personal-name:p,Subject,Subject:p
-melm 600               Subject,Subject:p
-melm 601$a             Corporate-name,Conference-name,Corporate-name:p,Conference-name:p
-melm 601               Subject,Subject:p
+melm 600$a              Personal-name,Personal-name:p,Subject,Subject:p
+melm 600                Subject,Subject:p
+melm 601$a              Corporate-name,Conference-name,Corporate-name:p,Conference-name:p
+melm 601                Subject,Subject:p
 melm 602$a    Personal-name,Personal-name:p
 melm 602    Subject,Subject:p
-melm 604               Subject,Subject:p
-melm 605               Subject,Subject:p
-melm 606               Subject,Subject:p
-melm 607       Subject,Subject:p
-melm 630               Subject,Subject:p
-melm 631               Subject,Subject:p
-melm 632               Subject,Subject:p
-melm 633               Subject,Subject:p
-melm 634               Subject,Subject:p
-melm 635               Subject,Subject:p
-melm 636               Subject,Subject:p
-melm 610               Subject,Subject:p
-melm 640        Subject,Subject:p
-melm 641        Subject,Subject:p
-melm 642        Subject,Subject:p
-melm 643        Subject,Subject:p
-melm 644        Subject,Subject:p
-melm 645        Subject,Subject:p
-melm 646        Subject,Subject:p
-
-######################
-
-melm 676$a             Dewey-classification:w,Dewey-classification:s
+melm 604                Subject,Subject:p
+melm 605                Subject,Subject:p
+melm 606                Subject,Subject:p
+melm 607        Subject,Subject:p
+melm 608                Subject,Subject:p
+melm 610                Subject,Subject:p
+melm 615                Subject,Subject:p
+melm 616                Subject,Subject:p
+melm 617                Subject,Subject:p
+melm 620                Subject,Subject:p
+melm 621                Subject,Subject:p
+# Technical details access // see Marc21 753. Seems deprecated.
+# melm 626                Subject,Subject:p
+# Geographic area code // see Marc21 043. Probably not useful
+# melm 660                Subject,Subject:p
+# Chronological coverage code. Probably not useful
+# melm 661                Subject,Subject:p
+
+#FIXME Fields 603, 630, 631, 632, 633, 634, 635, 636, 646 are not defined in Unimarc, but may be used by some libraries.
+melm 603      Subject,Subject:p
+melm 630      Subject,Subject:p
+melm 631      Subject,Subject:p
+melm 632      Subject,Subject:p
+melm 633      Subject,Subject:p
+melm 634      Subject,Subject:p
+melm 635      Subject,Subject:p
+melm 636      Subject,Subject:p
+melm 646      Subject,Subject:p
+
+########### CLASSIFICATIONS (67x/68x) ##################
+# PRECIS
+melm 670               Subject-precis:w,Subject-precis:p
+# Universal Decimal Classification // see Marc21 080
+melm 675$a             UDC-classification:w,UDC-classification:p,UDC-classification:s
+# Dewey // see Marc21 082
+melm 676$a             Dewey-classification:w,Dewey-classification:p,Dewey-classification:s
+# LC // see Marc21 050
+melm 680$b             LC-call-number:s
+melm 680               LC-call-number:w,LC-call-number:p
+# Other class numbers // see Marc21 084
+melm 686               Local-classification:w,Local-classification:p
 
 #############"# item information (based on 995) ###############
 melm 995$2             lost,lost:n,item
index 50e2728..fdfbaef 100644 (file)
@@ -523,6 +523,8 @@ a2ensite koha
 invoke-rc.d apache2 reload
 
 koha_script=`makefile_value KOHA_DEST_SCRIPT_DIR`
+ln -s "$koha_script"/koha-index-daemon-ctl.sh  /etc/init.d/koha-index-daemon
+update-rc.d koha-index-daemon defaults
 
 # TODO:
 # - add translator
index f668d99..7a1a9a3 100644 (file)
@@ -16,3 +16,94 @@ VALUES ('circulation','ODUE','Mahnung','Mahnung','Liebe/r <<borrowers.firstname>
 ('suggestions','AVAILABLE','Vorgeschlagenes Medium verfügbar', 'Das vorgeschlagene Medium ist jetzt verfügbar','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu können, dass dieser Titel jetzt im Bestand der Bibliothek verfügbar ist.\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'),
 ('suggestions','ORDERED','Vorgeschlagenes Medium bestellt', 'Das vorgeschlagene Medium wurde im Buchhandel bestellt','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haben der Bibliothek folgendes Medium zur Anschaffung vorgeschlaten: <<suggestions.title>> von <<suggestions.author>>.\n\nWir freuen uns Ihnen mitteilen zu können, dass dieser Titel jetzt im Buchhandel bestellt wurde. Nach Eintreffen wird er in unseren Bestand eingearbeitet.\n\nSie erhalten Nachricht, sobald das Medium verfügbar ist.\n\nBei Nachfragen erreichen Sie uns unter der Emailadresse <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>'),
 ('suggestions','REJECTED','Anschaffungsvorschlag nicht angenommen', 'Ihr Anschaffungsvorschlag wurde nicht angenommen','Liebe(r) <<borrowers.firstname>> <<borrowers.surname>>,\n\nSie haven der Bibliothek folgendes Medium zur Anschaffung vorgeschlagen: <<suggestions.title>> von <<suggestions.author>>.\n\nDie Bibliothek hat diesen Titel heute recherchiert und sich gegen eine Anschaffung entschieden.\n\nBegründung: <<suggestions.reason>>\n\nWenn Sie Fragen haben, richten Sie Ihre Mail bitte an: <<branches.branchemail>>.\n\nVielen Dank,\n\n<<branches.branchname>>');
+
+INSERT INTO `letter` (module, code, name, title, content, is_html)
+VALUES ('circulation','ISSUESLIP','Ausleihquittung (Quittungsdruck)','Ausleihquittung (Quittungsdruck)', '<h3><<branches.branchname>></h3>
+Ausleihe an: <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
+(<<borrowers.cardnumber>>) <br />
+
+<<today>><br />
+
+<h4>Ausleihen</h4>
+<checkedout>
+<p>
+<<biblio.title>> <br />
+Barcode: <<items.barcode>><br />
+Fällig am: <<issues.date_due>><br />
+</p>
+</checkedout>
+
+<h4>Überfällig</h4>
+<overdue>
+<p>
+<<biblio.title>> <br />
+Barcode: <<items.barcode>><br />
+Fällig am: <<issues.date_due>><br />
+</p>
+</overdue>
+
+<hr>
+
+<h4 style="text-align: center; font-style:italic;">News</h4>
+<news>
+<div class="newsitem">
+<h5 style="margin-bottom: 1px; margin-top: 1px"><b><<opac_news.title>></b></h5>
+<p style="margin-bottom: 1px; margin-top: 1px"><<opac_news.new>></p>
+<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px">Posted on <<opac_news.timestamp>></p>
+<hr />
+</div>
+</news>', 1),
+('circulation','ISSUEQSLIP','Kurzquittung','Kurzquittung', '<h3><<branches.branchname>></h3>
+Ausleihe an: <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
+(<<borrowers.cardnumber>>) <br />
+
+<<today>><br />
+
+<h4>Heutige Ausleihen</h4>
+<checkedout>
+<p>
+<<biblio.title>> <br />
+Barcode: <<items.barcode>><br />
+Fällig am: <<issues.date_due>><br />
+</p>
+</checkedout>', 1),
+('circulation','RESERVESLIP','Vormerkquittung','Vormerkquittung', '<h5>Datum: <<today>></h5>
+
+<h3> Bereitstellung in <<branches.branchname>></h3>
+
+<h3><<borrowers.surname>>, <<borrowers.firstname>></h3>
+
+<ul>
+    <li><<borrowers.cardnumber>></li>
+    <li><<borrowers.phone>></li>
+    <li> <<borrowers.address>><br />
+         <<borrowers.address2>><br />
+         <<borrowers.city >>  <<borrowers.zipcode>>
+    </li>
+    <li><<borrowers.email>></li>
+</ul>
+<br />
+<h3>VORMERKUNG</h3>
+<h4><<biblio.title>></h4>
+<h5><<biblio.author>></h5>
+<ul>
+   <li><<items.barcode>></li>
+   <li><<items.itemcallnumber>></li>
+   <li><<reserves.waitingdate>></li>
+</ul>
+<p>Notiz:
+<pre><<reserves.reservenotes>></pre>
+</p>
+', 1),
+('circulation','TRANSFERSLIP','Transportquittung','Transportquittung', '<h5>Datum: <<today>></h5>
+
+<h3>Transport nach <<branches.branchname>></h3>
+
+<h3>EXEMPLAR</h3>
+<h4><<biblio.title>></h4>
+<h5><<biblio.author>></h5>
+<ul>
+   <li><<items.barcode>></li>
+   <li><<items.itemcallnumber>></li>
+</ul>', 1);
+INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
index 7282cce..ec5a22a 100644 (file)
@@ -1,8 +1,8 @@
 INSERT INTO permissions (module_bit, code, description) VALUES
    ( 1, 'circulate_remaining_permissions', 'Übrige Ausleihberechtigungen'),
    ( 1, 'override_renewals', 'Gesperrte Verlängerungen überschreiben'),
-   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
-   ( 3, 'manage_circ_rules', 'manage circulation rules'),
+   ( 3, 'parameters_remaining_permissions', 'Übrige Administrationsberechtigungen'),
+   ( 3, 'manage_circ_rules', 'Ausleihkonditionen verwalten'),
    ( 6, 'place_holds', 'Vormerkungen für Benutzer setzen'),
    ( 6, 'modify_holds_priority', 'Vormerkungspriorität verändern'),
    ( 9, 'edit_catalogue', 'Katalogdaten bearbeiten (Titel- und Exemplardaten ändern)'),
@@ -18,21 +18,21 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    (11, 'group_manage', 'Bestellgruppen vewalten'),
    (11, 'order_receive', 'Lieferungen verwalten'),
    (11, 'budget_add_del', 'Konten hinzufügen/ändern, aber bestehende nicht ändern'),
-   (11, 'budget_manage_all', 'Manage all budgets'),
+   (11, 'budget_manage_all', 'Alle Konten verwalten'),
    (13, 'edit_news', 'Nachrichten für OPAC und Dienstoberfläche verfassen'),
    (13, 'label_creator', 'Etiketten und Barcodes aus Katalog- und Benutzerdaten erstellen'),
    (13, 'edit_calendar', 'Schließtage eintragen'),
    (13, 'moderate_comments', 'Benutzerkommentare moderieren'),
    (13, 'edit_notices', 'Benachrichtigungen verwalten'),
    (13, 'edit_notice_status_triggers', 'Mahntrigger für überfällige Medien verwalten'),
-   (13, 'edit_quotes', 'Edit quotes for quote-of-the-day feature'),
+   (13, 'edit_quotes', '"Zitat des Tages" konfigurieren'),
    (13, 'view_system_logs', 'Logs durchsuchen/einsehen'),
    (13, 'inventory', 'Inventur durchführen'),
    (13, 'stage_marc_import', 'MARC-Datensätze zwischenspeichern'),
    (13, 'manage_staged_marc', 'MARC-Importe verwalten, auch Übernahme in Katalog und Import rückgängig machen'),
    (13, 'export_catalog', 'Titel- und Exemplardaten exportieren'),
    (13, 'import_patrons', 'Benutzerdaten importieren'),
-   (13, 'edit_patrons', 'Perform batch modification of patrons'),
+   (13, 'edit_patrons', 'Stapelbearbeitung von Benutzerdaten durchführen'),
    (13, 'delete_anonymize_patrons', 'Inaktive Benutzer löschen und Ausleihhistorie anonymisieren (Benutzerausleihhistorie löschen)'),
    (13, 'batch_upload_patron_images', 'Benutzerfotos einzeln oder im Stapel hochladen'),
    (13, 'schedule_tasks', 'Aufgabenplaner verwenden'),
index 5832f61..3c45e08 100644 (file)
@@ -46,3 +46,14 @@ INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('MANUA
 
 -- custom borrower notes
 INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('BOR_NOTES','ADDR','Adresse kontrollieren');
+
+-- OPAC Suggestions reasons
+INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('OPAC_SUG','damaged','Vorhandenes Exemplar ist beschädigt','Vorhandenes Exemplar ist beschädigt');
+INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('OPAC_SUG','bestseller','Neuerscheinung von bekanntem Verfasser','Neuerscheinung von bekanntem Verfasser');
+
+-- Report groups
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'CIRC', 'Ausleihe');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'CAT', 'Katalog');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'PAT', 'Benutzer');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'ACQ', 'Erwerbung');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'ACC', 'Gebühren');
diff --git a/installer/data/mysql/de-DE/optional/patron_atributes.sql b/installer/data/mysql/de-DE/optional/patron_atributes.sql
new file mode 100644 (file)
index 0000000..35d61cb
--- /dev/null
@@ -0,0 +1,2 @@
+INSERT INTO `borrower_attribute_types` (`code`, `description`, `repeatable`, `unique_id`, `opac_display`, `password_allowed`, `staff_searchable`, `authorised_value_category`)
+VALUES ('SHOW_BCODE',  'Zeige den Barcode in der Exemplarübersicht', 0, 0, 1, 0, 0, 'YES_NO');
diff --git a/installer/data/mysql/de-DE/optional/patron_atributes.txt b/installer/data/mysql/de-DE/optional/patron_atributes.txt
new file mode 100644 (file)
index 0000000..39abf2e
--- /dev/null
@@ -0,0 +1,2 @@
+Nützliche Benutzerattribute:
+* SHOW_BCODE - Zeige den Barcode in der Exemplarübersicht.
index 83ce059..4cba418 100644 (file)
@@ -1,6 +1,4 @@
-Einige vorkonfigurierte Z39.50-Server
+Vorkonfigurierte Z39.50-Server:
 LIBRARY OF CONGRESS
-NEW YORK UNIVERSITY LIBRARIES
 COLUMBIA UNIVERSITY
-NEW YORK PUBLIC LIBRARY
 SMITHSONIAN INSTITUTION LIBRARIES
index 3a8926a..bbbb3d5 100644 (file)
@@ -1,2 +1,2 @@
-defines default message tranports for email, and sms.
+Defines default message tranports for email and sms.
 
index 6fa0a54..77fb501 100644 (file)
@@ -7,6 +7,7 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f
 ('circulation','DUEDGST','Item Due Reminder (Digest)','Item Due Reminder','You have <<count>> items due'), 
 ('circulation','PREDUE','Advance Notice of Item Due','Advance Notice of Item Due','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThe following item will be due soon:\r\n\r\n<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)'), 
 ('circulation','PREDUEDGST','Advance Notice of Item Due (Digest)','Advance Notice of Item Due','You have <<count>> items due soon'),
+('circulation','RENEWAL','Item Renewals','Item Renewals','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
 ('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'),
 ('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'),
 ('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'),
@@ -105,3 +106,16 @@ Date due: <<issues.date_due>><br />
    <li><<items.barcode>></li>
    <li><<items.itemcallnumber>></li>
 </ul>', 1);
+
+INSERT INTO `letter` (`module`,`code`,`branchcode`,`name`,`is_html`,`title`,`content`)
+VALUES (
+'members',  'OPAC_REG_VERIFY',  '',  'Opac Self-Registration Verification Email',  '1',  'Verify Your Account',  'Hello!
+
+Your library account has been created. Please verify your email address by clicking this link to complete the signup process:
+
+http://<<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>
+
+If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.'
+);
+
+INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
index 770bcac..5a326f4 100644 (file)
@@ -1,2 +1 @@
-defines default messages for items due, advance notices, and upcoming library events.
-
+Defines default messages for the enhanced messaging configuration.
index 18e3431..74cea36 100644 (file)
@@ -1,3 +1,2 @@
-Defines default message transports for sending item due messages,
-advance notice messages, and library event messages through email
-and SMS.
+Defines default message transports for sending item due messages and
+advance notice messages through email and SMS.
old mode 100644 (file)
new mode 100755 (executable)
index 90a3bed..dac8b29
@@ -63,6 +63,9 @@ VALUES( 'ar', 'language', 'en', 'Arabic');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'ar', 'language', 'fr', 'Arabe');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'ar', 'language', 'de', 'Arabisch');
+
 -- Armenian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'hy', 'language', 'Armenian','2005-10-16');
@@ -79,6 +82,9 @@ VALUES( 'hy', 'language', 'en', 'Armenian');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'hy', 'language', 'fr', 'Armenian');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'hy', 'language', 'de', 'Armenisch');
+
 -- Bulgarian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'bg', 'language', 'Bulgarian','2005-10-16');
@@ -95,6 +101,9 @@ VALUES( 'bg', 'language', 'en', 'Bulgarian');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'bg', 'language', 'fr', 'Bulgare');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'bg', 'language', 'de', 'Bulgarisch');
+
 -- Chinese
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'zh', 'language', 'Chinese','2005-10-16');
@@ -111,6 +120,9 @@ VALUES( 'zh', 'language', 'en', 'Chinese');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'zh', 'language', 'fr', 'Chinois');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'zh', 'language', 'de', 'Chinesisch');
+
 -- Czech
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'cs', 'language', 'Czech','2005-10-16' );
@@ -127,6 +139,9 @@ VALUES( 'cs', 'language', 'en', 'Czech');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'cs', 'language', 'fr', 'Tchèque');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'cs', 'language', 'de', 'Tschechisch');
+
 -- Danish
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'da', 'language', 'Danish','2005-10-16' );
@@ -143,6 +158,9 @@ VALUES( 'da', 'language', 'en', 'Danish');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'da', 'language', 'fr', 'Danois');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'da', 'language', 'de', 'Dänisch');
+
 -- Dutch, Flemish
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'nl', 'language', 'Dutch','2005-10-16' );
@@ -159,6 +177,9 @@ VALUES( 'nl', 'language', 'en', 'Dutch');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'nl', 'language', 'fr', 'Néerlandais');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'nl', 'language', 'de', 'Niederländisch');
+
 -- English
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'en', 'language', 'English','2005-10-16' );
@@ -172,6 +193,9 @@ VALUES( 'en', 'language', 'en', 'English');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'en', 'language', 'fr', 'Anglais');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'en', 'language', 'de', 'Englisch');
+
 -- Finnish
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'fi', 'language', 'Finnish','2005-10-16' );
@@ -185,6 +209,9 @@ VALUES( 'fi', 'language', 'fi', 'suomi');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'fi', 'language', 'en', 'Finnish');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'fi', 'language', 'de', 'Finnisch');
+
 -- French
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'fr', 'language', 'French','2005-10-16' );
@@ -198,6 +225,9 @@ VALUES( 'fr', 'language', 'en', 'French');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'fr', 'language', 'fr', 'Fran&ccedil;ais');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'fr', 'language', 'de', 'Französisch');
+
 -- INSERT INTO language_descriptions(subtag, type, lang, description)
 -- VALUES( 'fr-CA', 'language', 'fr-CA', 'fran&ccedil;ais');
 
@@ -214,6 +244,12 @@ VALUES( 'lo', 'language', 'lo', '&#3742;&#3762;&#3754;&#3762;&#3749;&#3762;&#375
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'lo', 'language', 'en', 'Lao');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'lo', 'language', 'fr', 'Laotien');
+
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'lo', 'language', 'de', 'Laotisch');
+
 -- German
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'de', 'language', 'German','2005-10-16' );
@@ -246,6 +282,9 @@ VALUES( 'el', 'language', 'en', 'Greek, Modern [1453- ]');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'el', 'language', 'fr', 'Grec Moderne (Après 1453)');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'el', 'language', 'de', 'Griechisch (Nach 1453)');
+
 -- Hebrew
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'he', 'language', 'Hebrew','2005-10-16');
@@ -262,6 +301,9 @@ VALUES( 'he', 'language', 'en', 'Hebrew');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'he', 'language', 'fr', 'Hébreu');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'he', 'language', 'de', 'Hebräisch');
+
 -- Hindi
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'hi', 'language', 'Hindi','2005-10-16');
@@ -278,6 +320,9 @@ VALUES( 'hi', 'language', 'en', 'Hindi');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'hi', 'language', 'fr', 'Hindi');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'hi', 'language', 'de', 'Hindi');
+
 -- Hungarian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'hu', 'language', 'Hungarian','2005-10-16' );
@@ -294,6 +339,9 @@ VALUES( 'hu', 'language', 'en', 'Hungarian');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'hu', 'language', 'fr', 'Hongrois');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'hu', 'language', 'de', 'Ungarisch');
+
 -- Indonesian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'id', 'language', 'Indonesian','2005-10-16' );
@@ -310,6 +358,9 @@ VALUES( 'id', 'language', 'en', 'Indonesian');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'id', 'language', 'fr', 'Indonésien');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'id', 'language', 'de', 'Indonesisch');
+
 -- Italian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'it', 'language', 'Italian','2005-10-16' );
@@ -326,6 +377,9 @@ VALUES( 'it', 'language', 'en', 'Italian');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'it', 'language', 'fr', 'Italien');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'it', 'language', 'de', 'Italienisch');
+
 -- Japanese
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'ja', 'language', 'Japanese','2005-10-16');
@@ -342,6 +396,9 @@ VALUES( 'ja', 'language', 'en', 'Japanese');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'ja', 'language', 'fr', 'Japonais');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'ja', 'language', 'de', 'Japanisch');
+
 -- Korean
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'ko', 'language', 'Korean','2005-10-16');
@@ -358,6 +415,9 @@ VALUES( 'ko', 'language', 'en', 'Korean');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'ko', 'language', 'fr', 'Coréen');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'ko', 'language', 'de', 'Koreanisch');
+
 -- Latin
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'la', 'language', 'Latin','2005-10-16' );
@@ -374,6 +434,9 @@ VALUES( 'la', 'language', 'en', 'Latin');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'la', 'language', 'fr', 'Latin');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'la', 'language', 'de', 'Latein');
+
 -- Galician
 
 INSERT INTO language_subtag_registry( subtag, type, description, added)
@@ -388,6 +451,9 @@ VALUES( 'gl', 'language', 'gl', 'Galego');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'gl', 'language', 'en', 'Galician');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'gl', 'language', 'fr', 'Galicien');
+
 -- Norwegian (bokmål)
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'nb', 'language', 'Norwegian bokm&#229;l','2005-10-16' );
@@ -407,6 +473,9 @@ VALUES( 'nb', 'language', 'en', 'Norwegian bokm&#229;l');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'nb', 'language', 'fr', 'Norvégien bokm&#229;l');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'nb', 'language', 'de', 'Norwegisch bokm&#229;l');
+
 -- Norwegian (nynorsk)
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'nn', 'language', 'Norwegian nynorsk','2011-02-14' );
@@ -426,6 +495,9 @@ VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'nn', 'language', 'de', 'Norwegisch nynorsk');
+
 -- Persian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'fa', 'language', 'Persian','2005-10-16');
@@ -442,6 +514,9 @@ VALUES( 'fa', 'language', 'en', 'Persian');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'fa', 'language', 'fr', 'Persan');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'fa', 'language', 'de', 'Persisch');
+
 -- Polish
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'pl', 'language', 'Polish','2005-10-16' );
@@ -458,6 +533,9 @@ VALUES( 'pl', 'language', 'en', 'Polish');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'pl', 'language', 'fr', 'Polonais');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'pl', 'language', 'de', 'Polnisch');
+
 -- Portuguese
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'pt', 'language', 'Portuguese','2005-10-16' );
@@ -474,6 +552,9 @@ VALUES( 'pt', 'language', 'en', 'Portuguese');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'pt', 'language', 'fr', 'Portugais');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'pt', 'language', 'de', 'Portugiesisch');
+
 -- Romanian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'ro', 'language', 'Romanian','2005-10-16' );
@@ -490,6 +571,9 @@ VALUES( 'ro', 'language', 'en', 'Romanian');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'ro', 'language', 'fr', 'Roumain');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'ro', 'language', 'de', 'Rumänisch');
+
 -- Russian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'ru', 'language', 'Russian','2005-10-16');
@@ -506,6 +590,9 @@ VALUES( 'ru', 'language', 'en', 'Russian');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'ru', 'language', 'fr', 'Russe');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'ru', 'language', 'de', 'Russisch');
+
 -- Serbian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'sr', 'language', 'Serbian','2005-10-16' );
@@ -519,6 +606,12 @@ VALUES( 'sr', 'language', 'sr', '&#1089;&#1088;&#1087;&#1089;&#1082;&#1080;');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'sr', 'language', 'en', 'Serbian');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'sr', 'language', 'fr', 'Serbe');
+
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'sr', 'language', 'de', 'Serbisch');
+
 -- Spanish, Castilian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'es', 'language', 'Spanish','2005-10-16' );
@@ -535,6 +628,9 @@ VALUES( 'es', 'language', 'en', 'Spanish');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'es', 'language', 'fr', 'Espagnol');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'es', 'language', 'de', 'Spanisch');
+
 -- Swedish
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'sv', 'language', 'Swedish','2005-10-16' );
@@ -551,6 +647,9 @@ VALUES( 'sv', 'language', 'en', 'Swedish');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'sv', 'language', 'fr', 'Suédois');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'sv', 'language', 'de', 'Schwedisch');
+
 -- Tetum
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'tet', 'language', 'Tetum','2005-10-16' );
@@ -564,6 +663,12 @@ VALUES( 'tet', 'language', 'tet', 'tetun');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'tet', 'language', 'en', 'Tetum');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'tet', 'language', 'fr', 'Tétoum');
+
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'tet', 'language', 'de', 'Tetum');
+
 -- Thai
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'th', 'language', 'Thai','2005-10-16');
@@ -580,6 +685,9 @@ VALUES( 'th', 'language', 'en', 'Thai');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'th', 'language', 'fr', 'Thaï');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'th', 'language', 'de', 'Thailändisch');
+
 -- Turkish
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'tr', 'language', 'Turkish','2005-10-16' );
@@ -596,6 +704,8 @@ VALUES( 'tr', 'language', 'en', 'Turkish');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'tr', 'language', 'fr', 'Turc');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'tr', 'language', 'de', 'Türkisch');
 
 -- Ukranian
 INSERT INTO language_subtag_registry( subtag, type, description, added)
@@ -613,6 +723,9 @@ VALUES( 'uk', 'language', 'en', 'Ukranian');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'uk', 'language', 'fr', 'Ukrainien');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'uk', 'language', 'de', 'Ukrainisch');
+
 -- Urdu
 INSERT INTO language_subtag_registry( subtag, type, description, added)
 VALUES ( 'ur', 'language', 'Urdu','2005-10-16' );
@@ -626,6 +739,12 @@ VALUES( 'ur', 'language', 'en', 'Urdu');
 INSERT INTO language_descriptions(subtag, type, lang, description)
 VALUES( 'ur', 'language', 'ur', '&#1575;&#1585;&#1583;&#1608;');
 
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'ur', 'language', 'fr', 'Ourdou');
+
+INSERT INTO language_descriptions(subtag, type, lang, description)
+VALUES( 'ur', 'language', 'de', 'Urdu');
+
 -- SCRIPTS
 -- Arabic
 INSERT INTO language_subtag_registry( subtag, type, description, added)
index 5648982..107bfd7 100644 (file)
@@ -1,5 +1,5 @@
-Koha I18N Support
+Koha I18N support
 
 BIDI Stuff, Arabic and Hebrew
 Default mappings between script and language subcodes
-Language Extensions
+Language extensions
index e1c7917..db6df3d 100644 (file)
@@ -50,3 +50,10 @@ INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('BOR_N
 -- OPAC Suggestions reasons
 INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('OPAC_SUG','damaged','The copy on the shelf is damaged','The copy on the shelf is damaged');
 INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('OPAC_SUG','bestseller','Upcoming title by popular author','Upcoming title by popular author');
+
+-- Report groups
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'CIRC', 'Circulation');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'CAT', 'Catalog');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'PAT', 'Patrons');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'ACQ', 'Acquisitions');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'ACC', 'Accounts');
index c234c3f..bc23678 100644 (file)
@@ -1 +1 @@
-Some basic default authorised values for Library Departments, Item Lost status, etc. You can change these at any time after installation.
+Some basic default authorised values for library locations, item lost status, etc. You can change these at any time after installation.
index ce1b6f4..7fa02cc 100644 (file)
@@ -1,2 +1,2 @@
-Coded values conforming to the Z39.71-2006 Holdings Statements for Bibliographic Items
+Coded values conforming to the Z39.71-2006 holdings statements for bibliographic items.
 Refer to http://www.niso.org/standards/index.html for details.
index ef8264b..5cbf709 100644 (file)
@@ -1 +1 @@
-MARC Code List for Relators, as of http://www.loc.gov/marc/relators/relaterm.html
+MARC code list for relators, as of http://www.loc.gov/marc/relators/relaterm.html
index ccb7f40..b94941a 100644 (file)
@@ -1,25 +1,25 @@
 Sample patron types and categories: 
 
-Type:                  Categories:
+Type:           Categories:
 
-Adult Patron - default patron type
-                               PT      - Patron
-                               ST      - Student
-                               BH      - Homebound
+Adult patron - default patron type
+                PT  - Patron
+                ST  - Student
+                BH  - Homebound
 
 Child - patron with a guarantor
-                               K       - Kid
-                               J       - Juvenile
-                               YA      - Young Adult
+                K   - Kid
+                J   - Juvenile
+                YA  - Young Adult
 
 Organization - patron is an institution, not a person
-                               ILL - Inter-library Loan
-                               SC      - School
-                               L       - Library
+                ILL - Inter-library Loan
+                SC  - School
+                L   - Library
 
 Professional - a member of an organization (organization is guarantor)
-                               T       - Teacher
-                               S       - Staff
-                               B       - Board
+                T   - Teacher
+                S   - Staff
+                B   - Board
 
 Types are currently hardcoded, but you can add/edit/delete categories after installation from the administration module.
index dacc9b3..a2d2de9 100644 (file)
@@ -1,4 +1,4 @@
-Sample Holidays:
+Sample holidays:
        Sundays
        Christmas
        New Year's
index f2b0bcc..1af4c51 100644 (file)
@@ -1 +1 @@
-A set of default item types (material types and collection codes).
+A set of default item types.
index 97953d0..cbaf05c 100644 (file)
@@ -1 +1 @@
-A few sample libraries, and library categories, including examples of the hardcoded types, CU, IS, PE.
+A few sample libraries.
index 121badd..89d7250 100644 (file)
@@ -1,5 +1,3 @@
 LIBRARY OF CONGRESS
-NEW YORK UNIVERSITY LIBRARIES
 COLUMBIA UNIVERSITY
-NEW YORK PUBLIC LIBRARY
 SMITHSONIAN INSTITUTION LIBRARIES
index 0450bd0..26a7c81 100644 (file)
@@ -16,3 +16,4 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f
 ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
 ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
 ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
+INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
index 121badd..89d7250 100644 (file)
@@ -1,5 +1,3 @@
 LIBRARY OF CONGRESS
-NEW YORK UNIVERSITY LIBRARIES
 COLUMBIA UNIVERSITY
-NEW YORK PUBLIC LIBRARY
 SMITHSONIAN INSTITUTION LIBRARIES
index 1056d14..ad91561 100644 (file)
@@ -18,3 +18,4 @@ VALUES
 ('suggestions','AVAILABLE','Suggestion disponible', 'Suggestion d\'achat disponible','cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez effectué une suggestion d\'achat pour le docuement  <<suggestions.title>> de <<suggestions.author>>.\n\nNous sommes heureux de vous informer que le document que vous aviez demandé est maintenant disponible dans nos collections.\n\nSi vous avez des questions, merci de nous contacter par courriel à l\'adresse <<branches.branchemail>>.\n\nMerci,\n\n<<branches.branchname>>'),
 ('suggestions','ORDERED','Suggestion commandée', 'Suggestion commandée','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez effectué une demande de suggestion d\'achat sur le docuement <<suggestions.title>> de <<suggestions.author>>.\n\nNous sommes heureux de vous informer que le document que vous avez demandé est maintenant en commande. Le document devrait arriver rapidement dans nos collections.\n\nVous serez averti quand le docuement sera disponible.\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <<branches.branchemail>>\n\nMerci,\n\n<<branches.branchname>>'),
 ('suggestions','REJECTED','Suggestion rejetée', 'Suggestion d\'achat rejeté','Cher(e) <<borrowers.firstname>> <<borrowers.surname>>,\n\nVous avez fait la demande du document <<suggestions.title>> de <<suggestions.author>>.\n\nla Bibliothèque a examiné votre demande ce jour, et a décidé de ne pas retenir la suggestion pour l\'instant.\n\nLa raison est la suivante: <<suggestions.reason>>\n\nSi vous avez des questions, merci de nous contacter à l\'adresse <<branches.branchemail>>.\n\nMerci,\n\n<<branches.branchname>>');
+INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','Les documents suivants ont été renouvelés\r\n----\r\n<<biblio.title>>\r\n----\r\nMerci, <<branches.branchname>>.');
index 4b8c66e..3147bed 100644 (file)
@@ -1,8 +1,8 @@
 INSERT INTO permissions (module_bit, code, description) VALUES
    ( 1, 'circulate_remaining_permissions', 'Fonctions de circulation restantes'),
    ( 1, 'override_renewals', 'Outrepasser les limites de renouvellement'),
-   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
-   ( 3, 'manage_circ_rules', 'manage circulation rules'),
+   ( 3, 'parameters_remaining_permissions', 'Paramètres du système restants'),
+   ( 3, 'manage_circ_rules', 'Gestion des règles de circulation'),
    ( 6, 'place_holds', 'Réserver pour des adhérents'),
    ( 6, 'modify_holds_priority', 'Modifier la priorité des réservations'),
    ( 9, 'edit_catalogue', 'Ajouter et modifier des notices au catalogue'),
@@ -14,7 +14,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    (13, 'moderate_comments', 'Modérer les commentaires des adhérents'),
    (13, 'edit_notices', 'Définir les notifications'),
    (13, 'edit_notice_status_triggers', 'Définir les déclencheurs de notification de retard'),
-   (13, 'edit_quotes', 'Edit quotes for quote-of-the-day feature'),
+   (13, 'edit_quotes', 'Gérer les citations pour la fonctionnalité citation du jour'),
    (13, 'view_system_logs', 'Parcourir les journaux de l''activité du système'),
    (13, 'inventory', 'Réaliser les tâches de récolement'),
    (13, 'stage_marc_import', 'Importer des notices MARC dans le réservoir'),
index cd78c83..f45d637 100644 (file)
@@ -79,4 +79,11 @@ INSERT INTO authorised_values (category, authorised_value, lib) VALUES
 ('LANG', 'fre', 'francese'),
 ('LANG', 'lat', 'latino');
 
+-- Raggruppamenti di esempio per i reports
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'CIRC', 'Circulation');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'CAT', 'Catalog');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'PAT', 'Patrons');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'ACQ', 'Acquisitions');
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'ACC', 'Accounts');
+
 SET FOREIGN_KEY_CHECKS=1;
index d0b5348..cf5424e 100644 (file)
@@ -3,8 +3,8 @@ SET FOREIGN_KEY_CHECKS=0;
 INSERT INTO permissions (module_bit, code, description) VALUES
    ( 1, 'circulate_remaining_permissions', 'Permessi rimanenti per la circolazione'),
    ( 1, 'override_renewals', 'Sblocca i rinnovi bloccati'),
-   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
-   ( 3, 'manage_circ_rules', 'manage circulation rules'),
+   ( 3, 'parameters_remaining_permissions', 'Permessi rimanenti'),
+   ( 3, 'manage_circ_rules', 'Gestisci regole circolazione'),
    ( 6, 'place_holds', 'Fai prenotazioni per gli utenti'),
    ( 6, 'modify_holds_priority', 'Modifica priorità prenotazioni'),
    ( 9, 'edit_catalogue', 'Cataloga (crea/modifica dati bibliografici e di copia)'),
@@ -20,26 +20,26 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    (11, 'group_manage', 'Gestisci ordini e raccoglitori raggruppati'),
    (11, 'order_receive', 'Gestisci arrivi'),
    (11, 'budget_add_del', 'Aggiungi e cancella budgets (senza modificarli)'),
-   (11, 'budget_manage_all', 'Manage all budgets'),
+   (11, 'budget_manage_all', 'Gestisci tutti i budgets'),
    (13, 'edit_news', 'Scrivi le news per l\'OPAC e per l\'interfaccia staff'),
    (13, 'label_creator', 'Crea etichette da stampare e barcodes dal catalogo e dai dati degli utenti'),
    (13, 'edit_calendar', 'Definisci i giorni di chiusura della biblioteca'),
    (13, 'moderate_comments', 'Modera i commenti degli utenti'),
    (13, 'edit_notices', 'Definisci le notifiche'),
    (13, 'edit_notice_status_triggers', 'Imposta il messaggio o lo stato delle notifiche per le copie in ritardo'),
-   (13, 'edit_quotes', 'Edit quotes for quote-of-the-day feature'),
+   (13, 'edit_quotes', 'Modifica suggerimenti/citazioni per la feature corrispondente'),
    (13, 'view_system_logs', 'Scorri i log di sistema'),
    (13, 'inventory', 'Lavora sugli inventari (stocktaking) del tuo catalogo'),
    (13, 'stage_marc_import', 'Opera sui Record MARC presenti nella zona di lavoro'),
    (13, 'manage_staged_marc', 'Gestisci i record MARC in lavorazione, inclusi il completare e il cancellare gli import'),
    (13, 'export_catalog', 'Esporta i dati bibliografici e di copia'),
    (13, 'import_patrons', 'Importa i dati utente'),
-   (13, 'edit_patrons', 'Perform batch modification of patrons'),
+   (13, 'edit_patrons', 'Modifica utenti via batch'),
    (13, 'delete_anonymize_patrons', 'Cancella i vecchi prestiti e rendi anonimo lo storico della circolazione (canella in lettura lo storico utenti prestito)'),
    (13, 'batch_upload_patron_images', 'Aggiorna le foto utente in modalità batch o al momento'),
    (13, 'schedule_tasks', 'Schedula i task da far andare'),
-   (13, 'items_batchmod', 'Perform batch modification of items'),
-   (13, 'items_batchdel', 'Perform batch deletion of items'),
+   (13, 'items_batchmod', 'Abilita alla modifica batch delle copie'),
+   (13, 'items_batchdel', 'Abilita alla cancellazione via batch delle copie'),
    (13, 'manage_csv_profiles', 'Gestisci i profili CSV di export'),
    (13, 'moderate_tags', 'Modera i tag inseriti dagli utenti'),
    (13, 'rotating_collections', 'Gestisci le collezioni circolanti (rotating collections)'),
index c0d9936..ed673da 100644 (file)
@@ -1850,7 +1850,7 @@ CREATE TABLE `statistics` ( -- information related to transactions (circulation
   `itemtype` varchar(10) default NULL, -- foreign key from the itemtypes table, links transaction to a specific item type
   `borrowernumber` int(11) default NULL, -- foreign key from the borrowers table, links transaction to a specific borrower
   `associatedborrower` int(11) default NULL,
-  `ccode` int(11) default NULL, -- foreign key from the items table, links transaction to a specific collection code
+  `ccode` varchar(10) default NULL, -- foreign key from the items table, links transaction to a specific collection code
   KEY `timeidx` (`datetime`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
@@ -1920,6 +1920,7 @@ CREATE TABLE `subscription` (
   `opacdisplaycount` VARCHAR(10) NULL,
   `graceperiod` int(11) NOT NULL default '0',
   `enddate` date default NULL,
+  `closed` INT(1) NOT NULL DEFAULT 0,
   PRIMARY KEY  (`subscriptionid`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
@@ -2824,7 +2825,8 @@ CREATE TABLE `aqorders_items` ( -- information on items entered in the acquisiti
   `itemnumber` int(11) NOT NULL, -- the item number for this item (items.itemnumber)
   `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this order item was last touched
   PRIMARY KEY  (`itemnumber`),
-  KEY `ordernumber` (`ordernumber`)
+  KEY `ordernumber` (`ordernumber`),
+  CONSTRAINT aqorders_items_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber) ON DELETE CASCADE ON UPDATE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 
@@ -2938,6 +2940,122 @@ CREATE TABLE `quotes` (
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
+--
+-- Table structure for table categories_branches
+--
+
+DROP TABLE IF EXISTS categories_branches;
+CREATE TABLE categories_branches( -- association table between categories and branches
+    categorycode VARCHAR(10),
+    branchcode VARCHAR(10),
+    FOREIGN KEY (categorycode) REFERENCES categories(categorycode) ON DELETE CASCADE,
+    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
+) ENGINE=INNODB DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table authorised_values_branches
+--
+
+DROP TABLE IF EXISTS authorised_values_branches;
+CREATE TABLE authorised_values_branches( -- association table between authorised_values and branches
+    av_id INTEGER,
+    branchcode VARCHAR(10),
+    FOREIGN KEY (av_id) REFERENCES authorised_values(id) ON DELETE CASCADE,
+    FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
+) ENGINE=INNODB DEFAULT CHARSET=utf8;
+
+
+--
+-- Table structure for table borrower_attribute_types_branches
+--
+
+DROP TABLE IF EXISTS borrower_attribute_types_branches;
+CREATE TABLE borrower_attribute_types_branches( -- association table between borrower_attribute_types and branches
+    bat_code VARCHAR(10),
+    b_branchcode VARCHAR(10),
+    FOREIGN KEY (bat_code) REFERENCES borrower_attribute_types(code) ON DELETE CASCADE,
+    FOREIGN KEY (b_branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE
+) ENGINE=INNODB DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table `borrower_modifications`
+--
+
+CREATE TABLE IF NOT EXISTS `borrower_modifications` (
+  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+  `verification_token` varchar(255) NOT NULL DEFAULT '',
+  `borrowernumber` int(11) NOT NULL DEFAULT '0',
+  `cardnumber` varchar(16) DEFAULT NULL,
+  `surname` mediumtext,
+  `firstname` text,
+  `title` mediumtext,
+  `othernames` mediumtext,
+  `initials` text,
+  `streetnumber` varchar(10) DEFAULT NULL,
+  `streettype` varchar(50) DEFAULT NULL,
+  `address` mediumtext,
+  `address2` text,
+  `city` mediumtext,
+  `state` text,
+  `zipcode` varchar(25) DEFAULT NULL,
+  `country` text,
+  `email` mediumtext,
+  `phone` text,
+  `mobile` varchar(50) DEFAULT NULL,
+  `fax` mediumtext,
+  `emailpro` text,
+  `phonepro` text,
+  `B_streetnumber` varchar(10) DEFAULT NULL,
+  `B_streettype` varchar(50) DEFAULT NULL,
+  `B_address` varchar(100) DEFAULT NULL,
+  `B_address2` text,
+  `B_city` mediumtext,
+  `B_state` text,
+  `B_zipcode` varchar(25) DEFAULT NULL,
+  `B_country` text,
+  `B_email` text,
+  `B_phone` mediumtext,
+  `dateofbirth` date DEFAULT NULL,
+  `branchcode` varchar(10) DEFAULT NULL,
+  `categorycode` varchar(10) DEFAULT NULL,
+  `dateenrolled` date DEFAULT NULL,
+  `dateexpiry` date DEFAULT NULL,
+  `gonenoaddress` tinyint(1) DEFAULT NULL,
+  `lost` tinyint(1) DEFAULT NULL,
+  `debarred` date DEFAULT NULL,
+  `debarredcomment` varchar(255) DEFAULT NULL,
+  `contactname` mediumtext,
+  `contactfirstname` text,
+  `contacttitle` text,
+  `guarantorid` int(11) DEFAULT NULL,
+  `borrowernotes` mediumtext,
+  `relationship` varchar(100) DEFAULT NULL,
+  `ethnicity` varchar(50) DEFAULT NULL,
+  `ethnotes` varchar(255) DEFAULT NULL,
+  `sex` varchar(1) DEFAULT NULL,
+  `password` varchar(30) DEFAULT NULL,
+  `flags` int(11) DEFAULT NULL,
+  `userid` varchar(75) DEFAULT NULL,
+  `opacnote` mediumtext,
+  `contactnote` varchar(255) DEFAULT NULL,
+  `sort1` varchar(80) DEFAULT NULL,
+  `sort2` varchar(80) DEFAULT NULL,
+  `altcontactfirstname` varchar(255) DEFAULT NULL,
+  `altcontactsurname` varchar(255) DEFAULT NULL,
+  `altcontactaddress1` varchar(255) DEFAULT NULL,
+  `altcontactaddress2` varchar(255) DEFAULT NULL,
+  `altcontactaddress3` varchar(255) DEFAULT NULL,
+  `altcontactstate` text,
+  `altcontactzipcode` varchar(50) DEFAULT NULL,
+  `altcontactcountry` text,
+  `altcontactphone` varchar(50) DEFAULT NULL,
+  `smsalertnumber` varchar(50) DEFAULT NULL,
+  `privacy` int(11) DEFAULT NULL,
+  PRIMARY KEY (`verification_token`,`borrowernumber`),
+  KEY `verification_token` (`verification_token`),
+  KEY `borrowernumber` (`borrowernumber`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
index f40da36..9c3e5e2 100644 (file)
@@ -37,3 +37,4 @@ VALUES ('circulation','ODUE','Purring','Purring på dokument','<<borrowers.first
 ('suggestions','AVAILABLE','Foreslått dokument tilgjengelig', 'Foreslått dokument tilgjengelig','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av å informere deg om at dokumentet nå er innlemmet i samlingen.\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'),
 ('suggestions','ORDERED','Innkjøpsforslag i bestilling', 'Innkjøpsforslag i bestilling','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nVi har gleden av å informere deg om at dokumentet du foreslo nå er i bestilling.\n\nDu vil få en ny melding når dokumentet er tilgjengelig.\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>'),
 ('suggestions','REJECTED','Innkjøpsforslag avslått', 'Innkjøpsforslag avslått','<<borrowers.firstname>> <<borrowers.surname>>,\n\nDu har foreslått at biblioteket kjøper inn <<suggestions.title>> av <<suggestions.author>>.\n\nBiblioteket har vurdert innkjøpsforslaget ditt i dag, og bestemt seg for å ikke ta det til følge.\n\nBegrunnelse: <<suggestions.reason>>\n\nEr det noe du lurer på, vennligst kontakt oss på <<branches.branchemail>>.\n\nVennlig hilsen,\n\n<<branches.branchname>>');
+INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
index 0ab90c3..c605944 100644 (file)
@@ -25,5 +25,6 @@ UPDATE systempreferences SET value = 'nb-NO' WHERE variable = 'language';
 UPDATE systempreferences SET value = 'nb-NO' WHERE variable = 'opaclanguages';
 UPDATE systempreferences SET value = '<p>Velkommen til Koha...</p><hr />' WHERE variable = 'OpacMainUserBlock';
 UPDATE systempreferences SET value = '<p>Viktige lenker kan plasseres her</p>' WHERE variable = 'OpacNav';
-
 UPDATE systempreferences SET value = '<li><a href="http://worldcat.org/search?q={TITLE}" target="_blank">Andre bibliotek (WorldCat)</a></li><li><a href="http://www.scholar.google.com/scholar?q={TITLE}" target="_blank">Andre databaser (Google Scholar)</a></li><li><a href="http://www.bookfinder.com/search/?author={AUTHOR}&amp;title={TITLE}&amp;st=xl&amp;ac=qr" target="_blank">Nettbutikker (Bookfinder.com)</a></li>' WHERE variable = 'OPACSearchForTitleIn';
+UPDATE systempreferences SET value = 'Monday' WHERE variable = 'CalendarFirstDayOfWeek';
+UPDATE systempreferences SET value = 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Æ Ø Å' WHERE variable = 'alphabet';
index a00535f..36c03f3 100644 (file)
@@ -1,6 +1,5 @@
 -- 
--- Default classification sources and filing rules
--- for Koha.
+-- Permissions for Koha.
 --
 -- Copyright (C) 2011 Magnus Enger Libriotech
 --
@@ -22,8 +21,8 @@
 INSERT INTO permissions (module_bit, code, description) VALUES
    ( 1, 'circulate_remaining_permissions', 'Øvrige rettigheter for sirkulasjon'),
    ( 1, 'override_renewals', 'Overstyre blokkerte fornyinger'),
-   ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'),
-   ( 3, 'manage_circ_rules', 'manage circulation rules'),
+   ( 3, 'parameters_remaining_permissions', 'Øvrige rettigheter knyttet til systempreferanser'),
+   ( 3, 'manage_circ_rules', 'Endre sirkulasjonsregler'),
    ( 6, 'place_holds', 'Foreta reservering for lånere'),
    ( 6, 'modify_holds_priority', 'Endre rekkefølge på reserveringer'),
    ( 9, 'edit_catalogue', 'Endre katalogen (Endre bibliografiske poster og eksemplaropplysninger)'),
@@ -39,21 +38,21 @@ INSERT INTO permissions (module_bit, code, description) VALUES
    (11, 'group_manage', 'Administrere bestillinger og kurv-grupper'),
    (11, 'order_receive', 'Administrere bestillinger og kurver'),
    (11, 'budget_add_del', 'Legge til og slette budsjetter (men ikke endre budsjetter)'),
-   (11, 'budget_manage_all', 'Manage all budgets'),
+   (11, 'budget_manage_all', 'Administrere alle budsjetter'),
    (13, 'edit_news', 'Legge ut nyhter i OPACen og det interne grensesnittet'),
    (13, 'label_creator', 'Lage etiketter og strekkoder basert på bibliografiske poster og lånerdata'),
    (13, 'edit_calendar', 'Definere dager da biblioteket er stengt'),
    (13, 'moderate_comments', 'Behandle kommentarer fra lånere'),
    (13, 'edit_notices', 'Definere meldinger'),
    (13, 'edit_notice_status_triggers', 'Definere utløsere for meldinger og statusenderinger for for sent leverte dokumenter'),
-   (13, 'edit_quotes', 'Edit quotes for quote-of-the-day feature'),
+   (13, 'edit_quotes', 'Endre sitater for dagens sitat-funksjonen'),
    (13, 'view_system_logs', 'Se Koha sine logger'),
    (13, 'inventory', 'Foreta varetelling'),
    (13, 'stage_marc_import', 'Importere MARC-poster til brønnen'),
    (13, 'manage_staged_marc', 'Behandle lagrede MARC-poster, inkludert ferdigstilling og reversering av importer'),
    (13, 'export_catalog', 'Eksportere bibliografiske data og beholdningsdata'),
    (13, 'import_patrons', 'Importere låneropplysninger'),
-   (13, 'edit_patrons', 'Perform batch modification of patrons'),
+   (13, 'edit_patrons', 'Utføre satsvise endringer av lånere'),
    (13, 'delete_anonymize_patrons', 'Slette utgåtte lånere og anonymisere lånehistorikk'),
    (13, 'batch_upload_patron_images', 'Laste opp bilder av lånere enkeltvis eller en masse'),
    (13, 'schedule_tasks', 'Planlegge oppgaver som skal kjøres'),
index 73102af..69812fd 100644 (file)
@@ -18,3 +18,4 @@ VALUES
 ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
 ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
 ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
+INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
index 6bbd894..47ba7ae 100644 (file)
@@ -1,5 +1,3 @@
 BIBLIOTEKA NARODOWA
 BIBLIOTEKA PUBLICZNA DZIELNICY BEMOWO
 LIBRARY OF CONGRESS
-NEW YORK UNIVERSITY LIBRARIES
-NEW YORK PUBLIC LIBRARY
index e13782a..358783e 100644 (file)
@@ -16,3 +16,4 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f
 ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
 ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
 ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
+INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
index a4e4102..d5d15d7 100644 (file)
@@ -352,7 +352,7 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacAllowSharingPrivateLists',0,'If set, allows opac users to share private lists with other patrons',NULL,'YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('Babeltheque_url_js','','Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','','Free');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('Babeltheque_url_update', '', 'Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)', '', 'Free');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('SocialNetworks','1','Enable/Disable social networks links in opac detail pages','','YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('SocialNetworks','0','Enable/Disable social networks links in opac detail pages','','YesNo');
 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('SubscriptionDuplicateDroppedInput','','','List of fields which must not be rewritten when a subscription is duplicated (Separated by pipe |)','Free');
 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoResumeSuspendedHolds',  '1', NULL ,  'Allow suspended holds to be automatically resumed by a set date.',  'YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacStarRatings','all',NULL,'disable|all|details','Choice');
@@ -386,3 +386,23 @@ INSERT INTO systempreferences (variable,value,explanation,type) VALUES('OPACdidy
 INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
 INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z','Alphabet than can be expanded into browse links, e.g. on Home > Patrons',NULL,'free');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.', NULL, 'YesNo');
+INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
+('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'),
+('PatronSelfRegistrationVerifyByEmail', '0', NULL, 'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate his or her account.', 'YesNo'),
+('PatronSelfRegistrationDefaultCategory', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'),
+('PatronSelfRegistrationExpireTemporaryAccountsDelay', '0', NULL, 'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.', 'Integer'),
+('PatronSelfRegistrationBorrowerMandatoryField',  'surname|firstname', NULL ,  'Choose the mandatory fields for a patron''s account, when registering via the OPAC.',  'free'),
+('PatronSelfRegistrationBorrowerUnwantedField',  '', NULL ,  'Name the fields you don''t want to display when registering a new patron via the OPAC.',  'free');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SeparateHoldings', '0', 'Separate current branch holdings from other holdings', NULL, 'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SeparateHoldingsBranch', 'homebranch', 'Branch used to separate holdings', 'homebranch|holdingbranch', 'Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacSeparateHoldings', '0', 'Separate current branch holdings from other holdings (OPAC)', NULL, 'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacSeparateHoldingsBranch', 'homebranch', 'Branch used to separate holdings (OPAC)', 'homebranch|holdingbranch', 'Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RenewalSendNotice','0', NULL, '', 'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HTML5MediaEnabled','not','Show a tab with a HTML5 media player for files catalogued in field 856','not|opac|staff|both','Choice');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HTML5MediaExtensions','webm|ogg|ogv|oga|vtt','Media file extensions','','free');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowHoldsOnPatronsPossessions', '1', 'Allow holds on records that patron have items of it',NULL,'YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free');
+INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded <style> tag.', 'free');
+INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserJS', '', NULL, 'Define custom javascript for inclusion in the SCO module', 'free');
index a908f6c..b7e67c5 100644 (file)
@@ -15,3 +15,4 @@ VALUES ('circulation','ODUE','Overdue Notice','Item Overdue','Dear <<borrowers.f
 ('suggestions','AVAILABLE','Suggestion available', 'Suggested purchase available','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested is now part of the collection.\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>'),
 ('suggestions','ORDERED','Suggestion ordered', 'Suggested item ordered','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nWe are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection.\n\nYou will be notified again when the book is available.\n\nIf you have any questions, please email us at <<branches.branchemail>>\n\nThank you,\n\n<<branches.branchname>>'),
 ('suggestions','REJECTED','Suggestion rejected', 'Purchase suggestion declined','Dear <<borrowers.firstname>> <<borrowers.surname>>,\n\nYou have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>.\n\nThe library has reviewed your request today, and has decided not to accept the suggestion at this time.\n\nThe reason given is: <<suggestions.reason>>\n\nIf you have any questions, please email us at <<branches.branchemail>>.\n\nThank you,\n\n<<branches.branchname>>');
+INSERT INTO `letter` (module, code, name, title, content) VALUES ('circulation','RENEWAL','Item Renewal','Renewals','The following items have been renew:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
index 518f23a..77265f4 100755 (executable)
@@ -64,6 +64,7 @@ GetOptions(
 my $dbh = C4::Context->dbh;
 $|=1; # flushes output
 
+local $dbh->{RaiseError} = 0;
 
 # Record the version we are coming from
 
@@ -5713,7 +5714,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
           ) ENGINE=InnoDB DEFAULT CHARSET=utf8");
 
     print "Upgrade to $DBversion done (creating `transport_cost` table; adding UseTransportCostMatrix systempref, in circulation)\n";
-    SetVersion ($DBversion);
+    SetVersion($DBversion);
 }
 
 $DBversion ="3.09.00.038";
@@ -5926,7 +5927,6 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
-
 $DBversion = "3.09.00.053";
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do(
@@ -6055,6 +6055,290 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
    SetVersion ($DBversion);
 }
 
+$DBversion = "3.09.00.066";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+   $dbh->do("DELETE FROM systempreferences WHERE variable='DidYouMeanFromAuthorities'");
+   print "Upgrade to $DBversion done (Bug 9107: remove DidYouMeanFromAuthorities syspref)\n";
+   SetVersion ($DBversion);
+}
+
+$DBversion = "3.09.00.067";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+   $dbh->do("ALTER TABLE statistics CHANGE COLUMN ccode ccode varchar(10) NULL");
+   print "Upgrade to $DBversion done (Bug 9064: statistics.ccode potentially wrongly defined)\n";
+   SetVersion ($DBversion);
+}
+
+$DBversion = "3.10.00.00";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+   print "Upgrade to $DBversion done (release tag)\n";
+   SetVersion ($DBversion);
+}
+
+$DBversion = "3.11.00.001";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z','Alphabet that can be expanded into browse links, e.g. on Home > Patrons',NULL,'free')");
+    print "Upgrade to $DBversion done (Bug 2832 - Add alphabet syspref)\n";
+}
+
+$DBversion = "3.11.00.002";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do(q{
+        DELETE from aqorders_items where ordernumber NOT IN (SELECT ordernumber FROM aqorders);
+    });
+    $dbh->do(q{
+        ALTER TABLE aqorders_items
+        ADD CONSTRAINT aqorders_items_ibfk_1 FOREIGN KEY (ordernumber) REFERENCES aqorders (ordernumber)
+        ON DELETE CASCADE ON UPDATE CASCADE;
+    });
+    print "Upgrade to $DBversion done (Bug 9030: Add constraint on aqorders_items.ordernumber)\n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.11.00.003";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.', NULL, 'YesNo')");
+    print "Upgrade to $DBversion done (Bug 7189: Add system preference RefundLostItemFeeOnReturn)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.004";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do(qq{
+        ALTER TABLE subscription ADD COLUMN closed INT(1) NOT NULL DEFAULT 0 AFTER enddate;
+    });
+
+    print "Upgrade to $DBversion done (Bug 8782: Add field subscription.closed)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.005";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do(qq{CREATE TABLE borrower_attribute_types_branches(bat_code VARCHAR(10), b_branchcode VARCHAR(10),FOREIGN KEY (bat_code) REFERENCES borrower_attribute_types(code) ON DELETE CASCADE,FOREIGN KEY (b_branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE ) ENGINE=INNODB DEFAULT CHARSET=utf8;});
+
+    $dbh->do(qq{CREATE TABLE categories_branches(categorycode VARCHAR(10), branchcode VARCHAR(10), FOREIGN KEY (categorycode) REFERENCES categories(categorycode) ON DELETE CASCADE, FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE ) ENGINE=INNODB DEFAULT CHARSET=utf8;});
+
+    $dbh->do(qq{CREATE TABLE authorised_values_branches(av_id INTEGER, branchcode VARCHAR(10), FOREIGN KEY (av_id) REFERENCES authorised_values(id) ON DELETE CASCADE, FOREIGN KEY  (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE ) ENGINE=INNODB DEFAULT CHARSET=utf8;});
+
+    print "Upgrade to $DBversion done (Bug 7919: Display of values depending on the connexion library)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.006";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do(q{
+        UPDATE virtualshelves SET sortfield="copyrightdate" where sortfield="year";
+    });
+    print "Upgrade to $DBversion done (Bug 9167: Update the virtualshelves.sortfield column with 'copyrightdate' if needed)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.007";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'ar', 'language', 'de', 'Arabisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'hy', 'language', 'de', 'Armenisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'bg', 'language', 'de', 'Bulgarisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'zh', 'language', 'de', 'Chinesisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'cs', 'language', 'de', 'Tschechisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'da', 'language', 'de', 'Dänisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'nl', 'language', 'de', 'Niederländisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'en', 'language', 'de', 'Englisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'fi', 'language', 'de', 'Finnisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'fr', 'language', 'de', 'Französisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'lo', 'language', 'fr', 'Laotien')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'lo', 'language', 'de', 'Laotisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'el', 'language', 'de', 'Griechisch (Nach 1453)')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'he', 'language', 'de', 'Hebräisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'hi', 'language', 'de', 'Hindi')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'hu', 'language', 'de', 'Ungarisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'id', 'language', 'de', 'Indonesisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'it', 'language', 'de', 'Italienisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'ja', 'language', 'de', 'Japanisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'ko', 'language', 'de', 'Koreanisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'la', 'language', 'de', 'Latein')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'gl', 'language', 'fr', 'Galicien')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'gl', 'language', 'de', 'Galizisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'nb', 'language', 'de', 'Norwegisch bokm&#229;l')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'nn', 'language', 'de', 'Norwegisch nynorsk')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'fa', 'language', 'de', 'Persisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'pl', 'language', 'de', 'Polnisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'pt', 'language', 'de', 'Portugiesisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'ro', 'language', 'de', 'Rumänisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'ru', 'language', 'de', 'Russisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'sr', 'language', 'fr', 'Serbe')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'sr', 'language', 'de', 'Serbisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'es', 'language', 'de', 'Spanisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'sv', 'language', 'de', 'Schwedisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'tet', 'language', 'fr', 'Tétoum')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'tet', 'language', 'de', 'Tetum')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'th', 'language', 'de', 'Thailändisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'tr', 'language', 'de', 'Türkisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'uk', 'language', 'de', 'Ukrainisch')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'ur', 'language', 'fr', 'Ourdou')");
+    $dbh->do("INSERT INTO language_descriptions (subtag, type, lang, description) VALUES( 'ur', 'language', 'de', 'Urdu')");
+    print "Upgrade to $DBversion done (Bug 9056: add German and a couple of French translations to language_descriptions)\n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.11.00.008";
+if (CheckVersion($DBversion)) {
+    $dbh->do("
+        CREATE TABLE IF NOT EXISTS `borrower_modifications` (
+          `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+          `verification_token` varchar(255) NOT NULL DEFAULT '',
+          `borrowernumber` int(11) NOT NULL DEFAULT '0',
+          `cardnumber` varchar(16) DEFAULT NULL,
+          `surname` mediumtext,
+          `firstname` text,
+          `title` mediumtext,
+          `othernames` mediumtext,
+          `initials` text,
+          `streetnumber` varchar(10) DEFAULT NULL,
+          `streettype` varchar(50) DEFAULT NULL,
+          `address` mediumtext,
+          `address2` text,
+          `city` mediumtext,
+          `state` text,
+          `zipcode` varchar(25) DEFAULT NULL,
+          `country` text,
+          `email` mediumtext,
+          `phone` text,
+          `mobile` varchar(50) DEFAULT NULL,
+          `fax` mediumtext,
+          `emailpro` text,
+          `phonepro` text,
+          `B_streetnumber` varchar(10) DEFAULT NULL,
+          `B_streettype` varchar(50) DEFAULT NULL,
+          `B_address` varchar(100) DEFAULT NULL,
+          `B_address2` text,
+          `B_city` mediumtext,
+          `B_state` text,
+          `B_zipcode` varchar(25) DEFAULT NULL,
+          `B_country` text,
+          `B_email` text,
+          `B_phone` mediumtext,
+          `dateofbirth` date DEFAULT NULL,
+          `branchcode` varchar(10) DEFAULT NULL,
+          `categorycode` varchar(10) DEFAULT NULL,
+          `dateenrolled` date DEFAULT NULL,
+          `dateexpiry` date DEFAULT NULL,
+          `gonenoaddress` tinyint(1) DEFAULT NULL,
+          `lost` tinyint(1) DEFAULT NULL,
+          `debarred` date DEFAULT NULL,
+          `debarredcomment` varchar(255) DEFAULT NULL,
+          `contactname` mediumtext,
+          `contactfirstname` text,
+          `contacttitle` text,
+          `guarantorid` int(11) DEFAULT NULL,
+          `borrowernotes` mediumtext,
+          `relationship` varchar(100) DEFAULT NULL,
+          `ethnicity` varchar(50) DEFAULT NULL,
+          `ethnotes` varchar(255) DEFAULT NULL,
+          `sex` varchar(1) DEFAULT NULL,
+          `password` varchar(30) DEFAULT NULL,
+          `flags` int(11) DEFAULT NULL,
+          `userid` varchar(75) DEFAULT NULL,
+          `opacnote` mediumtext,
+          `contactnote` varchar(255) DEFAULT NULL,
+          `sort1` varchar(80) DEFAULT NULL,
+          `sort2` varchar(80) DEFAULT NULL,
+          `altcontactfirstname` varchar(255) DEFAULT NULL,
+          `altcontactsurname` varchar(255) DEFAULT NULL,
+          `altcontactaddress1` varchar(255) DEFAULT NULL,
+          `altcontactaddress2` varchar(255) DEFAULT NULL,
+          `altcontactaddress3` varchar(255) DEFAULT NULL,
+          `altcontactstate` text,
+          `altcontactzipcode` varchar(50) DEFAULT NULL,
+          `altcontactcountry` text,
+          `altcontactphone` varchar(50) DEFAULT NULL,
+          `smsalertnumber` varchar(50) DEFAULT NULL,
+          `privacy` int(11) DEFAULT NULL,
+          PRIMARY KEY (`verification_token`,`borrowernumber`),
+          KEY `verification_token` (`verification_token`),
+          KEY `borrowernumber` (`borrowernumber`)
+        ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+");
+
+    $dbh->do("
+        INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
+        ('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'),
+        ('PatronSelfRegistrationVerifyByEmail', '0', NULL, 'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate his or her account.', 'YesNo'),
+        ('PatronSelfRegistrationDefaultCategory', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'),
+        ('PatronSelfRegistrationExpireTemporaryAccountsDelay', '0', NULL, 'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.', 'Integer'),
+        ('PatronSelfRegistrationBorrowerMandatoryField',  'surname|firstname', NULL ,  'Choose the mandatory fields for a patron''s account, when registering via the OPAC.',  'free'),
+        ('PatronSelfRegistrationBorrowerUnwantedField',  '', NULL ,  'Name the fields you don''t want to display when registering a new patron via the OPAC.',  'free');
+    ");
+
+    $dbh->do("
+    INSERT INTO  letter ( `module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content` )
+    VALUES ( 'members', 'OPAC_REG_VERIFY', '', 'Opac Self-Registration Verification Email', '1', 'Verify Your Account', 'Hello!
+
+    Your library account has been created. Please verify your email address by clicking this link to complete the signup process:
+
+    http://<<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>
+
+    If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly.'
+    )");
+
+    print "Upgrade to $DBversion done (Bug 7067: Add Patron Self Registration)\n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.11.00.009";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("
+        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES
+        ('SeparateHoldings', '0', 'Separate current branch holdings from other holdings', NULL, 'YesNo'),
+        ('SeparateHoldingsBranch', 'homebranch', 'Branch used to separate holdings', 'homebranch|holdingbranch', 'Choice'),
+        ('OpacSeparateHoldings', '0', 'Separate current branch holdings from other holdings (OPAC)', NULL, 'YesNo'),
+        ('OpacSeparateHoldingsBranch', 'homebranch', 'Branch used to separate holdings (OPAC)', 'homebranch|holdingbranch', 'Choice')
+    ");
+
+    print "Upgrade to $DBversion done (Bug 7674: Add systempreferences SeparateHoldings, SeparateHoldingsBranch, OpacSeparateHoldings and OpacSeparateHoldingsBranch) \n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.11.00.010";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('RenewalSendNotice', '0', '', NULL, 'YesNo')");
+    $dbh->do(q{
+        INSERT INTO `letter` (`module`, `code`, `name`, `title`, `content`) VALUES
+        ('circulation','RENEWAL','Item Renewals','Item Renewals','The following items have been renewed:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.');
+    });
+    print "Upgrade to $DBversion done (Bug 9151 - Renewal notice according to patron alert preferences)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.011";
+if ( CheckVersion($DBversion) ) {
+   $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HTML5MediaEnabled','not','Show a HTML5 media player in a tab on opac-detail.pl for media files catalogued in field 856.','not|opac|staff|both','Choice');");
+   $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HTML5MediaExtensions','webm|ogg|ogv|oga|vtt','Media file extensions','','free');");
+   print "Upgrade to $DBversion done (Bug 8377: Add HTML5MediaEnabled and HTML5MediaExtensions sysprefs)\n";
+   SetVersion ($DBversion);
+}
+
+$DBversion = "3.11.00.012";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowHoldsOnPatronsPossessions', '1', 'Allow holds on records that patron have items of it',NULL,'YesNo')");
+    print "Upgrade to $DBversion done (Bug 9206: Only allow place holds in records that the patron don't have in his possession)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.013";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free')");
+    print "Upgrade to $DBversion done (Bug 9162 - Add a system preference to set which notes fields appears on title notes/description separator)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.014";
+if ( CheckVersion($DBversion) ) {
+   $dbh->do("INSERT INTO systempreferences ( variable, value, explanation, type ) VALUES ( 'SCOUserCSS', '', 'Add CSS to be included in the SCO module in an embedded <style> tag.', 'free' )");
+   $dbh->do("INSERT INTO systempreferences ( variable, value, explanation, type ) VALUES ( 'SCOUserJS', '', 'Define custom javascript for inclusion in the SCO module', 'free' )");
+   print "Upgrade to $DBversion done (Bug 9009: Add SCOUserCSS and SCOUserJS sysprefs)\n";
+   SetVersion ($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)
@@ -6136,4 +6420,33 @@ sub SetVersion {
     }
     C4::Context::clear_syspref_cache(); # invalidate cached preferences
 }
+
+=head2 CheckVersion
+
+Check whether a given update should be run when passed the proposed version
+number. The update will always be run if the proposed version is greater
+than the current database version and less than or equal to the version in
+kohaversion.pl. The update is also run if the version contains XXX, though
+this behavior will be changed following the adoption of non-linear updates
+as implemented in bug 7167.
+
+=cut
+
+sub CheckVersion {
+    my ($proposed_version) = @_;
+    my $version_number = TransformToNum($proposed_version);
+
+    # The following line should be deleted when bug 7167 is pushed
+    return 1 if ( $proposed_version =~ m/XXX/ );
+
+    if ( C4::Context->preference("Version") < $version_number
+        && $version_number <= TransformToNum( C4::Context->final_linear_version ) )
+    {
+        return 1;
+    }
+    else {
+        return 0;
+    }
+}
+
 exit;
index d35a471..79ceb48 100644 (file)
@@ -155,4 +155,12 @@ a.tagnum {
 .floating {
        -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
        box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
+}
+
+tr.active td {
+    background-color: #FFFFCC;
+}
+
+tr.active.highlight td {
+    background-color: #FEF4B4;
 }
\ No newline at end of file
index 262fe11..c58e9a5 100644 (file)
@@ -69,4 +69,8 @@ h3.collapsed {
 
 #yui-main {
        margin-bottom:2em;
+}
+#toolbar.floating {
+    box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.5);
+    border-radius: 0;
 }
\ No newline at end of file
index 955b68b..239059c 100644 (file)
@@ -286,25 +286,30 @@ td.debit {
        text-align : left;
        }
 
-div#breadcrumbs,
-div#toplevelnav,
-div#login,
-div#header_search,
-div#toolbar,
-div#changelanguage,
-div#menu,
+#breadcrumbs,
+#toplevelnav,
+#login,
+#header,
+#header_search,
+#toolbar,
+#changelanguage,
+#menu,
+.gradient,
 div.yui-b,
 .noprint,
 form#sortbyform,
 #cartDetails,
 fieldset.action,
 .list-actions,
-.print {
+.print,
+.ui-tabs-nav {
     display: none;
 }
 
-div#yui-main div.yui-b {
-       display : block;
+div#yui-main div.yui-b,
+.ui-tabs .ui-tabs-panel,
+.ui-tabs .ui-tabs-hide {
+    display : block !important;
 }
 
 .yui-t1 #yui-main div.yui-b,
index 6f5a840..349a65d 100644 (file)
@@ -36,8 +36,6 @@ a.yuimenuitemlabel {
         color: #000000;
 }
 
-
-a.overdue,
 .overdue,
 .debit {
        color : #cc0000;
@@ -211,39 +209,6 @@ ol li {
 .clearfix {display: block;}
 /* End hide from IE-mac */
 
-#sitetitle {
-/*     background-image : url("../../img/koha-logo-black.png");
-       background-position : 5px 2px;
-       background-repeat : no-repeat;
-       float : left;
-       height : 54px;
-       padding-left : 50px;*/
-       border-bottom : 1px solid #E8E8E8;
-}
-
-#sitetitle h1 {
-       display : inline;
-       line-height : 54px;
-}
-
-#sitetitle h1 a {
-       text-decoration : none;
-}
-
-#submenu {
-       margin : 0 0 .5em 0;
-       padding : 0;
-}
-
-#submenu ul {
-       margin : 0;
-       padding : 0;    
-}
-
-#submenu ul li {
-       padding-left : 0;
-}
-
 table {
        border-collapse : collapse;
        border-top : 1px solid #BCBCBC;
@@ -378,10 +343,6 @@ legend {
        margin-top : 1em;
 }
 
-#commonsearch {
-       display : inline;
-}
-
 div.justify {
     text-align: justify;
 }
@@ -397,17 +358,6 @@ div#header_search input {
        font-size : 1.3em;
 }
 
-div#header_search ul.link-tabs {
-       font-family : Arial, Geneva, sans-serif;
-       margin-bottom : -4px;
-}
-
-div#header_search ul.link-tabs li.on a,
-div#header_search ul.link-tabs li a,
-div#header_search ul.link-tabs li.off a {
-       padding : 0.1em .5em .2em .5em;
-}
-
 div#header_search div.residentsearch {
        border : 0;
     border-bottom : 1px solid #85ca11;
@@ -516,7 +466,7 @@ div.patroninfo ul li {
        margin : 0;
 }
 
-div.patroninfo ul li, div.patronviews ul li {
+div.patroninfo ul li {
        list-style-type : none;
 }
 
@@ -526,6 +476,7 @@ div.patronviews {
        margin-bottom : .5em;
        padding : .5em 0 .5em 0;
 }
+}
 
 .column-tool {
        font-size: 80%;
@@ -994,10 +945,6 @@ tr.highlight th[scope=row] {
        border-color : #BCBCBC;
 }
 
-tr.confirm td, tr.highlight.confirm td {
-       background-color : #ffbfbf;
-}
-
 #circ_circulation_issue label {
        font-size: 105%;
        font-weight : bold;
@@ -1210,7 +1157,7 @@ div.message {
        background: -webkit-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Chrome10+,Safari5.1+ */
        background: -o-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Opera11.10+ */
        background: -ms-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* IE10+ */
-       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cddbf2',GradientType=0 ); /* IE6-9 */
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eaeef5', endColorstr='#cddbf2',GradientType=0 ); /* IE6-9 */
        background: linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* W3C */
        border : 1px solid #bcbcbc;
        text-align: center;
@@ -1305,7 +1252,6 @@ div#menu li a {
     background: -webkit-linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */
      background: -o-linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* Opera11.10+ */
    background: -ms-linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* IE10+ */
-        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e8f0f6', endColorstr='#c1c1c1',GradientType=1 ); /* IE6-9 */
        background: linear-gradient(left, #e8f0f6 0%,#e8f0f6 96%,#c1c1c1 100%); /* W3C */
        -moz-border-top-left-radius: 5px;
        border-top-left-radius: 5px;
@@ -1319,15 +1265,12 @@ div#menu li a {
 }
 
 div#menu li a:hover {
-
-
      background: #fff; /* Old browsers */
    background: -moz-linear-gradient(left, #FAFAFA 0%, #FAFAFA 96%, #e6e6e6 97%, #cccccc 99%, #c1c1c1 100%); /* FF3.6+ */
   background: -webkit-gradient(linear, left top, right top, color-stop(0%,#FAFAFA), color-stop(96%,#FAFAFA), color-stop(97%,#e6e6e6), color-stop(99%,#cccccc), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */
   background: -webkit-linear-gradient(left, #FAFAFA 0%,#FAFAFA 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */
      background: -o-linear-gradient(left, #FAFAFA 0%,#FAFAFA 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Opera11.10+ */
    background: -ms-linear-gradient(left, #FAFAFA 0%,#FAFAFA 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* IE10+ */
-        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#c1c1c1',GradientType=1 ); /* IE6-9 */
        background: linear-gradient(left, #FAFAFA 0%,#fff 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* W3C */
     border-left: 1px solid #85CA11;
     border-top: 1px solid #85CA11;
@@ -1354,14 +1297,6 @@ div#menu li.active a:hover {
     border-right: 0;
 }
 
-ul.error {
-       background : #ffffcc;
-       border : 1px solid #ff9090;
-       margin : .5em;
-       padding : .5em .5em .5em 1.5em;
-       width : 75%
-}
-
 h1#logo {
        border:0pt none;
        float:left !important;
@@ -1711,14 +1646,14 @@ ul#toplevelmenu li.more ul li a.yuimenuitemlabel {
        padding: .2em 20px .2em 20px;
 }
                
-ul#menu li a, ul#toplevelmenu li a {
+ul#toplevelmenu li a {
        text-decoration : none;
 }
-ul#menu li ul li, ul#toplevelmenu li ul li {
+ul#toplevelmenu li ul li {
        display :block;
        padding :0;
 }
-ul#menu li ul li a, ul#toplevelmenu li ul li a {
+ul#toplevelmenu li ul li a {
        text-decoration : none;
 }
 
@@ -1893,20 +1828,6 @@ span.permissiondesc {
        color: black;
 }
 
-.hintsClass {
-    font-family: tahoma, verdana, arial;
-    font-size: 12px;
-    background-color: #f0f0f0;
-    color: #000000;
-    border: 1px solid #808080;
-    padding: 5px;
-}
-.hintSource {
-    color: green;
-    text-decoration: underline;
-    cursor: pointer;
-}
-
 #cartDetails {
        background-color : #FFF;
        border: 1px solid #739acf;
@@ -2054,26 +1975,6 @@ fieldset.rows+h3 {clear:both;padding-top:.5em;}
     margin: 0;
 }
 
-.advsearch fieldset {
-    border : 1px solid #EEE;
-    -moz-border-radius : 3px;
-    border-radius : 3px;
-}
-
-.advsearch fieldset.action {
-    border : 0;
-}
-
-.advsearch fieldset fieldset {
-    border : 1px solid #EEE;
-    margin : 0;
-    padding : .3em .5em;
-    -moz-border-radius : 0;
-    border-radius : 0;
-}
-.advsearch fieldset fieldset+fieldset {
-    border-top : 0;
-}
 .advsearch table {
     border-spacing : 5px;
     border-collapse : separate;
@@ -2496,3 +2397,10 @@ div.authorizedheading {
 .ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
 .ui-timepicker-div td { font-size: 90%; }
 .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
+
+/* jQuery UI Accordion */
+.ui-accordion-header { font-weight: bold; font-size : 110%; }
+
+video {
+    width: 480px;
+}
index 740a3b5..f8e6b4a 100644 (file)
@@ -23,8 +23,7 @@
        function addToCart() { addRecord('[% biblionumber %]'); }
        function addToShelf() { window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=[% biblionumber %]','Add_to_virtualshelf','width=500,height=400,toolbar=false,scrollbars=yes');
        }
-       function printBiblio() {window.open('/cgi-bin/koha/catalogue/detailprint.pl?biblionumber=[% biblionumber %]','Print_Biblio','width=700,height=500,toolbar=false,scrollbars=yes');
-       }
+    function printBiblio() {window.print(); }
 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
 function confirm_deletion() {
                var count = [% count %];
@@ -235,7 +234,7 @@ function confirm_items_deletion() {
        [% END %]       
 
        <li><a id="addtoshelf" href="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=[% biblionumber %]">Add to shelf</a></li>
-       <li><a id="printbiblio" href="/cgi-bin/koha/catalogue/detailprint.pl?biblionumber=[% biblionumber %]">Print</a></li>
+    <li><span id="printbiblio"></span></li>
        [% IF ( CAN_user_reserveforothers ) %]
     [% UNLESS ( norequests ) %]<li><a id="placehold" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">Place hold</a></li>[% END %]
        [% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
deleted file mode 100644 (file)
index 23c7de2..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-<div id="toolbar">
-       <script type="text/javascript">
-       //<![CDATA[
-
-function confirm_deletion() {
-    var is_confirmed = window.confirm(_('Are you sure you want to delete this patron? This cannot be undone.'));
-    if (is_confirmed) {
-        window.location='/cgi-bin/koha/members/deletemem.pl?member=[% borrowernumber %]';
-    }
-}
-
-function confirm_updatechild() {
-    var is_confirmed = window.confirm(_('Are you sure you want to update this child to an Adult category?  This cannot be undone.'));
-    if (is_confirmed) {
-        window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
-    }
-}
-
-function confirm_reregistration() {
-    var is_confirmed = window.confirm(_('Are you sure you want to renew this patron\'s registration?'));
-    // var borrowernumbervalue1 = $("#borrowernumber").attr("value");
-    if (is_confirmed) {
-       window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&amp;destination=circ&amp;reregistration=y';
-    }
-}
-
-function update_child() {
-    // var borrowernumbervalue= $("#borrowernumber").attr("value"); 
-[% IF ( CATCODE_MULTI ) %]
- window.open('/cgi-bin/koha/members/update-child.pl?op=multi&borrowernumber=[% borrowernumber %]','UpdateChild','width=400,height=300,toolbar=no,scrollbars=yes,resizable=yes');
-[% ELSE %]
- confirm_updatechild();
-[% END %]
-}
-
-function export_barcodes() {
-    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]&amp;op=export_barcodes');
-}
-
-       // prepare DOM for YUI Toolbar
-
-        $(document).ready(function() {
-           $("#printslip,#patronflags,#deletepatron").parent().remove();
-               $("#moremenuc,#printmenuc,#searchtoholdc").empty();
-           yuiToolbar();
-        });
-
-       // YUI Toolbar Functions
-    var slip_re = /slip/;
-       function printx_window(print_type) {
-        var handler = print_type.match(slip_re) ? "printslip" : "moremember";
-               window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&amp;print=" + print_type, "printwindow");
-               return false;
-       }
-       function searchToHold(){
-               var date = new Date();
-               date.setTime(date.getTime() + (10 * 60 * 1000));
-           $.cookie("holdfor", "[% borrowernumber %]", { path: "/", expires: date });
-           location.href="/cgi-bin/koha/catalogue/search.pl";
-       }
-       function yuiToolbar() {
-           var printmenu = [
-            [% IF ( CAN_user_borrowers ) %]
-            { text: _("Print summary"), onclick: {fn: function(){printx_window("page")}} },
-            [% END %]
-            { text: _("Print slip"), onclick: {fn: function(){printx_window("slip")}} },
-            { text: _("Print quick slip"), onclick: {fn: function(){printx_window("qslip")}} }
-           ];
-       
-               var moremenu = [
-            { text: _("Renew patron"),  onclick: { fn: confirm_reregistration } },
-            { text: _("Set permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]"[% UNLESS CAN_user_permissions %], disabled: true[% END %]},
-            { text: _("Delete"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_deletion } },
-            { text: _("Update child to adult patron") , onclick: { fn: update_child }[% UNLESS is_child %], disabled: true[% END %]},
-            { text: _("Export today's checked in barcodes"), onclick: { fn: export_barcodes }}
-        ];
-
-           new YAHOO.widget.Button({
-               type: "menu",
-               label: _("Print"),
-               name: "printmenubutton",
-               menu: printmenu,
-               container: "printmenuc"
-           });
-           new YAHOO.widget.Button({
-               id: "searchtohold",
-               type: "button",
-               label: _("Search to hold"),
-               container: "searchtoholdc",
-                       onclick: {fn: searchToHold }
-               });
-           new YAHOO.widget.Button({
-               type: "menu",
-               label: _("More"),
-               name: "moremenubutton",
-               menu: moremenu,
-               container: "moremenuc"
-           });
-
-           [% IF ( adultborrower ) %]new YAHOO.widget.Button("addchild");[% END %]
-           new YAHOO.widget.Button("editpatron");
-           new YAHOO.widget.Button("addnote");
-        [% IF CAN_user_borrowers %] new YAHOO.widget.Button("changepassword");  [% END %]
-           new YAHOO.widget.Button("duplicate");
-           new YAHOO.widget.Button("printslip");
-               new YAHOO.widget.Button("printpage");
-       }
-
-       //]]>
-       </script>
-       <ul class="toolbar">
-       [% IF ( CAN_user_borrowers ) %]
-       [% IF ( category_type ) %]
-            [% IF ( guarantor ) %]
-                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;guarantorid=[% guarantorborrowernumber %]&amp;category_type=[% category_type %]">
-            [% ELSE %]
-            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">
-            [% END %]Edit</a></li>
-        [% ELSE %] <!-- try with categorycode if no category_type -->
-            [% IF ( categorycode ) %]
-            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit</a></li>
-            [% ELSE %] <!-- if no categorycode, set category_type to A by default -->
-                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;category_type=A">Edit</a></li>
-            [% END %]
-        [% END %]
-       [% END %]
-       [% IF ( CAN_user_borrowers ) %]
-        [% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
-        [% IF ( CAN_user_borrowers ) %] <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change password</a></li>[% END %]
-    [% END %]
-    <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
-    <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=page">Print summary</a></li>
-    <li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=slip">Print slip</a></li>
-       <li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li>
-    <li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=[% borrowernumber %]">Renew account</a></li>
-    [% IF ( CAN_user_permissions ) %]
-        [% IF ( StaffMember ) %]
-            [% IF ( CAN_user_staffaccess ) %]
-                <li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]">Set permissions</a></li>
-            [% END %]
-          [% ELSE %]
-                <li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]">Set permissions</a></li>
-        [% END %]
-    [% END %]
-    [% IF ( StaffMember ) %][% UNLESS ( CAN_user_staffaccess ) %]<li><a id="deletepatron" href="javascript:confirm_deletion();">Delete</a></li>[% END %]
-    [% ELSE %]<li><a id="deletepatron" href="javascript:confirm_deletion();">Delete</a></li>[% END %]
-
-</ul></div>
index 9acdf90..0bb9255 100644 (file)
 <div id="toolbar">
-       <script type="text/javascript">
-       //<![CDATA[
-
+    <script type="text/javascript">
+    //<![CDATA[
+[% IF ( CAN_user_borrowers ) %]
 function confirm_deletion() {
     var is_confirmed = window.confirm(_('Are you sure you want to delete this patron? This cannot be undone.'));
     if (is_confirmed) {
-            window.location='/cgi-bin/koha/members/deletemem.pl?member=[% borrowernumber %]';
-    }
-}
-function confirm_updatechild() {
-    var is_confirmed = window.confirm(_('Are you sure you want to update this child to an Adult category?  This cannot be undone.'));
-
-    if (is_confirmed) {
-            window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
+        window.location='/cgi-bin/koha/members/deletemem.pl?member=[% borrowernumber %]';
     }
 }
 
-function confirm_reregistration() {
-    var is_confirmed = window.confirm(_('Are you sure you want to renew this patron\'s registration?'));
+[% IF ( is_child ) %]function confirm_updatechild() {
+    var is_confirmed = window.confirm(_('Are you sure you want to update this child to an Adult category?  This cannot be undone.'));
     if (is_confirmed) {
-    window.location='/cgi-bin/koha/members/moremember.pl?reregistration=y&borrowernumber=[% borrowernumber %]';
+        window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
     }
 }
 
 function update_child() {
 [% IF ( CATCODE_MULTI ) %]
- window.open('update-child.pl?op=multi&borrowernumber=[% borrowernumber %]','UpdateChild','width=400,height=300,toolbar=no,scrollbars=yes,resizable=yes');
+ window.open('/cgi-bin/koha/members/update-child.pl?op=multi&borrowernumber=[% borrowernumber %]','UpdateChild','width=400,height=300,toolbar=no,scrollbars=yes,resizable=yes');
 [% ELSE %]
  confirm_updatechild();
 [% END %]
+}[% ELSE %][% END %]
+
+function confirm_reregistration() {
+    var is_confirmed = window.confirm(_('Are you sure you want to renew this patron\'s registration?'));
+    if (is_confirmed) {
+       window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&amp;destination=[% destination %]&amp;reregistration=y';
+    }
+}
+function export_barcodes() {
+    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]&amp;op=export_barcodes');
 }
+[% END %]
 
-       // prepare DOM for YUI Toolbar
+    // prepare DOM for YUI Toolbar
 
-        $(document).ready(function() {
-           $("#printslip,#patronflags,#deletepatron").parent().remove();
-               $("#moremenuc,#printmenuc,#searchtoholdc").empty();
-           yuiToolbar();
-        });
+     $(document).ready(function() {
+        $("#printslip,#patronflags,#deletepatron").parent().remove();
+        $("#moremenuc,#printmenuc,#searchtoholdc").empty();
+        yuiToolbar();
+     });
 
-       // YUI Toolbar Functions
-       function printx_window(print_type) {
-               window.open("/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=" + print_type, "printwindow");
-               return false;
-       }
-       function searchToHold(){
-               var date = new Date();
-               date.setTime(date.getTime() + (10 * 60 * 1000));
-           $.cookie("holdfor", "[% borrowernumber %]", { path: "/", expires: date });
-           location.href="/cgi-bin/koha/catalogue/search.pl";
-       }
-       function yuiToolbar() {
-           var printmenu = [
+    // YUI Toolbar Functions
+    var slip_re = /slip/;
+    function printx_window(print_type) {
+        var handler = print_type.match(slip_re) ? "printslip" : "moremember";
+        window.open("/cgi-bin/koha/members/" + handler + ".pl?borrowernumber=[% borrowernumber %]&amp;print=" + print_type, "printwindow");
+        return false;
+    }
+    function searchToHold(){
+        var date = new Date();
+        date.setTime(date.getTime() + (10 * 60 * 1000));
+        $.cookie("holdfor", "[% borrowernumber %]", { path: "/", expires: date });
+        location.href="/cgi-bin/koha/catalogue/search.pl";
+    }
+    function yuiToolbar() {
+        var printmenu = [
             { text: _("Print summary"), onclick: {fn: function(){printx_window("page")}} },
             { text: _("Print slip"), onclick: {fn: function(){printx_window("slip")}} },
             { text: _("Print quick slip"), onclick: {fn: function(){printx_window("qslip")}} }
-           ];
+        ];
 
-               var moremenu = [
-            { text: _("Renew patron"),  onclick: { fn: confirm_reregistration } },
-            { text: _("Set permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]"[% UNLESS ( CAN_user_permissions ) %], disabled: true[% END %]},
-                       { text: _("Delete"), onclick: { fn: confirm_deletion}[% UNLESS ( CANDELETEUSER ) %], disabled: true[% END %] },
-            { text: _("Update child to adult patron") , onclick: { fn: update_child }[% UNLESS ( is_child ) %], disabled: true[% END %]}
-               ];
+        var moremenu = [
+            { text: _("Renew patron"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_reregistration } },
+            { text: _("Set permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]"[% UNLESS CAN_user_permissions %], disabled: true[% END %]},
+            { text: _("Delete"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_deletion } },
+            { text: _("Update child to adult patron")[% IF is_child && CAN_user_borrowers %], onclick: { fn: update_child }[% ELSE %], disabled: true[% END %]},
+            { text: _("Export today's checked in barcodes"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: export_barcodes }}
+        ];
 
-           new YAHOO.widget.Button({
-               type: "menu",
-               label: _("Print"),
-               name: "printmenubutton",
-               menu: printmenu,
-               container: "printmenuc"
-           });
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("Print"),
+            name: "printmenubutton",
+            menu: printmenu,
+            container: "printmenuc"
+        });
+        new YAHOO.widget.Button({
+            id: "searchtohold",
+            type: "button",
+            label: _("Search to hold"),
+            container: "searchtoholdc",
+            onclick: {fn: searchToHold }
+        });
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("More"),
+            name: "moremenubutton",
+            menu: moremenu,
+            container: "moremenuc"
+        });
 
-           new YAHOO.widget.Button({
-               id: "searchtohold",
-               type: "button",
-               label: _("Search to hold"),
-               container: "searchtoholdc",
-                       onclick: {fn: searchToHold }
-               });
-
-           new YAHOO.widget.Button({
-               type: "menu",
-               label: _("More"),
-               name: "moremenubutton",
-               menu: moremenu,
-               container: "moremenuc"
-           });
-
-           [% IF ( adultborrower ) %]new YAHOO.widget.Button("addchild");[% END %]
-           new YAHOO.widget.Button("editpatron");
-           new YAHOO.widget.Button("addnote");
-            [% IF CAN_user_borrowers %]new YAHOO.widget.Button("changepassword");  [% END %]
-           new YAHOO.widget.Button("duplicate");
-           new YAHOO.widget.Button("printslip");
-               new YAHOO.widget.Button("printpage");
-       }
-
-       //]]>
+        [% IF ( CAN_user_borrowers ) %][% IF ( adultborrower ) %]new YAHOO.widget.Button("addchild");[% END %]
+        new YAHOO.widget.Button("editpatron");
+        new YAHOO.widget.Button("changepassword");
+        new YAHOO.widget.Button("duplicate");[% END %]
+        new YAHOO.widget.Button("printslip");
+        new YAHOO.widget.Button("printpage");
+    }
 
-       </script>
-       <ul class="toolbar">
-       [% IF ( category_type ) %]
+    //]]>
+    </script>
+    <ul class="toolbar">
+    [% IF ( CAN_user_borrowers ) %]
+        [% IF ( category_type ) %]
             [% IF ( guarantor ) %]
-                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;guarantorid=[% guarantorborrowernumber %]&amp;category_type=[% category_type %]">
+                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;guarantorid=[% guarantorborrowernumber %]&amp;category_type=[% category_type %]">
             [% ELSE %]
-            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">
+            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">
             [% END %]Edit</a></li>
         [% ELSE %] <!-- try with categorycode if no category_type -->
             [% IF ( categorycode ) %]
-            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit</a></li>
+            <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit</a></li>
             [% ELSE %] <!-- if no categorycode, set category_type to A by default -->
-                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;category_type=A">Edit</a></li>
+                <li><a id="editpatron" href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=[% destination %]&amp;borrowernumber=[% borrowernumber %]&amp;category_type=A">Edit</a></li>
             [% END %]
         [% END %]
-       [% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
-    [% IF CAN_user_borrowers %]<li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change password</a></li> [% END %]
-       <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
+        [% IF ( adultborrower AND activeBorrowerRelationship ) %]<li><a id="addchild" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C">Add child</a></li>[% END %]
+        <li><a id="changepassword" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Change password</a></li>
+        <li><a id="duplicate" href="/cgi-bin/koha/members/memberentry.pl?op=duplicate&amp;borrowernumber=[% borrowernumber %]&amp;category_type=[% category_type %]">Duplicate</a></li>
+    [% END %]
     <li id="printmenuc"><a id="printpage" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=page">Print summary</a></li>
     <li><a id="printslip" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]&amp;print=slip">Print slip</a></li>
-       <li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li>
-    <li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=[% borrowernumber %]">Renew account</a></li>[% IF ( CAN_user_permissions ) %]<li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]">Set permissions</a></li>[% END %]<li><a id="deletepatron" href="javascript:confirm_deletion();">Delete</a></li>
+    <li id="searchtoholdc"><a id="searchtohold" href="#">Search to hold</a></li>
+    [% IF ( CAN_user_borrowers ) %]<li id="moremenuc"><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&amp;borrowernumber=[% borrowernumber %]">Renew account</a></li>[% END %]
+    [% IF ( CAN_user_permissions ) %]
+        [% IF ( CAN_user_staffaccess ) %]
+            <li><a id="patronflags" href="/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]">Set permissions</a></li>
+        [% END %]
+    [% END %]
+    [% IF ( CAN_user_staffaccess ) %]<li><a id="deletepatron" href="#" onclick="confirm_deletion();">Delete</a></li>[% END %]
+
 </ul></div>
index 6909e1c..a0f6abb 100644 (file)
@@ -1,6 +1,6 @@
 [% IF ( PAGE_NUMBERS ) %]<div class="pages">
     <!-- Row of numbers corresponding to search result pages -->
-        [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">&lt;&lt; Previous</a>[% END %]
+        [% IF ( previous_page_offset.defined ) %]<a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">&lt;&lt; Previous</a>[% END %]
     [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %]        <a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
     [% END %]
         [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">Next &gt;&gt;</a>[% END %]
index 0feafda..8083192 100644 (file)
@@ -1,6 +1,7 @@
 [% IF ( subscriptionid ) %]
 <ul>
 <li><a href="serials-collection.pl?subscriptionid=[% subscriptionid %]">Serial collection</a></li>
+  [% UNLESS closed %]
     [% IF ( routing && CAN_user_serials_routing ) %]
         [% IF ( hasRouting ) %]
              <li><a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid %]">Edit routing list</a></li>
@@ -8,6 +9,7 @@
             <li><a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscriptionid %]&amp;op=new">Create routing list</a></li>
         [% END %]
     [% END %]
+  [% END %]
 </ul>
 [% END %]
 
index 00f76bc..0e7497d 100644 (file)
@@ -1,6 +1,18 @@
 <div id="toolbar"><script type="text/javascript">
        //<![CDATA[
 
+    function confirm_close() {
+        var is_confirmed = confirm(_("Are you sure you want to close this subscription?"));
+        if (is_confirmed) {
+            window.location="subscription-detail.pl?subscriptionid=[% subscriptionid %]&op=close";
+        }
+    }
+    function confirm_reopen() {
+        var is_confirmed = confirm(_("Are you sure you want to reopen this subscription?"));
+        if (is_confirmed) {
+            window.location="subscription-detail.pl?subscriptionid=[% subscriptionid %]&op=reopen";
+        }
+    }
        // prepare DOM for YUI Toolbar
 
         $(document).ready(function() {
@@ -50,6 +62,8 @@ onclick: {fn:function(){popup([% subscriptionid %])}}
                [% END %]
            new YAHOO.widget.Button("renew");
            new YAHOO.widget.Button("receive");
+        new YAHOO.widget.Button("close");
+        new YAHOO.widget.Button("reopen");
                [% END %]
        }
 
@@ -57,38 +71,49 @@ onclick: {fn:function(){popup([% subscriptionid %])}}
        </script>
 <ul class="toolbar">
     [% IF ( CAN_user_serials_create_subscription ) %]
-       [% IF ( biblionumber_for_new_subscription ) %]
-        <li><a id="newsubscription" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber_for_new_subscription %]">New subscription</a></li>
-       [% ELSE %]
-        <li><a id="newsubscription" href="/cgi-bin/koha/serials/subscription-add.pl">New subscription</a></li>
-       [% END %]
+        [% IF ( biblionumber_for_new_subscription ) %]
+            <li><a id="newsubscription" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber_for_new_subscription %]">New subscription</a></li>
+        [% ELSE %]
+            <li><a id="newsubscription" href="/cgi-bin/koha/serials/subscription-add.pl">New subscription</a></li>
+        [% END %]
     [% END %]
 
     [% IF ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription ) %]
-       [% IF ( subscriptionid ) %]
+        [% IF ( subscriptionid ) %]
 
-           [% IF ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription ) %]
-               [% UNLESS ( cannotedit ) %]
-                   <li id="editmenuc"><a id="edit" href="/cgi-bin/koha/serials/subscription-add.pl?op=modify&amp;subscriptionid=[% subscriptionid %]">Edit</a></li>
-               [% END %]
-           [% END %]
+            [% IF ( CAN_user_serials_edit_subscription || CAN_user_serials_create_subscription || CAN_user_serials_delete_subscription ) %]
+                [% UNLESS ( cannotedit ) %]
+                    <li id="editmenuc"><a id="edit" href="/cgi-bin/koha/serials/subscription-add.pl?op=modify&amp;subscriptionid=[% subscriptionid %]">Edit</a></li>
+                [% END %]
+            [% END %]
 
-           [% IF ( CAN_user_serials_create_subscription ) %]
-               <li><a id="duplicate" href="/cgi-bin/koha/serials/subscription-add.pl?op=dup&amp;subscriptionid=[% subscriptionid %]">Duplicate </a></li>
-           [% END %]
+            [% IF ( CAN_user_serials_create_subscription ) %]
+                <li><a id="duplicate" href="/cgi-bin/koha/serials/subscription-add.pl?op=dup&amp;subscriptionid=[% subscriptionid %]">Duplicate </a></li>
+            [% END %]
 
-           [% UNLESS ( cannotedit ) %]
-               [% IF ( CAN_user_serials_renew_subscription ) %]
-                   <li id="renewc"><a id="renew" href="#" onclick="popup([% subscriptionid %])">Renew </a></li>
-               [% END %]
-               [% IF ( CAN_user_serials_receive_serials ) %]
-                   <li><a id="receive" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscriptionid %]&amp;serstatus=1,3">Receive</a></li>
-               [% END %]
-               [% IF ( CAN_user_serials_delete_subscription ) %]
-                   <li><a id="delete" href="javascript:confirm_deletion()">Delete</a></li>
-               [% END %]
-           [% END %]
-       [% END %]
+            [% UNLESS ( cannotedit ) %]
+                [% UNLESS closed %]
+                    [% IF ( CAN_user_serials_renew_subscription ) %]
+                        <li id="renewc"><a id="renew" href="#" onclick="popup([% subscriptionid %])">Renew </a></li>
+                    [% END %]
+                [% END %]
+                [% IF ( CAN_user_serials_receive_serials ) %]
+                    [% UNLESS closed %]
+                        <li><a id="receive" href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscriptionid %]&amp;serstatus=1,3">Receive</a></li>
+                    [% END %]
+                [% END %]
+                [% IF CAN_user_serials_edit_subscription %]
+                    [% IF closed %]
+                        <li><a id="reopen" href="javascript:confirm_reopen();">Reopen</a></li>
+                    [% ELSE %]
+                        <li><a id="close" href="javascript:confirm_close();">Close</a></li>
+                    [% END %]
+                [% END %]
+                [% IF ( CAN_user_serials_delete_subscription ) %]
+                    <li><a id="delete" href="javascript:confirm_deletion()">Delete</a></li>
+                [% END %]
+            [% END %]
+        [% END %]
     [% END %]
 </ul>
 </div>
index 896e59e..5e6bf63 100644 (file)
@@ -6,21 +6,21 @@
                <p>
                <label>Audience</label>
                <select name="limit" class="subtype">
-            <option value="" SELECTED="selected" >Any</option>
+            <option value="" selected="selected" >Any</option>
                        <option value="aud:a">juvenile, general</option>
                        <option value="aud:b">pre-primary (0-5)</option>
-                       <option value="aud:c">Primary (5-8)</option>
+            <option value="aud:c">primary (5-8)</option>
                        <option value="aud:d">children (9-14)</option>
-                       <option value="aud:e">Young Adult</option>
-                       <option value="aud:k">Adult, serious</option>
-                       <option value="aud:m">Adult, General</option>
-                       <option value="aud:u">Unknown</option>
+            <option value="aud:e">young Adult</option>
+            <option value="aud:k">adult, serious</option>
+            <option value="aud:m">adult, general</option>
+            <option value="aud:u">unknown</option>
                </select>
                </p>
                <p>
                <label>Print</label>
         <select name="limit" class="subtype">
-                       <option value="" selected="selected" >any</option>
+            <option value="" selected="selected" >Any</option>
                                <option value="Material-type:r">regular print</option>
                                <option value="Material-type:d">large print</option>
                                <option value="Material-type:e">newspaper format</option>
                                <option value="Material-type:h">hand-written</option>
                                <option value="Material-type:i">multimedia</option>
                                <option value="Material-type:j">mini-print</option>
+                <option value="Material-type:s">electronic ressource</option>
+                <option value="Material-type:t">microform</option>
                                <option value="Material-type:z">other form of textual material</option>
                </select>
                </p>
                <p>
-               <label>Feschrift Ind.</label>
+        <label>Literary genre</label>
                <select name="limit" class="subtype">
                        <option value="" selected="selected" >Any</option>
             <option value="Literature-Code:a">fiction</option>
             <option value="Literature-Code:f">short stories</option>
             <option value="Literature-Code:g">poetry</option>
             <option value="Literature-Code:h">speeches, oratory</option>
+            <option value="Literature-Code:i">libretto</option>
             <option value="Literature-Code:y">not a literary text</option>
-            <option value="Literature-Code:z">multiple/other lit. forms</option>
-               </select>
-               </p>
+            <option value="Literature-Code:z">multiple/other literary forms</option>
+    </select>
+    </p>
         <p>
                <label>Biography</label>
         <select name="limit" class="subtype" size="1">
             <option value="">Any</option>
-            <option value="Biography-code:y">Not a biography</option>
+            <option value="Biography-code:y">not a biography</option>
             <option value="Biography-code:a">autobiography</option>
             <option value="Biography-code:b">individual biography</option>
             <option value="Biography-code:c">collective biography</option>
-            <option value="Biography-code:d">contains biogr. data</option>
+            <option value="Biography-code:d">contains biographical data</option>
                </select>
         </p>
         <p>
             <option value="ctype:r" >literature surveys/reviews</option>
             <option value="ctype:s" >treaties</option>
             <option value="ctype:t" >cartoons or comic strips</option>
+            <option value="ctype:v" >dissertation or thesis (revised)</option>v
+            <option value="ctype:w" >religious text</option>
             <option value="ctype:z" >other</option>
                </select>
         </p>
                <select name="limit" class="subtype">
            <option value="">Any type</option>
            <option value="Type-Of-Serial:a">Periodical</option>
-                       <option value="Type-Of-Serial:b">Monographical series</option>
+                    <option value="Type-Of-Serial:b">Monographic series</option>
                        <option value="Type-Of-Serial:c">Newspaper</option>
+                    <option value="Type-Of-Serial:e">Updating loose-leaf</option>
+                    <option value="Type-Of-Serial:f">Database</option>
+                    <option value="Type-Of-Serial:g">Updating website</option>
                        <option value="Type-Of-Serial:z">Other</option>
                </select>
                </p>
                                <option value="Frequency-code:i">Three times a year</option>
                                <option value="Frequency-code:j">Semiannual</option>
                                <option value="Frequency-code:k">Annual</option>
-                               <option value="Frequency-code:l">Biannual</option>
+                <option value="Frequency-code:l">Biennial</option>
                                <option value="Frequency-code:m">Triennial</option>
                                <option value="Frequency-code:n">Three times a week</option>
                                <option value="Frequency-code:o">Three times a month</option>
-                               <option value="Frequency-code:u">Unknown</option>
                                <option value="Frequency-code:y">Without periodicity</option>
-                               <option value="Frequency-code:i">Other</option>
+                <option value="Frequency-code:u">Unknown</option>
+                <option value="Frequency-code:z">Other</option>
                </select>
                </p>
                <p>
                <label>Regularity</label>
                <select name="limit" class="subtype">
             <option value="">Any regularity</option>
-                               <option value="Regularity-code:u">Unknown</option>
-                               <option value="Regularity-code:a">Regular</option>
-                               <option value="Regularity-code:b">Normalised irregular</option>
+                <option value="Regularity-code:a">regular</option>
+                <option value="Regularity-code:b">normalised irregular</option>
                                <option value="Regularity-code:y">irregular</option>
+                <option value="Regularity-code:u">unknown</option>
                </select>
         </p>
 
                                <option value="Graphics-type:z">other non-projected graphic type</option>
                </select>
                <select name="limit" class="subtype">
-            <option value="">any</option>
+            <option value="">Any</option>
             <option value="Graphics-support:a">canvas</option>
             <option value="Graphics-support:b">bristol board</option>
             <option value="Graphics-support:c">cardboard/illustration board</option>
             <option value="Graphics-support:l">porcelaine</option>
             <option value="Graphics-support:m">stone</option>
             <option value="Graphics-support:n">wood</option>
-            <option value="Graphics-support:u">unknown</option>
             <option value="Graphics-support:v">mixed collection</option>
             <option value="Graphics-support:e">synthetics</option>
             <option value="Graphics-support:f">skin</option>
             <option value="Graphics-support:h">metal</option>
             <option value="Graphics-support:i">paper</option>
             <option value="Graphics-support:z">others</option>
-               </select>
+            <option value="Graphics-support:u">unknown</option>
+    </select>
         </p>
-
 </fieldset>
 </div>
index 7318fb6..b2bd544 100644 (file)
         });
         
        [% IF ( viewshelf ) %] function sendList(){
-               open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
+        open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
         }
         
         function downloadList(){
-               open(CGIBIN+'virtualshelves/downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
+        open(CGIBIN+'virtualshelves/downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
         }[% END %]
 
        // YUI Toolbar Functions
index d67b05b..0c3ce91 100644 (file)
@@ -644,7 +644,8 @@ function updateCosts(){
     var discount = new Number($("#discount").val());
     var applygst = new Number ($("#applygst").val());
     var listprice   =  new Number($("#listprice").val());
-    var exchangerate =  new Number($("#currency_rate").val());
+    var currcode = new String($("#currency").val());
+    var exchangerate =  new Number($("#currency_rate_"+currcode).val());
     var gst_on=false;
 
     var rrp   = new Number(listprice*exchangerate);
@@ -669,7 +670,7 @@ function calcNewsuggTotal(){
 //    var currency = f.currency.value;
     var currcode = new String(document.getElementById('currency').value);
     var price   =  new Number(document.getElementById('price').value);
-    var exchangerate =  new Number(document.getElementById(currcode).value);
+    var exchangerate =  new Number(document.getElementById('currency_rate_'+currcode).value);
 
     var total =  new Number(quantity*price*exchangerate);
 
index dfc0444..71f8365 100644 (file)
@@ -7,7 +7,7 @@ KOHA.AJAX = {
             cache: false,
             dataType: 'json',
             type: 'POST',
-            error: function ( xhr, stat, error ) { KOHA.AJAX.BaseError( error_callback, xhr, stat, error ) }
+            error: function ( xhr, stat, error ) { KOHA.AJAX.BaseError( error_callback, xhr, stat, error ); }
         } );
         $.ajax( options );
     },
@@ -15,30 +15,30 @@ KOHA.AJAX = {
         KOHA.xhr = xhr;
         if ( !xhr.getResponseHeader( 'content-type' ).match( 'application/json' ) ) {
             // Something really failed
-            humanMsg.displayAlert( _( 'Internal Server Error, please reload the page' ) );
+            humanMsg.displayAlert( MSG_INTERNAL_SERVER_ERROR );
             return;
         }
 
         var error = eval( '(' + xhr.responseText + ')' );
 
         if ( error.type == 'auth' ) {
-            humanMsg.displayMsg( _( 'You need to log in again, your session has timed out' ) );
+            humanMsg.displayMsg( MSG_SESSION_TIMED_OUT );
         }
 
         if ( callback ) {
             callback( error );
         } else {
-            humanMsg.displayAlert( _( 'Error; your data might not have been saved' ) );
+            humanMsg.displayAlert( MSG_DATA_NOT_SAVED );
         }
     },
     MarkRunning: function ( selector, text ) {
-        text = text || _( 'Loading...' );
+        text = text || MSG_LOADING;
         $( selector )
             .attr( 'disabled', 'disabled' )
             .each( function () {
                 var $image = $( '<img src="/intranet-tmpl/prog/img/spinner-small.gif" alt="" class="spinner" />' );
                 var selector_type = this.localName;
-                if (selector_type == undefined) selector_type = this.nodeName; // IE only
+                if (selector_type === undefined) selector_type = this.nodeName; // IE only
                 switch ( selector_type.toLowerCase() ) {
                     case 'input':
                         $( this ).data( 'original-text', this.value );
@@ -65,7 +65,7 @@ KOHA.AJAX = {
             .removeAttr( 'disabled' )
             .each( function () {
                 var selector_type = this.localName;
-                if (selector_type == undefined) selector_type = this.nodeName; // IE only
+                if (selector_type === undefined) selector_type = this.nodeName; // IE only
                 switch ( selector_type.toLowerCase() ) {
                     case 'input':
                         this.value = $( this ).data( 'original-text' );
@@ -85,4 +85,4 @@ KOHA.AJAX = {
             } )
             .removeData( 'original-text' );
     }
-}
+};
index 2043cd6..cddddf7 100644 (file)
@@ -79,7 +79,7 @@ function openBasket() {
     if ( strCookie ) {
         var iW = 820;
         var iH = 450;
-        var optWin = "dependant=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=no,location=yes,height="+iH+",width="+iW;
+        var optWin = "status=yes,scrollbars=yes,resizable=yes,toolbar=no,location=yes,height="+iH+",width="+iW;
         var loc = CGIBIN + "basket/basket.pl?" + strCookie;
         var basket = open(loc, "basket", optWin);
         if (window.focus) {basket.focus()}
@@ -335,7 +335,7 @@ function sendBasket() {
 
     var loc = CGIBIN + "basket/sendbasket.pl?" + strCookie;
 
-    var optWin="dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100";
+    var optWin="scrollbars=no,resizable=no,height=300,width=450,top=50,left=100";
     var win_form = open(loc,"win_form",optWin);
 }
 
@@ -345,7 +345,7 @@ function downloadBasket() {
 
     var loc = CGIBIN + "basket/downloadcart.pl?" + strCookie;
 
-    open(loc,"win_form",'dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
+    open(loc,"win_form",'scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
 }
 
 function printBasket() {
index cdc1442..351ffe9 100644 (file)
@@ -1,37 +1,37 @@
 // this function checks id date is like DD/MM/YYYY
 function CheckDate(field) {
 var d = field.value;
-if (d!="") {
-      var amin = 1900; 
-      var amax = 2100; 
+if (d!=="") {
+      var amin = 1900;
+      var amax = 2100;
       var date = d.split("/");
       var ok=1;
       var msg;
       if ( (date.length < 2) && (ok==1) ) {
         msg = MSG_SEPARATOR+field.name;
-       alert(msg); ok=0; field.focus();
-       return;
+        alert(msg); ok=0; field.focus();
+        return;
       }
       var dd   = date[0];
       var mm   = date[1];
-      var yyyy = date[2]; 
+      var yyyy = date[2];
       // checking days
       if ( ((isNaN(dd))||(dd<1)||(dd>31)) && (ok==1) ) {
         msg = MSG_INCORRECT_DAY+field.name;
-           alert(msg); ok=0; field.focus();
-           return false;
+        alert(msg); ok=0; field.focus();
+        return false;
       }
       // checking months
       if ( ((isNaN(mm))||(mm<1)||(mm>12)) && (ok==1) ) {
         msg = MSG_INCORRECT_MONTH+field.name;
-           alert(msg); ok=0; field.focus();
-           return false;
+        alert(msg); ok=0; field.focus();
+        return false;
       }
       // checking years
       if ( ((isNaN(yyyy))||(yyyy<amin)||(yyyy>amax)) && (ok==1) ) {
         msg = MSG_INCORRECT_YEAR+field.name;
-           alert(msg); ok=0; field.focus();
-           return false;
+        alert(msg); ok=0; field.focus();
+        return false;
       }
    }
 }
@@ -41,22 +41,22 @@ function unique() {
 var msg1;
 var msg2;
 if (  document.form.check_member.value==1){
-       if (document.form.categorycode.value != "I"){
-               
-               msg1 += MSG_DUPLICATE_PATRON;
-               alert(msg1);
-       check_form_borrowers(0);
-       document.form.submit();
-       
-       }else{
-               msg2 += MSG_DUPLICATE_ORGANIZATION;
-               alert(msg2);
-       check_form_borrowers(0);
-       }
+    if (document.form.categorycode.value != "I"){
+
+        msg1 += MSG_DUPLICATE_PATRON;
+        alert(msg1);
+    check_form_borrowers(0);
+    document.form.submit();
+
+    }else{
+        msg2 += MSG_DUPLICATE_ORGANIZATION;
+        alert(msg2);
+    check_form_borrowers(0);
+    }
 }
 else
 {
-       document.form.submit();
+    document.form.submit();
 }
 
 }
@@ -66,106 +66,106 @@ else
 function check_manip_date(status) {
 if (status=='verify'){
 // this part of function('verify') is used to check if dateenrolled<date expiry
-if (document.form.dateenrolled != '' && document.form.dateexpiry.value !='') {
+if (document.form.dateenrolled !== '' && document.form.dateexpiry.value !=='') {
 var myDate1=document.form.dateenrolled.value.split ('/');
 var myDate2=document.form.dateexpiry.value.split ('/');
-       if ((myDate1[2]>myDate2[2])||(myDate1[2]==myDate2[2] && myDate1[1]>myDate2[1])||(myDate1[2]==myDate2[2] && myDate1[1]>=myDate2[1] && myDate1[0]>=myDate2[0]))
-       
-               { 
-               document.form.dateenrolled.focus();
-               var msg = MSG_LATE_EXPIRY;
-               alert(msg);
-               }
-       }
-       }
+    if ((myDate1[2]>myDate2[2])||(myDate1[2]==myDate2[2] && myDate1[1]>myDate2[1])||(myDate1[2]==myDate2[2] && myDate1[1]>=myDate2[1] && myDate1[0]>=myDate2[0]))
+
+        {
+        document.form.dateenrolled.focus();
+        var msg = MSG_LATE_EXPIRY;
+        alert(msg);
+        }
+    }
+    }
 }
 //end function
 
 
 // function to test all fields in forms and nav in different forms(1 ,2 or 3)
 function check_form_borrowers(nav){
-       var statut=0;
-       var message = "";
-       var message_champ="";
-       if (document.form.check_member.value == 1 )
-       {
-               if (document.form_double.answernodouble) {
-                       if( (!(document.form_double.answernodouble.checked))){
-                               document.form.nodouble.value=0;
-                       } else {
-                               document.form.nodouble.value=1;
-                       }
-               }
-       } 
-       
-       if (document.form.BorrowerMandatoryField.value=='')
-       {}
-       else
-       {
-           var champ_verif = document.form.BorrowerMandatoryField.value.split ('|');
-           message += MSG_MISSING_MANDATORY
-           message += "\n";
-               for (var i=0; i<champ_verif.length; i++) {
-                       if (document.getElementsByName(""+champ_verif[i]+"")[0]) {
-                               var val_champ=eval("document.form."+champ_verif[i]+".value");
-                               var ref_champ=eval("document.form."+champ_verif[i]);
-                               //check if it's a select
-                               if (ref_champ.type=='select-one'){
-                                       // check to see if first option is selected and is blank
-                                       if (ref_champ.options[0].selected &&
-                                           ref_champ.options[0].text == ''){
-                                               // action if field is empty
-                                               message_champ+=champ_verif[i]+"\n";
-                                               //test to know if you must show a message with error
-                                               statut=1;
-                                       }
-                               } else {
-                                       if ( val_champ == '' ) {
-                                               // action if the field is not empty
-                                               message_champ+=champ_verif[i]+"\n";
-                                               statut=1;
-                                       }       
-                           }
-                       }
-               }
-       }
+    var statut=0;
+    var message = "";
+    var message_champ="";
+    if (document.form.check_member.value == 1 )
+    {
+        if (document.form_double.answernodouble) {
+            if( (!(document.form_double.answernodouble.checked))){
+                document.form.nodouble.value=0;
+            } else {
+                document.form.nodouble.value=1;
+            }
+        }
+    }
 
-       if ( document.form.password.value != document.form.password2.value ){
-                       if ( message_champ != '' ){
-                               message_champ += "\n";
-                       }
-                       message_champ+= MSG_PASSWORD_MISMATCH;
-                       statut=1;
-       }
+    if (document.form.BorrowerMandatoryField.value==='')
+    {}
+    else
+    {
+        var champ_verif = document.form.BorrowerMandatoryField.value.split ('|');
+        message += MSG_MISSING_MANDATORY;
+        message += "\n";
+        for (var i=0; i<champ_verif.length; i++) {
+            if (document.getElementsByName(""+champ_verif[i]+"")[0]) {
+                var val_champ=eval("document.form."+champ_verif[i]+".value");
+                var ref_champ=eval("document.form."+champ_verif[i]);
+                //check if it's a select
+                if (ref_champ.type=='select-one'){
+                    // check to see if first option is selected and is blank
+                    if (ref_champ.options[0].selected &&
+                        ref_champ.options[0].text === ''){
+                        // action if field is empty
+                        message_champ+=champ_verif[i]+"\n";
+                        //test to know if you must show a message with error
+                        statut=1;
+                    }
+                } else {
+                    if ( val_champ === '' ) {
+                        // action if the field is not empty
+                        message_champ+=champ_verif[i]+"\n";
+                        statut=1;
+                    }
+                }
+            }
+        }
+    }
+
+    if ( document.form.password.value != document.form.password2.value ){
+            if ( message_champ !== '' ){
+                message_champ += "\n";
+            }
+            message_champ+= MSG_PASSWORD_MISMATCH;
+            statut=1;
+    }
 
-       //patrons form to test if you checked no to the question of double
-       if (statut!=1 && document.form.check_member.value > 0 ) {
-               if (!(document.form_double.answernodouble.checked)){
-                       message_champ+= MSG_DUPLICATE_SUSPICION;
-                       statut=1;
-                       document.form.nodouble.value=0;
-               } else {
-                       document.form.nodouble.value=1;
-               }
-       }
-               
-       if (statut==1){
-               //alert if at least 1 error
-               alert(message+"\n"+message_champ);
-               return false;
-       } else {
-               document.form.submit();
-       }
+    //patrons form to test if you checked no to the question of double
+    if (statut!=1 && document.form.check_member.value > 0 ) {
+        if (!(document.form_double.answernodouble.checked)){
+            message_champ+= MSG_DUPLICATE_SUSPICION;
+            statut=1;
+            document.form.nodouble.value=0;
+        } else {
+            document.form.nodouble.value=1;
+        }
+    }
+
+    if (statut==1){
+        //alert if at least 1 error
+        alert(message+"\n"+message_champ);
+        return false;
+    } else {
+        document.form.submit();
+    }
 }
 
 function Dopop(link) {
-// //  var searchstring=document.form.value[i].value;
-       var newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=no,top');
+// //   var searchstring=document.form.value[i].value;
+    var newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=no,top');
 }
 
 function Dopopguarantor(link) {
 
-       var newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=yes,top');
+    var newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=yes,top');
 }
 
 $(document).ready(function(){
index 93dfaac..80b0fc6 100644 (file)
@@ -59,6 +59,16 @@ $( document ).ready( function () {
         mark_modified.call(this);
     } );
 
+    $(".set_syspref").click(function() {
+        var s = $(this).attr('data-syspref');
+        var v = $(this).attr('data-value');
+        // populate the input with the value in data-value
+        $("#pref_"+s).val(v);
+        // pass the DOM element to trigger "modified" to enable submit button
+        mark_modified.call($("#pref_"+s)[0]);
+        return false;
+    });
+
     window.onbeforeunload = function () {
         if ( KOHA.Preferences.Modified ) {
             return MSG_MADE_CHANGES;
index fe76cd3..880bd01 100644 (file)
 /* Overlays */
 .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
 .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*!
+ * jQuery UI Accordion 1.8.23
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }
+/*!
  * jQuery UI Autocomplete 1.8.23
  *
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
    margin: -1px;
 }
 /*!
+ * jQuery UI Button 1.8.23
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4;  }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*!
+ * jQuery UI Dialog 1.8.23
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative;  }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*!
  * jQuery UI Slider 1.8.23
  *
  * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
     left: -4px; /*must have*/
     width: 200px; /*must have*/
     height: 200px; /*must have*/
-}
\ No newline at end of file
+}/*!
+ * jQuery UI Progressbar 1.8.23
+ *
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
index 635f4c6..eb53cd4 100644 (file)
 * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
 (function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;return i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&&(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&&(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&&(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&&(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&&(n.top+=m/2),n.left+=k[0],n.top+=k[1],this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&&(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&&(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&&a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&&c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&&(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),a.curCSS||(a.curCSS=a.css),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&&a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i>21&&i<22}()})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
 * https://github.com/jquery/jquery-ui
+* Includes: jquery.ui.draggable.js
+* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
+(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!this.element.data("draggable"))return;return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options;return this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(b),this.handle?(c.iframeFix&&a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);var d=this.element[0],e=!1;while(d&&(d=d.parentNode))d==document&&(e=!0);if(!e&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",b)!==!1&&f._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){return this.options.iframeFix===!0&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;return a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)}),c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.left<h[0]&&(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top),b.pageX-this.offset.click.left>h[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.top<h[1]||j-this.offset.click.top>h[3]?j-this.offset.click.top<h[1]?j+c.grid[1]:j-c.grid[1]:j:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?k-this.offset.click.left<h[0]||k-this.offset.click.left>h[2]?k-this.offset.click.left<h[0]?k+c.grid[0]:k-c.grid[0]:k:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),b=="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:"1.8.23"}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,f))})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,d.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("draggable"),e=this,f=function(b){var c=this.offset.click.top,d=this.offset.click.left,e=this.positionAbs.top,f=this.positionAbs.left,g=b.height,h=b.width,i=b.top,j=b.left;return a.ui.isOver(e+c,f+d,i,j,g,h)};a.each(d.sortables,function(f){this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c){var d=a("body"),e=a(this).data("draggable").options;d.css("cursor")&&(e._cursor=d.css("cursor")),d.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;d._cursor&&a("body").css("cursor",d._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(b,c){var d=a(this).data("draggable");d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"&&(d.overflowOffset=d.scrollParent.offset())},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=!1;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY<e.scrollSensitivity?d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop-e.scrollSpeed);if(!e.axis||e.axis!="y")d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX<e.scrollSensitivity?d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft-e.scrollSpeed)}else{if(!e.axis||e.axis!="x")b.pageY-a(document).scrollTop()<e.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<e.scrollSensitivity&&(f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")b.pageX-a(document).scrollLeft()<e.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<e.scrollSensitivity&&(f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))}f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c){var d=a(this).data("draggable"),e=d.options;d.snapElements=[],a(e.snap.constructor!=String?e.snap.items||":data(draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!=d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=e.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height;for(var k=d.snapElements.length-1;k>=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f<g&&g<m+f&&n-f<i&&i<o+f||l-f<g&&g<m+f&&n-f<j&&j<o+f||l-f<h&&h<m+f&&n-f<i&&i<o+f||l-f<h&&h<m+f&&n-f<j&&j<o+f)){d.snapElements[k].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=!1;continue}if(e.snapMode!="inner"){var p=Math.abs(n-j)<=f,q=Math.abs(o-i)<=f,r=Math.abs(l-h)<=f,s=Math.abs(m-g)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m}).left-d.margins.left)}var t=p||q||r||s;if(e.snapMode!="outer"){var p=Math.abs(n-i)<=f,q=Math.abs(o-j)<=f,r=Math.abs(l-g)<=f,s=Math.abs(m-h)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&&(p||q||r||s||t)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=p||q||r||s||t}}}),a.ui.plugin.add("draggable","stack",{start:function(b,c){var d=a(this).data("draggable").options,e=a.makeArray(a(d.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(!e.length)return;var f=parseInt(e[0].style.zIndex)||0;a(e).each(function(a){this.style.zIndex=f+a}),this[0].style.zIndex=f+e.length}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
+* https://github.com/jquery/jquery-ui
+* Includes: jquery.ui.droppable.js
+* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
+(function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,c=b.accept;this.isover=0,this.isout=1,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++)b[c]==this&&b.splice(c,1);return this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"),this},_setOption:function(b,c){b=="accept"&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return!1;var e=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return e=!0,!1}),e?!1:this.accept.call(this.element[0],d.currentItem||d.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.extend(a.ui.droppable,{version:"1.8.23"}),a.ui.intersect=function(b,c,d){if(!c.offset)return!1;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,i=c.offset.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case"fit":return i<=e&&f<=j&&k<=g&&h<=l;case"intersect":return i<e+b.helperProportions.width/2&&f-b.helperProportions.width/2<j&&k<g+b.helperProportions.height/2&&h-b.helperProportions.height/2<l;case"pointer":var m=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,n=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,o=a.ui.isOver(n,m,k,i,c.proportions.height,c.proportions.width);return o;case"touch":return(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l)&&(e>=i&&e<=j||f>=i&&f<=j||e<i&&f>j);default:return!1}},a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();g:for(var h=0;h<d.length;h++){if(d[h].options.disabled||b&&!d[h].accept.call(d[h].element[0],b.currentItem||b.element))continue;for(var i=0;i<f.length;i++)if(f[i]==d[h].element[0]){d[h].proportions.height=0;continue g}d[h].visible=d[h].element.css("display")!="none";if(!d[h].visible)continue;e=="mousedown"&&d[h]._activate.call(d[h],c),d[h].offset=d[h].element.offset(),d[h].proportions={width:d[h].element[0].offsetWidth,height:d[h].element[0].offsetHeight}}},drop:function(b,c){var d=!1;return a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options)return;!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,c))}),d},dragStart:function(b,c){b.element.parents(":not(body,html)").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var d=a.ui.intersect(b,this,this.options.tolerance),e=!d&&this.isover==1?"isout":d&&this.isover==0?"isover":null;if(!e)return;var f;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");g.length&&(f=a.data(g[0],"droppable"),f.greedyChild=e=="isover"?1:0)}f&&e=="isover"&&(f.isover=0,f.isout=1,f._out.call(f,c)),this[e]=1,this[e=="isout"?"isover":"isout"]=0,this[e=="isover"?"_over":"_out"].call(this,c),f&&e=="isout"&&(f.isout=0,f.isover=1,f._over.call(f,c))})},dragStop:function(b,c){b.element.parents(":not(body,html)").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
+* https://github.com/jquery/jquery-ui
 * Includes: jquery.ui.sortable.js
 * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
 (function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f)return e=a(this),!1});a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(h=!0)});if(!h)return!1}return this.currentItem=e,this._removeCurrentsFromItems(),!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top<c.scrollSensitivity&&(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()<c.scrollSensitivity?d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity&&(d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()<c.scrollSensitivity?d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity&&(d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed))),d!==!1&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var e=this.items.length-1;e>=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(!b)return;a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&d+j<i&&b+k>f&&b+k<g;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?l:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(b){var c=this.options.axis==="x"||a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),d=this.options.axis==="y"||a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),e=c&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return e?this.floating?g&&g=="right"||f=="down"?2:1:f&&(f=="down"?2:1):!1},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?f=="right"&&d||f=="left"&&!d:e&&(e=="down"&&c||e=="up"&&!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&&b)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(b){this.items=[],this.containers=[this];var c=this.items,d=this,e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g>=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i<m;i++){var n=a(l[i]);n.data(this.widgetName+"-item",k),c.push({item:n,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c>=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return e||(b.style.visibility="hidden"),b},update:function(a,b){if(e&&!d.forcePlaceholderSize)return;b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!c)return;if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.containers[d].floating?this.items[i].item.offset().left:this.items[i].item.offset().top;Math.abs(j-h)<f&&(f=Math.abs(j-h),g=this.items[i],this.direction=j-h>0?"down":"up")}if(!g&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;return d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(d[0].style.width==""||c.forceHelperSize)&&d.width(this.currentItem.width()),(d[0].style.height==""||c.forceHelperSize)&&d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3]?h-this.offset.click.top<this.containment[1]?h+c.grid[1]:h-c.grid[1]:h:h;var i=this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0];f=this.containment?i-this.offset.click.left<this.containment[0]||i-this.offset.click.left>this.containment[2]?i-this.offset.click.left<this.containment[0]?i+c.grid[0]:i-c.grid[0]:i:i}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){f==e.counter&&e.refreshPositions(!d)},0)},_clear:function(b,c){this.reverting=!1;var d=[],e=this;!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c&&d.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||d.push(function(a){this._trigger("remove",a,this._uiHash())});for(var f=this.containers.length-1;f>=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c&&(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f>=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!1}c||this._trigger("beforeStop",b,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null;if(!c){for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}}),a.extend(a.ui.sortable,{version:"1.8.23"})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
 * https://github.com/jquery/jquery-ui
+* Includes: jquery.ui.accordion.js
+* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
+(function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options;b.running=0,b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-focus")}),b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var d=b.element.find("a").filter(c.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");e.length?b.active=e:b.active=d.closest(".ui-accordion-content").prev()}}b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),b.active.next().addClass("ui-accordion-content-active"),b._createIcons(),b.resize(),b.element.attr("role","tablist"),b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel"),b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0),a.browser.safari||b.headers.find("a").attr("tabIndex",-1),c.event&&b.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this),a.preventDefault()})},_createIcons:function(){var b=this.options;b.icons&&(a("<span></span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove(),this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");return(b.autoHeight||b.fillHeight)&&c.css("height",""),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b=="active"&&this.activate(c),b=="icons"&&(this._destroyIcons(),c&&this._createIcons()),b=="disabled"&&this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(b){if(this.options.disabled||b.altKey||b.ctrlKey)return;var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target),b.preventDefault()}return f?(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),!1):!0},resize:function(){var b=this.options,c;if(b.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height(),a.browser.msie&&this.element.parent().css("overflow",d),this.headers.each(function(){c-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else b.autoHeight&&(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c));return this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];return this._clickHandler({target:b},b),this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===!1?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options;if(d.disabled)return;if(!b.target){if(!d.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}var h=a(b.currentTarget||c),i=h[0]===this.active[0];d.active=d.collapsible&&i?!1:this.headers.index(h);if(this.running||!d.collapsible&&i)return;var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&&d.collapsible?a([]):h,oldHeader:this.active,newContent:i&&d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])>this.headers.index(h[0]);this.active=i?a([]):h,this._toggle(g,e,f,i,k),j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),i||(h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected),h.next().addClass("ui-accordion-content-active"));return},_toggle:function(b,c,d,e,f){var g=this,h=g.options;g.toShow=b,g.toHide=c,g.data=d;var i=function(){if(!g)return;return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data),g.running=c.size()===0?b.size():c.size();if(h.animated){var j={};h.collapsible&&e?j={toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}:j={toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace},h.proxied||(h.proxied=h.animated),h.proxiedDuration||(h.proxiedDuration=h.duration),h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied,h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;m&&!k[m]&&!a.easing[m]&&(m="slide"),k[m]||(k[m]=function(a){this.slide(a,{easing:m,duration:l||700})}),k[m](j)}else h.collapsible&&e?b.toggle():(c.hide(),b.show()),i(!0);c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(this.running)return;this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data)}}),a.extend(a.ui.accordion,{version:"1.8.23",animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(!b.toHide.size()){b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);return}if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={},h=["height","paddingTop","paddingBottom"],i,j=b.toShow;i=j[0].style.width,j.width(j.parent().width()-parseFloat(j.css("paddingLeft"))-parseFloat(j.css("paddingRight"))-(parseFloat(j.css("borderLeftWidth"))||0)-(parseFloat(j.css("borderRightWidth"))||0)),a.each(h,function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}}),b.toShow.css({height:0,overflow:"hidden"}).show(),b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){c.prop=="height"&&(e=c.end-c.start===0?0:(c.now-c.start)/(c.end-c.start)),b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){b.autoHeight||b.toShow.css("height",""),b.toShow.css({width:i,overflow:d}),b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
+* https://github.com/jquery/jquery-ui
 * Includes: jquery.ui.autocomplete.js
 * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
 (function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&&(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&&(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&&(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&&(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&&b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&&b.element.val()!==b.term&&b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&&this._initSource(),b==="appendTo"&&this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&&c&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){!this.options.disabled&&a&&a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close()},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c<0?this.element.scrollTop(d+c):c>=e&&this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
 * https://github.com/jquery/jquery-ui
+* Includes: jquery.ui.button.js
+* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
+(function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);return c&&(d?e=a(d).find("[name='"+c+"']"):e=a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",j),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.propAttr("disabled"):this.element.propAttr("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(i?"":" ui-state-active"),m="ui-state-focus";h.label===null&&(h.label=this.buttonElement.html()),this.buttonElement.addClass(g).attr("role","button").bind("mouseenter.button",function(){if(h.disabled)return;a(this).addClass("ui-state-hover"),this===c&&a(this).addClass("ui-state-active")}).bind("mouseleave.button",function(){if(h.disabled)return;a(this).removeClass(l)}).bind("click.button",function(a){h.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this.element.bind("focus.button",function(){b.buttonElement.addClass(m)}).bind("blur.button",function(){b.buttonElement.removeClass(m)}),i&&(this.element.bind("change.button",function(){if(f)return;b.refresh()}),this.buttonElement.bind("mousedown.button",function(a){if(h.disabled)return;f=!1,d=a.pageX,e=a.pageY}).bind("mouseup.button",function(a){if(h.disabled)return;if(d!==a.pageX||e!==a.pageY)f=!0})),this.type==="checkbox"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).toggleClass("ui-state-active"),b.buttonElement.attr("aria-pressed",b.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){if(h.disabled)return!1;a(this).addClass("ui-state-active"),c=this,a(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(h.disabled)return!1;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(b){if(h.disabled)return!1;(b.keyCode==a.ui.keyCode.SPACE||b.keyCode==a.ui.keyCode.ENTER)&&a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",h.disabled),this._resetButton()},_determineButtonType:function(){this.element.is(":checkbox")?this.type="checkbox":this.element.is(":radio")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";if(this.type==="checkbox"||this.type==="radio"){var a=this.element.parents().filter(":last"),b="label[for='"+this.element.attr("id")+"']";this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible");var c=this.element.is(":checked");c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.attr("aria-pressed",c)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title"),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled"){c?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1);return}this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b),this.type==="radio"?k(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);return}var b=this.buttonElement.removeClass(i),c=a("<span></span>",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",c))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c),a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),a.Widget.prototype.destroy.call(this)}})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
+* https://github.com/jquery/jquery-ui
+* Includes: jquery.ui.dialog.js
+* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
+(function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||"&#160;",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("<div></div>")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){d.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){return b.close(a),!1}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("<span></span>")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),l=a("<span></span>").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);a.isFunction(d.beforeclose)&&!a.isFunction(d.beforeClose)&&(d.beforeClose=d.beforeclose),i.find("*").add(i).disableSelection(),d.draggable&&a.fn.draggable&&b._makeDraggable(),d.resizable&&a.fn.resizable&&b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;return a.overlay&&a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&&a.element.attr("title",a.originalTitle),a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1===c._trigger("beforeClose",b))return;return c.overlay&&c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d),c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;return e.modal&&!b||!e.stack&&!e.modal?d._trigger("focus",c):(e.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=e.zIndex),d.overlay&&(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c),d)},open:function(){if(this._isOpen)return;var b=this,c=b.options,d=b.uiDialog;return b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&&d.bind("keydown.ui-dialog",function(b){if(b.keyCode!==a.ui.keyCode.TAB)return;var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&&!b.shiftKey)return d.focus(1),!1;if(b.target===d[0]&&b.shiftKey)return e.focus(1),!1}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open"),b},_createButtons:function(b){var c=this,d=!1,e=a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),f=a("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=!0)}),d&&(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('<button type="button"></button>').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(f);a.each(d,function(a,b){if(a==="click")return;a in e?e[a](b):e.attr(a,b)}),a.fn.button&&e.button()}),e.appendTo(c.uiDialog))},_makeDraggable:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(e),b._trigger("dragStop",g,f(h)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing"),d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),e.height=a(this).height(),e.width=a(this).width(),d._trigger("resizeStop",b,h(c)),a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&&"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var c=this,f={},g=!1;a.each(b,function(a,b){c._setOption(a,b),a in d&&(g=!0),a in e&&(f[a]=b)}),g&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":d?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case"draggable":var g=f.is(":data(draggable)");g&&!d&&f.draggable("destroy"),!g&&d&&e._makeDraggable();break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");h&&!d&&f.resizable("destroy"),h&&typeof d=="string"&&f.resizable("option","handles",d),!h&&d!==!1&&e._makeResizable(d);break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||"&#160;"))}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth>b.width&&(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c);if(b.height==="auto")if(a.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();var f=this.element.css("height","auto").height();e||this.uiDialog.hide(),this.element.height(Math.max(f,d))}else this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.23",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");return b||(this.uuid+=1,b=this.uuid),"ui-dialog-title-"+b},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){this.instances.length===0&&(setTimeout(function(){a.ui.dialog.overlay.instances.length&&a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ)return!1})},1),a(document).bind("keydown.dialog-overlay",function(c){b.options.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}),a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize));var c=(this.oldInstances.pop()||a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return a.fn.bgiframe&&c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&&this.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&&a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;return a.browser.msie&&a.browser.version<7?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b<c?a(window).height()+"px":b+"px"):a(document).height()+"px"},width:function(){var b,c;return a.browser.msie?(b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),b<c?a(window).width()+"px":b+"px"):a(document).width()+"px"},resize:function(){var b=a([]);a.each(a.ui.dialog.overlay.instances,function(){b=b.add(this)}),b.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}}),a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
+* https://github.com/jquery/jquery-ui
 * Includes: jquery.ui.slider.js
 * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
 (function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=d.values&&d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&&(d.range===!0&&(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&&d.values.length!==2&&(d.values=[d.values[0],d.values[0]])),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;i<g;i+=1)h.push(f);this.handles=e.add(a(h.join("")).appendTo(b.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")}),this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)}),this.handles.keydown(function(d){var e=a(this).data("index.ui-slider-handle"),f,g,h,i;if(b.options.disabled)return;switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:d.preventDefault();if(!b._keySliding){b._keySliding=!0,a(this).addClass("ui-state-active"),f=b._start(d,e);if(f===!1)return}}i=b.options.step,b.options.values&&b.options.values.length?g=h=b.values(e):g=h=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:h=b._valueMin();break;case a.ui.keyCode.END:h=b._valueMax();break;case a.ui.keyCode.PAGE_UP:h=b._trimAlignValue(g+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:h=b._trimAlignValue(g-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g===b._valueMax())return;h=b._trimAlignValue(g+i);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g===b._valueMin())return;h=b._trimAlignValue(g-i)}b._slide(d,e,h)}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&&(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){return this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f>c&&(f=c,g=a(this),i=b)}),c.range===!0&&this.values(1)===c.min&&(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),this.orientation==="vertical"&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&&this.options.range===!0&&(b===0&&c>d||b===1&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);return}return this._value()},values:function(b,c){var d,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a),a},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b),b;c=this.options.values.slice();for(d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&&this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&&(d.orientation==="horizontal"?(b===0&&d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&&d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&&d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&&this.orientation==="horizontal"&&this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&&this.orientation==="vertical"&&this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.23"})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
 * https://github.com/jquery/jquery-ui
 * Includes: jquery.ui.datepicker.js
 * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
-(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.23"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$('<span class="'+this._appendClass+'">'+c+"</span>"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('<button type="button"></button>').addClass(this._triggerClass).html(g==""?f:$("<img/>").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;d<a.length;d++)a[d].length>b&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null;var e=b||{};typeof b=="string"&&(e={},e[b]=c);if(d){this._curInst==d&&this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),g!==null&&e.dateFormat!==undefined&&e.minDate===undefined&&(d.settings.minDate=this._formatDate(d,g)),h!==null&&e.dateFormat!==undefined&&e.maxDate===undefined&&(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&&$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&&a.ctrlKey?$.datepicker._showDatepicker(this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d<" "||!c||c.indexOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a)),this._attachHandlers(a);var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+(c?0:$(document).scrollLeft()),i=document.documentElement.clientHeight+(c?0:$(document).scrollTop());return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&&f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;return c&&s++,c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase())return f=c[0],r+=d.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s<a.length;s++)if(m)a.charAt(s)=="'"&&!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r<b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i<100&&(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i<=d?0:-100));if(l>-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;return c&&m++,c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length<c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m<a.length;m++)if(l)a.charAt(m)=="'"&&!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;return c&&e++,c};for(var e=0;e<a.length;e++)if(c)a.charAt(e)=="'"&&!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal)return;var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&&f.toString()=="Invalid Date"?c:f,f&&(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(a){var b=this._get(a,"stepMonths"),c="#"+a.id.replace(/\\\\/g,"\\");a.dpDiv.find("[data-handler]").map(function(){var a={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,-b,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,+b,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(c)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(c,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),a[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&p<l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))>p)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(a,"closeText")+"</button>",x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+u+"</button>":"")+(c?"":w)+"</div>":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L<g[0];L++){var M="";this.maxRows=4;for(var N=0;N<g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all",Q="";if(j){Q+='<div class="ui-datepicker-group';if(g[1]>1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'">'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var R=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="<th"+((S+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+A[T]+'">'+C[T]+"</span></th>"}Q+=R+"</tr></thead><tbody>";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z<X;Z++){Q+="<tr>";var _=z?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(Y)+"</td>":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Y<l||m&&Y>m;_+='<td class="'+((S+y+6)%7>=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&&n==a.selectedMonth&&a._keyEvent||J.getTime()==Y.getTime()&&J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&&!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&&ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' data-handler="selectDay" data-event="click" data-month="'+Y.getMonth()+'" data-year="'+Y.getFullYear()+'"')+">"+(bb&&!G?"&#xa0;":bc?'<span class="ui-state-default">'+Y.getDate()+"</span>":'<a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#">'+Y.getDate()+"</a>")+"</td>",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"</tr>"}n++,n>11&&(n=0,o++),Q+="</tbody></table>"+(j?"</div>"+(g[0]>0&&N==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var p=0;p<12;p++)(!n||p>=d.getMonth())&&(!o||p<=e.getMonth())&&(m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>");m+="</select>"}k||(l+=m+(f||!i||!j?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';for(;t<=u;t++)a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?"&#xa0;":"")+m),l+="</div>",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return e=d&&e>d?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.23",window["DP_jQuery_"+dpuuid]=$})(jQuery);;
\ No newline at end of file
+(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&&d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&&d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.23"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&&this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=$('<span class="'+this._appendClass+'">'+c+"</span>"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&&a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('<button type="button"></button>').addClass(this._triggerClass).html(g==""?f:$("<img/>").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;d<a.length;d++)a[d].length>b&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null;var e=b||{};typeof b=="string"&&(e={},e[b]=c);if(d){this._curInst==d&&this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),g!==null&&e.dateFormat!==undefined&&e.minDate===undefined&&(d.settings.minDate=this._formatDate(d,g)),h!==null&&e.dateFormat!==undefined&&e.maxDate===undefined&&(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&&$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&&$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&&$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&&$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&&$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&&a.ctrlKey?$.datepicker._showDatepicker(this):c=!1;c&&(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d<" "||!c||c.indexOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a)),this._attachHandlers(a);var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+(c?0:$(document).scrollLeft()),i=document.documentElement.clientHeight+(c?0:$(document).scrollTop());return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&&$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&&f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;return c&&s++,c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase())return f=c[0],r+=d.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s<a.length;s++)if(m)a.charAt(s)=="'"&&!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r<b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i<100&&(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i<=d?0:-100));if(l>-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;return c&&m++,c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length<c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m<a.length;m++)if(l)a.charAt(m)=="'"&&!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;return c&&e++,c};for(var e=0;e<a.length;e++)if(c)a.charAt(e)=="'"&&!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal)return;var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&&f.toString()=="Invalid Date"?c:f,f&&(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(a){var b=this._get(a,"stepMonths"),c="#"+a.id.replace(/\\\\/g,"\\");a.dpDiv.find("[data-handler]").map(function(){var a={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,-b,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,+b,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(c)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(c,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),a[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&p<l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))>p)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">'+this._get(a,"closeText")+"</button>",x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+u+"</button>":"")+(c?"":w)+"</div>":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L<g[0];L++){var M="";this.maxRows=4;for(var N=0;N<g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all",Q="";if(j){Q+='<div class="ui-datepicker-group';if(g[1]>1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'">'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var R=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="<th"+((S+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+A[T]+'">'+C[T]+"</span></th>"}Q+=R+"</tr></thead><tbody>";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z<X;Z++){Q+="<tr>";var _=z?'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(Y)+"</td>":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Y<l||m&&Y>m;_+='<td class="'+((S+y+6)%7>=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&&n==a.selectedMonth&&a._keyEvent||J.getTime()==Y.getTime()&&J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&&!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&&ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' data-handler="selectDay" data-event="click" data-month="'+Y.getMonth()+'" data-year="'+Y.getFullYear()+'"')+">"+(bb&&!G?"&#xa0;":bc?'<span class="ui-state-default">'+Y.getDate()+"</span>":'<a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#">'+Y.getDate()+"</a>")+"</td>",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"</tr>"}n++,n>11&&(n=0,o++),Q+="</tbody></table>"+(j?"</div>"+(g[0]>0&&N==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='<div class="ui-datepicker-title">',m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var p=0;p<12;p++)(!n||p>=d.getMonth())&&(!o||p<=e.getMonth())&&(m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>");m+="</select>"}k||(l+=m+(f||!i||!j?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';for(;t<=u;t++)a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>";a.yearshtml+="</select>",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?"&#xa0;":"")+m),l+="</div>",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return e=d&&e>d?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.23",window["DP_jQuery_"+dpuuid]=$})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
+* https://github.com/jquery/jquery-ui
+* Includes: jquery.ui.progressbar.js
+* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
+(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&&(this.options.value=c,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&&(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&&(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.23"})})(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
+* https://github.com/jquery/jquery-ui
+* Includes: jquery.effects.core.js
+* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
+jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array&&b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:(c=/rgba\(0, 0, 0, 0\)/.exec(b))?e.transparent:e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=(a.curCSS||a.css)(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function l(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&&!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){return a.isFunction(d)&&(e=d,d=null),this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class")||"";a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.23",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){return b=="toggle"&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;try{e.id}catch(f){e=document.body}return b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}});var m={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,b){m[b]=function(b){return Math.pow(b,a+2)}}),a.extend(m,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return a===0||a===1?a:-Math.pow(2,8*(a-1))*Math.sin(((a-1)*80-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){var b,c=4;while(a<((b=Math.pow(2,--c))-1)/11);return 1/Math.pow(4,3-c)-7.5625*Math.pow((b*3-2)/22-a,2)}}),a.each(m,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(a*2)/2:c(a*-2+2)/-2+1}})}(jQuery);;/*! jQuery UI - v1.8.23 - 2012-08-15
+* https://github.com/jquery/jquery-ui
+* Includes: jquery.effects.highlight.js
+* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
+(function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&&(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide(),a.effects.restore(c,d),e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"),b.callback&&b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;
index af37c88..4a2d62c 100644 (file)
@@ -84,9 +84,9 @@ var humanMsg = {
                        .unbind('click', humanMsg.removeMsg)
                        .unbind('keypress', humanMsg.removeMsg)
 
-               // If message is fully transparent, fade it out
-               if (jQuery('#'+humanMsg.msgID).css('opacity') == humanMsg.msgOpacity)
-                       jQuery('#'+humanMsg.msgID).animate({ opacity: 0 }, 500, function() { jQuery(this).hide() })
+                // If message is fully transparent, fade it out
+                if ( Math.abs(jQuery('#'+humanMsg.msgID).css('opacity') - humanMsg.msgOpacity ) < 0.00001 )
+                        jQuery('#'+humanMsg.msgID).animate({ opacity: 0 }, 500, function() { jQuery(this).hide() })
        }
 };
 
index 8b2d555..6c8ea00 100644 (file)
         <div id="sysinfo">
         [% IF (warnIsRootUser) %]
             <h2>Warning regarding current user</h2>
-            <p>It seems that you are logged in as database administrative user. A lot of things will not work with this account.</p>
-            <p>Usually you need to log in with a regular staff account. To create a staff account, create a branch, a patron category 'Staff' and add a new patron. Then give this patron permissions from 'More' in the toolbar.</p>
+            <p>You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p>
+            <p>Please log in instead with a regular staff account. To create a staff account, create a library, a patron category 'Staff' and add a new patron. Then give this patron permissions from 'More' in the toolbar.</p>
         [% END %]
             <h2>Warnings regarding the system configuration</h2>
         [% IF ( (prefNoZebra) || (warnPrefBiblioAddsAuthorities) || warnPrefEasyAnalyticalRecords ) %]
                 <li><a href="http://www.ashs.school.nz/">Albany Senior High School</a>, Auckland, New Zealand (OPAC 'star-ratings' sponsorship)</li>
             </ul>
 
-            <h2>Koha release team</h2>
+            <h2>Release team for Koha 3.12</h2>
             <ul>
-               <li>Colin Campbell (Koha 3.4 QA Manager)</li>
-               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544614260">Galen Charlton</a> (Koha 3.2 Release Manager)</li>
-               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544609030">Chris Cormack</a> (Koha 1.x, 3.4, 3.6 Release Manager, Koha 3.2 Translation Manager)</li>
-               <li><a href="https://www.ohloh.net/p/koha/contributors/6620692210484">Frédéric Demians</a>(Koha 3.4, 3.6 Translation Manager)</li>
-               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544646984">Nicole C. Engard</a> (Koha 3.x Documentation Manager)</li>
-               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544609053">Joshua Ferraro</a> (Koha 3.0 Release Manager &amp; Translation Manager)</li>
+               <li>D Ruth Bavousett (Translation Manager)</li>
+               <li>Jared Camins-Esakov (Release Manager)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544609030">Chris Cormack</a> (3.8, 3.10 Release Maintainer)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544646984">Nicole C. Engard</a> (Documentation Manager)</li>
+               <li>Katrin Fischer (QA Manager)</li>
+               <li>Liz Rea (3.6 Release Maintainer)</li>
+            </ul>
+
+            <h2>Former Koha release team members</h2>
+            <ul>
+               <li>Jared Camins-Esakov (3.6 Release Maintainer)</li>
+               <li>Colin Campbell (3.4 QA Manager)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544614260">Galen Charlton</a> (3.2 Release Manager)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544609030">Chris Cormack</a> (1.x, 3.4, 3.6 Release Manager, 3.2 Translation Manager, 3.8 Release Maintainer)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6620692210484">Frédéric Demians</a> (3.4, 3.6, 3.8, 3.10 Translation Manager)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544646984">Nicole C. Engard</a> (3.x Documentation Manager)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544609053">Joshua Ferraro</a> (3.0 Release Manager &amp; Translation Manager)</li>
                <li>Rachel Hamilton-Williams (Kaitiaki from 2004 to present)</li>
-               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544614275">Henri-Damien Laurent</a> (Koha 3.0 Release Maintainer)</li>
-               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544609147">Owen Leonard</a> (Koha 3.x Interface Design)</li>
-               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544615991">Chris Nighswonger</a> (Koha 3.2, 3.4 Release Maintainer, Koha 3.6 Release Maintainer)</li>
-               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544612249">Paul Poulain</a> (Koha 2.0 Release Manager, Koha 2.2 Release Manager/Maintainer, Koha 3.8 Release Manager, Koha 3.10 Release Manager)</li>
-               <li><a href="http://www.ohloh.net/p/koha/contributors/6620692116417">MJ Ray</a> (Koha 2.0 Release Maintainer)</li>
-                <li>Ian Walls Koha 3.6 QA Manager, Koha 3.8 QA Manager, Koha 3.10 QA Manager</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544614275">Henri-Damien Laurent</a> (3.0 Release Maintainer)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544609147">Owen Leonard</a> (3.x Interface Design)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544615991">Chris Nighswonger</a> (3.2, 3.4, 3.6 Release Maintainer)</li>
+               <li><a href="https://www.ohloh.net/p/koha/contributors/6618544612249">Paul Poulain</a> (2.0 Release Manager, 2.2 Release Manager/Maintainer, 3.8, 3.10 Release Manager)</li>
+               <li><a href="http://www.ohloh.net/p/koha/contributors/6620692116417">MJ Ray</a> (2.0 Release Maintainer)</li>
+                <li>Ian Walls (3.6, 3.8, 3.10 QA Manager)</li>
                 </ul>
+
             <h2>Koha development team</h2>
             <ul>
                 <li>Md. Aftabuddin</li>
                 <li>Shaun Evans</li>
                 <li>Pat Eyler (Kaitiaki from 2002 to 2004)</li>
                 <li><a href="https://www.ohloh.net/p/koha/contributors/6618544609865">Antoine Farnault</a></li>
+                <li>Vitor Fernandes</li>
                 <li><a href="https://www.ohloh.net/p/koha/contributors/6618544670742">Katrin Fischer</a></li>
                 <li>Clay Fouts</li>
                 <li>Claudia Forsman</li>
                 <li><a href="https://www.ohloh.net/p/koha/contributors/6618544607803">Andrew Moore</a></li>
                 <li>Sharon Moreland</li>
                 <li>Nicolas Morin</li>
-                 <li>Mike Mylonas</li>
-                 <li>Joy Nelson</li>
+                <li>Mike Mylonas</li>
+                <li>Nadia Nicolaides</li>
+                <li>Joy Nelson</li>
                 <li><a href="https://www.ohloh.net/accounts/cnighswonger">Chris Nighswonger</a></li>
                 <li>Albert Oller</li>
                 <li>Eric Olsen</li>
                 <li>Maxime Pelletier</li>
                 <li>Polytechnic University</li>
                 <li>Shari Perkins</li>
-                <li>Meenakshi.R</li>
+                <li>Romina Racca</li>
                 <li><a href="https://www.ohloh.net/p/koha/contributors/6620692116417">MJ Ray</a></li>
                 <li>Liz Rea</li>
                 <li>Thatcher Rea</li>
                   by the Bridge Consortium of Carleton College and St. Olaf College.</li>
               </ul>
 
+            <h2>The Sudoc Icon Set</h2>
+              <ul>
+                <li><a href="http://www.abes.fr/Sudoc/Boite-a-outils-Sudoc-public/Les-icones-Sudoc">Les icones Sudoc</a></li>
+                <li>The Sudoc Icon Set is licensed under a
+                  <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License</a>
+                  by Agence Bibliographique de l'Enseignement Supérieur</li>
+              </ul>
             <h2>The Noun Project icons</h2>
                 <ul>
                     <li>All images come from <a href="http://thenounproject.com/">The Noun Project</a> collection</li>
 <li>Fran&ccedil;ais (French) <a href="http://www.koha-fr.org/category/tags/association">Kohala</a>, Pascale Nalon (ENSMP), and many more </li>
 <li>Galego (Galician) Ignacio Javier</li>
 <li>Deutsch (German) Friedrich zur Hellen, Robert Hillig, Katrin Fischer, Beda Szukics, Mirko Tietgen and Marc Véron</li>
-<li>&#949;&#955;&#955;&#951;&#957;&#953;&#954;&#940; (Greek, Modern [1453- ])Georgia Katsarou, Panoraia Gaitanou</li>
+<li>&#949;&#955;&#955;&#951;&#957;&#953;&#954;&#940; (Greek, Modern [1453- ]) Georgia Katsarou, Panoraia Gaitanou and Kiriaki Roditi</li>
 <li>&#1506;&#1489;&#1512;&#1497;&#1514; (Hebrew)</li>
 <li>&#2361;&#2367;&#2344;&#2381;&#2342;&#2368; (Hindi)</li>
 <li>Magyar (Hungarian)Agnes Imecs</li>
index f271823..3524ecd 100644 (file)
                 [% IF ( closedate ) %]
                 <div class="yui-u">
                     <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
+                        <p>
+                          <label for="basketgroupid"><strong>Basket group:</strong></label>
+                          [% IF basketgroup.closed %]
+                            [% basketgroup.name %] (closed)
+                          [% ELSE %]
+                            </p>
+                            <p>
+                            <select id="basketgroupid" name="basketgroupid">
+                              <option value="new">Add new group</option>
+                              [% FOREACH bg IN basketgroups %]
+                                [% IF ( bg.default ) %]
+                                    <option value="[% bg.id %]" selected="selected">[% bg.name %]</option>
+                                [% ELSE %]
+                                  [% UNLESS bg.closed %]
+                                    <option value="[% bg.id %]">[% bg.name %]</option>
+                                  [% ELSE %]
+                                    <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option>
+                                  [% END %]
+                                [% END %]
+                              [% END %]
+                            </select>
+                          [% END %]
+                        </p>
 
-                        <p><label for="basketgroupid"><strong>Basket group:</strong></label></p>
-                        <p><select id="basketgroupid" name="basketgroupid">
-                            <option value="new">Add new group</option>
-                                                    [% FOREACH basketgroup IN basketgroups %]
-                                                        [% IF ( basketgroup.default ) %]
-                            <option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option>
-                                                        [% ELSE %]
-                            <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
-                                                        [% END %]
-                                                    [% END %]
-                        </select></p>
-
-                        <p><input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
-                        <input type="hidden" value="mod_basket" name="op" />
-                        <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
-                        <input type="submit" value="Change basket group" /></p>
-
+                        [% UNLESS basketgroup.closed %]
+                          <p>
+                            <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
+                            <input type="hidden" value="mod_basket" name="op" />
+                            <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
+                            <input type="submit" value="Change basket group" />
+                          </p>
+                        [% END %]
                     </form>
                     [% IF ( basketgroupdeliveryplace ) %]<p>Basket group delivery place: [% basketgroupdeliveryplace %]</p>[% END %]
                     [% IF ( basketgroupbillingplace ) %]<p>Basket group billing place: [% basketgroupbillingplace %]</p>[% END %]
index a04204e..8e9b1a3 100644 (file)
@@ -207,7 +207,7 @@ $(document).ready(function() {
             <input type="text" id="publicationyear" name="publicationyear" value="[% publicationyear %]" />
           </li>
           <li>
-            <label for="branch">Branch:</label>
+            <label for="branch">Library:</label>
             <select id="branch" name="branch">
               <option value="">All</option>
               [% FOREACH branch IN branches_loop %]
index 5533ebc..398a568 100644 (file)
@@ -125,6 +125,7 @@ $(document).ready(function()
                 alert(_("You can't add a new item, please create a new order line"));
                 // and we replace the original value
                 $(this).val([% quantityrec %])
+                updateCosts(); // blur is invoked after change which updated values
                 return false;
             }
         });
@@ -146,7 +147,7 @@ $(document).ready(function()
 //]]>
 </script>
 </head>
-<body id="acq_neworderempty" class="acq" onload="updateCosts()">
+<body id="acq_neworderempty" class="acq">
 
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
@@ -230,7 +231,10 @@ $(document).ready(function()
         <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst %]" />
         <input type="hidden" name="suggestionid" value="[% suggestionid %]" />
         <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
-        <input type="hidden" name="currency_rate" id="currency_rate" value="[% currency_rate %]" />
+
+        [% FOREACH loop_currencie IN loop_currencies %]
+            <input type="hidden" id="currency_rate_[% loop_currencie.currcode %]"  name="[% loop_currencie.currcode %]" value="[% loop_currencie.rate %]" />
+        [% END %]
 
         <ol><li>
             [% IF ( biblionumber ) %]
@@ -350,8 +354,8 @@ $(document).ready(function()
                         <th>&nbsp;</th>
                         <th>&nbsp;</th>
                         <th>Barcode</th>
-                        <th>Home branch</th>
-                        <th>Holding branch</th>
+                        <th>Home library</th>
+                        <th>Holding library</th>
                         <th>Not for loan</th>
                         <th>Restricted</th>
                         <th>Location</th>
index c6559c3..da9aefe 100644 (file)
                             <th>&nbsp;</th>
                             <th>&nbsp;</th>
                             <th>Barcode</th>
-                            <th>Home branch</th>
-                            <th>Holding branch</th>
+                            <th>Home library</th>
+                            <th>Holding library</th>
                             <th>Not for loan</th>
                             <th>Restricted</th>
                             <th>Location</th>
 
 </div>
 </div><div class="yui-g"><fieldset class="action">
-        <input type="submit"  value="Save" />
+        <input type="submit" onclick="return false;" style="display: none;" id="phony_submit" value="phony_submit" name="phony_submit" />
+        <input type="submit"  value="Save" class="button" accesskey="w" />
         <a class="cancel" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Cancel</a>
 </fieldset></div>    </form>
 [% ELSE %]
-<div id="acqui_acquire_orderlist">
-    <table>
-    <tr>
-        <th>Basket</th>
-        <th>ISBN</th>
-        <th>Title</th>
-        <th>Author</th>
-        <th>Qty</th>
-        <th>Received</th>
-    </tr>
-    [% FOREACH loo IN loop %]
-        <tr>
-            <td>[% loo.basketno %]</td>
-            <td>[% loo.isbn %]</td>
-         <td><a href="orderreceive.pl?ordernumber=[% loo.ordernumber %]&amp;invoiceid=[% invoiceid %]">[% loo.title |html %]</a></td>
-            <td>[% loo.author %]</td>
-            <td>[% loo.quantity %]</td>
-            <td>[% loo.quantityreceived %]</td>
-        </tr>
-    [% END %]
-    </table>
-</div>
+    This ordernumber does not exist.
 [% END %]
 
 </div>
index 833e606..877d263 100644 (file)
 
     dt_overwrite_html_sorting_localeCompare();
 
-    var rowsToCollapse = 5;
     $(document).ready(function(){
         var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
+            "bStateSave": true,
+            "iCookieDuration": 60*60*24*1000, // 1000 days
+            "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
             "aoColumnDefs": [
                 { "aTargets": [ 3, 8, 9 ], "bSortable": false, "bSearchable": false },
             ],
@@ -34,6 +36,9 @@
             "sPaginationType": "four_button"
         } ) );
         var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
+            "bStateSave": true,
+            "iCookieDuration": 60*60*24*1000, // 1000 days
+            "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
             "aoColumnDefs": [
                 { "aTargets": [ 3, -1 ], "bSortable": false, "bSearchable": false },
             ],
     });
 */
 
-       rowCountPending  = $("#pendingt tbody.filterclass tr").length;
-       rowCountReceived = $("#receivedt tbody.filterclass tr").length;
-       if (rowCountPending > rowsToCollapse ) { if ( $.cookie("pendingKeepExpanded") != 1 ) { pendingCollapse(); } else { pendingExpand(); } }
-       if (rowCountReceived > rowsToCollapse ) { if ( $.cookie("receivedKeepExpanded") != 1 ) { receivedCollapse(); } else { receivedExpand(); } }
     });
 
      // Case-insensitive version of jquery's contains function
           containsExactly: "$(a).text() == m[3]"
      });
 
-
-    // Collapse pending items table
-    function pendingCollapse() {
-        $.cookie("pendingKeepExpanded", 0, { path: "/", expires: 9999 });
-       $("#pendingcollapserow").remove();
-    $("#pendingt tr").show();
-       $("#pendingt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide();
-       $("#pendingt").before("<p id=\"pendingcollapserow\">" + _("Only the first ")  + rowsToCollapse +  _(" items are displayed.") + " <a href=\"javascript:pendingExpand();\">" + _("Click here to show all ")  + rowCountPending + _(" items") + "<\/a>.<\/p>");
-
-    }
-
-    // Expend pending items table
-    function pendingExpand() {
-        $.cookie("pendingKeepExpanded", 1, { path: "/", expires: 9999 });
-       $("#pendingcollapserow").remove();
-       $("#pendingt tr").show();
-    $("#pendingt tbody.filterclass tr.orderfound").remove();
-       $("#pendingt").before("<p id=\"pendingcollapserow\">" + rowCountPending + _(" items are displayed.") + " <a href=\"javascript:pendingCollapse();\">" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>");
-    }
-
-    // Collapse already received items table
-    function receivedCollapse() {
-        $.cookie("receivedKeepExpanded", 0, { path: "/", expires: 9999 });
-       $("#receivedcollapserow").remove();
-       $("#receivedt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide();
-       $("#receivedt").before("<p id=\"receivedcollapserow\">" + _("Only the first ") + rowsToCollapse + _(" items are displayed.") + " <a href=\"javascript:receivedExpand();\">" + _("Click here to show all ") + rowCountReceived + _(" items") + "<\/a>.<\/p>");
-    }
-
-    // Expand already received items table
-    function receivedExpand() {
-        $.cookie("receivedKeepExpanded", 1, { path: "/", expires: 9999 });
-       $("#receivedcollapserow").remove();
-       $("#receivedt tr").show();
-       $("#receivedt").before("<p id=\"receivedcollapserow\">" + _("All ") + rowCountReceived + _(" items are displayed.") + " <a href=\"javascript:receivedCollapse();\">" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>");
-    }
-
 //]]>
 </script>
 <script type="text/javascript">
            </ol>
                <fieldset class="action">
         <input type="hidden" value="search" name="op" />
-        <input type="hidden" value="[% booksellerid %]" name="booksellerid" />
-        <input type="hidden" value="[% invoice %]" name="invoice" />
-        <input type="hidden" value="[% invoicedatereceived %]" name="datereceived" />
+        <input type="hidden" value="[% invoiceid %]" name="invoiceid" />
         <input type="submit" value="Filter" />
-        <a href="/cgi-bin/koha/acqui/parcel.pl?booksellerid=[% booksellerid %]&amp;invoice=[% invoice %]&amp;op=new&amp;datereceived=[% formatteddatereceived %]">Clear</a>
+        <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Clear</a>
                </fieldset>
 
 
index 0902d07..1b1f070 100644 (file)
@@ -68,7 +68,6 @@ function check(form) {
         <h2>Orders with uncertain prices</h2>
         <form action="[% scriptname %]" method="post" name="uncertainprices">
         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
-        <input type="hidden" name="op" value="validate" />
         Orders from:
         <select name="owner">
             [% IF ( owner ) %]
index f8a0506..244f92f 100644 (file)
 
   <div id="budgetsTabs" class="toptabs">
     <ul>
-        <li><a href="#active">Active Budgets</a></li>
-        <li><a href="#inactive">Inactive Budgets</a></li>
+        <li><a href="#active">Active budgets</a></li>
+        <li><a href="#inactive">Inactive budgets</a></li>
     </ul>
 
     <div id="active">
                 <td>
                   <a href="[% script_name %]?op=add_form&amp;budget_period_id=[% period_active.budget_period_id |html %]">Edit</a>
                   <a href="[% script_name %]?op=delete_confirm&amp;budget_period_id=[% period_active.budget_period_id %]">Delete</a>
-                  <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_period_id=[% period_active.budget_period_id %]">Add Fund</a>
+                  <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_period_id=[% period_active.budget_period_id %]">Add fund</a>
                 </td>
                 </tr>
               [% END %]
index 4acaac3..e464617 100644 (file)
                sortList: [[1,0]],
                headers: { 4: { sorter: false}, 5: { sorter: false}}
                                }).tablesorterPager({container: $("#pagertable_authorized_values"),positionFixed: false,size: 50});
-       
+
+    if ( $("#branches option:selected").length < 1 ) {
+        $("#branches option:first").attr("selected", "selected");
+    }
 }); </script>
 
 <script type="text/JavaScript" language="JavaScript">
@@ -60,7 +63,7 @@
         <fieldset class="rows"><ol>
         <li>
                         [% IF ( action_add_category ) %]<label for="category">Category</label>
-               <input type="text" name="category"  id="category" size="10" maxlength="10" />
+            <input type="text" name="category"  id="category" size="10" maxlength="10" class="focus" />
                         [% ELSE %]<span class="label">Category</span>
                <input type="hidden" name="category" value="[% category %]" />   [% category %]
                         [% END %]
         <li>
             <label for="authorised_value">Authorized value</label>
      [% IF ( action_modify ) %]<input type="hidden" id="id" name="id" value="[% id %]" />[% END %]
+            [% IF ( action_add_category ) %]
             <input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value %]" maxlength="80" />
+            [% ELSE %]
+            <input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value %]" maxlength="80" class="focus" />
+            [% END %]
         </li>
         <li>
             <label for="lib">Description</label>
             <label for="lib_opac">Description (OPAC)</label>
             <input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac %]" maxlength="200" />
         </li>
+        <li><label for="branches">Branches limitation: </label>
+            <select id="branches" name="branches" multiple size="10">
+                <option value="">All branches</option>
+                [% FOREACH branch IN branches_loop %]
+                  [% IF ( branch.selected ) %]
+                    <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
+                  [% ELSE %]
+                    <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
+                  [% END %]
+                [% END %]
+            </select>
+            <span>Select All if this authorised value must to be displayed all the time. Otherwise select librairies you want to associate with this value.
+            </span>
+        </li>
+
                </ol>
         <div id="icons" class="toptabs" style="clear:both">
         <h5 style="margin-left:10px;">Choose an icon:</h5>
        <th>Description</th>
        <th>Description (OPAC)</th>
        <th>Icon</th>
+    <th>Branches limitations</th>
        <th>Edit</th>
        <th>Delete</th>
        </tr>
        <td>[% loo.lib %]</td>
        <td>[% loo.lib_opac %]</td>
        <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt=""/>[% ELSE %]&nbsp;[% END %]</td>
+    <td>
+        [% IF loo.branches.size > 0 %]
+            [% branches_str = "" %]
+            [% FOREACH branch IN loo.branches %]
+                [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
+            [% END %]
+            <span href="#" title="[% branches_str %]">
+                [% IF loo.branches.size > 1 %]
+                    [% loo.branches.size %] branches limitations
+                [% ELSE %]
+                    [% loo.branches.size %] branch limitation
+                [% END %]
+        [% ELSE %]
+            No limitation
+        [% END %]
+    </td>
        <td><a href="[% loo.edit %]">Edit</a></td>
        <td><a href="[% loo.delete %]">Delete</a></td>
 </tr>
index f1b8254..6c3114f 100644 (file)
                headers: { 11: { sorter: false}}
        }).tablesorterPager({container: $("#pagertable_categorie"),positionFixed: false,size: 20});
     $( "#enrolmentperioddate" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
+
+    if ( $("#branches option:selected").length < 1 ) {
+        $("#branches option:first").attr("selected", "selected");
+    }
 }); </script>
 <script type="text/javascript">
 //<![CDATA[
                                        [% IF ( type_P ) %]<option value="P" selected="selected">Professional</option>[% ELSE %]<option value="P">Professional</option>[% END %]
                                        [% IF ( type_X ) %]<option value="X" selected="selected">Statistical</option>[% ELSE %]<option value="X">Statistical</option>[% END %]
                                        </select>
-       </li></ol>
+    </li>
+    <li><label for="branches">Branches limitation: </label>
+        <select id="branches" name="branches" multiple size="10">
+            <option value="">All branches</option>
+            [% FOREACH branch IN branches_loop %]
+              [% IF ( branch.selected ) %]
+                <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
+              [% ELSE %]
+                <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
+              [% END %]
+            [% END %]
+        </select>
+        <span>Select All if this category type must to be displayed all the time. Otherwise select librairies you want to associate with this value.
+        </span>
+    </li>
+    </ol>
 </fieldset>
 
     [% IF ( EnhancedMessagingPreferences ) %]
@@ -292,6 +311,7 @@ Confirm deletion of category [% categorycode |html %][% END %]</legend>
             [% IF ( EnhancedMessagingPreferences ) %]
             <th scope="col">Messaging</th>
             [% END %]
+            <th scope="col">Branches limitations</th>
                        <th scope="col" colspan="2">&nbsp; </th>
                </thead>
                [% FOREACH loo IN loop %]
@@ -345,6 +365,23 @@ Confirm deletion of category [% categorycode |html %][% END %]</legend>
                             [% END %]
                         </td>
                         [% END %]
+                        <td>
+                            [% IF loo.branches.size > 0 %]
+                                [% branches_str = "" %]
+                                [% FOREACH branch IN loo.branches %]
+                                    [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
+                                [% END %]
+                                <span title="[% branches_str %]">
+                                    [% IF loo.branches.size > 1 %]
+                                        [% loo.branches.size %] branches limitations
+                                    [% ELSE %]
+                                        [% loo.branches.size %] branch limitation
+                                    [% END %]
+                                </span>
+                            [% ELSE %]
+                                No limitation
+                            [% END %]
+                        </td>
                         <td><a href="[% loo.script_name %]?op=add_form&amp;categorycode=[% loo.categorycode |uri %]">Edit</a></td>
                         <td><a href="[% loo.script_name %]?op=delete_confirm&amp;categorycode=[% loo.categorycode |uri %]">Delete</a></td>
                </tr>
index cb3f9ba..30a3a85 100644 (file)
@@ -168,11 +168,15 @@ Item types administration
      </li>
   [% ELSE %]
       <li>
-          <label for="itemtype">Item type</label> <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" />
+          <label for="itemtype">Item type</label> <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" class="focus" />
       </li>
   [% END %]
       <li>
-          <label for="description">Description</label><input type="text" id="description" name="description" size="48" value="[% description |html %]" />      </li>
+      [% IF ( itemtype ) %]
+          <label for="description">Description</label><input type="text" id="description" name="description" size="48" value="[% description |html %]" class="focus" /></li>
+      [% ELSE %]
+          <label for="description">Description</label><input type="text" id="description" name="description" size="48" value="[% description |html %]" /></li>
+      [% END %]
      [% IF ( noItemTypeImages ) %]
         <li><span class="label">Image: </span>Item type images are disabled. To enable them, turn off the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&amp;searchfield=noItemTypeImages">noItemTypeImages system preference</a></li></ol>
         [% ELSE %]</ol>
index 4ce4785..d70bdbd 100644 (file)
 
 <script type="text/javascript">
 //<![CDATA[
+$(document).ready(function() {
+    if ( $("#branches option:selected").length < 1 ) {
+        $("#branches option:first").attr("selected", "selected");
+    }
+} );
 
 function DoCancel(f) {
   f.op.value='';
@@ -186,6 +191,20 @@ function CheckAttributeTypeForm(f) {
                   to be chosen from the authorized value list.  However, an authorized value list is not 
                   enforced during batch patron import.</span>
         </li>
+        <li><label for="branches">Branches limitation: </label>
+            <select id="branches" name="branches" multiple size="10">
+                <option value="">All branches</option>
+                [% FOREACH branch IN branches_loop %]
+                  [% IF ( branch.selected ) %]
+                    <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
+                  [% ELSE %]
+                    <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
+                  [% END %]
+                [% END %]
+            </select>
+            <span>Select All if this attribute type must to be displayed all the time. Otherwise select librairies you want to associate with this value.
+            </span>
+        </li>
         <li>
             <label for="category">Category: </label>
             <select name="category_code" id="category">
@@ -286,6 +305,7 @@ function CheckAttributeTypeForm(f) {
         <tr>
           <th>Code</th>
           <th>Description</th>
+          <th>Branches limitation</th>
           <th>Actions</th>
         </tr>
       </thead>
@@ -295,6 +315,23 @@ function CheckAttributeTypeForm(f) {
             <td>[% item.code |html %]</td>
             <td>[% item.description %]</td>
             <td>
+                [% IF item.branches.size > 0 %]
+                    [% branches_str = "" %]
+                    [% FOREACH branch IN item.branches %]
+                        [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
+                    [% END %]
+                    <span title="[% branches_str %]">
+                        [% IF item.branches.size > 1 %]
+                            [% item.branches.size %] branches limitations
+                        [% ELSE %]
+                            [% item.branches.size %] branch limitation
+                        [% END %]
+                    </span>
+                [% ELSE %]
+                    No limitation
+                [% END %]
+            </td>
+            <td>
               <a href="[% item.script_name %]?op=edit_attribute_type&amp;code=[% item.code |html %]">Edit</a>
               <a href="[% item.script_name %]?op=delete_attribute_type&amp;code=[% item.code |html %]">Delete</a>
             </td>
index 9591003..139c35e 100644 (file)
@@ -3,11 +3,12 @@
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/preferences.css" />
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/humanmsg.css" />
-<script src="[% themelang %]/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script>
-<script src="[% themelang %]/js/ajax.js" type="text/javascript"></script>
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
 <script type="text/javascript">
 //<![CDATA[
+    [% UNLESS ( searchfield ) %]$(document).ready(function(){
+            $('#toolbar').fixFloat();
+        });[% END %]
     // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw
     var to_highlight = "[% searchfield |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]";
     var search_jumped = [% IF ( search_jumped ) %]true[% ELSE %]false[% END %];
     var MSG_MADE_CHANGES = _("You have made changes to system preferences.");
     var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
     var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
+    var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
+    var MSG_SESSION_TIMED_OUT = _( 'You need to log in again, your session has timed out' );
+    var MSG_DATA_NOT_SAVED = _( 'Error; your data might not have been saved' );
+    var MSG_LOADING = _( 'Loading...' );
+
 //]]>
 </script>
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/humanmsg.css" />
+<script src="[% themelang %]/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script>
+<script src="[% themelang %]/js/ajax.js" type="text/javascript"></script>
 <script src="[% themelang %]/js/pages/preferences.js" type="text/javascript"></script>
 <script src="[% themelang %]/lib/jquery/plugins/jquery.highlight-3.js" type="text/javascript"></script>
 </head>
@@ -49,6 +58,7 @@
     <div class="prefs-tab">
     <h2>[% TAB.tab_title %] preferences</h2>
     <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
+        [% UNLESS ( searchfield ) %]<div id="toolbar"><button class="save-all submit" type="submit">Save all [% TAB.tab_title %] preferences</button></div>[% END %]
         <input type="hidden" name="op" value="save" />
         <input type="hidden" name="tab" value="[% TAB.tab %]" />
 
index 91f15c3..09ec796 100644 (file)
@@ -156,4 +156,19 @@ Cataloging:
             - pref: OpacSuppressionByIPRange
               class: short
             - (Leave blank if not used. Define a range like <code>192.168.</code>.)
-
+        -
+            - pref: SeparateHoldings
+              choices:
+                  yes: Separate
+                  no: Don't separate
+            - 'items display into two tabs. First tab contains items whose'
+            - pref: SeparateHoldingsBranch
+              choices:
+                homebranch: 'home branch'
+                holdingbranch: 'holding branch'
+            - 'is the branch of user logged in. The other tab contains other items.'
+        -
+            - Don't show these
+            - pref: NotesBlacklist
+              class: multi
+            - note fields in title notes separator (OPAC record details) and in the description separator (Staff client record details). The fields should appear separated with commas and according with the Koha MARC format (eg 3.. for UNIMARC, 5.. for MARC21)
index c583bbe..645b19b 100644 (file)
@@ -228,6 +228,12 @@ Circulation:
                   date_due: the old due date of the checkout.
                   now: the current date.
         -
+            - pref: RenewalSendNotice
+              choices:
+                  yes: Send
+                  no: "Don't send"
+            - a renewal notice according to patron checkout alert preferences.
+        -
             - Prevent patrons from making holds on the OPAC if they owe more than
             - pref: maxoutstanding
               class: currency
@@ -435,6 +441,12 @@ Circulation:
             - pref: decreaseLoanHighHoldsValue
               class: integer
             - holds.
+        -
+            - pref: AllowHoldsOnPatronsPossessions
+              choices:
+                  yes: Allow
+                  no: "Don't allow"
+            - a patron to place a hold on a record where the patron already has one or more items attached to that record checked out.
     Fines Policy:
         -
             - Calculate fines based on days overdue
@@ -452,8 +464,24 @@ Circulation:
                   test: Calculate (but only for mailing to the admin)
                   production: Calculate and charge
             - fines (when <code>misc/cronjobs/fines.pl</code> is being run).
+        -
+            - pref: RefundLostItemFeeOnReturn
+              choices:
+                  yes: Refund
+                  no: "Don't refund"
+            - lost item fees charged to a borrower when the lost item is returned.
     Self Checkout:
         -
+            - "Include the following JavaScript on all pages in the web-based self checkout:"
+            - pref: SCOUserJS
+              type: textarea
+              class: code
+        -
+            - "Include the following CSS on all pages in the web-based self checkout:"
+            - pref: SCOUserCSS
+              type: textarea
+              class: code
+        -
             - pref: ShowPatronImageInWebBasedSelfCheck
               choices:
                   yes: Show
index d1f2814..655ae34 100644 (file)
@@ -286,3 +286,17 @@ Enhanced Content:
                   yes: Allow
                   no: "Don't allow"
             - multiple images to be attached to each bibliographic record.
+    HTML5 Media:
+        -
+            - Show a tab with a HTML5 media player for files catalogued in field 856
+            - pref: HTML5MediaEnabled
+              choices:
+                  not: "not at all."
+                  opac: "in the OPAC."
+                  staff: "in the staff client."
+                  both: "in OPAC and staff client."
+        -
+            - Media file extensions
+            - pref: HTML5MediaExtensions
+              class: multi
+            - (separated with |).
index 02b8de6..cc6700b 100644 (file)
@@ -31,3 +31,8 @@ I18N/L10N:
         - "Enable the following languages on the OPAC:"
         - pref: opaclanguages
           type: opac-languages
+    -
+        - "Use the alphabet"
+        - pref: alphabet
+          class: long
+        - for lists of browsable letters. This should be a space separated list of uppercase letters.
index 1a9fa09..c1870ad 100644 (file)
@@ -59,12 +59,12 @@ OPAC:
             - 'Display OPAC results using XSLT stylesheet at: '
             - pref: OPACXSLTResultsDisplay
               class: file
-            - '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language'
+            - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="OPACXSLTResultsDisplay" data-value="">Leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="OPACXSLTResultsDisplay" data-value="default">default</a>" for the default one</li><li> put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language'
         -
             - 'Display OPAC details using XSLT stylesheet at: '
             - pref: OPACXSLTDetailsDisplay
               class: file
-            - '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language'
+            - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="OPACXSLTDetailsDisplay" data-value="">Leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="OPACXSLTDetailsDisplay" data-value="default">default</a>" for the default one</li><li>put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language'
         -
             - On pages displayed with XSLT stylesheets on the OPAC,
             - pref: DisplayOPACiconsXSLT
@@ -239,6 +239,7 @@ OPAC:
             - a library select pulldown menu on the OPAC masthead.
         -
             - 'Display this HTML when no results are found for a search in the OPAC:'
+            - '<br />Note: You can insert placeholders {QUERY_KW} that will be replaced with the keywords of the query.'
             - pref: OPACNoResultsFound
               type: textarea
               class: code
@@ -258,6 +259,17 @@ OPAC:
             - '<br />Note: Available options are: BIBTEX (<code>bibtex</code>), Dublin Core (<code>dc</code>),'
             - 'MARCXML (<code>marcxml</code>), MARC-8 encoded MARC (<code>marc8</code>), Unicode/UTF-8 encoded MARC (<code>utf8</code>),'
             - 'Unicode/UTF-8 encoded MARC without local use -9xx, x9x, xx9- fields and subfields (<code>marcstd</code>), MODS (<code>mods</code>), RIS (<code>ris</code>)'
+        -
+            - pref: OpacSeparateHoldings
+              choices:
+                  yes: Separate
+                  no: Don't separate
+            - 'items display into two tabs. First tab contains items whose'
+            - pref: OpacSeparateHoldingsBranch
+              choices:
+                homebranch: 'home branch'
+                holdingbranch: 'holding branch'
+            - 'is the branch of user logged in. The other tab contains other items.'
     Features:
         -
             - pref: opacuserlogin
@@ -527,3 +539,37 @@ OPAC:
                   yes: Use
                   no: "Don't use"
             - "the item collection code when finding items for the shelf browser."      
+
+    Self Registration:
+        -
+            - pref: PatronSelfRegistration
+              choices:
+                  yes: Allow
+                  no: "Don't allow"
+            - "library patrons to register an account via the OPAC."
+        -
+            - pref: PatronSelfRegistrationVerifyByEmail
+              choices:
+                  yes: Require
+                  no: "Don't require"
+            - "that a self-registering patron verify his or herself via email."
+        -
+            - "Use the patron category code"
+            - pref: PatronSelfRegistrationDefaultCategory
+              class: short
+            - "as the default patron category for patrons registered via the OPAC."
+        -
+            - "Delete patrons registered via the OPAC, but not yet verified after"
+            - pref: PatronSelfRegistrationExpireTemporaryAccountsDelay
+              class: integer
+            - "days."
+        -
+            - "The following <a href='http://schema.koha-community.org/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:"
+            - pref: PatronSelfRegistrationBorrowerMandatoryField
+              class: multi
+            - (separate columns with |)
+        -
+            - "The following <a href='http://schema.koha-community.org/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron entry screen:"
+            - pref: PatronSelfRegistrationBorrowerUnwantedField
+              class: multi
+            - (separate columns with |)
index 0b9e3cb..7b99173 100644 (file)
@@ -58,12 +58,6 @@ Searching:
                   no: "Not using"
             - 'ICU Zebra indexing. Please note: This setting will not affect Zebra indexing, it should only be used to tell Koha that you have activated ICU indexing if you have actually done so, since there is no way for Koha to figure this out on its own.'
         -
-            - pref: DidYouMeanFromAuthorities
-              default: 0
-              choices:
-                  yes: Suggest
-                  no: "Don't suggest"
-            - alternate searches based on data in the authority file.
             - pref: IncludeSeeFromInSearches
               default: 0
               choices:
index b6be289..d9fc21a 100644 (file)
@@ -59,12 +59,12 @@ Staff Client:
             - 'Display results in the staff client using XSLT stylesheet at: '
             - pref: XSLTResultsDisplay
               class: file
-            - '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language'
+            - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="XSLTResultsDisplay" data-value="">Leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="XSLTResultsDisplay" data-value="default">default</a>" for the default one</li><li> put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language'
         -
             - 'Display details in the staff client using XSLT stylesheet at: '
             - pref: XSLTDetailsDisplay
               class: file
-            - '<br />Options:<br />- leave empty for "no xslt"<br />- enter "default" for the default one<br />- put a path to define a xslt file<br />- put an URL for an external specific stylesheet.<br />{langcode} will be replaced with current interface language'
+            - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="XSLTDetailsDisplay" data-value="">Leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="XSLTDetailsDisplay" data-value="default">default</a>" for the default one</li><li>put a path to define a xslt file</li><li>put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language'
         -
             - Use the Yahoo UI libraries
             - pref: yuipath
index a025fe1..586d72f 100644 (file)
@@ -230,7 +230,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
                             [% ELSE %]
                             <option value="holdingbranch">
                             [% END %]
-                                Item returns to issuing branch
+                                Item returns to issuing library
                             </option>
                             [% IF ( default_returnbranch == 'noreturn' ) %]
                             <option value="noreturn" selected="selected">
@@ -390,7 +390,7 @@ for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde
                     <td>
                         <select name="returnbranch">
                             <option value="homebranch">Item returns home</option>
-                            <option value="holdingbranch">Item returns to issuing branch</option>
+                            <option value="holdingbranch">Item returns to issuing library</option>
                             <option value="noreturn">Item floats</option>
                         </select>
                     </td>
index 2fd8832..9989194 100644 (file)
        <script type="text/javascript">
        //<![CDATA[
 
-$(document).ready(function()
-    {
-        $("#itemst").tablesorter({
-                        headers: { 0: { sorter: false }}
-                });
-    }
-);
-
-
 function placeHold () {
     var checkedItems = $("input:checkbox:checked");
     if ($(checkedItems).size() == 0) {
@@ -72,9 +63,30 @@ function placeHold () {
            });
         $(".holdsep").text("| ");
         $(".hold").text(_("Place Hold"));
+        $("#downloadcartc").empty();
+        yuiToolbar();
+        $("#itemst").tablesorter({
+            headers: { 0: { sorter: false }}
+        });
        });
 
-
+function yuiToolbar() {
+    var downloadmenu = [
+    { text: _("iso2709"), url: "/cgi-bin/koha/basket/downloadcart.pl?format=iso2709&bib_list=[% bib_list %]" },
+    { text: _("RIS"), url: "/cgi-bin/koha/basket/downloadcart.pl?format=ris&bib_list=[% bib_list %]" },
+    { text: _("BibTex"), url: "/cgi-bin/koha/basket/downloadcart.pl?format=bibtex&bib_list=[% bib_list %]" },
+[% FOREACH csv_profile IN csv_profiles %]
+    { text: _("CSV - [% csv_profile.profile %]"), url: "/cgi-bin/koha/basket/downloadcart.pl?format=[% csv_profile.export_format_id %]&bib_list=[% bib_list %]" },
+[% END %]
+    ];
+    new YAHOO.widget.Button({
+        type: "menu",
+        label: _("Download"),
+        name: "downloadmenubutton",
+        menu: downloadmenu,
+        container: "downloadcartc"
+    });
+}
        //]]>
        </script>
        [% END %]
@@ -98,11 +110,9 @@ function placeHold () {
                <a class="send" href="basket.pl" onclick="sendBasket(); return false;">Send</a>
            </span></span>
        </li>
-       <li>
-           <span id="savemenuc" class="yui-button yui-link-button"><span class="first-child">
-               <a class="download" href="basket.pl" onclick="downloadBasket(); return false;">Download</a>
-           </span></span>
-       </li>
+    <li id="downloadcartc">
+        <a href="#" id="downloadcart">Download</a>
+    </li>
        <li>
            <span id="printmenuc" class="yui-button yui-link-button"><span class="first-child">
                <a class="print" href="basket.pl" onclick="printBasket(); return false;">Print</a>
index ef2b5b9..cc68bfe 100644 (file)
@@ -1,4 +1,5 @@
 [% INCLUDE 'doc-head-open.inc' %]
+[% INCLUDE 'greybox.inc' %]
 <title>Koha &rsaquo; Catalog &rsaquo;
   [% IF ( unknownbiblionumber ) %]
     Unknown record
@@ -115,6 +116,7 @@ function verify_images() {
                     [% END %]
                     </span>
         [% END %]
+        <span id="catalogue_detail_marc_preview" class="results_summary"><span class="label">MARC Preview:</span> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Show</a></span>
         [% IF ( holdcount ) %]<span class="results_summary"><span class="label">Holds:</span> <span class="holdcount"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">[% holdcount %]</a></span></span>[% ELSE %][% END %]
 
         [% IF ( AmazonCoverImages ) %]</div><div class="yui-u" id="bookcoverimg">
@@ -174,6 +176,10 @@ function verify_images() {
        <a href="http://[% OpacUrl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]" target="_blank">Open in new window</a>
                </li>
        [% END %]
+        <li id="catalogue_detail_marc_preview">
+            <strong>MARC Preview:</strong>
+            <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Show</a>
+        </li>
         </ul>
         </div>
        
@@ -255,18 +261,23 @@ function verify_images() {
 </div>
 <div id="bibliodetails" class="toptabs">
 
-<ul>   
-<li><a href="#holdings">Holdings</a></li>
+<ul>
+    [% IF (SeparateHoldings) %]
+        <li><a href="#holdings">[% LoginBranchname %] holdings</a></li>
+        <li><a href="#otherholdings">Other holdings</a></li>
+    [% ELSE %]
+        <li><a href="#holdings">Holdings</a></li>
+    [% END %]
 <li><a href="#description">Descriptions</a></li>
 [% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
 [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %]
 [% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]<li><a href="#images">Images</a></li>[% END %][% END %]
- </ul>
+[% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]<li><a href="#html5media">Play media</a></li>[% END %][% END %]
+</ul>
 
-<div id="holdings">
-[% IF ( count ) %]
-    [% IF ( showncount ) %]
-        <table>
+[% BLOCK items_table %]
+    <table>
+        <thead>
             <tr>
                 [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
                 <th>Current location</th>
@@ -281,148 +292,171 @@ function verify_images() {
                 [% IF ( itemdata_copynumber ) %]<th>Copy no.</th>[% END %]
                 [% IF materials %]<th>Materials specified</th>[% END %]
                 [% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
-        [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %]
-        [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
-               [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
+                [% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %]
+                [% IF ( hostrecords ) %]<th>Host records</th>[% END %]
+                [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
             </tr>
-            [% FOREACH itemloo IN itemloop %]
+        </thead>
+        <tbody>
+            [% FOREACH item IN items %]
                 <tr>
                     [% IF ( item_level_itypes ) %]
-                    <td class="itype">
-                        [% IF !noItemTypeImages && itemloo.imageurl %]
-                            <img src="[% itemloo.imageurl %]" alt="[% itemloo.description %]" title="[% itemloo.description %]" />
-                        [% END %]
-                        [% itemloo.description %]
-                    </td>
+                        <td class="itype">
+                            [% IF !noItemTypeImages && item.imageurl %]
+                                <img src="[% item.imageurl %]" alt="[% item.description %]" title="[% item.description %]" />
+                            [% END %]
+                            [% item.description %]
+                        </td>
                     [% END %]
-                    <td class="location">[% UNLESS ( singlebranchmode ) %][% itemloo.branchname %] [% END %]</td>
-                    <td class="homebranch">[% itemloo.homebranch %]<span class="shelvingloc">[% itemloo.location %]</span> </td>
-                   [% IF ( itemdata_ccode ) %]<td>[% itemloo.ccode %]</td>[% END %]
-                    <td class="itemcallnumber">[% IF ( itemloo.itemcallnumber ) %] [% itemloo.itemcallnumber %][% END %]</td>
+                    <td class="location">[% UNLESS ( singlebranchmode ) %][% item.branchname %] [% END %]</td>
+                    <td class="homebranch">[% item.homebranch %]<span class="shelvingloc">[% item.location %]</span> </td>
+                    [% IF ( itemdata_ccode ) %]<td>[% item.ccode %]</td>[% END %]
+                    <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber %][% END %]</td>
                     <td class="status">
 
-                [% IF ( itemloo.datedue ) %]
-                                               <span class="datedue">Checked out
-                    [% UNLESS ( itemloo.NOTSAMEBRANCH ) %]
-                          to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.borrowernumber %]">
-                         [% IF ( itemloo.hidepatronname ) %]
-                             [% itemloo.cardnumber %]
-                         [% ELSE %]
-                             [% itemloo.firstname %] [% itemloo.surname %]
-                         [% END %]
-                         </a>
-                    [% END %]
-                                               : due [% itemloo.datedue %]
-                                               </span>
-                [% ELSIF ( itemloo.transfertwhen ) %]
-                           In transit from [% itemloo.transfertfrom %],
-                           to [% itemloo.transfertto %], since [% itemloo.transfertwhen %]
-                                                       <!-- FIXME: the "since" clause is redundant w/ lastseen field -->
-                [% END %]
+                        [% IF ( item.datedue ) %]
+                            <span class="datedue">Checked out
+                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
+                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
+                                        [% IF ( item.hidepatronname ) %]
+                                            [% item.cardnumber %]
+                                        [% ELSE %]
+                                            [% item.firstname %] [% item.surname %]
+                                        [% END %]
+                                    </a>
+                                [% END %]
+                                : due [% item.datedue %]
+                            </span>
+                        [% ELSIF ( item.transfertwhen ) %]
+                            In transit from [% item.transfertfrom %],
+                            to [% item.transfertto %], since [% item.transfertwhen %]
+                            <!-- FIXME: the "since" clause is redundant w/ lastseen field -->
+                        [% END %]
 
-                [% IF ( itemloo.itemlost ) %]
-                    [% IF ( itemloo.itemlostloop ) %]
-                    [% FOREACH itemlostloo IN itemloo.itemlostloop %]
-                        [% IF ( itemlostloo.selected ) %]
+                        [% IF ( item.itemlost ) %]
+                            [% IF ( item.itemlostloop ) %]
+                                [% FOREACH itemlostloo IN item.itemlostloop %]
+                                    [% IF ( itemlostloo.selected ) %]
                                         <span class="lost">[% itemlostloo.lib %]</span>
+                                    [% END %]
+                                [% END %]
+                            [% ELSE %]
+                                <span class="lost">Unavailable (lost or missing)</span>
+                            [% END %]
                         [% END %]
-                    [% END %]
-                    [% ELSE %]
-                                        <span class="lost">Unavailable (lost or missing)</span>
-                    [% END %]
-                [% END %]
 
-                [% IF ( itemloo.wthdrawn ) %]
-                                        <span class="wdn">Withdrawn</span>
-                [% END %]
+                        [% IF ( item.wthdrawn ) %]
+                            <span class="wdn">Withdrawn</span>
+                        [% END %]
 
-                [% IF ( itemloo.damaged ) %]
-                    [% IF ( itemloo.itemdamagedloop ) %]
-                        [% FOREACH itemdamagedloo IN itemloo.itemdamagedloop %]
-                        [% IF ( itemdamagedloo.selected ) %]
+                        [% IF ( item.damaged ) %]
+                            [% IF ( item.itemdamagedloop ) %]
+                                [% FOREACH itemdamagedloo IN item.itemdamagedloop %]
+                                    [% IF ( itemdamagedloo.selected ) %]
                                         <span class="dmg">[% itemdamagedloo.lib %]</span>
+                                    [% END %]
+                                [% END %]
+                            [% ELSE %]
+                                <span class="dmg">Damaged</span>
+                            [% END %]
                         [% END %]
+
+                        [% IF ( item.itemnotforloan ) %]
+                            Not for loan
+                            [% IF ( item.notforloanvalue ) %]
+                                ([% item.notforloanvalue %])
+                            [% END %]
                         [% END %]
-                    [% ELSE %]
-                                        <span class="dmg">Damaged</span>
-                    [% END %]
-                [% END %]
 
-                [% IF ( itemloo.itemnotforloan ) %]
-                    Not for loan 
-                    [% IF ( itemloo.notforloanvalue ) %]
-                        ([% itemloo.notforloanvalue %])
-                    [% END %]
-                [% END %]
+                        [% IF ( item.reservedate ) %]
+                            [% IF ( item.waitingdate ) %]
+                                Waiting
+                            [% ELSE %]
+                                Item-level hold
+                            [% END %]
+                            [% IF ( canreservefromotherbranches ) %]
+                                for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.ReservedForBorrowernumber %]">
+                                    [% IF ( item.hidepatronname ) %]
+                                        [% item.Reservedcardnumber %]
+                                    [% ELSE %]
+                                        [% item.ReservedForFirstname %] [% item.ReservedForSurname %]
+                                    [% END %]
+                                </a>
+                            [% END %]
+                            [% IF ( item.waitingdate ) %]
+                                at[% ELSE %]for delivery at
+                            [% END %]
+                            [% item.ExpectedAtLibrary %]
+                            [% IF ( item.waitingdate ) %]
+                                since [% item.waitingdate %]
+                            [% ELSE %]
+                                [% IF ( item.reservedate ) %]
+                                    (placed [% item.reservedate %])
+                                [% END %]
+                            [% END %]
+                        [% END %]
+                        [% UNLESS ( item.itemnotforloan or item.onloan or item.itemlost or item.wthdrawn or item.damaged or item.transfertwhen or item.reservedate ) %]
+                            Available
+                        [% END %]
 
-                            
-                [% IF ( itemloo.reservedate ) %]
-                    [% IF ( itemloo.waitingdate ) %]
-                        Waiting
-                    [% ELSE %]
-                        Item-level hold
-                    [% END %]
-                    [% IF ( canreservefromotherbranches ) %]for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedForBorrowernumber %]">
-                       [% IF ( itemloo.hidepatronname ) %]
-                           [% itemloo.Reservedcardnumber %]
-                       [% ELSE %]
-                           [% itemloo.ReservedForFirstname %] [% itemloo.ReservedForSurname %]
-                       [% END %]
-                   </a>[% END %]
-                    [% IF ( itemloo.waitingdate ) %]
-                        at[% ELSE %]for delivery at
-                    [% END %]   [% itemloo.ExpectedAtLibrary %]
-                    [% IF ( itemloo.waitingdate ) %]
-                        since [% itemloo.waitingdate %]
-                    [% ELSE %]
-                        [% IF ( itemloo.reservedate ) %](placed [% itemloo.reservedate %])[% END %]
-                    [% END %]
-                [% END %]
-                [% UNLESS ( itemloo.itemnotforloan ) %][% UNLESS ( itemloo.onloan ) %][% UNLESS ( itemloo.itemlost ) %][% UNLESS ( itemloo.wthdrawn ) %][% UNLESS ( itemloo.damaged ) %][% UNLESS ( itemloo.transfertwhen ) %][% UNLESS ( itemloo.reservedate ) %]
-                                        Available
-                [% END %][% END %][% END %][% END %][% END %][% END %][% END %]
+                        [% IF ( item.restricted ) %]
+                            <span class="restricted">([% item.restricted %])</span>
+                        [% END %]
 
-                [% IF ( itemloo.restricted ) %]<span class="restricted">([% itemloo.restricted %])</span>[% END %]
-                        
                     </td>
-                    <td class="datelastseen">[% itemloo.datelastseen %]</td>
-                    <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% itemloo.type %]&amp;itemnumber=[% itemloo.itemnumber %]&amp;biblionumber=[% itemloo.biblionumber %]&amp;bi=[% itemloo.biblioitemnumber %]#item[% itemloo.itemnumber %]">[% itemloo.barcode %]</a></td>
-                               [% IF ( volinfo ) %]    <td class="enumchron">
-                                       [% IF ( itemdata_enumchron ) %]
-                                               [% IF ( itemloo.enumchron ) %]
-                                               [% itemloo.enumchron %][% IF ( itemloo.serialseq ) %] -- [% END %]
-                                               [% END %]
-                                       [% itemloo.serialseq %][% IF ( itemloo.publisheddate ) %] ([% itemloo.publisheddate %])[% END %]
-                                       [% END %]
-                               </td>[% END %]
-                               [% IF ( itemdata_uri ) %]
-                                       <td class="uri"><a href="[% itemloo.uri %]">[% itemloo.uri %]</a></td>
-                               [% END %]
-                               [% IF ( itemdata_copynumber ) %]
-                                       <td class="copynumber">[% itemloo.copynumber %]</td>
-                               [% END %]
-               [% IF materials %]
-                   <td class="materials"> [% itemloo.materials %] </td>
-               [% END %]
-                [% IF ( itemdata_itemnotes ) %]<td><div class="itemnotes">[% itemloo.itemnotes %]</div></td>[% END %]
-               [% IF ( SpineLabelShowPrintOnBibDetails ) %]
-            <td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% itemloo.barcode %]" >Print label</a></td>
-               [% END %]
-                [% IF ( hostrecords ) %]
-                      <td>[% IF ( itemloo.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemloo.hostbiblionumber %]" >[% itemloo.hosttitle %]</a>[% END %]</td>
-                [% END %]
-                [% IF ( analyze ) %]<td>
-                       [% IF ( itemloo.countanalytics ) %]
-                               <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=[% itemloo.itemnumber %]">[% itemloo.countanalytics %] analytics</a>
-                       [% END %]</td>
-               [% END %]
-                [% IF ( analyze ) %]
-                        <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% itemloo.biblionumber %]&amp;hostitemnumber=[% itemloo.itemnumber %]">Create analytics</a></td>
-                [% END %]
+                    <td class="datelastseen">[% item.datelastseen %]</td>
+                    <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type %]&amp;itemnumber=[% item.itemnumber %]&amp;biblionumber=[% item.biblionumber %]&amp;bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a></td>
+                    [% IF ( volinfo ) %]
+                        <td class="enumchron">
+                            [% IF ( itemdata_enumchron ) %]
+                                [% IF ( item.enumchron ) %]
+                                    [% item.enumchron %]
+                                    [% IF ( item.serialseq ) %] -- [% END %]
+                                [% END %]
+                                [% item.serialseq %]
+                                [% IF ( item.publisheddate ) %] ([% item.publisheddate %])[% END %]
+                            [% END %]
+                        </td>
+                    [% END %]
+                    [% IF ( itemdata_uri ) %]
+                        <td class="uri"><a href="[% item.uri %]">[% item.uri %]</a></td>
+                    [% END %]
+                    [% IF ( itemdata_copynumber ) %]
+                        <td class="copynumber">[% item.copynumber %]</td>
+                    [% END %]
+                    [% IF materials %]
+                        <td class="materials"> [% item.materials %] </td>
+                    [% END %]
+                    [% IF ( itemdata_itemnotes ) %]
+                        <td><div class="itemnotes">[% item.itemnotes %]</div></td>
+                    [% END %]
+                    [% IF ( SpineLabelShowPrintOnBibDetails ) %]
+                        <td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode %]" >Print label</a></td>
+                    [% END %]
+                    [% IF ( hostrecords ) %]
+                        <td>[% IF ( item.hostbiblionumber) %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.hostbiblionumber %]" >[% item.hosttitle %]</a>[% END %]</td>
+                    [% END %]
+                    [% IF ( analyze ) %]
+                        <td>
+                            [% IF ( item.countanalytics ) %]
+                                <a href="/cgi-bin/koha/catalogue/search.pl?idx=hi&amp;q=[% item.itemnumber %]">[% item.countanalytics %] analytics</a>
+                            [% END %]
+                        </td>
+                    [% END %]
+                    [% IF ( analyze ) %]
+                        <td><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?hostbiblionumber=[% item.biblionumber %]&amp;hostitemnumber=[% item.itemnumber %]">Create analytics</a></td>
+                    [% END %]
 
                 </tr>
             [% END %]
-        </table>
+        </tbody>
+    </table>
+[% END %][%# end of block items_table %]
+
+<div id="holdings">
+[% IF ( count ) %]
+    [% IF ( showncount ) %]
+        [% PROCESS items_table items=itemloop %]
         [% END %]
                 [% IF ( hiddencount ) %]
                    <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&amp;showallitems=1">Show all items ([% hiddencount %] hidden)</a>
@@ -445,6 +479,16 @@ function verify_images() {
     [% END %]
 [% END %]
     </div>
+
+[% IF (SeparateHoldings) %]
+    <div id="otherholdings">
+        [% IF (otheritemloop.size) %]
+            [% PROCESS items_table items=otheritemloop %]
+        [% ELSE %]
+            No other items.
+        [% END %]
+    </div>
+[% END %]
     
 <div id="description">
 <div class="content_set">
@@ -470,6 +514,8 @@ function verify_images() {
     [% FOREACH subscription IN subscriptions %]
            [% IF ( subscription.branchname ) %]<h3>At library: [% subscription.branchname %]</h3>[% ELSE %]
            [% IF ( subscription.branchcode ) %]<h3>At library: [% subscription.branchcode %]</h3>[% END %][% END %]
+            [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
+            [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber %] </p>[% END %]
             [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes FILTER html_line_break %] </p>[% END %]
             [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist %] </p>[% END %]
             [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote %])</p>[% END %]
@@ -486,20 +532,16 @@ function verify_images() {
                 <tr>
                     <td>[% latestserial.serialseq %]</td>
                     <td>[% latestserial.planneddate %]</td>
-                    <td>[% IF ( latestserial.status1 ) %]Expected
-                        [% ELSE %]
-                            [% IF ( latestserial.status2 ) %]Arrived
-                            [% ELSE %]
-                                [% IF ( latestserial.status3 ) %]Late
-                                [% ELSE %]
-                                    [% IF ( latestserial.status4 ) %]Missing
-                                    [% ELSE %]
-                                        [% IF ( latestserial.status5 ) %]Not issued
-                                        [% END %]
-                                    [% END %]
-                                [% END %]
-                            [% END %]
-                        [% END %]</td>
+                    <td>
+                      [% IF ( latestserial.status1 ) %]Expected[% END %]
+                      [% IF ( latestserial.status2 ) %]Arrived[% END %]
+                      [% IF ( latestserial.status3 ) %]Late[% END %]
+                      [% IF ( latestserial.status4 ) %]Missing[% END %]
+                      [% IF ( latestserial.status5 ) %]Not issued[% END %]
+                      [% IF ( latestserial.status6 ) %]Delete[% END %]
+                      [% IF ( latestserial.status7 ) %]Claimed[% END %]
+                      [% IF ( latestserial.status8 ) %]Stopped[% END %]
+                    </td>
                     <td>[% latestserial.notes %]</td>
                 </tr>
             [% END %]
@@ -546,6 +588,20 @@ function verify_images() {
 </div>
 [% END %]
 
+[% IF ( HTML5MediaEnabled ) %]
+<div id="html5media">
+        <p>
+        <[% HTML5MediaParent %] controls preload=none>
+          [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
+            <[% HTML5MediaSet.child  %] src="[% HTML5MediaSet.srcblock %]"[% HTML5MediaSet.typeblock %] />
+          [% END %]
+            [[% HTML5MediaParent %] tag not supported by your browser.]
+        </[% HTML5MediaParent %]>
+        </p>
+</div>
+[% END %]
+
+
 </div><!-- /bibliodetails -->
 
 <div class="yui-g" id="export" style="margin-top: 1em;">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detailprint.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detailprint.tt
deleted file mode 100644 (file)
index 3f4312a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Catalog &rsaquo; Details for [% title |html %]</title>
-[% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" href="[% themelang %]/css/print.css" type="text/css" />
-</head>
-
-<body id="catalog_detailprint" class="catalog">
-
-<!-- main site -->
-<div id="main">
-[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
-       <table class="list">
-       <caption>[% BIBLIO_RESULT.title |html %] [% BIBLIO_RESULT.subtitle %]</caption>
-    <tr><th>Biblio record number: </th><td> [% BIBLIO_RESULT.biblionumber %]   </td></tr>
-[% IF ( BIBLIO_RESULT.author ) %]<tr><th>Author: </th><td>[% BIBLIO_RESULT.author %]</td></tr>[% END %]
-[% IF ( BIBLIO_RESULT.additional ) %]<tr><th>Additional author: </th><td>[% BIBLIO_RESULT.additional %]</td></tr>[% END %]
-[% IF ( BIBLIO_RESULT.publishercode ) %]<tr><th>Publisher: </th><td>[% BIBLIO_RESULT.publishercode %]</td></tr>[% END %]
-<tr><th>Publication details: </th><td>                 [% IF ( BIBLIO_RESULT.publicationyear ) %][% BIBLIO_RESULT.publicationyear %][% END %]
-                       [% IF ( BIBLIO_RESULT.pages ) %], [% END %][% BIBLIO_RESULT.pages %]
-                       [% IF ( BIBLIO_RESULT.size ) %], [% END %][% BIBLIO_RESULT.size %]</td></tr>
-                       [% IF ( BIBLIO_RESULT.collection ) %]<tr><th>Collection:</th><td> [% BIBLIO_RESULT.seriestitle %]</td></tr>[% END %]
-                       [% IF ( BIBLIO_RESULT.subject ) %]<tr><th>Subject: </th><td>[% BIBLIO_RESULT.subject %]</td></tr>[% END %]
-            [% IF ( BIBLIO_RESULT.copyrightdate ) %]<tr><th>Copyright date: </th><td> [% BIBLIO_RESULT.copyrightdate %]</td></tr>[% END %]
-                       [% IF ( BIBLIO_RESULT.notes ) %]<tr><th>Notes: </th><td>[% BIBLIO_RESULT.notes %]</td></tr>[% END %]
-                       [% IF ( BIBLIO_RESULT.unititle ) %]<tr><th>Unititle: </th><td>[% BIBLIO_RESULT.unititle %]</td></tr>[% END %]
-                       [% IF ( BIBLIO_RESULT.dewey ) %]<tr><th>Dewey: </th><td>[% BIBLIO_RESULT.dewey %]</td></tr>[% END %]
-                       [% IF ( BIBLIO_RESULT.classification ) %]<tr><th>Classification: </th><td> [% BIBLIO_RESULT.classification %]</td></tr>[% END %]
-                       [% IF ( BIBLIO_RESULT.lccn ) %]<tr><th>LCCN: </th><td>[% BIBLIO_RESULT.lccn %]</td></tr>[% END %]
-            [% IF ( BIBLIO_RESULT.url ) %]<tr><th>URL: </th><td><a href="[% BIBLIO_RESULT.url %]">[% BIBLIO_RESULT.url %]</a></td></tr>[% END %]
-                       [% IF ( BIBLIO_RESULT.ISBN ) %]<tr><th>ISBN: </th><td>[% BIBLIO_RESULT.ISBN %]</td></tr>[% END %]
-       </table>
-[% END %]
-
-<table>
-    <tr><th>Item type</th><th>Call number</th><th>Location</th><th>Date due</th><th>Last seen</th><th>Barcode</th></tr>
-       [% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
-               <tr>
-                       <td>[% ITEM_RESULT.description %]</td>
-                       <td>[% ITEM_RESULT.itemcallnumber %]</td>
-                       <td>[% ITEM_RESULT.branchname %][% IF ( ITEM_RESULT.bulk ) %], [% ITEM_RESULT.bulk %][% ELSE %]&nbsp;[% END %]</td>
-                       <td>[% ITEM_RESULT.datedue %]</td>
-                       <td>[% ITEM_RESULT.datelastseen %]</td>
-                       <td>[% ITEM_RESULT.barcode %]</td>
-               </tr>
-       [% END %]
-</table>
-<script type="text/javascript">
-//<![CDATA[
-    $(document).ready(function() {
-       window.print();
-    });
-//]]>
-</script>
-[% INCLUDE 'intranet-bottom.inc' %]
index 2c33df8..0222046 100644 (file)
@@ -87,8 +87,8 @@ function confirm_deletion(biblionumber,itemnumber) {
 
 $(document).ready(function() {
     $("#cataloguing_additem_itemlist  tr").hover(
-        function () {$(this).attr("class","highlight");},
-        function () {$(this).attr("class",""         );}
+        function () {$(this).addClass("highlight");},
+        function () {$(this).removeClass("highlight");}
     );
 });
 //]]>
@@ -131,7 +131,11 @@ $(document).ready(function() {
                 [% END %]
             </tr>
                 [% FOREACH item_loo IN item_loop %]
+                [% IF ( item_loo.itemnumber == itemnumber) %]
+                <tr id="row[% item_loo.itemnumber %]" class="active">
+                [% ELSE %]
                 <tr id="row[% item_loo.itemnumber %]">
+                [% END %]
                     [% IF ( item_loo.nomod ) %] <td colspan="2">&nbsp;</td>[% ELSE %][% IF ( item_loo.hostitemflag ) %]<td><a href="additem.pl?op=edititem&amp;biblionumber=[% item_loo.hostbiblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit in host</a></td>
 <td><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&amp;biblionumber=[% biblionumber %]&amp;hostitemnumber=[% item_loo.itemnumber %]">Delink</a></td>
 [% ELSE %]<td><a href="additem.pl?op=edititem&amp;biblionumber=[% biblionumber %]&amp;itemnumber=[% item_loo.itemnumber %]#edititem">Edit</a></td>
@@ -197,8 +201,8 @@ $(document).ready(function() {
     -->
 
     <input type="submit" name="add_submit" value="Add item" onclick="return Check(this.form)" />
-    <input type="submit" name="add_duplicate_submit" value="Add &amp; Duplicate" onclick="return Check(this.form)" />
-    <input type="submit" name="add_multiple_copies" value="Add Multiple Copies" onclick="javascript:this.nextSibling.style.visibility='visible';document.f.number_of_copies.focus(); return false;" /><span id="add_multiple_copies_span" style="visibility:hidden">
+    <input type="submit" name="add_duplicate_submit" value="Add &amp; duplicate" onclick="return Check(this.form)" />
+    <input type="submit" name="add_multiple_copies" value="Add multiple copies" onclick="javascript:this.nextSibling.style.visibility='visible';document.f.number_of_copies.focus(); return false;" /><span id="add_multiple_copies_span" style="visibility:hidden">
        <label for="number_of_copies">Number of copies to add : </label>
        <input type="text" id="number_of_copies" name="number_of_copies" value="" size="2" />
        <input type="submit" id="add_multiple_copies_submit" name="add_multiple_copies_submit" value="Add" onclick="javascript:return Check(this.form) &amp;&amp; CheckMultipleAdd(this.form.number_of_copies.value);" />
@@ -208,7 +212,7 @@ $(document).ready(function() {
     <input type="hidden" name="tag" value="[% itemtagfield %]" />
     <input type="hidden" name="subfield" value="[% itemtagsubfield %]" />
     <input type="hidden" name="field_value" value="[% itemnumber %]" />
-    <input type="submit" value="Save Changes" onclick="return Check(this.form)" />
+    <input type="submit" value="Save changes" onclick="return Check(this.form)" />
     [% END %]</fieldset>
     
     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
index b53cffb..cabb45c 100644 (file)
@@ -28,7 +28,7 @@ $(document).ready(function(){
                
                <tr><td>[% homebranch %]</td>
             <td>[% holdingbranch %]</td>
-            <td>[% lastdate %]</td>
+            <td>[% IF ( lastdate ) %][% lastdate %][% ELSE %]Item has no transfer record[% END %]</td>
             <td>[% count %]</td>
         </tr>
 </table>
@@ -50,7 +50,8 @@ $(document).ready(function(){
                     <span style="display:none;">[% branchloo.seen %][% branchloo.seentime %]</span>
                     <!-- invisible span for eventual use by tablesorter -->
                     [% branchloo.seen %] [% branchloo.seentime %]
-                [% ELSE %]Never
+                [% ELSE %]
+                    <span>Never</span>
                 [% END %]
             </td>
         </tr>
index 8b4ad57..631158f 100644 (file)
@@ -19,7 +19,9 @@
        <ul>
         <li><a href="/cgi-bin/koha/circ/circulation.pl">Check out</a></li>
         <li><a href="/cgi-bin/koha/circ/returns.pl">Check in</a></li>
+    [% IF ( display_transfer ) %]
                <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
+    [% END %]
        [% IF ( AutoLocation ) %][% ELSE %][% IF ( IndependantBranches ) %][% ELSE %]<li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a></li>[% END %][% END %]
        [% IF ( fast_cataloging ) %]
            [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
index ee3a666..9c045cd 100644 (file)
@@ -1,5 +1,6 @@
 [% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
+[% SET destination = "circ" %]
 <title>Koha &rsaquo; Circulation
 [% IF borrowernumber %]
   &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
@@ -130,7 +131,7 @@ var allcheckboxes = $(".checkboxed");
                     $(this).removeAttr("checked");
                 } else {
                     $(this).attr("checked","checked");
-                  //  radioCheckBox($(this));
+                    radioCheckBox($(this));
                 }
            });
         }
@@ -261,7 +262,7 @@ function validate1(date) {
 [% END %]
 
 [% IF ( borrowernumber ) %]
-[% INCLUDE 'circ-toolbar.inc' %]
+[% INCLUDE 'members-toolbar.inc' %]
 [% END %]
 
 <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
@@ -385,16 +386,18 @@ function validate1(date) {
 
 [% IF ( RESERVED ) %]
     <p>
-    <input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" />
+    <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
     <label for="cancelreserve">Cancel hold</label>
     </p>
 [% END %]
 
 [% IF ( RESERVE_WAITING ) %]
-    <p>
-    <input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" />
+<p>
     <label for="cancelreserve">Cancel hold</label>
-    </p>
+    <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
+    <label for="revertreserve">Revert waiting status</label>
+    <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
+</p>
 [% END %]
 
     <input type="hidden" name="barcode" value="[% barcode %]" />
index 050ebd3..7fd8d1d 100644 (file)
@@ -332,6 +332,11 @@ $(document).ready(function () {
                     [% END %]
                     [% IF ( errmsgloo.waslost ) %]
                         <p class="problem">Item was lost, now found.</p>
+                        [% IF ( LostItemFeeRefunded ) %]
+                            <p class="problem">A refund has been applied to the borrowing patron's account.</p>
+                        [% ELSE %]
+                            <p class="problem">Any lost item fees for this item will remain on the patron's account</p>
+                        [% END %]
                     [% END %]
                     [% IF ( errmsgloo.withdrawn ) %]
                         [% IF BlockReturnOfWithdrawnItems %]
@@ -412,28 +417,10 @@ $(document).ready(function () {
     </form>
 </div>
 
-[% IF ( returned ) %]
-<div class="yui-g">    <table>
-        <tr><th>Item information</th><th>Patron information</th></tr>
-        <tr>
-            <td>[% title |html %]</td>
-            <td>
-
-                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riborrowernumber %]">[% riborsurname %], [% ribortitle %] [% riborfirstname %]</a> ([% riborcnum %])
-                [% IF ( flagset ) %]
-                ([% FOREACH flagloo IN flagloop %]
-                [% flagloo.flag %]
-               [% IF ( flagloo.charges ) %] of [% flagloo.chargeamount %] [% END %]
-               ,
-                [% END %])[% END %]
-            </td>
-        </tr>
-    </table>
-[% END %]
 [% IF ( riloop ) %]
     <h2>Checked-in items</h2>
     <table>
-    <tr><th>Due date</th><th>Title</th>        <th>Author</th> <th>Barcode</th><th>Home branch</th><th>Holding branch</th><th>Shelving location</th><th>Call number</th><th>Type</th>  <th>Patron</th><th>Note</th></tr>
+    <tr><th>Due date</th><th>Title</th>        <th>Author</th> <th>Barcode</th><th>Home library</th><th>Holding library</th><th>Shelving location</th><th>Call number</th><th>Type</th>        <th>Patron</th><th>Note</th></tr>
 
         [% FOREACH riloo IN riloop %]
             <tr>
index d8d8536..aefd8d9 100644 (file)
@@ -6,13 +6,21 @@
 <body id="circ_view_holdsqueue" class="circ">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
-
-<script type="text/javascript" src="[% ( themelang ) %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" />
+<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+[% INCLUDE 'datatables-strings.inc' %]
+<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
 <script type="text/javascript">//<![CDATA[
 $(document).ready(function() {
-        $("#holdst").tablesorter({
-                sortList: [[6,0]],
-        });
+    $("#holdst").dataTable({
+        "aaSorting": [[ 2, "asc" ]],
+        "bPaginate": false,
+        "bLengthChange": false,
+        "bFilter": false,
+        "bSort": true,
+        "bInfo": false,
+        "bAutoWidth": false
+    });
 });
 //]]>
 </script>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/didyoumean.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/didyoumean.tt
new file mode 100644 (file)
index 0000000..eea10bc
--- /dev/null
@@ -0,0 +1,22 @@
+[% INCLUDE 'help-top.inc' %]
+
+<h1>Did you mean?</h1>
+
+<p>Koha can offer 'Did you mean?' options on searches based on values in your authorities.</p>
+
+<p style="color: #990000;">Important Did you mean? only works in the OPAC at this time. The Intranet options are here for future development.</p>
+
+<p>Using this page you can control which options Koha gives patrons on their search results.</p>
+
+<p>To turn on the 'Did you mean?' bar on your search results you need to check the box next to each plugin you would like to use. The two plugins you have to choose from are:</p>
+
+<ul>
+    <li>The ExplodedTerms plugin suggests that the user try searching for broader/narrower/related terms for a given search (e.g. a user searching for "New York (State)" would click the link for narrower terms if they're also interested in "New York (City)"). This is only relevant for libraries with highly hierarchical authority data.</li>
+    <li>The AuthorityFile plugin searches the authority file and suggests the user might be interested in bibs linked to the top 5 authorities</li>
+</ul>
+
+<p>If you want one plugin to take priority over another you simply drag it above the other.</p>
+
+<p><strong>See the full documentation for the Did you mean? feature in the <a href="http://manual.koha-community.org/3.10/en/additionaladmin.html#didyoumean">manual</a> (online).</strong></p>
+
+[% INCLUDE 'help-bottom.inc' %]
index 4791ab2..e9552c5 100644 (file)
        <li>all libraries, all patron types, all item types</li>
 </ul>
 
-<p>Tip: If you are a single library system choose your branch name before creating rules (sometimes having only rules for the 'all libraries' option can cause issues with holds)</p>
+<p>Tip: If you are a single library system choose your library name before creating rules (sometimes having only rules for the 'all libraries' option can cause issues with holds)</p>
 
 <p style="color: #990000;">Important: At the very least you will need to set a default circulation rule. This rule should be set for all item types, all libraries and all patron categories. That will catch all instances that do not match a specific rule. When checking out if you do not have a rule for all libraries, all item types and all patron types then you may see patrons getting blocked from placing holds. You will also want a rule for your specific library set for all item types and all patron types to avoid this holds issue. Koha needs to know what rule to fall back on.</p>
 
 <h4>Default Circulation Rules</h4>
 
-<p>Using the issuing rules matrix you can define rules that depend on patron/item typecombos. To set your rules, choose a library from the pull down (or 'all libraries' if you want to apply these rules to all branches)</p>
+<p>Using the issuing rules matrix you can define rules that depend on patron/item typecombos. To set your rules, choose a library from the pull down (or 'all libraries' if you want to apply these rules to all libraries)</p>
 
 <p>From the matrix you can choose any combination of patron categories and item types to apply the rules to</p>
 
@@ -84,7 +84,7 @@
     <li>Control where the item returns to once it is checked in
 <ul>
     <li>Item returns home</li>
-    <li>Item returns to issuing branch</li>
+    <li>Item returns to issuing library</li>
     <li>Item floats
 <ul>
     <li>When an item floats it stays where it was checked in and does not ever return 'home'</li>
 
 <p style="color: #990000;">Important: Note that if the system preference AllowHoldPolicyOverrideset to 'allow', these policies can be overridden by your circulation staff.</p>
 
-<p style="color: #990000;">Important: These policies are based on the patron's home branch, not the branch that the reserving staff member is from.</p>
+<p style="color: #990000;">Important: These policies are based on the patron's home library, not the library that the reserving staff member is from.</p>
 
 <p>The various Return Policies have the following effects:</p>
 
     <li style="color: #990000;">Important: If the AutomaticItemReturnpreference is set to automatically transfer the items home, then a prompt will not appear</li>
 </ul>
 </li>
-    <li>Item returns to issuing branch: The item will prompt the librarian to transfer the item back to the library where it was checked out
+    <li>Item returns to issuing library: The item will prompt the librarian to transfer the item back to the library where it was checked out
 <ul>
     <li style="color: #990000;">Important: If the AutomaticItemReturnpreference is set to automatically transfer the items home, then a prompt will not appear</li>
 </ul>
 </li>
-    <li>Item floats: The item will not be transferred from the branch it was checked in at, instead it will remain there until transferred manually or checked in at another branch</li>
+    <li>Item floats: The item will not be transferred from the library it was checked in at, instead it will remain there until transferred manually or checked in at another library</li>
 </ul>
 
 <p><strong>See the full documentation for Circulation and Fine Rules in the <a href="http://manual.koha-community.org/3.10/en/patscirc.html#circfinerules">manual</a> (online).</strong></p>
index 91f72b4..7441e98 100644 (file)
@@ -2,7 +2,7 @@
 
 <h2>Adding Authorities</h2>
 
-<p>To add a new authority record, choose the authority type from the 'New Authority' button.,/p>
+<p>To add a new authority record, choose the authority type from the 'New Authority' button.</p>
 
 <p>The form that appears will allow you to enter all of the necessary details regarding your authority record.</p>
 
@@ -22,4 +22,4 @@
 
 <p><strong>See the full documentation for Authorities in the <a href="http://manual.koha-community.org/3.10/en/catauthorities.html">manual</a> (online).</strong></p>
 
-[% INCLUDE 'help-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'help-bottom.inc' %]
index 153b012..699643a 100644 (file)
@@ -4,7 +4,7 @@
 
 <p>This report will show you any overdues at your library that have accrued fines on them.</p>
 
-<p>If you would like to limit the report you can use the pull down menu at the top to limit to a specific shelving location at your branch. To see overdues with fines at other branches you will have to change your branch or log in at that branch.</p>
+<p>If you would like to limit the report you can use the pull down menu at the top to limit to a specific shelving location at your library. To see overdues with fines at other libraries you will have to change your library or log in at that library.</p>
 
 <p style="color: #990000">Important: If you do not charge fines and/or don't have the fines cron job running you will see no data on this report.</p>
 
index 397e599..b6a5e29 100644 (file)
@@ -2,7 +2,7 @@
 
 <h1>Holds to Pull</h1>
 
-<p>This report will show you all of the items that have holds on them that are available at the library for pulling. If the items are available at multiple branches then all branches with that item available will see the hold to pull until one library triggers the hold.</p>
+<p>This report will show you all of the items that have holds on them that are available at the library for pulling. If the items are available at multiple libraries then all libraries with that item available will see the hold to pull until one library triggers the hold.</p>
 
 <p>You can limit the results you see by using the Refine box on the left side of the page</p>
 
index 852648d..1e0a0c4 100644 (file)
 <p>There are several messages that can appear when checking items in:</p>
 
 <ul>
-    <li>If you are checking an item in at a library other than the home branch, a message will appear asking you to transfer the book to the home library
+    <li>If you are checking an item in at a library other than the home library, a message will appear asking you to transfer the book to the home library
 <ul>
        <li>After this item is checked in the status of the item will be changed in the catalog to 'in transit'</li>
-    <li>To mark an item as back at the home branch, check the item in at the home branch
+    <li>To mark an item as back at the home library, check the item in at the home library
 <ul>
-    <li>A message will appear tell you that the item is not checked out, but the status will now say available in the catalog. This step is necessary to mark items as received by the home branch.</li>
+    <li>A message will appear tell you that the item is not checked out, but the status will now say available in the catalog. This step is necessary to mark items as received by the home library.</li>
 </ul>
 </li>
 </ul>
@@ -46,7 +46,7 @@
     <li>Ignoring the hold will leave the item on hold, but leave its status as Available (it will not cancel the hold)</li>
 </ul>
 </li>
-    <li>If you're checking in an item that has a hold on it at another branch you will be prompted to confirm and transfer the item
+    <li>If you're checking in an item that has a hold on it at another library you will be prompted to confirm and transfer the item
 <ul>
     <li>Clicking the Confirm hold and Transfer button will mark the item as in transit to the library where the hold was placed</li>
     <li>Clicking the Print Slip, Transfer and Confirm button will mark the item as in transit to the library where the hold was placed and present the library with a receipt to print and place on the book with the patron's information</li>
@@ -61,7 +61,7 @@
 
 <p>When you check in an item that has a hold on it the system will ask you to either confirm and transfer the item or just confirm the hold</p>
 
-<p>Clicking the Confirm button will mark the item as on hold for the patron. If the item needs to be transferred the item will also be marked as in transit to the proper branch. Clicking 'Ignore' will retain the hold, but allow you to check the item out to another patron. Choosing to confirm and print will present you with a printable page that you can slip inside the book with the necessary hold and/or transfer information.</p>
+<p>Clicking the Confirm button will mark the item as on hold for the patron. If the item needs to be transferred the item will also be marked as in transit to the proper library. Clicking 'Ignore' will retain the hold, but allow you to check the item out to another patron. Choosing to confirm and print will present you with a printable page that you can slip inside the book with the necessary hold and/or transfer information.</p>
 
 <p>Once confirmed the hold will show on the patron record and on the checkout screen under the 'Hold' tab.</p>
 
index c45d16d..29be871 100644 (file)
@@ -10,7 +10,7 @@
 
 <p>If you do not want all of your libraries to participate in the on-shelf holds fulfillment process, you should list the the libraries that *do* participate in the process here by inputting all the participating library's branchcodes, separated by commas ( e.g. "MPL,CPL,SPL,BML" etc. ).</p>
 
-<p>By default, the holds queue will be generated such that the system will first attempt to hold fulfillment using items already at the pickup library if possible. If there are no items available at the pickup library to fill a hold, build_holds_queue.pl will then use the list of libraries defined in StaticHoldsQueueWeight. If RandomizeHoldsQueueWeight is disabled ( which it is by default ), the script will assign fulfillment requests in the order the branches are placed in the StaticHoldsQueueWeight system preference.</p>
+<p>By default, the holds queue will be generated such that the system will first attempt to hold fulfillment using items already at the pickup library if possible. If there are no items available at the pickup library to fill a hold, build_holds_queue.pl will then use the list of libraries defined in StaticHoldsQueueWeight. If RandomizeHoldsQueueWeight is disabled ( which it is by default ), the script will assign fulfillment requests in the order the libraries are placed in the StaticHoldsQueueWeight system preference.</p>
 
 <p>For example, if your system has three libraries, of varying sizes ( small, medium and large ) and you want the burden of holds fulfillment to be on larger libraries before smaller libraries, you would want StaticHoldsQueueWeight to look something like "LRG,MED,SML".</p>
 
index 258e167..37dc0db 100644 (file)
@@ -32,7 +32,7 @@
 </li>
 </ul>
 
-<p>If you want to filter your results to a specific branch or category, you can click the plus sign [+] to the right of the search box.</p>
+<p>If you want to filter your results to a specific library or category, you can click the plus sign [+] to the right of the search box.</p>
 
 <p>You can also browse through the patron records by clicking on the linked letters across the top.</p>
 
index 428fe7f..2023cbb 100644 (file)
@@ -34,7 +34,7 @@
 </li>
 </ul>
 
-<p>If you want to filter your results to a specific branch or category, you can click the plus sign [+] to the right of the search box.</p>
+<p>If you want to filter your results to a specific library or category, you can click the plus sign [+] to the right of the search box.</p>
 
 <p>You can also browse through the patron records by clicking on the linked letters across the top.</p>
 
index 7be3885..33f46c6 100644 (file)
@@ -72,7 +72,7 @@
 <ul>
     <li>The &lt;&lt; and &gt;&gt; are just delimiters. You must put &lt;&lt; at the beginning and &gt;&gt; at the end of your parameter</li>
     <li>The 'Question to ask' will be displayed on the left of the string to enter.</li>
-    <li>The authorized_value can be omitted if not applicable. If it contains an authorized value category, or branches or itemtype or categorycode, a list with the Koha authorized values will be displayed instead of a free field Note that you can have more than one parameter in a given SQL Note that entering nothing at run time won't probably work as you expect. It will be considered as "value empty" not as "ignore this parameter". For example entering nothing for : "title=&lt;&lt;Enter title&gt;&gt;" will display results with title='' (no title). If you want to have to have something not mandatory, use "title like &lt;&lt;Enter title&gt;&gt;" and enter a % at run time instead of nothing</li>
+    <li>The authorized_value can be omitted if not applicable. If it contains an authorized value category, or libraries or itemtype or categorycode, a list with the Koha authorized values will be displayed instead of a free field Note that you can have more than one parameter in a given SQL Note that entering nothing at run time won't probably work as you expect. It will be considered as "value empty" not as "ignore this parameter". For example entering nothing for : "title=&lt;&lt;Enter title&gt;&gt;" will display results with title='' (no title). If you want to have to have something not mandatory, use "title like &lt;&lt;Enter title&gt;&gt;" and enter a % at run time instead of nothing</li>
 </ul>
 <p>Examples:</p>
 <ul>
@@ -81,12 +81,12 @@ FROM borrowers <br />
 WHERE branchcode=&lt;&lt;Enter patrons library|branches&gt;&gt; AND surname like &lt;&lt;Enter filter for patron surname (% if none)&gt;&gt;</li>
     <li>SELECT * <br />
 FROM items <br />
-WHERE homebranch = &lt;&lt;Pick your branch|branches&gt;&gt; AND barcode like &lt;&lt;Partial barcode value here&gt;&gt;</li>
+WHERE homebranch = &lt;&lt;Pick your library|branches&gt;&gt; AND barcode like &lt;&lt;Partial barcode value here&gt;&gt;</li>
 </ul>
 </li>
     <li>Tip: To generate a date picker calendar to the right of the field when running a report you can use the 'date' keyword like this: &lt;&lt;Enter Date|date&gt;&gt;</li>
     <li>Tip: You have to put "%" in a text box to 'leave it blank'. Otherwise, it literally looks for "" (empty string) as the value for the field.</li>
-    <li style="color: #990000">Important: In addition to using any authorized value code to generate a dropdown, you can use the following values as well: Branches (branches), Item Types (itemtypes) and Patron Categories (categorycode). For example a branch pull down would be generated like this &lt;&lt;Branch|branches&gt;&gt;</li>
+    <li style="color: #990000">Important: In addition to using any authorized value code to generate a dropdown, you can use the following values as well: Libraries (branches), Item Types (itemtypes) and Patron Categories (categorycode). For example a library pull down would be generated like this &lt;&lt;Library|branches&gt;&gt;</li>
 </ul>
 
 <p>Note: There is a limit of 10,000 records put on SQL statements entered in Koha. To get around this you want to add 'LIMIT 100000' to the end of your SQL statement (or any other number above 10,000.</p>
index 1784350..923e1d5 100644 (file)
@@ -19,7 +19,7 @@
 
 <h3>Adding Events</h3>
 
-<p>Before adding events, choose the library you would like to apply the closings to. When adding events you will be asked if you would like to apply the event to one branch or all branches. To add events, simply</p>
+<p>Before adding events, choose the library you would like to apply the closings to. When adding events you will be asked if you would like to apply the event to one library or all libraries. To add events, simply</p>
 
 <ul>
        <li>Click on the date on the calendar that you would like to apply the closing to</li>
@@ -39,7 +39,7 @@
 </li>
     <li>Finally decide if this event should be applied to all libraries or just the one you have originally selected
 <ul>
-    <li>If you'd rather enter all the holidays and then copy them all to another branch all at once you can use the copy menu below the calendar</li>
+    <li>If you'd rather enter all the holidays and then copy them all to another library all at once you can use the copy menu below the calendar</li>
 </ul>
 </li>
 </ul>
index cf81c5e..bae182f 100644 (file)
 </li>
 </ol>
 </li>
-    <li>When this notice references the branches table it is referring to the pickup branch information.</li>
+    <li>When this notice references the branches table it is referring to the pickup library information.</li>
 </ul>
 </li>
        <li>HOLDPLACED (a notice to the library staff that a hold has been placed)
 <ul>
        <li>This notice requires the emailLibrarianWhenHoldIsPlaced system preference to be set to 'Enable'</li>
-    <li>When this notice references the branches table it is referring to the pickup branch information.</li>
+    <li>When this notice references the branches table it is referring to the pickup library information.</li>
 </ul>
 </li>
        <li>HOLD_PRINT (Printed notice when hold available for pickup)
 <ul>
        <li>This notice is used for hold confirmation notices that are sent out in print format. This will not effect what the email notice looks like.</li>
-    <li>When this notice references the branches table it is referring to the pickup branch information.</li>
+    <li>When this notice references the branches table it is referring to the pickup library information.</li>
 </ul>
 </li>
        <li>ODUE (Overdue Notice)
     <li>TRANSFERSLIP
 <ul>
     <li>Used to print a transfer slip</li>
-    <li>The transfer sliip is printed when you confirm a transfer from one branch to another in your system</li>
+    <li>The transfer sliip is printed when you confirm a transfer from one library to another in your system</li>
 </ul>
 </li>
 </ul>
index 38658dd..542a350 100644 (file)
    <div id="bd" role="main">
     <div id="yui-main">
     <div class="yui-b"><div class="yui-g">
+    [% IF adminWarning %]
+        <div id="adminwarning" class="dialog alert">
+            <p><strong>Warning:</strong> You're logged in with the database administrator account. This a bad idea, and you are likely to encounter problems.</p>
+            <p>You should <a href="/cgi-bin/koha/members/memberentry.pl?op=add">create a patron</a> to use when administering Koha and give it superlibrarian permissions.</p>
+        </div>
+    [% END %]
     <div class="yui-u first">
+
             <div id="area-list-left">
                 <ul class="biglinks-list">
                     [% IF ( CAN_user_circulate ) %]
 <div class="yui-g">
             [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) 
                     || ( CAN_user_tools_moderate_tags && pendingtags )
+                    || ( CAN_user_borrowers && pending_borrower_modifications )
                     || ( CAN_user_acquisition && pendingsuggestions ) ) %]
                 <div id="area-pending">
                     [% IF ( CAN_user_acquisition && pendingsuggestions ) %]
                         <span class="pending-number-link">[% pendingtags %]</span>
                     </div>
                     [% END %]
+
+
+                    [% IF ( CAN_user_borrowers && pending_borrower_modifications ) %]
+                    <div class="pending-info" id="patron_updates_pending">
+                        <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
+                        <span class="pending-number-link">[% pending_borrower_modifications %]</span>
+                    </div>
+                    [% END %]
+
                 </div>
-            [% END %]
 
+            [% END %]
 
 </div>
             [% IF ( IntranetmainUserblock ) %]
index a44aaa9..58a3038 100644 (file)
@@ -13,7 +13,7 @@
     <div id="bd">
         <div id="yui-main">
             <div class="yui-b">
-                [% INCLUDE 'circ-toolbar.inc' %]
+                [% INCLUDE 'members-toolbar.inc' %]
 
                 <h1>Files</h1>
 
index 64e410f..f44754a 100644 (file)
 
                                                <div class="browse">
                                                        Browse by last name:
-                                                       [% FOREACH letter IN letters %]
-                                                               <a href="/cgi-bin/koha/members/member.pl?quicksearch=1&amp;surname=[% letter.letter %]">[% letter.letter %]</a>
+                            [% FOREACH letter IN alphabet.split(' ') %]
+                                <a href="/cgi-bin/koha/members/member.pl?quicksearch=1&amp;surname=[% letter %]">[% letter %]</a>
                                                        [% END %]
                                                </div>
 
+                    [% IF ( CAN_user_borrowers && pending_borrower_modifications ) %]
+                        <div class="pending-info" id="patron_updates_pending">
+                            <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
+                            <span class="holdcount"><a href="/cgi-bin/koha/members/members-update.pl">[% pending_borrower_modifications %]</a></span>
+                        </div>
+                    [% END %]
 
                                                [% IF ( resultsloop ) %]
                                                <div id="searchheader"> <h3>Results [% from %] to [% to %] of [% numresults %] found for [% IF ( member ) %]'<span class="ex">[% member %]</span>'[% END %][% IF ( surname ) %]'<span class="ex">[% surname %]</span>'[% END %]</h3></div>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt
new file mode 100644 (file)
index 0000000..7b85274
--- /dev/null
@@ -0,0 +1,123 @@
+[% INCLUDE 'doc-head-open.inc' %]
+<title>Koha &rsaquo; Patrons &rsaquo; Update patron records</title>
+[% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript">
+    $(function() {
+        $( "#pending_updates" ).accordion();
+    });
+</script>
+</head>
+<body id="pat_update" class="pat">
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'patron-search.inc' %]
+
+[%
+    SET field_display_names = {
+        surname         => "Surname"
+        firstname       => "First name"
+        title           => "Title"
+        othernames      => "Other names"
+        initials        => "Initials"
+        streetnumber    => "Street number"
+        streettype      => "Street type"
+        address         => "Address"
+        address2        => "Address 2"
+        city            => "City"
+        state           => "State"
+        zipcode         => "Zip code"
+        country         => "Country"
+        email           => "Email"
+        phone           => "Primary Phone"
+        mobile          => "Primary Mobile Phone"
+        fax             => "Fax"
+        emailpro        => "Secondary email"
+        phonepro        => "Secondary phone"
+        B_streetnumber  => "Alternate address - street number"
+        B_streettype    => "Alternate address - street type"
+        B_address       => "Alternate address"
+        B_address2      => "Alternate address 2"
+        B_city          => "Alternate address - city"
+        B_state         => "Alternate address - state"
+        B_zipcode       => "Alternate address - zip code"
+        B_email         => "Alternate address - email"
+        B_phone         => "Alertnate address - phone"
+        dateofbirth     => "Date of birth"
+        contactname     => "Contact - last name"
+        contactfirstname=> "Contact - first name"
+        contacttitle    => "Contact - title"
+        relationship    => "Contact - relationship"
+        ethnicity       => "Ethnicity"
+        ethnotes        => "Ethnicity notes"
+        sex             => "Sex"
+        altcontactfirstname => "Alternate contact - first name"
+        altcontactsurname   => "Alternate contact - surname"
+        altcontactaddress1  => "Alternate contact - address"
+        altcontactaddress2  => "Alternate contact - address 2"
+        altcontactaddress3  => "Alternate contact - city"
+        altcontactstate     => "Alternate contact - state"
+        altcontactzipcode   => "Alternate contact - zip code"
+        altcontactcounty    => "Alternate contact - county"
+        altcontactphone     => "Alternate contact - phone"
+        smsalertnumber      => "SMS alert number"
+    }
+%]
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> &rsaquo; Update patron records</div>
+
+<div id="doc2" class="yui-t7">
+
+   <div id="bd">
+        <div id="yui-main">
+
+            [% IF PendingModifications %]
+            <h2>Update patron records</h2>
+                <form method="post" action="members-update-do.pl">
+                    <div id="pending_updates">
+                            [% FOREACH pm IN PendingModifications %]
+                                [% SET borrowernumber = pm.borrowernumber %]
+                                <h3><a href="#panel_modify_[% pm.borrowernumber %]">[% borrowers.$borrowernumber.surname %], [% borrowers.$borrowernumber.firstname %]</a></h3>
+                                <div id="panel_modify_[% pm.borrowernumber %]">
+                                    <div style="background-color:#E6F0F2;padding:.5em;margin:.3em 0;">
+                                        <input type="radio" id="approve_modify_[% pm.borrowernumber %]" name="modify_[% pm.borrowernumber %]" value="approve" />
+                                        <label for="approve_modify_[% pm.borrowernumber %]">Approve</label>
+
+                                        <input type="radio" id="deny_modify_[% pm.borrowernumber %]" name="modify_[% pm.borrowernumber %]" value="deny" />
+                                        <label for="deny_modify_[% pm.borrowernumber %]">Deny</label>
+
+                                        <input type="radio" id="ignore_modify_[% pm.borrowernumber %]" name="modify_[% pm.borrowernumber %]" value="ignore" checked="checked"/>
+                                        <label for="ignore_modify_[% pm.borrowernumber %]">Ignore</label>
+                                    </div>
+                                        <table>
+                                            <tr>
+                                                <th>Field</th>
+                                                <th>From</th>
+                                                <th>To</th>
+                                            </tr>
+
+
+                                            [% FOREACH key IN pm.keys %]
+                                                [% IF field_display_names.$key %]
+                                                    [% IF ( ( pm.$key OR borrowers.$borrowernumber.$key ) && ( pm.$key != borrowers.$borrowernumber.$key ) ) %]
+                                                        <tr>
+                                                            <td>[% field_display_names.$key %]</td>
+                                                            <td>[% borrowers.$borrowernumber.$key %]</td>
+                                                            <td>[% pm.$key %]</td>
+                                                        </tr>
+                                                    [% END %]
+                                                [% END %]
+                                            [% END %]
+                                        </table>
+                                </div>
+                            [% END %]
+                        </div>
+                    <fieldset class="action"><input type="submit" value="Submit" /></fieldset>
+
+                </form>
+            [% ELSE %]
+            <div class="dialog message">
+                <p>There are no pending patron modifications.</p>
+            </div>
+            [% END %]
+
+        </div>
+    </div>
+[% INCLUDE 'intranet-bottom.inc' %]
index bd345b8..445ed17 100644 (file)
@@ -35,7 +35,7 @@
     <div id="bd">
     <div id="yui-main">
     <div class="yui-b">
-[% INCLUDE 'circ-toolbar.inc' %]
+[% INCLUDE 'members-toolbar.inc' %]
 <h1>Sent notices for [% INCLUDE 'patron-title.inc' %]</h1>
 
 
index c558b08..5b3b2ca 100644 (file)
@@ -84,9 +84,9 @@ function moneyFormat(textObj) {
     </li>
 </ul>
 <div class="tabs-container">
-[% IF ( error ) %]
+[% IF ( error_over ) %]
     <div id="error_message" class="dialog alert">
-    [% error %]
+    You must pay a value less than or equal to [% total_due | format('%.2f') %].
     </div>
 [% END %]
 
index b7c5f53..90e1530 100644 (file)
@@ -25,7 +25,7 @@
    <div id="bd">
        <div id="yui-main">
        <div class="yui-b">
-[% INCLUDE 'circ-toolbar.inc' %]
+[% INCLUDE 'members-toolbar.inc' %]
 <h1>Circulation history</h1>
 [% IF loop_reading %]
 <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
index 04876dc..f6f6f92 100644 (file)
@@ -12,7 +12,7 @@
     <div id="bd">
     <div id="yui-main">
     <div class="yui-b">
-[% INCLUDE 'circ-toolbar.inc' %]
+[% INCLUDE 'members-toolbar.inc' %]
 
 <!-- Search Bar -->
 <p class="tip">Search subscriptions:</p>
index 802a82e..159e89a 100644 (file)
 [% IF ( do_it ) %]
        [% FOREACH mainloo IN mainloop %]
                <h1>Acquisitions statistics </h1>
-               [% IF ( mainloo.loopfilter ) %]
-                       <p><b>Filtered on:</b></p>
-                       [% FOREACH loopfilte IN mainloo.loopfilter %]
-                                       <p>[% loopfilte.crit %]: [% loopfilte.filter %]</p>
+        [% IF ( mainloo.loopfilter.size ) %]
+            <p><b>Filtered on:</b></p>
+            [% FOREACH loopfilte IN mainloo.loopfilter %]
+                <p>
+                    [% SWITCH loopfilte.crit %]
+                        [% CASE '0' %] Placed on (from)
+                        [% CASE '1' %] Placed on (to)
+                        [% CASE '2' %] Received on (from)
+                        [% CASE '3' %] Received on (to)
+                        [% CASE '4' %] Supplier
+                        [% CASE '5' %] Home branch
+                        [% CASE '6' %] Collection
+                        [% CASE '7' %] Item type
+                        [% CASE '8' %] Budget
+                        [% CASE '9' %] Sort1
+                        [% CASE '10' %] Sort2
+                        [% CASE %] Unknown filter
+                    [% END %]
+                    : [% loopfilte.filter %]
+                </p>
                        [% END %]
                [% END %]
 
                                <td>Vendor</td>
                                <td><input type="radio" checked="checked" name="Line" value="aqbooksellers.name" /></td>
                                <td><input type="radio" name="Column" value="aqbooksellers.name" /></td>
-                               <td>[% CGIBookSeller %]</td>
-                       </tr>
+                <td>
+                    <select name="Filter">
+                        <option value="">All suppliers</option>
+                        [% FOREACH bookseller IN booksellers %]
+                            <option value="[% bookseller.name %]">[% bookseller.name %]</option>
+                        [% END %]
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <td>Home branch</td>
+                <td><input type="radio" name="Line" value="items.homebranch" /></td>
+                <td><input type="radio" name="Column" value="items.homebranch" /></td>
+                <td>
+                    <select name="Filter">
+                        <option value="" selected="selected">All branches</option>
+                        [% FOREACH branch IN branches %]
+                            <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
+                        [% END %]
+                    </select>
+                </td>
+            </tr>
+            <tr>
+                <td>
+                    [% IF ccode_label %]
+                        [% ccode_label %]
+                    [% ELSE %]
+                        Collection
+                    [% END %]
+                </td>
+                <td><input type="radio" name="Line" value="items.ccode" /></td>
+                <td><input type="radio" name="Column" value="items.ccode" /></td>
+                <td>
+                    [% IF ccode_avlist.size %]
+                        <select name="Filter">
+                            <option value="" selected="selected">All</option>
+                            [% FOREACH ccode_av IN ccode_avlist %]
+                                <option value="[% ccode_av.value %]">[% ccode_av.lib %]</option>
+                            [% END %]
+                        </select>
+                    [% ELSE %]
+                        <input type="text" name="Filter" />
+                    [% END %]
+                </td>
+            </tr>
                        <tr>
                                <td>Item Type</td>
                                <td><input type="radio" name="Line" value="biblioitems.itemtype" /></td>
        </table><br />
        </fieldset>
 
-<fieldset class="rows">                <legend> Cell value </legend>
-                       <ol><li><label for="cellvalue1">Count items</label><input type="radio" name="Cellvalue" id="cellvalue1" value="1" checked="checked" /> </li>
-                       <li><label for="cellvalue2">Amount</label><input type="radio" name="Cellvalue" id="cellvalue2" value="2" /> </li></ol></fieldset>
+<fieldset class="rows">
+    <legend> Cell value </legend>
+    <ol>
+        <li>
+            <label for="cellvalue1">Count items</label><input type="radio" name="Cellvalue" id="cellvalue1" value="1" checked="checked" />
+        </li>
+        <li>
+            <label for="cellvalue2">Count unique biblios</label><input type="radio" name="Cellvalue" id="cellvalue2" value="2" />
+        </li>
+        <li>
+            <label for="cellvalue3">Amount</label><input type="radio" name="Cellvalue" id="cellvalue3" value="3" />
+        </li>
+        <li>
+            <label for="cellvalue4">Ordered amount</label><input type="radio" name="Cellvalue" id="cellvalue4" value="4" />
+        </li>
+        <li>
+            <label for="cellvalue5">Spent amount</label><input type="radio" name="Cellvalue" id="cellvalue5" value="5" />
+        </li>
+    </ol>
+</fieldset>
 
        <fieldset class="rows">
        <legend>Output</legend>
index af51a4c..65f662f 100644 (file)
@@ -38,6 +38,7 @@
                 <th>Call number</th>
                 <th>Subscription begin</th>
                 <th>Subscription end</th>
+                <th>Expired? / Closed?</th>
                        </tr>
                </thead>
                <tbody>
                                        <td>[% data.callnumber %]</td>
                                        <td>[% data.startdate %]</td>
                                        <td>[% data.enddate %]</td>
+                    <td>
+                        [% IF data.closed %]
+                            Closed
+                        [% ELSIF data.expired %]
+                            Expired
+                        [% END %]
+                    </td>
                                </tr>
                                [% END %]
                        </tr>
index 0ad5d23..05470eb 100644 (file)
@@ -213,6 +213,9 @@ function checkMultiHold() {
         [% IF ( none_available ) %]
           <li> <strong>No copies are available</strong> to be placed on hold</li>
         [% END %]
+        [% IF ( alreadypossession ) %]
+          <li> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a> <strong>is already in possesion</strong> of one item</li>
+        [% END %]
          </ul>
     [% ELSE %]
       <h3>Cannot place hold on some items</h3>
index 5d9f7a9..c1f3aa1 100644 (file)
                <option>Late</option>
                <option>Missing</option>
                <option>Claimed</option>
+        <option>Stopped</option>
            </select>
        </li>
        
                             [% IF ( missingissue.status3 ) %]Late[% END %]
                             [% IF ( missingissue.status4 ) %]Missing[% END %]
                             [% IF ( missingissue.status7 ) %]Claimed[% END %]
+                            [% IF ( missingissue.status8 ) %]Stopped[% END %]
                         </td>
                         <td class="planneddate">
                         [% missingissue.planneddate %]
index ae998cc..dbdfda9 100644 (file)
@@ -68,12 +68,14 @@ function active(numlayer)
                                        [% serial.serialseq %]
                                </td>
                                <td>
-                                       [% IF ( serial.status1 ) %]Arrived[% END %]
-                                       [% IF ( serial.status2 ) %]Expected[% END %]
-                                       [% IF ( serial.status3 ) %]Late[% END %]
-                                       [% IF ( serial.status4 ) %]Missing[% END %]
-                    [% IF ( serial.status5 ) %]Not available[% END %]
-                                       [% IF ( serial.status7 ) %]Claimed[% END %]
+                    [% IF ( serial.status1 ) %]Expected[% END %]
+                    [% IF ( serial.status2 ) %]Arrived[% END %]
+                    [% IF ( serial.status3 ) %]Late[% END %]
+                    [% IF ( serial.status4 ) %]Missing[% END %]
+                    [% IF ( serial.status5 ) %]Not issued[% END %]
+                    [% IF ( serial.status6 ) %]Delete[% END %]
+                    [% IF ( serial.status7 ) %]Claimed[% END %]
+                    [% IF ( serial.status8 ) %]Stopped[% END %]
                                </td>
                        </tr>
                        [% END %]
index 3d2e690..6281258 100644 (file)
@@ -1,6 +1,10 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Serials &rsaquo; Serial collection information for [% bibliotitle %]</title>
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
 [% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
 
 <script type="text/javascript">
 //<![CDATA[
@@ -45,10 +49,31 @@ function generateNext(subscriptionid) {
        }
 }
 
+function CheckAll( node ) {
+    $("#"+node).checkCheckboxes();
+    return false;
+}
+function CheckNone( node ) {
+    $("#"+node).unCheckCheckboxes();
+    return false;
+}
 $(document).ready(function() {
     $('#subscription_years').tabs();
+    [% IF dateformatmetric %]
+      dt_add_type_uk_date();
+    [% END %]
+
+    $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
+        "aoColumnDefs": [
+            { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
+        ],
+        "aaSorting": [[0, 'desc']],
+        "bAutoWidth": false,
+        "bPaginate": false,
+        "bInfo": false,
+        "bFilter": false,
+    } ));
 });
 
 //]]>
 </script>
@@ -151,22 +176,33 @@ $(document).ready(function() {
                 [% END %]</td>
             <td> [% subscription.branchcode %]</td>
             <td> [% subscription.callnumber %]</td>
-        <td> [% subscription.notes %]        [% IF ( subscription.subscriptionexpired ) %]<br /><span class="problem"> Subscription expired</span>
-        [% END %]
+        <td> [% subscription.notes %]
+            [% UNLESS subscription.closed %]
+                [% IF ( subscription.subscriptionexpired ) %]
+                    <br /><span class="problem"> Subscription expired</span>
+                [% END %]
+            [% ELSE %]
+                <br /> Subscription closed
+            [% END %]
         </td>
         [% IF ( routing && CAN_user_serials_routing ) %]
         <td>
-            <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit routing list</a>
+            [% UNLESS subscription.closed %]
+                <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit routing list</a>
+            [% END %]
         </td>
         [% END %]
-        [% IF ( subscription.abouttoexpire ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
-        [% ELSE %]
-        [% IF ( subscription.subscriptionexpired ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
+        [% UNLESS subscription.closed %]
+            [% IF ( subscription.abouttoexpire ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
+            [% ELSE %]
+                [% IF ( subscription.subscriptionexpired ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
+                [% ELSE %]
+                    <td> &nbsp;</td>
+                [% END %]
+            [% END %]
         [% ELSE %]
-        <td> &nbsp;</td>
-        [% END %]
+            <td> &nbsp;</td>
         [% END %]
-
       </tr>
 [% END %]
 [% IF ( subscr ) %]
@@ -194,13 +230,22 @@ $(document).ready(function() {
     [% IF ( CAN_user_serials_receive_serials ) %]
         <p>
             <input type="submit" value="Edit serials" />&nbsp;
-            <input type="button" value="Generate Next" onclick="javascript:generateNext([% subscriptionidlist %])" />
-            [% IF ( subscriptions.size == 1 and !serialsadditems ) %]&nbsp;<input type="button" value="Multi receiving" onclick="javascript:generateReceive([% subscriptionidlist %])" />[% END %]
+            [% UNLESS subscription.closed %]
+                <input type="button" value="Generate Next" onclick="javascript:generateNext([% subscriptionidlist %])" />
+                [% IF ( subscriptions.size == 1 and !serialsadditems ) %]&nbsp;<input type="button" value="Multi receiving" onclick="javascript:generateReceive([% subscriptionidlist %])" />[% END %]
+            [% END %]
         </p>
     [% END %]
-
-        <table>
-         <tr>
+      <span class="checkall">
+        <a class="CheckAll" href="#" onclick="CheckAll('subscription-year-[% year.year %]'); return false;">Select all</a>
+      </span> |
+      <span class="clearall">
+        <a class="CheckNone" href="#" onclick="CheckNone('subscription-year-[% year.year %]'); return false;">Clear all</a>
+      </span>
+        <table class="subscription-year-table">
+          <thead>
+            <tr>
+                [% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %]
 [% IF ( subscriptions.size > 1 ) %]
                 <th># Subs</th>
 [% END %]
@@ -217,10 +262,28 @@ $(document).ready(function() {
                 <th>Library
                 </th>
                 [% IF ( routing ) %]<th>Routing</th>[% END %]
-                [% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %]
             </tr>
+          </thead>
+          <tbody>
       [% FOREACH serial IN year.serials %]
     [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
+            [% IF ( CAN_user_serials_receive_serials ) %]
+                <td>
+                  [% IF ( serial.cannotedit ) %]
+                    disabled
+                  [% ELSE %]
+                    [% IF ( serial.subscriptionexpired ) %]
+                    <input type="checkbox" name="serialid" value="[% serial.serialid %]" disabled="disabled" />
+                    [% ELSE %]
+                      [% IF ( serial.checked ) %]
+                    <input type="checkbox" class="checkboxed" name="serialid" checked="checked" value="[% serial.serialid %]" />
+                      [% ELSE %]
+                    <input type="checkbox" class="checkboxed" name="serialid" value="[% serial.serialid %]" />
+                      [% END %]
+                    [% END %]
+                  [% END %]
+                </td>
+            [% END %]
 [% IF ( subscriptions.size > 1 ) %]
                  <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid %]">[% serial.subscriptionid %]</a></td>
 [% END %]
@@ -234,7 +297,14 @@ $(document).ready(function() {
                     [% serial.serialseq %]
                 </td>
                 <td>
-                    [% IF ( serial.status1 ) %]Expected[% END %][% IF ( serial.status2 ) %]Arrived[% END %][% IF ( serial.status3 ) %]Late[% END %][% IF ( serial.status4 ) %]Missing[% END %][% IF ( serial.status5 ) %]Not Available[% END %][% IF ( serial.status7 ) %]Claimed[% END %]
+                    [% IF ( latestserial.status1 ) %]Expected[% END %]
+                    [% IF ( latestserial.status2 ) %]Arrived[% END %]
+                    [% IF ( latestserial.status3 ) %]Late[% END %]
+                    [% IF ( latestserial.status4 ) %]Missing[% END %]
+                    [% IF ( latestserial.status5 ) %]Not issued[% END %]
+                    [% IF ( latestserial.status6 ) %]Delete[% END %]
+                    [% IF ( latestserial.status7 ) %]Claimed[% END %]
+                    [% IF ( latestserial.status8 ) %]Stopped[% END %]
                 </td>
                 <td>
                     [% serial.notes %]
@@ -247,26 +317,10 @@ $(document).ready(function() {
                     <a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq |html %] ([% serial.planneddate %])'); return false" >Print list</a>
                 </td>
                 [% END %]
-            [% IF ( CAN_user_serials_receive_serials ) %]
-                <td>
-                  [% IF ( serial.cannotedit ) %]
-                    disabled
-                  [% ELSE %]
-                    [% IF ( serial.subscriptionexpired ) %]
-                    <input type="checkbox" name="serialid" value="[% serial.serialid %]" disabled="disabled" />
-                    [% ELSE %]
-                      [% IF ( serial.checked ) %]
-                    <input type="checkbox" name="serialid" checked="checked" value="[% serial.serialid %]" />
-                      [% ELSE %]
-                    <input type="checkbox" name="serialid" value="[% serial.serialid %]" />
-                      [% END %]           
-                    [% END %]
-                  [% END %]
-                </td>
-            [% END %]
             </tr>
-      [% END %]
-        </table>
+          [% END %]
+        </tbody>
+      </table>
     </div>
     [% END %]
   <input type="hidden" name="subscriptionid" value="[% subscriptionidlist %]" />
index 61b76a9..935d9e1 100644 (file)
@@ -168,7 +168,7 @@ $(document).ready(function() {
         </td>
         <td>
             [% IF ( serialslis.editdisable ) %]
-              <input type="hidden" name="status" id="status[% serialslis.serialid %]" value="1">
+              <input type="hidden" name="status" id="status[% serialslis.serialid %]" value="[% serialslis.serstatus %]">
               <select name="status" size="1"  disabled="disabled">
             [% ELSE %]
               [% IF ( serialslis.serialsadditems ) %]
@@ -177,39 +177,42 @@ $(document).ready(function() {
               <select name="status" size="1" id="status[% serialslis.serialid %]" onchange="if (this.value==2 || this.value==7){changeDate(this, '[% serialslis.arriveddate %]')} else {changeDate(this, '[% serialslis.planneddate %]')}" >
                [% END %] 
             [% END %]
-  [% IF ( serialslis.status1 ) %]
-                    <option value="1" selected="selected">Expected</option>
-  [% END %]
-  [% IF ( serialslis.status2 ) %]
-                    <option value="2" selected="selected">Arrived</option>
-  [% ELSE %]
-                    <option value="2">Arrived</option>
-  [% END %]
-  [% IF ( serialslis.status3 ) %]
-                    <option value="3" selected="selected">Late</option>
-  [% ELSE %]
-                    <option value="3">Late</option>
-  [% END %]
-  [% IF ( serialslis.status4 ) %]
-                    <option value="4" selected="selected">Missing</option>
-  [% ELSE %]
-                    <option value="4">Missing</option>
-  [% END %]
-  [% IF ( serialslis.status7 ) %]
-                    <option value="7" selected="selected">Claimed</option>
-  [% ELSE %]
-                    <option value="7">Claimed</option>
-  [% END %]
-  [% IF ( serialslis.status5 ) %]
-                    <option value="5" selected="selected">Not available</option>
-  [% ELSE %]
-                    <option value="5">Not available</option>
-  [% END %]
-  [% IF ( serialslis.status6 ) %]
-                    <option value="6" selected="selected">Delete</option>
-  [% ELSE %]
-                    <option value="6">Delete</option>
-  [% END %]
+            [% IF ( serialslis.status1 ) %]
+              <option value="1" selected="selected">Expected</option>
+            [% END %]
+            [% IF ( serialslis.status2 ) %]
+              <option value="2" selected="selected">Arrived</option>
+            [% ELSE %]
+              <option value="2">Arrived</option>
+            [% END %]
+            [% IF ( serialslis.status3 ) %]
+              <option value="3" selected="selected">Late</option>
+            [% ELSE %]
+              <option value="3">Late</option>
+            [% END %]
+            [% IF ( serialslis.status4 ) %]
+              <option value="4" selected="selected">Missing</option>
+            [% ELSE %]
+              <option value="4">Missing</option>
+            [% END %]
+            [% IF ( serialslis.status7 ) %]
+              <option value="7" selected="selected">Claimed</option>
+            [% ELSE %]
+              <option value="7">Claimed</option>
+            [% END %]
+            [% IF ( serialslis.status5 ) %]
+              <option value="5" selected="selected">Not available</option>
+            [% ELSE %]
+              <option value="5">Not available</option>
+            [% END %]
+            [% IF ( serialslis.status6 ) %]
+              <option value="6" selected="selected">Delete</option>
+            [% ELSE %]
+              <option value="6">Delete</option>
+            [% END %]
+            [% IF serialslis.status8 %]
+              <option value="8" selected="selected">Stopped</option>
+            [% END %]
             </select>
 
         </td>
@@ -284,39 +287,42 @@ $(document).ready(function() {
             <select name="status" size="1" id="addstatus[% newserialloo.serialid %]" onchange="if (this.value==2){unHideItems('items'+'[% newserialloo.subscriptionid %][% newserialloo.serialid %]','label[% newserialloo.subscriptionid %][% newserialloo.serialid %]','[% newserialloo.serialid %]'); changeDate2('[% newserialloo.arriveddate %]')} else if (this.value==7){changeDate('[% newserialloo.arriveddate %]')} else { HideItems('items'+'[% newserialloo.subscriptionid %]'+[% newserialloo.serialid %],'label[% serialslis.subscriptionid %][% serialslis.serialid %]'); changeDate2('[% serialslis.planneddate %]')}" >
 
                     <option value="">----</option>
-  [% IF ( newserialloo.status1 ) %]
+                  [% IF ( newserialloo.status1 ) %]
                     <option value="1" selected="selected">Expected</option>
-  [% END %]
-  [% IF ( newserialloo.status2 ) %]
+                  [% END %]
+                  [% IF ( newserialloo.status2 ) %]
                     <option value="2" selected="selected">Arrived</option>
-  [% ELSE %]
+                  [% ELSE %]
                     <option value="2">Arrived</option>
-  [% END %]
-  [% IF ( newserialloo.status3 ) %]
+                  [% END %]
+                  [% IF ( newserialloo.status3 ) %]
                     <option value="3" selected="selected">Late</option>
-  [% ELSE %]
+                  [% ELSE %]
                     <option value="3">Late</option>
-  [% END %]
-  [% IF ( newserialloo.status4 ) %]
+                  [% END %]
+                  [% IF ( newserialloo.status4 ) %]
                     <option value="4" selected="selected">Missing</option>
-  [% ELSE %]
+                  [% ELSE %]
                     <option value="4">Missing</option>
-  [% END %]
-  [% IF ( newserialloo.status7 ) %]
+                  [% END %]
+                  [% IF ( newserialloo.status7 ) %]
                     <option value="7" selected="selected">Claimed</option>
-  [% ELSE %]
+                  [% ELSE %]
                     <option value="7">Claimed</option>
-  [% END %]
-  [% IF ( newserialloo.status5 ) %]
+                  [% END %]
+                  [% IF ( newserialloo.status5 ) %]
                     <option value="5" selected="selected">Not available</option>
-  [% ELSE %]
+                  [% ELSE %]
                     <option value="5">Not available</option>
-  [% END %]
-  [% IF ( newserialloo.status6 ) %]
+                  [% END %]
+                  [% IF ( newserialloo.status6 ) %]
                     <option value="6" selected="selected">Delete</option>
-  [% ELSE %]
+                  [% ELSE %]
                     <option value="6">Delete</option>
-  [% END %]
+                  [% END %]
+                  [% IF newserialloo.status8 %]
+                    <option value="8" selected="selected">Stopped</option>
+                  [% END %]
             </select>
 
         </td>
@@ -370,8 +376,11 @@ $(document).ready(function() {
 [% END %]
 
 </table>
-    <fieldset class="action"><input type="submit" value="Save"  class="button" accesskey="w" />
-    [% UNLESS ( serialsadditems ) %]&nbsp;&nbsp;<input type="button" onclick="javascript:generateReceive()" value="Multi receiving">[% END %]
+    <fieldset class="action">
+       <input type="submit" onclick="return false;" style="display: none;" id="phony_submit" value="phony_submit" name="phony_submit" />
+       <input type="submit" value="Save"  class="button" accesskey="w" />
+       [% UNLESS ( serialsadditems ) %]&nbsp;&nbsp;<input type="button" onclick="javascript:generateReceive()" value="Multi receiving">[% END %]
+    </fieldset>
 </form>
 
 </div>
@@ -384,7 +393,9 @@ $(document).ready(function() {
         <li><a href="serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]" title="serial collection for [% subscription.bibliotitle %]">Serial collection #[% subscription.subscriptionid %]</a></li>
         <li><a href="subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" title="detail of the subscription">Subscription #[% subscription.subscriptionid %]</a></li>
         [% IF ( subscription.abouttoexpire ) %]
+          [% UNLESS subscription.closed %]
             <li><a href="#" onclick="javascript:popup([% subscription.subscriptionid %])">Renew #[% subscription.subscriptionid %]</a></li>
+          [% END %]
         [% END %]
     [% END %]
     <li><a href="/cgi-bin/koha/catalogue/[% default_bib_view %].pl?biblionumber=[% biblionumber %]" title="go to [% bibliotitle %]">Show biblio</a></li></ul>
index 868d34e..04db346 100644 (file)
@@ -137,6 +137,9 @@ function barcode_check(){
                                        [% ELSE %]
                                                <option value="6">Delete</option>
                                        [% END %]
+                    [% IF serialslis.status8 %]
+                        <option value="8" selected="selected">Stopped</option>
+                    [% END %]
                                </select>
                        [% IF ( serialslis.serialadditems ) %]
                                <br /><br />
index 98ef4d5..558f988 100644 (file)
@@ -9,14 +9,25 @@
 <script type="text/javascript">
 //<![CDATA[
  $(document).ready(function() {
-    var srlt = $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
+    var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
         "aoColumnDefs": [
             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
         ],
         "sPaginationType": "four_button"
     } ) );
 
-    srlt.fnAddFilters("filter", 750);
+    var csrlt = $("#csrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
+        "aoColumnDefs": [
+            { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
+        ],
+        "sPaginationType": "four_button"
+    } ) );
+
+    osrlt.fnAddFilters("filter", 750);
+    csrlt.fnAddFilters("filter", 750);
+
+    $('#serialstabs').tabs();
+
  });
  //]]>
 </script>
@@ -33,9 +44,9 @@
       <div class="yui-b">
       [% INCLUDE 'serials-toolbar.inc' %]
 
-      <h2>Serials subscriptions</h2>
+      <h2>Serials subscriptions ([% total %] found)</h2>
       [% UNLESS ( done_searched ) %]
-      <div id="advsearch">
+      <div id="advsearch" style="padding-bottom:3em;">
         <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
           <fieldset class="rows">
           <legend>Search subscriptions</legend>
                   <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
                 </li>
                 <li>
-                  <label for="bookseller">Bookseller:</label>
+                  <label for="bookseller">Vendor:</label>
                   <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter %]" />
                 </li>
                 <li>
-                  <label for="branch">Branch:</label>
+                  <label for="branch">Library:</label>
                   <select id="branch" name="branch_filter">
                     <option value="">All</option>
                     [% FOREACH branch IN branches_loop %]
       </div>
       [% END %]
       [% IF ( done_searched ) %]
-        [% IF ( subscriptions ) %]
-          <table id="srlt">
-            <thead>
-              <tr>
-                  <th>ISSN</th>
-                  <th>Title</th>
-                  <th> Notes </th>
-                  <th>Library</th>
-                  <th>Call number</th>
-                  <th>Expiration date</th>
-                  [% IF ( routing && CAN_user_serials_routing ) %]
-                    <th>Routing list</th>
-                  [% END %]
-                  <th>&nbsp;</th>
-                  <th>&nbsp;</th>
-              </tr>
-            </thead>
-            <tfoot>
-              <tr>
-                <td><input type="text" class="filter" data-column_num="0" placeholder="Search ISSN" /></td>
-                <td><input type="text" class="filter" data-column_num="1" placeholder="Search title" /></td>
-                <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td>
-                <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td>
-                <td><input type="text" class="filter" data-column_num="4" placeholder="Search callnumber" /></td>
-                <td><input type="text" class="filter" data-column_num="5" placeholder="Search expiration date" /></td>
-                [% IF ( routing && CAN_user_serials_routing ) %]<td></td>[% END %]
-                <td></td>
-                <td></td>
-              </tr>
-            </tfoot>
-            <tbody>
-              [% FOREACH subscription IN subscriptions %]
-                <tr>
-                  <td>
-                  [% IF ( subscription.issn ) %][% subscription.issn %]
-                  [% END %]
-                  </td>
-                  <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
-                  </td>
-                  <td>[% IF ( subscription.notes ) %][% subscription.notes %][% END %]
-                  [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
-                  </td>
-                  <td>
-                    [% IF ( subscription.branchname ) %][% subscription.branchname %][% END %]
-                  </td>
-                  <td>
-                    [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
-                  </td>
-                  <td>
-                    [% IF ( subscription.enddate ) %][% subscription.enddate | $KohaDates %][% END %]
-                  </td>
-                  [% IF ( routing && CAN_user_serials_routing ) %]
-                  <td>
-                    [% IF ( subscription.cannotedit ) %]
-                      &nbsp;
-                    [% ELSE %]
-                      [% IF ( subscription.routingedit ) %]
-                        <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit</a>
-                        ([% subscription.routingedit %])
-                      [% ELSE %]
-                        <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new">New</a>
-                      [% END %]
+        [% IF ( total ) %]
+          <div id="serialstabs" class="toptabs" style="clear:both;">
+            <ul class="ui-tabs-nav">
+              <li><a href="#opened">Opened ([% openedsubscriptions.size || 0 %])</a></li>
+              <li><a href="#closed">Closed ([% closedsubscriptions.size || 0 %])</a></li>
+            </ul>
+            <div id="opened">
+              [% IF openedsubscriptions %]
+                <table id="osrlt">
+                  <thead>
+                    <tr>
+                        <th>ISSN</th>
+                        <th>Title</th>
+                        <th> Notes </th>
+                        <th>Library</th>
+                        <th>Call number</th>
+                        <th>Expiration date</th>
+                        [% IF ( routing && CAN_user_serials_routing ) %]
+                          <th>Routing list</th>
+                        [% END %]
+                        <th>&nbsp;</th>
+                        <th>&nbsp;</th>
+                    </tr>
+                  </thead>
+                  <tfoot>
+                    <tr>
+                      <td><input type="text" class="filter" data-column_num="0" placeholder="Search ISSN" /></td>
+                      <td><input type="text" class="filter" data-column_num="1" placeholder="Search title" /></td>
+                      <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td>
+                      <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td>
+                      <td><input type="text" class="filter" data-column_num="4" placeholder="Search callnumber" /></td>
+                      <td><input type="text" class="filter" data-column_num="5" placeholder="Search expiration date" /></td>
+                      [% IF ( routing && CAN_user_serials_routing ) %]<td></td>[% END %]
+                      <td></td>
+                      <td></td>
+                    </tr>
+                  </tfoot>
+                  <tbody>
+                    [% FOREACH subscription IN openedsubscriptions %]
+                      <tr>
+                        <td>
+                        [% IF ( subscription.issn ) %][% subscription.issn %]
+                        [% END %]
+                        </td>
+                        <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
+                        </td>
+                        <td>[% IF ( subscription.notes ) %][% subscription.notes %][% END %]
+                        [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
+                        </td>
+                        <td>
+                          [% IF ( subscription.branchname ) %][% subscription.branchname %][% END %]
+                        </td>
+                        <td>
+                          [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
+                        </td>
+                        <td>
+                          [% IF ( subscription.enddate ) %][% subscription.enddate | $KohaDates %][% END %]
+                        </td>
+                        [% IF ( routing && CAN_user_serials_routing ) %]
+                        <td>
+                          [% IF ( subscription.cannotedit ) %]
+                            &nbsp;
+                          [% ELSE %]
+                            [% IF ( subscription.routingedit ) %]
+                              <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit</a>
+                              ([% subscription.routingedit %])
+                            [% ELSE %]
+                              <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new">New</a>
+                            [% END %]
+                          [% END %]
+                        </td>
+                        [% END %]
+                        <td><a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]">Issue history</a>
+                        </td>
+                        <td>
+                        [% IF ( subscription.cannotedit ) %]
+                          &nbsp;
+                        [% ELSE %]
+                          [% IF ( CAN_user_serials_receive_serials ) %]<a href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;serstatus=1,3,7">Serial receive</a>[% END %]
+                        [% END %]
+                        </td>
+                      </tr>
+                    [% END %]
+                  </tbody>
+                </table>
+              [% ELSE %]
+                There is no opened subscription for your search.
+              [% END %]
+            </div>
+            <div id="closed">
+              [% IF closedsubscriptions %]
+                <table id="csrlt">
+                  <thead>
+                    <tr>
+                        <th>ISSN</th>
+                        <th>Title</th>
+                        <th> Notes </th>
+                        <th>Library</th>
+                        <th>Call number</th>
+                        <th>&nbsp;</th>
+                        <th>&nbsp;</th>
+                    </tr>
+                  </thead>
+                  <tfoot>
+                    <tr>
+                      <td><input type="text" class="filter" data-column_num="0" placeholder="Search ISSN" /></td>
+                      <td><input type="text" class="filter" data-column_num="1" placeholder="Search title" /></td>
+                      <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td>
+                      <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td>
+                      <td><input type="text" class="filter" data-column_num="4" placeholder="Search callnumber" /></td>
+                      <td></td>
+                      <td></td>
+                    </tr>
+                  </tfoot>
+                  <tbody>
+                    [% FOREACH subscription IN closedsubscriptions %]
+                      <tr>
+                        <td>
+                          [% IF ( subscription.issn ) %]
+                            [% subscription.issn %]
+                          [% END %]
+                        </td>
+                        <td>
+                          <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
+                        </td>
+                        <td>
+                          [% IF ( subscription.notes ) %][% subscription.notes %][% END %]
+                          [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
+                        </td>
+                        <td>
+                          [% IF ( subscription.branchname ) %][% subscription.branchname %][% END %]
+                        </td>
+                        <td>
+                          [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
+                        </td>
+                        <td>
+                          [% UNLESS subscription.cannotedit %]
+                            <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=reopen&routing=[% subscription.routing %]&amp;searched=1&amp;title_filter=[% title_filter %]&amp;ISSN_filter=[% ISSN_filter %]&amp;EAN_filter=[% EAN_filter %]&amp;published_filter=[% publisher_filter %]&amp;bookseller_filter=[% bookseller_filter %]&amp;branch_filter=[% branch_filter %]" onclick="return confirm(_('Are you sure you want to reopen this subscription?'));">Reopen</a>
+                          [% ELSE %]
+                            Cannot edit
+                          [% END %]
+                        </td>
+                        <td>
+                          <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]">Issue history</a>
+                        </td>
+                      </tr>
                     [% END %]
-                  </td>
-                  [% END %]
-                  <td><a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]">Issue history</a>
-                  </td>
-                  <td>
-                  [% IF ( subscription.cannotedit ) %]
-                    &nbsp;
-                  [% ELSE %]
-                    [% IF ( CAN_user_serials_receive_serials ) %]<a href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;serstatus=1,3,7">Serial receive</a>[% END %]
-                  [% END %]
-                  </td>
-                </tr>
+                  </tbody>
+                </table>
+              [% ELSE %]
+                There is no closed subscription for your search.
               [% END %]
-            </tbody>
-          </table>
-        [% ELSE %]
-          There is no subscription for your search.
+            </div>
+          </div>
         [% END %]
       [% END %]
     </div>
                   <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
                 </li>
                 <li>
-                  <label for="bookseller">Bookseller:</label>
+                  <label for="bookseller">Vendor:</label>
                   <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter %]" />
                 </li>
                 <li>
-                  <label for="branch">Branch:</label>
+                  <label for="branch">Library:</label>
                   <select id="branch" name="branch_filter">
                     <option value="">All</option>
                     [% FOREACH branch IN branches_loop %]
index 44a2d8f..949b946 100644 (file)
@@ -55,8 +55,12 @@ $(document).ready(function() {
        <div class="yui-b">
        [% INCLUDE 'serials-toolbar.inc' %]
 
-    <h1>Subscription for [% bibliotitle %] </h1>
-    [% IF ( abouttoexpire ) %]<div class="dialog message">Subscription will expire [% enddate %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>[% END %]
+    <h1>Subscription for [% bibliotitle%] [% IF closed %](closed)[% END %]</h1>
+    [% IF ( abouttoexpire ) %]
+      [% UNLESS closed %]
+        <div class="dialog message">Subscription will expire [% enddate %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
+      [% END %]
+    [% END %]
     [% IF ( NEEDSCONFIRMATION ) %]
     <div id="circ_needsconfirmation" class="dialog alert">
                        <h3>Please Confirm Subscription deletion</h3>
@@ -374,27 +378,19 @@ $(document).ready(function() {
                     [% serialslis.publisheddate %]
                 </td>
                 <td>
-                        [% IF ( serialslis.status1 ) %]
-                            Expected
-                        [% END %]
-                        [% IF ( serialslis.status2 ) %]
-                            Arrived
-                        [% END %]
-                        [% IF ( serialslis.status3 ) %]
-                            Late
-                        [% END %]
-                        [% IF ( serialslis.status4 ) %]
-                            Missing
-                        [% END %]
-                        [% IF ( serialslis.status5 ) %]
-                            Not available
-                        [% END %]
-                        [% IF ( serialslis.status7 ) %]
-                            Claimed
-                             [% IF ( serialslis.claimdate ) %]
-                             [% serialslis.claimdate %]
-                             [% END %]
-                        [% END %]
+                    [% IF ( serialslis.status1 ) %]Expected[% END %]
+                    [% IF ( serialslis.status2 ) %]Arrived[% END %]
+                    [% IF ( serialslis.status3 ) %]Late[% END %]
+                    [% IF ( serialslis.status4 ) %]Missing[% END %]
+                    [% IF ( serialslis.status5 ) %]Not issued[% END %]
+                    [% IF ( serialslis.status6 ) %]Delete[% END %]
+                    [% IF ( serialslis.status7 ) %]
+                      Claimed
+                      [% IF ( serialslis.claimdate ) %]
+                        [% serialslis.claimdate %]
+                      [% END %]
+                    [% END %]
+                    [% IF ( serialslis.status8 ) %]Stopped[% END %]
                 </td>
             </tr>
         [% END %]
index 8bf8fb8..c65277a 100644 (file)
@@ -81,8 +81,10 @@ $(document).ready(function(){
         [% END %]
     </tbody>
       </table>
-      [% UNLESS ( too_many_items ) %]
-      <h4>The following barcodes were found: </h4>
+      [% IF ( item_loop ) %]
+          [% UNLESS ( too_many_items ) %]
+          <h4>The following barcodes were found: </h4>
+          [% END %]
       [% END %]
   [% END %] <!-- /notfoundbarcodes -->
 
@@ -143,6 +145,7 @@ $(document).ready(function(){
     [% END %]
 [% END %]<!-- /too_many_items -->
 
+[% IF ( item_loop ) %]
 <div id="cataloguing_additem_newitem">
         <h2>Edit Items</h2>
         <div class="hint">Checking the box right next the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.</div>
@@ -182,6 +185,9 @@ $(document).ready(function(){
          <a href="/cgi-bin/koha/tools/batchMod.pl" class="cancel" onclick="history.back();return false;">Cancel</a>
     </fieldset>
 </div>
+[% ELSE %]
+    <p><a href="/cgi-bin/koha/tools/batchMod.pl">Return to batch item modification</a></p>
+[% END %]
 [% ELSE %] <!-- // show -->
 <fieldset class="action">
 [% IF ( src == 'CATALOGUING') %]
index f7193e3..5aa1865 100644 (file)
          */
           function checkForm(form) {
               if((form.checkbox[0].checked)){
-                  if(!(form.date1.value)){
-                    alert(_("please enter a date !"));
-                    document.form.date1.focus();
+                  if ( (!form.date1.value) && (!form.borrower_dateexpiry.value) && (!form.borrower_categorycode.value) ){
+                    alert(_("Please enter at least one criterion for deletion!"));
                     return false;
                   }
               }
               if((form.checkbox[1].checked)){
                   if(!(form.date2.value)){
                       alert(_("please enter a date !"));
-                      document.form.date2.focus();
                       return false;
                   }
               }
     <form name="f1" onsubmit="return checkForm(this);" action="/cgi-bin/koha/tools/cleanborrowers.pl" method="post">
     <fieldset>
     <legend>What do you want to do ?</legend>
-        <p><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" checked="checked" />
-        <label for="checkborrower">Delete borrower who has not borrowed since:</label>
-        <input size="10" id="date1" name="filterdate1" value="[% filterdate1 %]" type="text" class="datepicker" />
+        <h3><input id="checkborrower" type="checkbox" name="checkbox" value="borrower" /><label for="checkborrower"> Delete borrowers</label></h3>
+
+        <label for="date1">Who have not borrowed since:</label>
+        <input size="10" id="date1" name="filterdate1" type="text" class="datepicker" />
+        <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
+
+        <label for="borrower_dateexpiry">Whose expiration date is before:</label>
+        <input size="10" id=borrower_dateexpiry" name="borrower_dateexpiry" type="text" class="datepicker" />
         <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
 
-        <p><input id="checkissue" type="checkbox" name="checkbox" value="issue" checked="checked" />
-        <label for="checkissue">Anonymize check-out history older than</label>
-        <input size="10" id="date2" name="filterdate2" value="[% filterdate2 %]" type="text" class="datepicker" />
+        <label for="borrower_categorycode">Whose patron category is:</label>
+        <select id="borrower_categorycode" name="borrower_categorycode">
+            <option value="" selected="selected">Any</option>
+            [% FOREACH bc IN borrower_categorycodes %]
+                [% UNLESS bc.categorycode == 'S' %]
+                    <option value="[% bc.categorycode %]">[% bc.description %]</option>
+                [% END %]
+            [% END %]
+        </select>
+
+        <h3><input id="checkissue" type="checkbox" name="checkbox" value="issue" /><label for="checkissue"> Anonymize history</label></h3>
+        <label for="date2">Anonymize check-out history older than</label>
+        <input size="10" id="date2" name="filterdate2" type="text" class="datepicker" />
         <span class="hint">[% INCLUDE 'date-format.inc' %]</span></p>
 
             <!-- hidden here -->
             <input type="hidden" name="step3" value="1" />
             <input type="hidden" name="filterdate1" value="[% filterdate1 %]" />
             <input type="hidden" name="filterdate2" value="[% filterdate2 %]" />
+            <input type="hidden" name="borrower_dateexpiry" value="[% borrower_dateexpiry %]" />
+            <input type="hidden" name="borrower_categorycode" value="[% borrower_categorycode %]" />
     </fieldset>
        <fieldset class="action"><input type="submit" value="Finish" /> <a class="cancel" href="/cgi-bin/koha/tools/cleanborrowers.pl">Cancel</a></fieldset>
         </form>
index 8f33fe6..62d2eb3 100644 (file)
@@ -1,28 +1,34 @@
 [% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc'%]
-<title>Koha &rsaquo; Tools &rsaquo; [% IF ( del ) %]Batch item deletion[% ELSE %]Batch item modification[% END %] </title>
+<title>Koha &rsaquo; Tools &rsaquo; Batch patron modification</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'calendar.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/JavaScript" language="JavaScript">
+<script type="text/JavaScript">
 //<![CDATA[
         var patron_attributes_lib = new Array();
         var patron_attributes_values = new Array();
         $(document).ready(function() {
-            $("#borrowerst").tablesorter();
+            [% IF borrowers %]
+                $("#borrowerst").tablesorter({
+                    headers: { 0: { sorter: false}},
+                    widgets : ['zebra'],
+                    sortList: [[1,0]]
+                });
 
-            $("#selectallbutton").click(function() {
-                $("#borrowerst").find("input:checkbox").each(function() {
-                    $(this).attr("checked", true);
+                $("#selectallbutton").click(function() {
+                    $("#borrowerst").find("input:checkbox").each(function() {
+                        $(this).attr("checked", true);
+                    });
+                    return false;
                 });
-                return false;
-            });
-            $("#clearallbutton").click(function() {
-                $("#borrowerst").find("input:checkbox").each(function() {
-                    $(this).attr("checked", false);
+                $("#clearallbutton").click(function() {
+                    $("#borrowerst").find("input:checkbox").each(function() {
+                        $(this).attr("checked", false);
+                    });
+                    return false;
                 });
-                return false;
-            });
+            [% END %]
 
             var values = new Array();
             var lib = new Array();
@@ -53,7 +59,7 @@
             var information_category_node = $(select_attr).parent().parent().find('span.information_category');
             information_category_node.html("");
             if ( category.length > 0 ) {
-                information_category_node.html('This attribute will be only applied to the borrower\'s category "' + category + '"');
+                information_category_node.html(_("This attribute will be only applied to the patron\'s category") +' "' + category + '"');
             }
             if ( type == 'select' ) {
                 var options = '<option value = ""></option>';
@@ -70,7 +76,7 @@
             var li_node = $("li.attributes:last");
             var li_clone = $(li_node).clone();
             if ( $(li_clone).find("a.delete").length == 0 ) {
-                $(li_clone).append('[<a href="#" title="Delete" class="delete" onclick="del_attributes(this);return false;">X</a>]');
+                $(li_clone).append('<a href="#" title="Delete" class="delete clear-field" onclick="del_attributes(this);return false;">Delete</a>');
             }
             $(li_clone).find('select[name="patron_attributes"]').change(function() {
                 updateAttrValues(this);
 <div id="breadcrumbs">
     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
     <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
-    <a href="/cgi-bin/koha/tools/modborrowers.pl">Patrons modification</a>
+    <a href="/cgi-bin/koha/tools/modborrowers.pl">Batch patron modification</a>
 </div>
 
 <div id="doc3" class="yui-t2">
         <div id="yui-main">
             <div class="yui-b">
                 [% IF ( op == 'show_form' ) %]
-                <h1>Batch patrons modification</h1>
+                <h1>Batch patron modification</h1>
                 <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/modborrowers.pl">
                     <fieldset class="rows">
                     <legend>Use a file</legend>
-                    <label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" />
+                    <ol>
+                    <li><label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /></li>
+                    </ol>
                     </fieldset>
                     <fieldset class="rows">
                         <legend>Or list cardnumbers one by one</legend>
                         <ol>
                             <li>
-                              <label for="cardnumberlist">Carnumber list (one cardnumber per line): </label>
+                              <label for="cardnumberlist">Carnumber list (one cardnumber per line): </label>
                               <textarea rows="10" cols="30" id="cardnumberlist" name="cardnumberlist">[% cardnumberlist %]</textarea>
                             </li>
                         </ol>
 
                     [% IF ( op == 'show_results' ) %]
                         [% IF ( errors ) %]
-                            Errors occured :
+                            <div class="dialog alert">
+                            <h4>Errors occured:</h4>
                             <ul class="warnings">
                             [% FOREACH error IN errors %]
                                 [% IF ( error.error == 'can_not_update' ) %]
-                                    <li>Can not update borrower with borrowernumber [% error.borrowernumber %]</li>
+                                    <li>Can not update patron with borrowernumber [% error.borrowernumber %]</li>
                                 [% ELSE %]
                                     <li>[% error.error %]</li>
                                 [% END %]
                             [% END %]
                             </ul>
+                            </div>
                         [% END %]
-                        <br/>
                     [% END %]
 
                     [% IF ( op == 'show' ) %]
                             <div id="toolbar"><a id="selectallbutton" href="#">Select All</a> | <a id="clearallbutton" href="#">Clear All</a></div>
                         [% END %]
                     [% END %]
+                        [% IF borrowers %]
                             <div id="cataloguing_additem_itemlist">
                                 <div style="overflow:auto">
                                     <table id="borrowerst">
                                                 [% IF ( op == 'show' ) %]
                                                     <th>&nbsp;</th>
                                                 [% END %]
+                                                <th>Card number</th>
                                                 <th>Surname</th>
                                                 <th>Firstname</th>
-                                                <th>Branchname</th>
-                                                <th>Categorycode</th>
-                                                <th>Cardnumber</th>
-                                                <th>dateenrolled</th>
-                                                <th>dateexpiry</th>
-                                                <th>debarred</th>
+                                                <th>Library</th>
+                                                <th>Category</th>
+                                                <th>Registration date</th>
+                                                <th>Expiry date</th>
+                                                <th>Restricted</th>
                                                 [% FOREACH attrh IN attributes_header %]
                                                     <th>[% attrh.attribute %]</th>
                                                 [% END %]
                                                     [% IF ( op == 'show' ) %]
                                                         <td><input type="checkbox" name="borrowernumber" value="[% borrower.borrowernumber %]" checked="checked" /></td>
                                                     [% END %]
+                                                    <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">[% borrower.cardnumber %]</a></td>
                                                     <td>[% borrower.surname %]</td>
                                                     <td>[% borrower.firstname %]</td>
                                                     <td>[% borrower.branchname %]</td>
                                                     <td>[% borrower.categorycode %]</td>
-                                                    <td>[% borrower.cardnumber %]</td>
                                                     <td>[% borrower.dateenrolled | $KohaDates %]</td>
                                                     <td>[% borrower.dateexpiry | $KohaDates %]</td>
                                                     <td>[% borrower.debarred | $KohaDates %]</td>
                                     <ol>
                                         [% FOREACH field IN fields %]
                                         <li>
-                                            <label style="width:20em;">
+                                            [% IF ( field.mandatory ) %]
+                                            <label for="[% field.name %]" class="required">
+                                            [% ELSE %]
+                                            <label for="[% field.name %]">
+                                            [% END %]
                                             [% SWITCH ( field.name ) %]
                                                 [% CASE 'surname' %]
                                                 Surname:
                                             [% END %]
                                             [% IF ( field.type == 'date' ) %]
                                                 <input type="text" name="[% field.name %]" id="[% field.name %]" value="" size="10" maxlength="10" readonly="readonly" class="datepicker" />
-                                                <a href="#" onclick="clearDate('[% field.name %]');return false;">X</a>
+                                                <a href="#" class="clear-field" onclick="clearDate('[% field.name %]');return false;">Clear</a>
                                                 [% END %]
                                         </li>
                                         [% END %]
                                         [% IF ( patron_attributes_codes ) %]
                                             <li class="attributes">
-                                                <label style="width:20em;">Attribute:
+                                                <label style="width:auto;">Attribute:
                                                     <select name="patron_attributes">
                                                         [% FOREACH pac IN patron_attributes_codes %]
                                                             <option value="[% pac.attribute_code %]" data-type="[% pac.type %]" data-category="[% pac.category_lib %]">[% pac.attribute_lib %]</option>
                                                 </label>
                                                 <input type="checkbox" title="check to delete this field" name="disable_input" value="attr0_value" />
                                                 <span class="patron_attributes_value"></span>
-                                                <a href="#" title="Add an attribute" onclick="add_attributes(); return false;">+</a>
-                                                <span class="information_category"></span>
+                                                <a href="#" class="clone-field" title="Add an attribute" onclick="add_attributes(); return false;">New</a>
+                                                <span class="information_category hint" style="width:25%;float:right;"></span>
                                             </li>
                                         [% END %]
                                     </ol>
                             </div>
                         </form>
                         [% END %]
+                    [% END %]
                 [% END %]
                 [% IF ( op == 'show_results' ) %]
-                    <br/>
-                    <a href="/cgi-bin/koha/tools/modborrowers.pl" title="new Batch patrons modification">new Batch patrons modification</a>
+                <p>
+                    <a href="/cgi-bin/koha/tools/modborrowers.pl" title="New batch patrons modification">New batch patron modification</a>
+                </p>
                 [% END %]
             </div>
             </div>
index 7a083b8..ea5769c 100644 (file)
@@ -6,7 +6,6 @@
     <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
     <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/dataTables.fnReloadAjax.js"></script>
     [% INCLUDE 'datatables-strings.inc' %]
-    </script>
     <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
     <script type="text/javascript" src="[% themelang %]/js/jquery.jeditable.mini.js"></script>
     <script type="text/javascript">
                                             { "sWidth": "11%" },
                                           ],
                    "oLanguage"          : {
-                                            "sEmptyTable": sEmptyTable,
+                                            "oPaginate": {
+                                                           "sFirst": MSG_DT_FIRST,
+                                                           "sLast": MSG_DT_LAST,
+                                                           "sNext": MSG_DT_NEXT,
+                                                           "sPrevious": MSG_DT_PREVIOUS,
+                                                         },
+                                            "sEmptyTable": MSG_DT_EMPTY_TABLE,
+                                            "sInfo": MSG_DT_INFO,
+                                            "sInfoEmpty": MSG_DT_INFO_EMPTY,
+                                            "sInfoFiltered": MSG_DT_INFO_FILTERED,
+                                            "sLengthMenu": MSG_DT_LENGTH_MENU,
+                                            "sLoadingRecords": MSG_DT_LOADING_RECORDS,
+                                            "sProcessing": MSG_DT_PROCESSING,
+                                            "sSearch": MSG_DT_SEARCH,
+                                            "sZeroRecords": MSG_DT_ZERO_RECORDS,
                                           },
                    "fnPreDrawCallback": function(oSettings) {
                         return true;
index 0c71a41..81fe513 100644 (file)
@@ -210,6 +210,7 @@ function placeHold () {
                 <th>Title</th>
                 <th>Author</th>
                 <th>Date added</th>
+                <th>Call number</th>
                 <th>&nbsp;</th>
             </tr>
                [% FOREACH itemsloo IN itemsloop %]
@@ -238,6 +239,9 @@ function placeHold () {
                        <td>[% itemsloo.author %]</td>
                        <td>[% itemsloo.dateadded %]</td>
                        <td>
+                [% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %]
+            </td>
+            <td>
                        [% UNLESS ( itemsloo.notforloan ) %]
                        <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a>
                        [% END %]
@@ -294,14 +298,15 @@ function placeHold () {
         <ol>
         <li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" /></li>
         <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="[% loggedinuser %]" />[% loggedinusername %]</li>
-               <li><label for="sortfield" >Sort this list by: </label>
-               <select name="sortfield" id="sortfield">
-               [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
-               [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
-               [% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
-               </select></li>
+        <li><label for="sortfield" >Sort this list by: </label>
+        <select name="sortfield" id="sortfield">
+            <option value="title">Title</option>
+            <option value="author">Author</option>
+            <option value="copyrightdate">Copyrightdate</option>
+            <option value="itemcallnumber">Call number</option>
+        </select></li>
         <li><label for="category">Category: </label>
-                       <select name="category" id="category">
+            <select name="category" id="category">
                   <option value="1">Private</option>
                   <option value="2">Public</option>
                      </select></li>
@@ -319,9 +324,10 @@ function placeHold () {
                <li><label for="owner">Owner: </label><input type="hidden" id="owner" name="owner" value="[% IF ( owner ) %][% ownername %][% ELSE %][% loggedinusername %][% END %]" />[% IF ( owner ) %][% ownername %][% ELSE %][% loggedinusername %][% END %]</li>
                <li><label for="sortfield" >Sort this list by: </label>
                <select name="sortfield">
-               [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
-               [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
-               [% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
+        [% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
+        [% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
+        [% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
+        [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
                </select></li>
                <li><label for="category">Category: </label>
                        <select id="category" name="category">
@@ -386,7 +392,7 @@ function placeHold () {
                     [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
         <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&amp;[% END %]viewshelf=[% shelveslooppri.shelf %]&amp;shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
         <td>[% shelveslooppri.count %] item(s)</td>
-        <td>[% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
+        <td>[% IF ( shelveslooppri.sortfield == "author" ) %]Author[% ELSIF ( shelveslooppri.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelveslooppri.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
         <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %]
                        [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %]
                </td>
@@ -439,7 +445,7 @@ function placeHold () {
                <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td>
         <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td>
                <td>[% shelvesloo.count %] item(s)</td>
-        <td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %]</td>
+        <td>[% IF ( shelvesloo.sortfield == "author" ) %]Author[% ELSIF ( shelvesloo.sortfield == "copyrightdate" ) %]Year[% ELSIF (shelvesloo.sortfield == "itemcallnumber") %]Call number[% ELSE %]Title[% END %]</td>
         <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %]
                        [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %]
                </td>
index ea36118..24349e1 100644 (file)
                                 </xsl:call-template>
                             </xsl:with-param>
                         </xsl:call-template>
-                       </a>
-                    <xsl:text> </xsl:text><xsl:call-template name="part"/>
-            <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+            </a>
+            <xsl:call-template name="part"/>
+            <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
         </xsl:for-each>
 
         <!-- 490 Series not traced, Ind1 = 0 -->
        </xsl:choose>
        <!-- add relator code too between brackets-->
        <xsl:if test="marc:subfield[@code='4' or @code='e']">
-         <xsl:text>[</xsl:text>
+      <span class="relatorcode">
+      <xsl:text> [</xsl:text>
          <xsl:choose>
            <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
            <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
          </xsl:choose>
          <xsl:text>]</xsl:text>
+      </span>
        </xsl:if>
        </a>
         <xsl:choose>
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/article_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/article_b.gif
new file mode 100644 (file)
index 0000000..22f50d0
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/article_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/audiovisual_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/audiovisual_b.gif
new file mode 100644 (file)
index 0000000..e5b101d
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/audiovisual_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/binary_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/binary_b.gif
new file mode 100644 (file)
index 0000000..497ce89
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/binary_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/book_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/book_b.gif
new file mode 100644 (file)
index 0000000..ee79e8a
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/book_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/handwriting_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/handwriting_b.gif
new file mode 100644 (file)
index 0000000..d767a8c
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/handwriting_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/map_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/map_b.gif
new file mode 100644 (file)
index 0000000..816110d
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/map_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/periodical_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/periodical_b.gif
new file mode 100644 (file)
index 0000000..3249ec4
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/periodical_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/picture_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/picture_b.gif
new file mode 100644 (file)
index 0000000..652dfb1
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/picture_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/score_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/score_b.gif
new file mode 100644 (file)
index 0000000..31a2118
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/score_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/sons_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/sons_b.gif
new file mode 100644 (file)
index 0000000..a81ad42
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/sons_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/sound_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/sound_b.gif
new file mode 100644 (file)
index 0000000..d563c82
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/sound_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/thesis_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/thesis_b.gif
new file mode 100644 (file)
index 0000000..78bb330
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/thesis_b.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/unknown_b.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/unknown_b.gif
new file mode 100644 (file)
index 0000000..1630b7b
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/sudoc/unknown_b.gif differ
index 6fa04a0..e939a1b 100644 (file)
@@ -723,7 +723,7 @@ input.deleteshelf:active {
 
 #tagslist li { display : inline; }
 
-a.tag_results_add {
+a.tag_add {
     background-image: url(../../images/tag-small.png);
     background-position : -1px center;
     background-repeat : no-repeat;
@@ -742,7 +742,6 @@ a.tag_results_add {
 
 .tag_results_input {
     background-color: #EEE;
-    display: none;
     margin-left: 1em;
     padding: 0.3em;
 }
@@ -1443,9 +1442,19 @@ padding-left : .4em;
     padding-left:20px
 }
 
-.searchresults .tagstatus {
-        display: block;
-        color: #707070;
+.tagstatus {
+    color: #707070;
+    padding: 0 4px 0 4px;
+    margin-left: 5px;
+    border: 1px solid #bcbcbc;
+    background-color: #ffffcc;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.results_summary.tagstatus {
+    display: inline;
 }
 
 .results_summary .label {
@@ -1456,8 +1465,12 @@ padding-left : .4em;
         font-weight: normal;
 }
 
-.actions a {
-   margin-left : 1em;
+.actions a.hold,
+.actions a.addtocart,
+.actions a.addtoshelf,
+.actions a.addtolist,
+.actions a.tag_add {
+     margin-left : 1em;
      text-decoration : none;
 }
 
diff --git a/koha-tmpl/opac-tmpl/ccsr/en/css/sanop.css b/koha-tmpl/opac-tmpl/ccsr/en/css/sanop.css
deleted file mode 100644 (file)
index 7ed0a67..0000000
+++ /dev/null
@@ -1,2013 +0,0 @@
-
-body #main {
-  margin-left : 2%;
-      background-color: #eeeeee;
-
-}
-
-/* TWO COLUMNS, RIGHT SIDEBAR */
-
-
-body#withsidebar #main {
-     float: left;
-   margin-left: 1%;
-       width: 58%;
-    }
-
-html body#withsidebar #main    {
-       margin-left: .5%;
-      }
-
-body#withsidebar #sidebar
-   {
-      float: left;
-   margin-top : 2.4em;
-    width: 39%;
-}
-
-/* THREE COLUMNS */
-
-body#tricolumn #main_wrapper {
-             float: left;
-   width: 100%;
-}
-
-body#tricolumn #main
-   {
-              margin: 0 150px 0 175px;
-       }
-
-body#tricolumn #nav
- {
-      float: left;
-   margin-left: -100%;
-    width: 175px;
-  }
-body#tricolumn #sidebar
-      {
-      float: left;
-   margin-left: -150px;
-   width: 150px;
-  }
-
-/* TWO COLUMNS LEFT NAVIGATION */
-
-body#withnav #main_wrapper
-       {
-      float: left;
-   width: 100%;
-   }
-
-body#withnav #main
-  {
-      margin: 0 0 0 175px;
-   }
-
-body#withnav #nav
-   {
-      float: left;
-   margin-left: -100%;
-    width: 175px;
-  }
-
-body#withnav #main .content-block {
- padding-left : 10px;
-}
-
-/* END TWO COLUMNS RIGHT NAVIGATION */
-
-a {
-    font-weight: bold;
-}
-
-a:link, a:visited, a:active {
-        text-decoration : underline;
-        color :navy;
-}
-
-a:link.current {
-      font-weight: bold;
-     padding: 1px 5px 1px 5px;
-      text-decoration: none;
-}
-
-a:link.nav {
- font-weight: bold;
-     padding: 1px 5px 1px 5px;
-      text-decoration: none;
-
-}
-
-a:visited.current {
- font-weight: bold;
-     padding: 1px 5px 1px 5px;
-      text-decoration: none;
-}
-
-a:visited.nav {
-      font-weight: bold;
-     padding: 1px 5px 1px 5px;
-      text-decoration: none;
-}
-
-a:hover.current {
-    font-weight: bold;
-     padding: 1px 5px 1px 5px;
-      text-decoration: none;
-}
-
-a:hover.nav {
-        font-weight: bold;
-     padding: 1px 5px 1px 5px;
-      text-decoration: none;
-
-}
-
-a:active.current {
-  font-weight: bold;
-     padding: 1px 5px 1px 5px;
-      text-decoration: none;
-}
-
-a:active.nav {
-       font-weight: bold;
-     padding: 1px 5px 1px 5px;
-      text-decoration: none;
-}
-
-a.help {
-     padding: 3px;
-  text-decoration: none;
-}
-
-a.title {
-    font-size: 1.2em;
-      font-style: normal;
-    font-weight: bold;
-}
-
-body {
-   font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-    font-size: 73%;
-        margin: 0;
-     padding: 0;
-    background-color : #eeeeee;
-}
-
-input, select, th, td {
- font-size:1em
-}
-
-caption {
-     font-family: Arial, Geneva, Helvetica, sans-serif;
-     font-size : 1.3em;
-     font-weight: bold;
-     margin: 0;
-     padding: 5px 0 3px 0;
-  text-align: left;
-}
-
-div.bookcover {
-   float: right;
-}
-
-div.details td.details {
-      text-align: left;
-}
-
-div.details ul {
-  list-style-type: circle;
-       margin-left: 0;
-        text-align: left;
-}
-
-div.error {
-       padding: 3px 10px 3px 10px;
-    width: 75%;
-}
-
-div.error li {
-  margin-bottom: .5em;
-}
-
-div.form, div.details {
-        margin: 0 auto;
-        padding: 0 0 0 6px;
-}
-
-div.notes {
-     text-align: left;
-}
-
-div.sidebar-box+div.sidebar-box {
- margin-top: 5px;
-}
-
-div.tab {
-  display: block;
-        margin-right: 0px;
-     width: 100%;
-}
-
-div.tab p {
-    margin: 0;
-     padding: 3px 0;
-}
-
-div.tab p.MARCtag {
- clear: both;
-   font-weight: bold; /* style for tag definition (700 - Statement of responsability) */
-  margin: 0;
-     padding: 2px;
-}
-
-div.tab table {
-}
-
-div.tabbloc {
-      font-family: Arial, Helvetica, sans-serif;
-}
-
-div.table {
-      width: 95%;
-}
-
-dl.details dt {
- font-weight: bold;
-     margin: .5em 0;
-}
-
-dl.details dd {
-     margin-left: 1em;
-}
-
-dl.details ul {
-   padding: 0;
-    margin-left: 1em;
-}
-
-dl.details ul p {
- margin-left : 0;
-}
-
-em.new {
-   font-style: normal;
-    font-weight: bold;
-}
-
-form {
-   display: inline;
-       margin: 0;
-     padding: 0;
-}
-
-h1 {
-    font-size: 1.8em;
-      padding: 5px 0 3px 0;
-}
-
-h1,h2,h3,h4,h5,h6 {
-   font-family: arial, geneva, helvetica, sans-serif;
-     margin: 0;
-}
-
-h1.logo {
-        display: inline;
-       margin: 10px 0 0 10px;
-
-}
-
-h1.title {
-  font-style: italic;
-    padding: 5px 0 3px 0;
-  color: navy;
-}
-
-h2 {
-   font-size: 1.6em;
-      padding: 5px 0 3px 0;
-
-}
-
-h2#libraryname {
-     padding-left : 5px;
-}
-
-h3 {
-    font-size: 1.4em;
-      padding: 5px 0 3px 0;
-}
-
-h3.author {
-   padding: 0 0 3px 15px;
-}
-
-h3+p {
-       margin: .4em 0 .4em 0;
-}
-
-h4 {
- font-size: 1.3em;
-      padding: 5px 0 3px 0;
-}
-
-h5 {
-  font-size: 1.2em;
-      margin: 0;
-     padding: 10px 0 2px 0;
-}
-
-h5+p {
-       margin-top: 0;
- padding-top: 0;
-}
-
-h6 {
-        font-size: 1.1em;
-}
-
-input.add, a.add {
-        background-image: url(../images/add.gif);
-}
-
-input.addchecked, a.addchecked {
-  background-image: url(../images/addtobasket.gif);
-}
-
-input.back, a.back {
-      background-image: url(../images/back.gif);
-}
-
-input.brief, a.brief {
-   background-image: url(../images/brief.gif);
-}
-
-input.cancel {
-  font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-    font-size : .9em;
-      font-weight: bold;
-     padding: 2px;
-}
-
-input.cart, a.cart {
-  background-image: url(../images/cart.gif);
-}
-
-input.clearall, a.clearall {
-     background-image: url(../images/clearbasket.gif);
-}
-
-input.close, a.close {
-    background-image: url(../images/close.gif);
-}
-
-input.delete, a.delete {
-        background-image: url(../images/delete.gif);
-}
-
-input.detail, a.detail {
-       background-image: url(../images/detail.gif);
-}
-
-input.edit, a.edit {
-   background-image: url(../images/edit.gif);
-}
-
-input.icon {
-     background-position: left;
-     background-repeat: no-repeat;
-  font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-    font-size : .9em;
-      font-weight: bold;
-     padding: 2px 2px 2px 22px;
-}
-
-input.isbd, a.isbd {
-     background-image: url(../images/isbd.gif);
-}
-
-input.print, a.print {
-   background-image: url(../images/print2.gif);
-}
-
-input.remove, a.remove {
-       background-image: url(../images/remove.gif);
-}
-
-input.reserve, a.reserve {
-     background-image: url(../images/placereserve.gif);
-}
-
-input.send, a.send {
-     background-image: url(../images/send.gif);
-}
-
-input.shelf, a.shelf {
-   background-image: url(../images/addtoshelf.gif);
-}
-
-input.trash, a.trash {
-     background-image: url(../images/trash.gif);
-}
-
-p {
-     padding: 0 10px 0 10px;
-}
-
-p.error, div.error {
-        font-weight: normal;
-   margin: auto;
-  padding: 5px 20px 5px 20px;
-}
-
-p.error+p.error, div.error+div.error {
-  margin-top: 5px;
-}
-
-p+h3 {
-     margin-top: .6em;
-}
-
-p+h5 {
-    margin: 0;
-     padding: 3px 0 2px 0;
-}
-
-span.itemicon {
-       float : left;
-  font-size: .9em;
-       margin: 2px;
-   white-space: nowrap;
-}
-
-span.print {
-   font-size: .7em;
-       font-weight: normal;
-   padding-left: .7em;
-}
-
-table {
- border-collapse: collapse;
-     margin: 5px 0 5px 0;
-   padding: 0;
-}
-
-*html td, *html th {
-    font-size : .8em;
-}
-
-td {
-      padding: 3px;
-}
-
-td.input, div.form td, div.details td {
-       border-left: 0;
-        border-right: 0;
-       padding: 2px 2px 2px 4px;
-      text-align: right;
-}
-
-td.credit {
-      text-align: right;
-}
-
-td.debit {
-       text-align: right;
-}
-
-td.sum, th.sum {
- text-align: right;
-}
-
-td.sum {
- font-weight: bold;
-}
-
-td.label {
-       font-weight: bold;
-     line-height: 1.5em;
-    padding: 4px;
-}
-
-td.label, div.form th, div.details th {
-       border-right: 0;
-       border-top: 0;
- font-weight: bold;
-     padding: 2px 2px 2px 4px;
-      text-align: left;
-      vertical-align: top;
-}
-
-td.search-options select {
-}
-
-td:last-child {
-  padding: 3px;
-}
-
-th {
-  font-weight: bold;
-     padding: 2px;
-}
-
-th a {
-        font-weight: bold;
-     text-decoration: none;
-}
-
-th:last-child {
-      font-weight: bold;
-     padding: 2px;
-}
-
-th[scope="row"] {
-     font-weight: normal;
-   text-align: right;
-}
-
-ul#facets {
-      margin: 3px;
-}
-
-#nav ul#facets {
-       margin : 0;
-    padding : 0;
-}
-
-#nav ul#facets li {
-    font-weight: bold;
-     text-align: left;
-}
-
-#nav ul#facets li#branch_facet, #nav ul#facets li#subject_facet, #nav ul#facets li#series_facet, #nav ul#facets li#author_facet {
-}
-
-#nav ul#facets ul li {
-       border: 0;
-     font-size: .95em;
-      font-weight: normal;
-   padding: 2px;
-  text-align: left;
-}
-
-#nav ul#facets ul li a {
-  font-weight: normal;
-   text-decoration: underline;
-}
-
-#nav ul#facets ul li.showmore {
- text-align: center;
-}
-
-#nav ul#facets ul li.showmore a {
-       font-weight: bold;
-     text-decoration: none;
-}
-
-/* Tabs */
-ul.link-tabs {
-    list-style-type: none;
- margin: 9px 0 -2px 5px;
-        padding: 0;
-}
-
-ul.link-tabs li {
-       display: inline;
-       padding: 0px;
-}
-
-ul.link-tabs li a {
-   font-weight: bold;
-     padding: 2px 4px 2px 4px;
-      text-decoration: none;
-}
-
-ul.link-tabs li#power_formButton a, ul.link-tabs li#proximity_formButton a {
- padding: 2px 4px 3px 4px;
-}
-
-ul.link-tabs li.off a {
-}
-
-ul.link-tabs li.off a:hover {
-  padding: 2px 3px 2px 4px;
-}
-
-ul.link-tabs li.on a {
-}
-
-.clear {
-        clear: both;
-   line-height: .1em;
-}
-
-.content-block {
- padding: 5px;
-}
-
-#home {
-       text-align : center;
-}
-
-#home #searchform input.submit {
-       font-size : 1.3em;
-}
-
-div#advanced-search p {
-  margin: .4em;
-
-}
-
-div#advanced-search fieldset {
-       /*margin-left : -1em;*/
-       margin-bottom: .3em;
-  background-color : #eeeeee;
-
-}
-
-div#advanced-search fieldset p {
-       margin-left : 1em;
-       white-space: nowrap;
-
-
-}
-
-table.itemtypes {
-        border-collapse: separate;
-     border-spacing: 3px;
-   display: block;
-        padding: 0;
-    margin: 0;
-}
-
-div#advanced-search legend, div#sidebar legend {
- font-weight: bold;
-}
-
-div#advanced-search label {
-
-}
-
-.count {
- font-weight: normal;
-}
-
-.current {
-     font-weight: bold;
-     padding: 1px 5px 1px 5px;
-      text-decoration: none;
-}
-
-.detail-sidebar {
-    float: right;
-  padding: 5px;
-  margin-left : 15px;
-    margin-right : 5px;
-    text-align: center;
-    width : 25%;
-}
-
-.detail-sidebar .further {
-     float: none;
-   text-align: left;
-      width : 90%;
-}
-
-.further {
-     margin: 5px;
-   text-align: left;
-      width : 90%;
-}
-
-.ex {
-  font-family: "Courier New", Courier, monospace;
-}
-
-.further h4 {
-       padding: 2px;
-}
-
-.further li {
- padding: 2px 0;
-}
-
-.further ul, .further li {
-  list-style: none;
-      margin: .5em 0 .7em .4em;
-      padding: 0;
-}
-
-.inline {
-       display: inline;
-}
-
-.item-datedue {
-    font-style: italic;
-}
-
-.item-details {
- display: block;
-        margin: 0 0 0 25px;
-}
-
-.item-reserved, .item-notforloan, .item-lost, .item-cancelled, .item-damaged, .item-reserved {
-  display: block;
-}
-
-.labelsubfield {
-    clear: both; /* style for each subfield (like : a Publication year), just before the biblio subfield */
-        float: left;
-   font-weight: bold;
-     margin-left: 30px;
-     width: 12em;
-}
-
-.left {
-        float: left;
-}
-
-.loggedin {
-    font-weight: bold;
-}
-
-.login-note {
-    width: 35%;
-}
-
-.menu {
- line-height: 3em;
-      font-size: 1.2em;
-      margin: 0;
-     padding: 5px;
-}
-
-.menu a.logout {
-      font-weight: bold;
-     padding: 3px 15px 3px 15px;
-    text-decoration: none;
-}
-
-.menu a:link, #members a:link {
-      padding: 2px;
-}
-
-.menu a:visited, #members a:visited {
- padding: 2px;
-}
-
-.menu a:hover, #members a:hover {
-     padding: 2px;
-}
-
-.menu a:active, #members a:active {
-   padding: 2px;
-}
-
-.menu input {
-}
-
-.menu label {
-        font-weight: bold;
-}
-
-.menu p {
-        margin: 0;
-     padding: 0;
-}
-
-.menu p+p {
-     margin-top: 5px;
-}
-
-.note {
-    margin: 10px auto;
-     padding: 4px 4px 4px 4px;
-      width: 35%;
-}
-
-.opac-detail {
-  padding: 4px;
-}
-
-.opac-detail dd {
-     display: block;
-        line-height: 1.5em;
-    padding: 4px;
-  text-align: right;
-}
-
-.operations {
-    margin-top: 7px;
-       padding: 0 10px;
-       text-align: center;
-    width: 100%;
-}
-
-.operations img {
-      padding: 5px;
-}
-
-.operations li {
-      list-style-type: none;
- margin: 0;
-     padding-bottom: 2px;
-}
-
-.operations li a, .operations li a:visited {
-   background-position: top left;
- background-repeat: no-repeat;
-  border-style: outset;
-  display: block;
-        padding: 3px 3px 3px 26px;
-     text-decoration: none;
-}
-
-.searchresults a.reserve, .searchresults a.reserve:visited {
- background-position: top left;
- background-repeat: no-repeat;/*
-        border-style: outset;*/
-        float: right;
-  padding: 2px 3px 2px 26px;
-     /*text-decoration: none;*/
-}
-
-.operations li a:active {
-        border-style: inset;
-}
-
-.operations ul {
-       margin: 0;
-     padding: 0;
-    width: 90%;
-}
-
-.overdue {
-      font-weight: bold;
-}
-
-.pages {
- line-height : 1.8em;
-   text-align: center;
-}
-
-.rejected {
-     text-decoration: line-through;
-}
-
-.right {
-     float: right;
-}
-
-.search-main {
-        float: left;
-   width: 65%;
-}
-
-.searchresults input, .searchresults label, .searchresults select {
-     font-size: .8em;
-}
-
-.searchresults p {
- margin: 0;
-     padding: 0;
-    padding-top : .6em;
-}
-
-.searchresults p img {
-  vertical-align: middle;
-}
-
-.searchresults table td {
-   vertical-align: top;
-}
-
-p.searchresults {
-      margin-top : -5px;
-     text-align : right;
-    vertical-align : middle;
-       padding-bottom : 3px;
-}
-
-.selected {
-   text-decoration: none;
-}
-
-.sidebar-box {
-       margin-bottom: 0;
-}
-
-.sidebar-box h3, .sidebar-box h4 {
-        margin-left: 10px;
-}
-
-.sidebar-box p {
- margin: 3px 10px;
-      padding: 0;
-}
-
-.submit {
-       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-    font-size : .9em;
-      font-weight: bold;
-     padding: 2px;
-}
-
-.term {
-       font-weight: bold;
-}
-
-.thumbnail {
-     border: 0;
-     float: left;
-   margin: 0 5px 5px 0;
-}
-
-.title {
-       font-style: italic;
-    font-weight: bold;
-}
-
-#sidebar .content-block {
-        margin : 0 10px 0 0;
-}
-
-form#auth h3 {
- font-size : 1.1em;
-}
-
-#footer {
-        clear: both;
-   padding: 10px;
- text-align: center;
-}
-
-#corner {
-       position: absolute;
-    top: 10px;
-     right: 5px;
-}
-
-#corner a.cart {
-        background-image : url(../images/cart-small.gif);
-      background-position: left;
-     background-repeat : no-repeat;
- padding: 0 15px;
-       text-decoration: none;
-}
-
-#languages {
- display: inline;
-}
-
-#languages ul {
-    display : inline;
-      list-style: none;
-      margin: 0;
-     padding : 0;
-}
-
-#languages ul li {
-     display: inline;
-       font-family: Arial, Helvetica, sans-serif;
-     font-size: .9em;
-}
-
-#languages ul li a {
-       font-weight: normal;
-   padding: 0 3px;
-        text-decoration: none;
-}
-
-#loose_form label, #keyword_form label, #precise_form label, #cql_form label, #advanced label, #cql label, #power label, #proximity label {
-  font-weight: bold;
-     text-align: right;
-}
-
-#loose_form, #keyword_form, #precise_form, #cql_form, #advanced, #cql, #power, #proximity {
-      margin: 5px;
-   width: 96%;
-}
-
-/*#main {
-       margin-left: 20%;
-      margin-right: 0;
-       padding: 0;
-    position: relative;
-}*/
-
-#masthead {
-   margin: 0;
-     margin-bottom : 1em;
-   padding: 0;
-    text-align:center;
-
-}
-
-#members {
-      font-size: .8em;
-       font-weight: bold;
-     padding: 4px 0 4px 0;
-}
-
-#members a.card {
-     background-image: url(../images/card.gif);
-     background-position: left;
-     background-repeat: no-repeat;
-  display: block;
-        padding-left: 39px;
-}
-
-#members a.logout {
-     font-weight: bold;
-     padding: 0 .3em 0 .3em;
-        text-decoration: none;
-}
-
-#members li {
-        display: inline;
-       list-style: none;
-      margin: 0;
-}
-
-#members ul li a:link, #members ul li a:visited, #members ul li a:hover, #members ul li a:active, #members span.members {
-        padding : 4px;
-}
-
-#members ul li:last-child {
-}
-
-#members ul li a:hover {
-}
-
-#members ul {
-     margin: 0;
-     padding: 0;
-    text-align: right;
-}
-
-/*#nav {
- float: left;
-   margin: 0;
-     padding: 0;
-    width: 20%;
-}*/
-
-#nav a {
-      font-family: Arial, Geneva, Helvetica, sans-serif;
-     font-weight: bold;
-     text-decoration: none;
-}
-
-#nav h6 {
-    padding: 3px;
-  text-align: center;
-}
-
-#nav li ul li {
- font-family: Arial, Geneva, Helvetica, sans-serif;
-     list-style: none;
-      margin: 0;
-     padding: 5px 3px 5px 3px;
-      text-align: right;
-}
-
-#nav li ul li a {
-        font-family: Arial, Geneva, Helvetica, sans-serif;
-     font-weight: bold;
-     text-decoration: none;
-}
-
-#nav ul {
-    margin: 0;
-     padding: 0;
-}
-
-#nav ul li {
-    font-family: Arial, Geneva, Helvetica, sans-serif;
-     list-style: none;
-      margin: 0;
-     padding: 3px 8px 3px 3px;
-      text-align: right;
-}
-
-#nav ul li+li {
-  margin: 0;
-}
-
-#power_formButton, #proximity_formButton {
-}
-
-#results, .results {
-       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-    margin: 0;
-     padding: 7px 0 10px 0;
-}
-
-#search-footer {
-     margin: auto;
-  text-align: center;
-}
-
-#search-footer a {
-      margin: 3px 5px 3px 5px;
-       padding: 2px 5px;
-      text-decoration: none;
-}
-
-#searchform input.submit {
-   font-size: .8em;
-}
-
-#search-sidebar {
-  float: right;
-  margin: 10px;
-  padding: 3px;
-  width: 30%;
-}
-
-#search-sidebar .sidebar-box label {
-    display: block;
-        text-align: left;
-}
-
-/*#sidebar {
-      float: right;
-  margin: 20px;
-  padding: 5px;
-  width: 20%;
-}*/
-
-#sidebar .submit {
-    font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-    font-weight: bold;
-     padding: 2px;
-  font-size: 1em;
-}
-
-#sidebar h3 {
-       font-family: Arial, Geneva, Helvetica, sans-serif;
-     margin: 0;
-     padding: 5px 0 1px 0;
-}
-
-#sort {
-       margin: .3em;
-}
-
-#sort, #sort select, #sort input {
-}
-
-#starFull {
-     background: url(../images/bluestars.png) top left no-repeat;
-   height: 25px;
-  margin: 0;
-     padding: 0;
-}
-
-#starMT {
-       background: url(../images/emptystars.png) top left no-repeat;
-  height: 25px;
-  margin: 0 3px 0 30px;
-  padding: 0;
-    position: relative;
-    width: 100px;
-}
-
-#window {
-     margin-left: 2%;
-       margin-right: 2%;
-      margin-top: 2%;
-        padding: 10px;
-}
-
-#window .class {
-     display: block;
-        font-weight: bold;
-     padding: 0 0 5px 3px;
-}
-
-#window div.menu {
-    margin: 0;
-
-}
-
-div#item-details {
-      margin-bottom : 1.5em;
-}
-
-div#item-details img {
-       float : left;
-  padding : 1em;
-}
-
-div#item-details p {
- margin : .1em 0;
-       line-height : 1.6em;
-}
-
-div#holdings table {
-   width : 100%;
-}
-
-div#holdings td, div#holdings th {
-    padding : 5px;
-}
-
-div#holdings, div#descriptions, div#reviews, div#serials, div#publicshelves, div#privateshelves, div#fines, div#waiting, div#overdues, div#issues, div#reserves {
-    margin-top : 4px;
-      padding : .7em;
-        width : 90%;
-}
-
-#usermenu {
-    font-size: .9em;
-       font-weight: bold;
-     margin-top : -1.1em;
-   margin-bottom : 1em;
-   padding: 4px 0 4px 0;
-
-
-}
-
-#usermenu li {
-      display: inline;
-       list-style: none;
-      margin: 0;
-}
-
-#usermenu ul li a:link, #usermenu ul li a:visited, #usermenu ul li a:hover, #usermenu ul li a:active, #usermenu span.members {
-   padding : 4px;
-}
-
-#usermenu ul li:last-child {
-}
-
-#usermenu ul li a:hover {
-}
-
-#usermenu ul {
-  margin: 0;
-     padding: 0;
-    text-align: right;
-}
-
-table.featured-item {
-    border-collapse : separate;
-    border-spacing: 9px;
-   margin : 5px;
-  text-align : center;
-}
-
-table.featured-item td {
-       vertical-align : top;
-}
-
-table.featured-item a img {
-   margin : auto;
-}
-
-table.featured-item a.title {
-        display : block;
-       font-size : 1em;
-       margin-bottom : .4em;
-}
-
-table.featured-item .author {
- display : block;
-       font-size : .95em;
-     margin-bottom : .2em;
-}
-
-table.featured-item .publisher {
-      display : block;
-       font-size : .8em;
-}
-
-/* COLORS, BACKGROUNDS, AND BORDERS */
-
-a {
-       color: #006699;
-}
-
-a:link.current {
-    background-color: transparent;
- color: #3366CC;
-}
-
-a:link.nav {
-        background-color: #EFF1DC;
-     border: 1px solid #CCCC99;
-     color: #3366CC;
-}
-
-a:visited {
- color: #006699;
-}
-
-a:visited.current {
- background-color: transparent;
- color: #3366CC;
-}
-
-a:visited.nav {
-     background-color: #EFF1DC;
-     border: 1px solid #CCCC99;
-     color: #3366CC;
-}
-
-a:hover {
-   color: orange;
-}
-
-a:hover.current {
-    background-color: #CCFF00;
-     color: #CC3333;
-}
-
-a:hover.nav {
-       background-color: #FFFFCC;
-     border: 1px solid #CCCC99;
-     color: #CC3333;
-}
-
-a:active {
-  color: #990033;
-}
-
-a:active.current {
-  background-color: #99CC00;
-     color: #FFFF99;
-}
-
-a:active.nav {
-      background-color: #FFFFCC;
-     border: 1px solid #CCCC99;
-     color: #D25500;
-}
-
-a.reserve {
- background-color: #006699;
-     color: White;
-}
-
-body {
-        background-color: #eeeeee;
-}
-
-body#withsidebar #main {
- border: 0;
-
-}
-ul {
-background-color:#eeeeee;
-text-align: left;
-}
-
-caption {
-    color: #000066;
-}
-
-div.error h3 {
-      color: #990000;
-}
-
-div.form, div.details {
-     background-color: #ffffff;
-}
-
-div.tab {
-        background-color: transparent;
-}
-
-div.tab p {
-  border-bottom: 1px solid #FFFFFF;
-      border-top: 1px solid #D8DEB8;
-}
-
-div.tabbloc {
-        background-color: transparent;
-}
-
-div#advanced-search fieldset {
-       border-right : 1px none #999999;
-       border-top : 1px none #999999;
-       border-bottom : 1px none #999999;
-       border-left : 1px none #999999;
-}
-
-div#advanced-search legend {
- color : #003366;
-}
-
-dl.details dt {
-    color: #000066;
-}
-
-em.new {
-    color: #CC3333;
-}
-
-h1,h2,h3,h4,h5,h6 {
- color: navy;
-   background-color:navy;
- color:white;
-}
-
-h1.logo {
-      color: #D3DFAD;
-
-}
-
-h1#libraryname a {
- color: #000066;
-        margin-left: .3em;
-     text-decoration: none;
-}
-
-input.icon {
- background-color: #6699CC;
-     border: 1px outset #666666;
-    color: #FFFFCC;
-}
-
-p.availability {
-    color: #666666;
-        font-size: .9em;
-}
-
-p.error, div.error {
-       background-color: #FFFFCC;
-     border: 1px dashed #CC6600;
-}
-
-span.itemicon {
- background-color : #F8F8EB;
-    border: 1px solid #D8DEB8;
-}
-
-table {
-  background-color: #FFFFFF;
-}
-
-table.itemtypes td {
-     background-color: #F8F8EB;
-     border: 1px solid #D8DEB8;
-}
-
-td {
-     background-color: #FFFFFF;
-     border-bottom: 1px solid #DDDDDD;
-      border-right: 1px solid #DDDDDD;
-}
-
-td.input, div.form td, div.details td {
-    border-bottom: 1px solid #CCCCCC;
-      border-left: 0;
-        border-right: 0;
-       color: #000000;
-}
-
-td.credit {
- color: #000066;
-}
-
-td.debit {
-  color: #990000;
-}
-
-td.sum, th.sum {
-}
-
-td.sum {
-        background-color : #FFFFCC;
-}
-
-td.label {
-      border-bottom: 1px solid #CCCCCC;
-      border-left: 1px solid #CCCCCC;
-        color: #000088;
-}
-
-td.label, div.form th, div.details th {
-     background-color: #FFFFFF;
-     border-bottom: 1px solid #CCCCCC;
-      border-left: 1px solid #CCCCCC;
-        border-right: 0;
-       border-top: 0;
- color: #000088;
-}
-
-div.details {
-       padding: 5px;
-
-}
-
-div.details table, div.details td, div.details th {
-  border: 0;
-     border-bottom: 1px solid #DDDDDD;
-}
-
-td.overdue {
-      color: #CC0000;
-}
-
-td:last-child {
-     border-bottom: 1px solid #CCCCCC;
-      border-right: 0 solid #CCCCCC;
-}
-
-th {
- background-color: #EFF1DC;
-     border-bottom: 1px solid #CCCCCC;
-      border-right: 1px solid #CCCCCC;
-}
-
-th:last-child {
-    background-color: #EFF1DC;
-     border-bottom: 1px solid #CCCCCC;
-      border-right: 0 solid #CCCCCC;
-}
-
-th[scope="row"] {
-    background-color: #E7E7CA;
-}
-
-tr.highlight {
-   background-color: #F8F8EB;
-}
-
-tr.highlight th[scope="row"] {
-   background-color: #EEEEEE;
-}
-
-tr.overdue td {
-  background-color: #FFDDDD;
-}
-
-input.cancel {
-   background-color: #990033;
-     border: 1px outset #666666;
-    color: #FFFFCC;
-}
-
-.available {
-        color : #006600;
-}
-
-.content-block {
-   background-color: #FFFFFF;
-}
-
-.current {
-       background-color: #FFFFFF;
-     color: #3366CC;
-}
-
-.detail-sidebar {
-   background-color: #EEEEEB;
-}
-
-.further {
-       background-color: #EEEEEB;
-     border: 2px solid #DDDED3;
-     color: #CCCC99;
-}
-
-.further h4 {
-       background-color: #D8DEB8;
-}
-
-.further li {
-}
-
-.issued {
-       color: #999999;
-}
-
-.labelsubfield {
-}
-
-.loggedin {
-     color: #D8DEB8;
-}
-
-.loggedinusername {
- color: #666666;
-}
-
-.marcsubfieldletter {
-       background-color: #EFF1DC;
-}
-
-.marcsubfieldname {
-      background-color: #EFF1DC;
-}
-
-.MARCtag {
-       background-color: #EEEEEE;
-     color: #000066; /* style for tag definition (700 - Statement of responsability) */
-}
-
-.menu {
-  background-image : url(../images/menu-background.gif);
- background-repeat: repeat-x;
-   background-color: #6699CC;
-     border-top: 1px solid #335599;
- border-bottom: 1px solid #335599;
-      color: #FFFFFF;
-
-}
-
-.menu a:link {
-     color : #FFFFCC;
-}
-
-.menu a:visited {
-  color : #FFFFCC;
-}
-
-.menu a:hover {
-    color : #FFFFFF;
-}
-
-.menu a:active {
-   color : #FFFF99;
-}
-
-#members a:link {
-  color: #0099CC;
-}
-
-#members a:visited {
-        color: #0099CC;
-}
-
-#members a:hover {
-  color: #990000;
-}
-
-#members a:active {
- color: #990000;
-}
-
-.menu input.submit {
-        background-color : #6BA037;
-    color: #FFFFFF;
-}
-
-.note {
-     background-color: #EEEEEB;
-     border-bottom: 1px solid #DDDED3;
-      border-left: 1px solid #DDDED3;
-        border-right: 1px solid #DDDED3;
-       border-top: 1px solid #DDDED3;
-}
-
-.opac-detail {
-       background-color: #FFFFCC;
-}
-
-.opac-detail dd {
-        border-bottom: 1px solid #E7E7CA;
-      color: #000000;
-}
-
-.operations li a, .operations li a:visited {
-        background-color: #6699CC;
-     border: 2px solid #D8DEB8;
-     color: #FFFFCC;
-}
-
-.operations li a:hover {
-    background-color: #0099FF;
-     color: #FFFF99;
-}
-
-.operations li a:active {
-   background-color: #0099FF;
-     color: #FFFF99;
-}
-
-
-.item-reserved {
-   color : #009933;
-}
-
-.item-datedue {
-    color: #999999;
-}
-
-.item-notforloan, .item-lost, .item-cancelled, .item-damaged, .item-reserved {
-}
-
-.searchresults td, .searchresults th, .searchresults table {
-      border: 0;
-}
-
-.searchresults tr {
-      border-bottom : 1px solid #CCCCCC;
-}
-
-.searchresults table {
-   border-top : 0px solid #CCCCCC;
-}
-
-p.searchresults {
-   background-color : #EFF1DC;
-}
-
-.searchresults a.reserve {
-      background-color : transparent;
-        color : #006699;/*
-     background-color : #6699CC;
-    border: 1px outset #666666;
-    color : White;*/
-}
-
-.sidebar-box {
-     border: 1px dashed #CCCCCC;
-}
-
-.subfield {
-     background-color: #EFF1DC;
-}
-
-.subfieldvalue {
- background-color: #FFFFFF;
-}
-
-.submit {
-        background-color: #EEC95A;
-     border: 3px outset #666666;
-    color: #FFFFFF;
-}
-
-.term {
-     background-color: #FFFFCC;
-     color: #990000;
-}
-
-.unavailable {
-      color: #990033;
-}
-
-#footer {
-   border-top: 1px solid #EEEEEE;
-}
-
-#languages ul li a {
- border: 1px solid #D8DEB8;
-}
-
-#languages ul li a:hover {
-       background-color: #FFFFCC;
-}
-
-#main {
-  background-color: transparent;/*
-       border-top: 1px solid #EEEEEE;*/
-}
-
-#masthead {
-        background-color: #FFFFFF;/*
-   border-bottom: 1px solid #EEEEEE;*/
-}
-
-#members {
-      background-image : url(../images/member-menu-background.gif);
-  background-repeat: repeat-x;
-   border-top: 1px solid #9999CC;
- border-bottom : 1px solid #9999CC;
-     background-color: #AFBCCF;
-     color: #000066;
-}
-
-#members ul li a:link, #members ul li a:visited, #members span.members {
-    background-image : url(../images/member-menu-background-link.gif);
-     background-repeat: repeat-x;
-   border-left: 1px solid #9999CC;
-        color: #006699;
-}
-
-#members ul li:last-child a {
-       border-right : 1px solid #9999CC;
-}
-
-#members ul li a:hover, #members ul li a:active {
- background-image : url(../images/member-menu-background-hover.gif);
-    background-repeat: repeat-x;
-}
-
-#members a {
-   text-decoration: none;
-}
-
-#members a.logout:link, #members a.logout:visited, #members a.logout:hover, #members a.logout:active {
-       background-image : url(../images/member-menu-background-logout.gif);
-   background-repeat: repeat-x;
-   color: #000000;
-}
-
-#members a:hover.logout {
-   background-image : url(../images/member-menu-background-logout-hover.gif);
-     background-repeat: repeat-x;
-   color: #000000;
-}
-
-#nav {
-      /*background-color: #EFF1DC;*/
- border : 1px solid #EFF1DC;
-
-}
-
-#nav h6 {
-      background-color: #E7E7CA;
-     line-height : 1.8em;
-   margin-left: -1px;
-     margin-top : -1px;
-     margin-right : -1px;
-}
-
-#nav li ul li {/*
-      background-color: #E7E7CA;*/
-   border-bottom: 0 solid #D8DEB8;
-        border-left: 0 solid #FFFFCC;
-  border-right: 0 solid #006699;
- border-top: 0 solid #FFFFCC;
-}
-
-#nav li ul li a {
-      color: #0000FF;
-}
-
-#nav li ul li a:link {
-      color: #335599;
-}
-
-#nav li ul li a:visited {
-   color: #335599;
-}
-
-#nav li ul li a:hover {
-     color: #CC3333;
-}
-
-#nav ul li {
-        /* background-color: #EFF1DC; */
-       border-bottom: 0px solid #CCCC99;
-      border-left: 0 solid #FFFFCC;
-  border-right: 0 solid #006699;
- border-top: 0 solid #FFFFCC;
-}
-
-#nav ul li+li {
-        border-bottom: 0px solid #CCCC99;
-      border-left: 0 solid #FFFFCC;
-  border-right: 0 solid #006699;
-}
-
-#results, .results {
- color: #000066;
-}
-
-#search-sidebar {
-   background-color: #F8F8EB;
-}
-
-#sidebar {
-       /*background-color: #F8F8EB;
-   border: 1px dashed #666666;*/
-}
-
-#sidebar .content-block {
-     background-color : #EEEEEE;
-}
-
-#sidebar fieldset {
-     background-color: #F9F9FF;
-}
-
-#sidebar legend {
-        color : #003366;
-}
-
-#sidebar .submit {
-/*     background-color: #EEC95A; */
-       color: #FFFFFF;
-}
-
-#sidebar h3 {
-       color: #000066;
-}
-
-#window {
-   background-color: #E7E7CA;
-     border-left: 1px solid #CCCC99;
-}
-ul.link-tabs {
-}
-
-ul.link-tabs li {
-}
-
-ul.link-tabs li a {
-   border-top: 1px solid #DDDDDD;
- border-left : 1px solid #DDDDDD;
-       border-right : 1px solid #666666;
-}
-
-ul.link-tabs li.on a {
-    background-color: #FFFFFF;
-     border-bottom: 1px solid #FFFFFF;
-}
-
-ul.link-tabs li.off a {
-   background-color: #EEEEEB;
-     border-bottom: 1px solid #DDDDDD;
-}
-
-ul.link-tabs li.off a:hover {
-     background-color: #FFFFEC;
-     border-top: 1px solid #BEBF84;
- border-left : 1px solid #BEBF84;
-       border-right : 2px solid #333333;
-}
-
-ul.link-tabs li a.debit {
- background-color : #FFFF99;
-    color : #990033;
-}
-
-div#holdings, div#descriptions, div#reviews, div#serials, div#publicshelves, div#privateshelves, div#fines, div#waiting, div#overdues, div#issues, div#reserves {
-  border : 1px solid #DDDDDD;
-}
-
-div#holdings table {
-    border-top : 1px solid #DDDDDD;
-        border-right : 1px solid #DDDDDD;
-}
-
-div#holdings td, div#holdings th {
-        border-left : 1px solid #DDDDDD;
-       border-bottom : 1px solid #DDDDDD;
-}
-
-#usermenu {
-      background-image : url(../images/usermenu-background.gif);
-     background-repeat: repeat-x;
-   background-color: #EEEEEB;
-     border-top: 1px solid #EEEEEE;
- border-bottom: 1px solid #335599;
-      color: #000000;
-}
-
-#usermenu ul li a:link, #usermenu ul li a:visited {
- background-image : url(../images/usermenu-background.gif);
-     background-repeat: repeat-x;
-   border-left: 1px solid #9999CC;
-        color: #006699;
-}
-
-#usermenu ul li:last-child a {
-      border-right : 1px solid #9999CC;
-}
-
-#usermenu ul li a:hover, #usermenu ul li a:active {
-       background-image : url(../images/usermenu-background-hover.gif);
-       background-repeat: repeat-x;
-}
-
-#usermenu a {
-  text-decoration: none;
-}
-
-table.featured-item {
-        border : 0;
-}
-
-table.featured-item td {
-        border : 1px solid #CCCCCC;
-}
-
-table.featured-item a img {
-}
-
-table.featured-item a.title {
-}
-
-table.featured-item .author {
-}
-
-table.featured-item .publisher {
-}
-h1{
-background-color: #eeeeee;
-color: navy;
-background-image: url(./acceuil.jpg);
-background-repeat:no-repeat;
-}
-h1.authority
-{
-background-image:none;
-
-}
\ No newline at end of file
index 407ab83..8df82cf 100644 (file)
@@ -83,7 +83,8 @@
     var MSG_TAGS_ADDED = _("Tags added: ");
     var MSG_TAGS_DELETED = _("Tags added: ");
     var MSG_TAGS_ERRORS = _("Errors: ");
-    var MSG_MULTI_ADD_TAG_FAILED = _("Unable to add one or more tags.");[% END %][% END %]
+    var MSG_MULTI_ADD_TAG_FAILED = _("Unable to add one or more tags.");
+    var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");[% END %][% END %]
     [% IF ( OPACAmazonCoverImages ) %]$(window).load(function() {
         verify_images();
     });[% END %]
index 0ee0622..115880f 100644 (file)
@@ -80,7 +80,7 @@ function openBasket() {
     if ( strCookie ) {
         var iW = 820;
         var iH = 450;
-        var optWin = "dependant=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=no,location=yes,height="+iH+",width="+iW;
+        var optWin = "status=yes,scrollbars=yes,resizable=yes,toolbar=no,location=yes,height="+iH+",width="+iW;
         var loc = CGIBIN + "opac-basket.pl?" + strCookie;
         var basket = open(loc, "basket", optWin);
         if (window.focus) {basket.focus()}
@@ -354,7 +354,7 @@ function sendBasket() {
 
     var loc = CGIBIN + "opac-sendbasket.pl?" + strCookie;
 
-    var optWin="dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100";
+    var optWin="scrollbars=no,resizable=no,height=300,width=450,top=50,left=100";
     var win_form = open(loc,"win_form",optWin);
 }
 
@@ -365,7 +365,7 @@ function downloadBasket() {
 
     var loc = CGIBIN + "opac-downloadcart.pl?" + strCookie;
 
-    open(loc,"win_form",'dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
+    open(loc,"win_form",'scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
 }
 
 function printBasket() {
index f663696..cffd4bf 100644 (file)
@@ -26,12 +26,11 @@ if (typeof(readCookie) == "undefined") {
    }
 }
 KOHA.Tags = {
-      add_tag_button: function(){
-            var mybibnum = $(this).attr("title");
-          var mynewtag = "newtag" + mybibnum;
+      add_tag_button: function(bibnum, tag){
+          var mynewtag = "newtag" + bibnum;
             var mytagid = "#" + mynewtag;
           var mydata = {CGISESSID: readCookie('CGISESSID')};   // Someday this should be OPACSESSID
-                mydata[mynewtag] = $(mytagid).val();   // need [bracket] for variable property id
+                mydata[mynewtag] = tag;        // need [bracket] for variable property id
                 var response;  // AJAX from server will assign value to response.
                $.post(
                         "/cgi-bin/koha/opac-tags.pl",
@@ -61,11 +60,14 @@ KOHA.Tags = {
       },
      set_tag_status : function(tagid, newstatus) {
           $(tagid).html(newstatus);
-              $(tagid).css({display:"inline"});
+              $(tagid).show();
       },
      append_tag_status : function(tagid, newstatus) {
                $(tagid).append(newstatus);
-            $(tagid).css({display:"inline"});
+            $(tagid).show();
+      },
+     clear_all_tag_status : function() {
+          $(".tagstatus").empty().hide();
       },
 
     tag_message: {
@@ -73,8 +75,8 @@ KOHA.Tags = {
     scrubbed_all_bad : function(arg) {return (MSG_TAG_ALL_BAD);},
   badparam : function(arg) {return (MSG_ILLEGAL_PARAMETER+" "+arg);},
     scrubbed : function(arg) {return (MSG_TAG_SCRUBBED+" "+arg);},
-    failed_add_tag : function(arg) {return (MSG_ADD_TAG_FAILED+ " "+arg+" "+MSG_ADD_TAG_FAILED_NOTE);},
-    failed_delete  : function(arg) {return (MSG_DELETE_TAG_FAILED+ " "+arg+" "+MSG_DELETE_TAG_FAILED_NOTE);},
+    failed_add_tag : function(arg) {return (MSG_ADD_TAG_FAILED+ " '"+arg+"'. \n"+MSG_ADD_TAG_FAILED_NOTE);},
+    failed_delete  : function(arg) {return (MSG_DELETE_TAG_FAILED+ " '"+arg+"'. \n"+MSG_DELETE_TAG_FAILED_NOTE);},
    login : function(arg) {return (MSG_LOGIN_REQUIRED);}
    },
 
@@ -92,7 +94,7 @@ KOHA.Tags = {
                   mydata,
                         function(data){
                                 eval(data);
-                $(".tagstatus").empty();
+                KOHA.Tags.clear_all_tag_status();
                 var bibErrors = false;
 
                 // Display the status for each tagged bib
index 7ab95e0..3149784 100644 (file)
@@ -1,3 +1,6 @@
+@import url("/opac-tmpl/lib/yui/reset-fonts-grids.css");
+@import url("/opac-tmpl/lib/yui/skin.css");
+
 a {
        font-weight : bold;
 }
@@ -649,12 +652,11 @@ a.send {
 
 #toolbar input.editshelf,
 input.editshelf {
-    background-image : url("../../images/sprite.png");
-    background-position : 2px -732px;
-    background-repeat: no-repeat;
+    background : transparent url("../../images/sprite.png") 2px -732px no-repeat;
        border : 0;
        color : #006699;
        cursor : pointer;
+    filter: none;
        font-size : 100%;
        padding-left : 29px;
        text-decoration : none;
@@ -664,11 +666,12 @@ input.editshelf {
 #toolbar a.newshelf,
 a.newshelf {
     background-image: url("../../images/sprite.png"); /* add to list icon */
-    background-position: -4px -864px;
+    background-position: -4px -764px;
     background-repeat: no-repeat;
        border : 0;
        color : #006699;
        cursor : pointer;
+    filter: none;
        font-size : 100%;
        margin: 0 0.5em;
     padding-left : 23px;
@@ -683,12 +686,11 @@ a.newshelf.disabled {
 
 #toolbar input.deleteshelf,
 input.deleteshelf {
-    background-image : url("../../images/sprite.png");
-    background-position : 2px -685px;
-    background-repeat: no-repeat;
+    background : transparent url("../../images/sprite.png") 2px -685px no-repeat;
        border : 0;
        color : #006699;
        cursor : pointer;
+    filter: none;
        font-size : 100%;
     padding-left : 25px;
        text-decoration : none;
@@ -729,7 +731,7 @@ input.deleteshelf:active {
 
 #tagslist li { display : inline; }
 
-a.tag_results_add {
+a.tag_add {
     background-image: url(../../images/tag-small.png);
     background-position : -1px center;
     background-repeat : no-repeat;
@@ -748,7 +750,6 @@ a.tag_results_add {
 
 .tag_results_input {
     background-color: #EEE;
-    display: none;
     margin-left: 1em;
     padding: 0.3em;
 }
@@ -1450,9 +1451,19 @@ padding-left : .4em;
     padding-left:20px
 }
 
-.searchresults .tagstatus {
-       display: block;
-       color: #707070;
+.tagstatus {
+    color: #707070;
+    padding: 0 4px 0 4px;
+    margin-left: 5px;
+    border: 1px solid #bcbcbc;
+    background-color: #ffffcc;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.results_summary.tagstatus {
+    display: inline;
 }
 
 .results_summary .label {
@@ -1463,7 +1474,11 @@ padding-left : .4em;
        font-weight: normal;
 }
 
-.actions a {
+.actions a.hold,
+.actions a.addtocart,
+.actions a.addtoshelf,
+.actions a.addtolist,
+.actions a.tag_add {
        margin-left : 1em;
        text-decoration : none;
 }
@@ -1525,7 +1540,7 @@ div.message {
        background: -webkit-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Chrome10+,Safari5.1+ */
        background: -o-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* Opera11.10+ */
        background: -ms-linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* IE10+ */
-       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#cddbf2',GradientType=0 ); /* IE6-9 */
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eaeef5', endColorstr='#cddbf2',GradientType=0 ); /* IE6-9 */
        background: linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* W3C */
        border : 1px solid #bcbcbc;
        width : 55%;
@@ -1571,7 +1586,6 @@ div.message {
        background: -webkit-linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* Chrome10+,Safari5.1+ */
        background: -o-linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* Opera11.10+ */
        background: -ms-linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* IE10+ */
-       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eef4fe', endColorstr='#cbdefe',GradientType=1 ); /* IE6-9 */
        background: linear-gradient(left, #eef4fe 0%,#eef4fe 88%,#f6f9fe 98%,#ffffff 99%,#a5c2f6 99%,#e6eefe 100%,#cbdefe 100%); /* W3C */
        border : 1px solid #739acf;
        padding : .3em 1em 0 0;
@@ -1726,7 +1740,6 @@ div#menu li a {
        background: -o-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Opera 11.10+ */
        background: -ms-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* IE10+ */
        background: linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* W3C */
-       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#c1c1c1',GradientType=1 ); /* IE6-9 */
        text-decoration : none;
        display : block;
        border : 1px solid #979797;
@@ -1744,7 +1757,6 @@ div#menu li a:hover {
        background: -o-linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* Opera 11.10+ */
        background: -ms-linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* IE10+ */
        background: linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* W3C */
-       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eaeef5', endColorstr='#a2bee8',GradientType=1 ); /* IE6-9 */
 }
 
 div#menu li.active a:hover {
@@ -2820,3 +2832,21 @@ body#opac-main #opacmainuserblockmobile {
 .tagweight9 {
     font-size: 30px;
 }
+
+#patronregistration {
+    background-color: #F7F7F7;
+    border : 1px solid #EAEAEA;
+    -moz-border-radius: 3px;
+    border-radius : 3px;
+    font-size : 90%;
+    margin : .7em 0;
+    padding : .5em;
+    text-align: center;
+}
+#patronregistration a {
+    display: block;
+}
+
+video {
+    width: 480px;
+}
diff --git a/koha-tmpl/opac-tmpl/prog/en/css/sanop.css b/koha-tmpl/opac-tmpl/prog/en/css/sanop.css
deleted file mode 100644 (file)
index 610b00e..0000000
+++ /dev/null
@@ -1,2013 +0,0 @@
-
-body #main {
-       margin-left : 2%;
-       background-color: #eeeeee;
-
-}
-
-/* TWO COLUMNS, RIGHT SIDEBAR */
-
-
-body#withsidebar #main {
-       float: left;
-       margin-left: 1%;
-       width: 58%;
-       }
-
-html body#withsidebar #main    {
-       margin-left: .5%;
-       }
-       
-body#withsidebar #sidebar
-       {
-       float: left;
-       margin-top : 2.4em;
-       width: 39%;
-}
-
-/* THREE COLUMNS */
-
-body#tricolumn #main_wrapper {
-               float: left;
-       width: 100%;
-}
-
-body#tricolumn #main
-       {
-               margin: 0 150px 0 175px;
-       }
-
-body#tricolumn #nav
-       {
-       float: left;
-       margin-left: -100%;
-       width: 175px;
-       }
-body#tricolumn #sidebar
-       {
-       float: left;
-       margin-left: -150px;
-       width: 150px;
-       }
-       
-/* TWO COLUMNS LEFT NAVIGATION */
-       
-body#withnav #main_wrapper
-       {
-       float: left;
-       width: 100%;
-       }
-       
-body#withnav #main
-       {
-       margin: 0 0 0 175px;
-       }
-
-body#withnav #nav
-       {
-       float: left;
-       margin-left: -100%;
-       width: 175px;
-       }
-
-body#withnav #main .content-block {
-       padding-left : 10px;
-}
-
-/* END TWO COLUMNS RIGHT NAVIGATION */
-       
-a {
-       font-weight: bold;
-}
-
-a:link, a:visited, a:active {
-        text-decoration : underline;
-        color :navy;
-}
-        
-a:link.current {
-       font-weight: bold;
-       padding: 1px 5px 1px 5px;
-       text-decoration: none;
-}
-
-a:link.nav {
-       font-weight: bold;
-       padding: 1px 5px 1px 5px;
-       text-decoration: none;
-  
-}
-
-a:visited.current {
-       font-weight: bold;
-       padding: 1px 5px 1px 5px;
-       text-decoration: none;
-}
-
-a:visited.nav {
-       font-weight: bold;
-       padding: 1px 5px 1px 5px;
-       text-decoration: none;
-}
-
-a:hover.current {
-       font-weight: bold;
-       padding: 1px 5px 1px 5px;
-       text-decoration: none;
-}
-
-a:hover.nav {
-       font-weight: bold;
-       padding: 1px 5px 1px 5px;
-       text-decoration: none;
-       
-}
-
-a:active.current {
-       font-weight: bold;
-       padding: 1px 5px 1px 5px;
-       text-decoration: none;
-}
-
-a:active.nav {
-       font-weight: bold;
-       padding: 1px 5px 1px 5px;
-       text-decoration: none;
-}
-
-a.help {
-       padding: 3px;
-       text-decoration: none;
-}
-
-a.title {
-       font-size: 1.2em;
-       font-style: normal;
-       font-weight: bold;
-}
-
-body {
-       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-       font-size: 73%;
-       margin: 0;
-       padding: 0;
-       background-color : #eeeeee;
-}
-
-input, select, th, td {
-       font-size:1em
-}
-
-caption {
-       font-family: Arial, Geneva, Helvetica, sans-serif;
-       font-size : 1.3em;
-       font-weight: bold;
-       margin: 0;
-       padding: 5px 0 3px 0;
-       text-align: left;
-}
-
-div.bookcover {
-       float: right;
-}
-
-div.details td.details {
-       text-align: left;
-}
-
-div.details ul {
-       list-style-type: circle;
-       margin-left: 0;
-       text-align: left;
-}
-
-div.error {
-       padding: 3px 10px 3px 10px;
-       width: 75%;
-}
-
-div.error li {
-       margin-bottom: .5em;
-}
-
-div.form, div.details {
-       margin: 0 auto;
-       padding: 0 0 0 6px;
-}
-
-div.notes {
-       text-align: left;
-}
-
-div.sidebar-box+div.sidebar-box {
-       margin-top: 5px;
-}
-
-div.tab {
-       display: block;
-       margin-right: 0px;
-       width: 100%;
-}
-
-div.tab p {
-       margin: 0;
-       padding: 3px 0;
-}
-
-div.tab p.MARCtag {
-       clear: both;
-       font-weight: bold; /* style for tag definition (700 - Statement of responsability) */
-       margin: 0;
-       padding: 2px;
-}
-
-div.tab table {
-}
-
-div.tabbloc {
-       font-family: Arial, Helvetica, sans-serif;
-}
-
-div.table {
-       width: 95%;
-}
-
-dl.details dt {
-       font-weight: bold;
-       margin: .5em 0;
-}
-
-dl.details dd {
-       margin-left: 1em;
-}
-
-dl.details ul {
-       padding: 0;
-       margin-left: 1em;
-}
-
-dl.details ul p {
-       margin-left : 0;
-}
-
-em.new {
-       font-style: normal;
-       font-weight: bold;
-}
-
-form {
-       display: inline;
-       margin: 0;
-       padding: 0;
-}
-
-h1 {
-       font-size: 1.8em;
-       padding: 5px 0 3px 0;
-}
-
-h1,h2,h3,h4,h5,h6 {
-       font-family: arial, geneva, helvetica, sans-serif;
-       margin: 0;
-}
-
-h1.logo {
-       display: inline;
-       margin: 10px 0 0 10px;
-       
-}
-
-h1.title {
-       font-style: italic;
-       padding: 5px 0 3px 0;
-       color: navy;
-}
-
-h2 {
-       font-size: 1.6em;
-       padding: 5px 0 3px 0;
-       
-}
-
-h2#libraryname {
-       padding-left : 5px;
-}
-
-h3 {
-       font-size: 1.4em;
-       padding: 5px 0 3px 0;
-}
-
-h3.author {
-       padding: 0 0 3px 15px;
-}
-
-h3+p {
-       margin: .4em 0 .4em 0;
-}
-
-h4 {
-       font-size: 1.3em;
-       padding: 5px 0 3px 0;
-}
-
-h5 {
-       font-size: 1.2em;
-       margin: 0;
-       padding: 10px 0 2px 0;
-}
-
-h5+p {
-       margin-top: 0;
-       padding-top: 0;
-}
-
-h6 {
-       font-size: 1.1em;
-}
-
-input.add, a.add {
-       background-image: url(../images/add.gif);
-}
-
-input.addchecked, a.addchecked {
-       background-image: url(../images/addtobasket.gif);
-}
-
-input.back, a.back {
-       background-image: url(../images/back.gif);
-}
-
-input.brief, a.brief {
-       background-image: url(../images/brief.gif);
-}
-
-input.cancel {
-       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-       font-size : .9em;
-       font-weight: bold;
-       padding: 2px;
-}
-
-input.cart, a.cart {
-       background-image: url(../images/cart.gif);
-}
-
-input.clearall, a.clearall {
-       background-image: url(../images/clearbasket.gif);
-}
-
-input.close, a.close {
-       background-image: url(../images/close.gif);
-}
-
-input.delete, a.delete {
-       background-image: url(../images/delete.gif);
-}
-
-input.detail, a.detail {
-       background-image: url(../images/detail.gif);
-}
-
-input.edit, a.edit {
-       background-image: url(../images/edit.gif);
-}
-
-input.icon {
-       background-position: left;
-       background-repeat: no-repeat;
-       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-       font-size : .9em;
-       font-weight: bold;
-       padding: 2px 2px 2px 22px;
-}
-
-input.isbd, a.isbd {
-       background-image: url(../images/isbd.gif);
-}
-
-input.print, a.print {
-       background-image: url(../images/print2.gif);
-}
-
-input.remove, a.remove {
-       background-image: url(../images/remove.gif);
-}
-
-input.reserve, a.reserve {
-       background-image: url(../images/placereserve.gif);
-}
-
-input.send, a.send {
-       background-image: url(../images/send.gif);
-}
-
-input.shelf, a.shelf {
-       background-image: url(../images/addtoshelf.gif);
-}
-
-input.trash, a.trash {
-       background-image: url(../images/trash.gif);
-}
-
-p {
-       padding: 0 10px 0 10px;
-}
-
-p.error, div.error {
-       font-weight: normal;
-       margin: auto;
-       padding: 5px 20px 5px 20px;
-}
-
-p.error+p.error, div.error+div.error {
-       margin-top: 5px;
-}
-
-p+h3 {
-       margin-top: .6em;
-}
-
-p+h5 {
-       margin: 0;
-       padding: 3px 0 2px 0;
-}
-
-span.itemicon {
-       float : left;
-       font-size: .9em;
-       margin: 2px;
-       white-space: nowrap;
-}
-
-span.print {
-       font-size: .7em;
-       font-weight: normal;
-       padding-left: .7em;
-}
-
-table {
-       border-collapse: collapse;
-       margin: 5px 0 5px 0;
-       padding: 0;
-}
-
-*html td, *html th {
-       font-size : .8em;
-}
-
-td {
-       padding: 3px;
-}
-
-td.input, div.form td, div.details td {
-       border-left: 0;
-       border-right: 0;
-       padding: 2px 2px 2px 4px;
-       text-align: right;
-}
-
-td.credit {
-       text-align: right;
-}
-
-td.debit {
-       text-align: right;
-}
-
-td.sum, th.sum {
-       text-align: right;
-}
-
-td.sum {
-       font-weight: bold;
-}
-
-td.label {
-       font-weight: bold;
-       line-height: 1.5em;
-       padding: 4px;
-}
-
-td.label, div.form th, div.details th {
-       border-right: 0;
-       border-top: 0;
-       font-weight: bold;
-       padding: 2px 2px 2px 4px;
-       text-align: left;
-       vertical-align: top;
-}
-
-td.search-options select {
-}
-
-td:last-child {
-       padding: 3px;
-}
-
-th {
-       font-weight: bold;
-       padding: 2px;
-}
-
-th a {
-       font-weight: bold;
-       text-decoration: none;
-}
-
-th:last-child {
-       font-weight: bold;
-       padding: 2px;
-}
-
-th[scope="row"] {
-       font-weight: normal;
-       text-align: right;
-}
-
-ul#facets {
-       margin: 3px;
-}
-
-#nav ul#facets {
-       margin : 0;
-       padding : 0;
-}
-
-#nav ul#facets li {
-       font-weight: bold;
-       text-align: left;
-}
-
-#nav ul#facets li#branch_facet, #nav ul#facets li#subject_facet, #nav ul#facets li#series_facet, #nav ul#facets li#author_facet {
-}
-
-#nav ul#facets ul li {
-       border: 0;
-       font-size: .95em;
-       font-weight: normal;
-       padding: 2px;
-       text-align: left;
-}
-
-#nav ul#facets ul li a {
-       font-weight: normal;
-       text-decoration: underline;
-}
-
-#nav ul#facets ul li.showmore {
-       text-align: center;
-}
-
-#nav ul#facets ul li.showmore a {
-       font-weight: bold;
-       text-decoration: none;
-}
-
-/* Tabs */
-ul.link-tabs {
-       list-style-type: none;
-       margin: 9px 0 -2px 5px;
-       padding: 0;
-}
-
-ul.link-tabs li {
-       display: inline;
-       padding: 0px;
-}
-
-ul.link-tabs li a {
-       font-weight: bold;
-       padding: 2px 4px 2px 4px;
-       text-decoration: none;
-}
-
-ul.link-tabs li#power_formButton a, ul.link-tabs li#proximity_formButton a {
-       padding: 2px 4px 3px 4px;
-}
-
-ul.link-tabs li.off a {
-}
-
-ul.link-tabs li.off a:hover {
-       padding: 2px 3px 2px 4px;
-}
-
-ul.link-tabs li.on a {
-}
-
-.clear {
-       clear: both;
-       line-height: .1em;
-}
-
-.content-block {
-       padding: 5px;
-}
-
-#home {
-       text-align : center;
-}
-
-#home #searchform input.submit {
-       font-size : 1.3em;
-}
-
-div#advanced-search p {
-       margin: .4em;
-
-}
-
-div#advanced-search fieldset {
-       /*margin-left : -1em;*/
-       margin-bottom: .3em; 
-       background-color : #eeeeee;
-       
-}
-
-div#advanced-search fieldset p {
-       margin-left : 1em;
-       white-space: nowrap; 
-       
-       
-}
-
-table.itemtypes {
-       border-collapse: separate;
-       border-spacing: 3px;
-       display: block;
-       padding: 0;
-       margin: 0;
-}
-
-div#advanced-search legend, div#sidebar legend {
-       font-weight: bold;
-}
-
-div#advanced-search label {
-
-}
-
-.count {
-       font-weight: normal;
-}
-
-.current {
-       font-weight: bold;
-       padding: 1px 5px 1px 5px;
-       text-decoration: none;
-}
-
-.detail-sidebar {
-       float: right;
-       padding: 5px;
-       margin-left : 15px;
-       margin-right : 5px;
-       text-align: center;
-       width : 25%;
-}
-
-.detail-sidebar .further {
-       float: none;
-       text-align: left;
-       width : 90%;
-}
-
-.further {
-       margin: 5px;
-       text-align: left;
-       width : 90%;
-}
-
-.ex {
-       font-family: "Courier New", Courier, monospace;
-}
-
-.further h4 {
-       padding: 2px;
-}
-
-.further li {
-       padding: 2px 0;
-}
-
-.further ul, .further li {
-       list-style: none;
-       margin: .5em 0 .7em .4em;
-       padding: 0;
-}
-
-.inline {
-       display: inline;
-}
-
-.item-datedue {
-       font-style: italic;
-}
-
-.item-details {
-       display: block;
-       margin: 0 0 0 25px;
-}
-
-.item-reserved, .item-notforloan, .item-lost, .item-cancelled, .item-damaged, .item-reserved {
-       display: block;
-}
-
-.labelsubfield {
-       clear: both; /* style for each subfield (like : a Publication year), just before the biblio subfield */
-       float: left;
-       font-weight: bold;
-       margin-left: 30px;
-       width: 12em;
-}
-
-.left {
-       float: left;
-}
-
-.loggedin {
-       font-weight: bold;
-}
-
-.login-note {
-       width: 35%;
-}
-
-.menu {
-       line-height: 3em;
-       font-size: 1.2em;
-       margin: 0;
-       padding: 5px;
-}
-
-.menu a.logout {
-       font-weight: bold;
-       padding: 3px 15px 3px 15px;
-       text-decoration: none;
-}
-
-.menu a:link, #members a:link {
-       padding: 2px;
-}
-
-.menu a:visited, #members a:visited {
-       padding: 2px;
-}
-
-.menu a:hover, #members a:hover {
-       padding: 2px;
-}
-
-.menu a:active, #members a:active {
-       padding: 2px;
-}
-
-.menu input {
-}
-
-.menu label {
-       font-weight: bold;
-}
-
-.menu p {
-       margin: 0;
-       padding: 0;
-}
-
-.menu p+p {
-       margin-top: 5px;
-}
-
-.note {
-       margin: 10px auto;
-       padding: 4px 4px 4px 4px;
-       width: 35%;
-}
-
-.opac-detail {
-       padding: 4px;
-}
-
-.opac-detail dd {
-       display: block;
-       line-height: 1.5em;
-       padding: 4px;
-       text-align: right;
-}
-
-.operations {
-       margin-top: 7px;
-       padding: 0 10px;
-       text-align: center;
-       width: 100%;
-}
-
-.operations img {
-       padding: 5px;
-}
-
-.operations li {
-       list-style-type: none;
-       margin: 0;
-       padding-bottom: 2px;
-}
-
-.operations li a, .operations li a:visited {
-       background-position: top left;
-       background-repeat: no-repeat;
-       border-style: outset;
-       display: block;
-       padding: 3px 3px 3px 26px;
-       text-decoration: none;
-}
-
-.searchresults a.reserve, .searchresults a.reserve:visited {
-       background-position: top left;
-       background-repeat: no-repeat;/*
-       border-style: outset;*/
-       float: right;
-       padding: 2px 3px 2px 26px;
-       /*text-decoration: none;*/
-}
-
-.operations li a:active {
-       border-style: inset;
-}
-
-.operations ul {
-       margin: 0;
-       padding: 0;
-       width: 90%;
-}
-
-.overdue {
-       font-weight: bold;
-}
-
-.pages {
-       line-height : 1.8em;
-       text-align: center;
-}
-
-.rejected {
-       text-decoration: line-through;
-}
-
-.right {
-       float: right;
-}
-
-.search-main {
-       float: left;
-       width: 65%;
-}
-
-.searchresults input, .searchresults label, .searchresults select {
-       font-size: .8em;
-}
-
-.searchresults p {
-       margin: 0;
-       padding: 0;
-       padding-top : .6em;
-}
-
-.searchresults p img {
-       vertical-align: middle;
-}
-
-.searchresults table td {
-       vertical-align: top;
-}
-
-p.searchresults {
-       margin-top : -5px;
-       text-align : right;
-       vertical-align : middle;
-       padding-bottom : 3px;
-}
-
-.selected {
-       text-decoration: none;
-}
-
-.sidebar-box {
-       margin-bottom: 0;
-}
-
-.sidebar-box h3, .sidebar-box h4 {
-       margin-left: 10px;
-}
-
-.sidebar-box p {
-       margin: 3px 10px;
-       padding: 0;
-}
-
-.submit {
-       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-       font-size : .9em;
-       font-weight: bold;
-       padding: 2px;
-}
-
-.term {
-       font-weight: bold;
-}
-
-.thumbnail {
-       border: 0;
-       float: left;
-       margin: 0 5px 5px 0;
-}
-
-.title {
-       font-style: italic;
-       font-weight: bold;
-}
-
-#sidebar .content-block {
-       margin : 0 10px 0 0;
-}
-
-form#auth h3 {
-       font-size : 1.1em;
-}
-
-#footer {
-       clear: both;
-       padding: 10px;
-       text-align: center;
-}
-
-#corner {
-       position: absolute;
-       top: 10px;
-       right: 5px;
-}
-
-#corner a.cart {
-       background-image : url(../images/cart-small.gif);
-       background-position: left;
-       background-repeat : no-repeat;
-       padding: 0 15px;
-       text-decoration: none;
-}
-
-#languages {
-       display: inline;
-}
-
-#languages ul {
-       display : inline;
-       list-style: none;
-       margin: 0;
-       padding : 0;
-}
-
-#languages ul li {
-       display: inline;
-       font-family: Arial, Helvetica, sans-serif;
-       font-size: .9em;
-}
-
-#languages ul li a {
-       font-weight: normal;
-       padding: 0 3px;
-       text-decoration: none;
-}
-
-#loose_form label, #keyword_form label, #precise_form label, #cql_form label, #advanced label, #cql label, #power label, #proximity label {
-       font-weight: bold;
-       text-align: right;
-}
-
-#loose_form, #keyword_form, #precise_form, #cql_form, #advanced, #cql, #power, #proximity {
-       margin: 5px;
-       width: 96%;
-}
-
-/*#main {
-       margin-left: 20%;
-       margin-right: 0;
-       padding: 0;
-       position: relative;
-}*/
-
-#masthead {
-       margin: 0;
-       margin-bottom : 1em;
-       padding: 0;
-       text-align:center;
-       
-}
-
-#members {
-       font-size: .8em;
-       font-weight: bold;
-       padding: 4px 0 4px 0;
-}
-
-#members a.card {
-       background-image: url(../images/card.gif);
-       background-position: left;
-       background-repeat: no-repeat;
-       display: block;
-       padding-left: 39px;
-}
-
-#members a.logout {
-       font-weight: bold;
-       padding: 0 .3em 0 .3em;
-       text-decoration: none;
-}
-
-#members li {
-       display: inline;
-       list-style: none;
-       margin: 0;
-}
-
-#members ul li a:link, #members ul li a:visited, #members ul li a:hover, #members ul li a:active, #members span.members {
-       padding : 4px;
-}
-
-#members ul li:last-child {
-}
-
-#members ul li a:hover {
-}
-
-#members ul {
-       margin: 0;
-       padding: 0;
-       text-align: right;
-}
-
-/*#nav {
-       float: left;
-       margin: 0;
-       padding: 0;
-       width: 20%;
-}*/
-
-#nav a {
-       font-family: Arial, Geneva, Helvetica, sans-serif;
-       font-weight: bold;
-       text-decoration: none;
-}
-
-#nav h6 {
-       padding: 3px;
-       text-align: center;
-}
-
-#nav li ul li {
-       font-family: Arial, Geneva, Helvetica, sans-serif;
-       list-style: none;
-       margin: 0;
-       padding: 5px 3px 5px 3px;
-       text-align: right;
-}
-
-#nav li ul li a {
-       font-family: Arial, Geneva, Helvetica, sans-serif;
-       font-weight: bold;
-       text-decoration: none;
-}
-
-#nav ul {
-       margin: 0;
-       padding: 0;
-}
-
-#nav ul li {
-       font-family: Arial, Geneva, Helvetica, sans-serif;
-       list-style: none;
-       margin: 0;
-       padding: 3px 8px 3px 3px;
-       text-align: right;
-}
-
-#nav ul li+li {
-       margin: 0;
-}
-
-#power_formButton, #proximity_formButton {
-}
-
-#results, .results {
-       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-       margin: 0;
-       padding: 7px 0 10px 0;
-}
-
-#search-footer {
-       margin: auto;
-       text-align: center;
-}
-
-#search-footer a {
-       margin: 3px 5px 3px 5px;
-       padding: 2px 5px;
-       text-decoration: none;
-}
-
-#searchform input.submit {
-       font-size: .8em;
-}
-
-#search-sidebar {
-       float: right;
-       margin: 10px;
-       padding: 3px;
-       width: 30%;
-}
-
-#search-sidebar .sidebar-box label {
-       display: block;
-       text-align: left;
-}
-
-/*#sidebar {
-       float: right;
-       margin: 20px;
-       padding: 5px;
-       width: 20%;
-}*/
-
-#sidebar .submit {
-       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
-       font-weight: bold;
-       padding: 2px;
-       font-size: 1em;
-}
-
-#sidebar h3 {
-       font-family: Arial, Geneva, Helvetica, sans-serif;
-       margin: 0;
-       padding: 5px 0 1px 0;
-}
-
-#sort {
-       margin: .3em;
-}
-
-#sort, #sort select, #sort input {
-}
-
-#starFull {
-       background: url(../images/bluestars.png) top left no-repeat;
-       height: 25px;
-       margin: 0;
-       padding: 0;
-}
-
-#starMT {
-       background: url(../images/emptystars.png) top left no-repeat;
-       height: 25px;
-       margin: 0 3px 0 30px;
-       padding: 0;
-       position: relative;
-       width: 100px;
-}
-
-#window {
-       margin-left: 2%;
-       margin-right: 2%;
-       margin-top: 2%;
-       padding: 10px;
-}
-
-#window .class {
-       display: block;
-       font-weight: bold;
-       padding: 0 0 5px 3px;
-}
-
-#window div.menu {
-       margin: 0;
-       
-}
-
-div#item-details {
-       margin-bottom : 1.5em;
-}
-
-div#item-details img {
-       float : left;
-       padding : 1em;
-}
-
-div#item-details p {
-       margin : .1em 0;
-       line-height : 1.6em;
-}
-
-div#holdings table {
-       width : 100%;
-}
-
-div#holdings td, div#holdings th {
-       padding : 5px;
-}
-
-div#holdings, div#descriptions, div#reviews, div#serials, div#publicshelves, div#privateshelves, div#fines, div#waiting, div#overdues, div#issues, div#reserves {
-       margin-top : 4px;
-       padding : .7em;
-       width : 90%;
-}
-
-#usermenu {
-       font-size: .9em;
-       font-weight: bold;
-       margin-top : -1.1em;
-       margin-bottom : 1em;
-       padding: 4px 0 4px 0;
-       
-       
-}
-
-#usermenu li {
-       display: inline;
-       list-style: none;
-       margin: 0;
-}
-
-#usermenu ul li a:link, #usermenu ul li a:visited, #usermenu ul li a:hover, #usermenu ul li a:active, #usermenu span.members {
-       padding : 4px;
-}
-
-#usermenu ul li:last-child {
-}
-
-#usermenu ul li a:hover {
-}
-
-#usermenu ul {
-       margin: 0;
-       padding: 0;
-       text-align: right;
-}
-
-table.featured-item {
-       border-collapse : separate;
-       border-spacing: 9px;
-       margin : 5px;
-       text-align : center;
-}
-
-table.featured-item td {
-       vertical-align : top;
-}
-
-table.featured-item a img {
-       margin : auto;
-}
-
-table.featured-item a.title {
-       display : block;
-       font-size : 1em;
-       margin-bottom : .4em;
-}
-
-table.featured-item .author {
-       display : block;
-       font-size : .95em;
-       margin-bottom : .2em;
-}
-
-table.featured-item .publisher {
-       display : block;
-       font-size : .8em;
-}
-
-/* COLORS, BACKGROUNDS, AND BORDERS */
-
-a {
-       color: #006699;
-}
-
-a:link.current {
-       background-color: transparent;
-       color: #3366CC;
-}
-
-a:link.nav {
-       background-color: #EFF1DC;
-       border: 1px solid #CCCC99;
-       color: #3366CC;
-}
-
-a:visited {
-       color: #006699;
-}
-
-a:visited.current {
-       background-color: transparent;
-       color: #3366CC;
-}
-
-a:visited.nav {
-       background-color: #EFF1DC;
-       border: 1px solid #CCCC99;
-       color: #3366CC;
-}
-
-a:hover {
-       color: orange;
-}
-
-a:hover.current {
-       background-color: #CCFF00;
-       color: #CC3333;
-}
-
-a:hover.nav {
-       background-color: #FFFFCC;
-       border: 1px solid #CCCC99;
-       color: #CC3333;
-}
-
-a:active {
-       color: #990033;
-}
-
-a:active.current {
-       background-color: #99CC00;
-       color: #FFFF99;
-}
-
-a:active.nav {
-       background-color: #FFFFCC;
-       border: 1px solid #CCCC99;
-       color: #D25500;
-}
-
-a.reserve {
-       background-color: #006699;
-       color: White;
-}
-
-body {
-       background-color: #eeeeee;
-}
-
-body#withsidebar #main {
-       border: 0;
-       
-}
-ul {
-background-color:#eeeeee;
-text-align: left;
-}
-
-caption {
-       color: #000066;
-}
-
-div.error h3 {
-       color: #990000;
-}
-
-div.form, div.details {
-       background-color: #ffffff;
-}
-
-div.tab {
-       background-color: transparent;
-}
-
-div.tab p {
-       border-bottom: 1px solid #FFFFFF;
-       border-top: 1px solid #D8DEB8;
-}
-
-div.tabbloc {
-       background-color: transparent;
-}
-
-div#advanced-search fieldset {
-       border-right : 1px none #999999; 
-       border-top : 1px none #999999; 
-       border-bottom : 1px none #999999;
-       border-left : 1px none #999999; 
-}
-
-div#advanced-search legend {
-       color : #003366;
-}
-
-dl.details dt {
-       color: #000066;
-}
-
-em.new {
-       color: #CC3333;
-}
-
-h1,h2,h3,h4,h5,h6 {
-       color: navy;
-       background-color:navy;
-       color:white;
-}
-
-h1.logo {
-       color: #D3DFAD;
-       
-}
-
-h1#libraryname a {
-       color: #000066;
-       margin-left: .3em;
-       text-decoration: none;
-}
-
-input.icon {
-       background-color: #6699CC;
-       border: 1px outset #666666;
-       color: #FFFFCC;
-}
-
-p.availability {
-       color: #666666;
-       font-size: .9em;
-}
-
-p.error, div.error {
-       background-color: #FFFFCC;
-       border: 1px dashed #CC6600;
-}
-
-span.itemicon {
-       background-color : #F8F8EB;
-       border: 1px solid #D8DEB8;
-}
-
-table {
-       background-color: #FFFFFF;
-}
-
-table.itemtypes td {
-       background-color: #F8F8EB;
-       border: 1px solid #D8DEB8;
-}
-
-td {
-       background-color: #FFFFFF;
-       border-bottom: 1px solid #DDDDDD;
-       border-right: 1px solid #DDDDDD;
-}
-
-td.input, div.form td, div.details td {
-       border-bottom: 1px solid #CCCCCC;
-       border-left: 0;
-       border-right: 0;
-       color: #000000;
-}
-
-td.credit {
-       color: #000066;
-}
-
-td.debit {
-       color: #990000;
-}
-
-td.sum, th.sum {
-}
-
-td.sum {
-       background-color : #FFFFCC;
-}
-
-td.label {
-       border-bottom: 1px solid #CCCCCC;
-       border-left: 1px solid #CCCCCC;
-       color: #000088;
-}
-
-td.label, div.form th, div.details th {
-       background-color: #FFFFFF;
-       border-bottom: 1px solid #CCCCCC;
-       border-left: 1px solid #CCCCCC;
-       border-right: 0;
-       border-top: 0;
-       color: #000088;
-}
-
-div.details {
-       padding: 5px;
-       
-}
-
-div.details table, div.details td, div.details th {
-       border: 0;
-       border-bottom: 1px solid #DDDDDD;
-}
-
-td.overdue {
-       color: #CC0000;
-}
-
-td:last-child {
-       border-bottom: 1px solid #CCCCCC;
-       border-right: 0 solid #CCCCCC;
-}
-
-th {
-       background-color: #EFF1DC;
-       border-bottom: 1px solid #CCCCCC;
-       border-right: 1px solid #CCCCCC;
-}
-
-th:last-child {
-       background-color: #EFF1DC;
-       border-bottom: 1px solid #CCCCCC;
-       border-right: 0 solid #CCCCCC;
-}
-
-th[scope="row"] {
-       background-color: #E7E7CA;
-}
-
-tr.highlight {
-       background-color: #F8F8EB;
-}
-
-tr.highlight th[scope="row"] {
-       background-color: #EEEEEE;
-}
-
-tr.overdue td {
-       background-color: #FFDDDD;
-}
-
-input.cancel {
-       background-color: #990033;
-       border: 1px outset #666666;
-       color: #FFFFCC;
-}
-
-.available {
-       color : #006600;
-}
-
-.content-block {
-       background-color: #FFFFFF;
-}
-
-.current {
-       background-color: #FFFFFF;
-       color: #3366CC;
-}
-
-.detail-sidebar {
-       background-color: #EEEEEB;
-}
-
-.further {
-       background-color: #EEEEEB;
-       border: 2px solid #DDDED3;
-       color: #CCCC99;
-}
-
-.further h4 {
-       background-color: #D8DEB8;
-}
-
-.further li {
-}
-
-.issued {
-       color: #999999;
-}
-
-.labelsubfield {
-}
-
-.loggedin {
-       color: #D8DEB8;
-}
-
-.loggedinusername {
-       color: #666666;
-}
-
-.marcsubfieldletter {
-       background-color: #EFF1DC;
-}
-
-.marcsubfieldname {
-       background-color: #EFF1DC;
-}
-
-.MARCtag {
-       background-color: #EEEEEE;
-       color: #000066; /* style for tag definition (700 - Statement of responsability) */
-}
-
-.menu {
-       background-image : url(../images/menu-background.gif);
-       background-repeat: repeat-x;
-       background-color: #6699CC;
-       border-top: 1px solid #335599;
-       border-bottom: 1px solid #335599;
-       color: #FFFFFF;
-       
-}
-
-.menu a:link {
-       color : #FFFFCC;
-}
-
-.menu a:visited {
-       color : #FFFFCC;
-}
-
-.menu a:hover {
-       color : #FFFFFF;
-}
-
-.menu a:active {
-       color : #FFFF99;
-}
-
-#members a:link {
-       color: #0099CC;
-}
-
-#members a:visited {
-       color: #0099CC;
-}
-
-#members a:hover {
-       color: #990000;
-}
-
-#members a:active {
-       color: #990000;
-}
-
-.menu input.submit {
-       background-color : #6BA037;
-       color: #FFFFFF;
-}
-
-.note {
-       background-color: #EEEEEB;
-       border-bottom: 1px solid #DDDED3;
-       border-left: 1px solid #DDDED3;
-       border-right: 1px solid #DDDED3;
-       border-top: 1px solid #DDDED3;
-}
-
-.opac-detail {
-       background-color: #FFFFCC;
-}
-
-.opac-detail dd {
-       border-bottom: 1px solid #E7E7CA;
-       color: #000000;
-}
-
-.operations li a, .operations li a:visited {
-       background-color: #6699CC;
-       border: 2px solid #D8DEB8;
-       color: #FFFFCC;
-}
-
-.operations li a:hover {
-       background-color: #0099FF;
-       color: #FFFF99;
-}
-
-.operations li a:active {
-       background-color: #0099FF;
-       color: #FFFF99;
-}
-
-
-.item-reserved {
-       color : #009933;
-}
-
-.item-datedue {
-       color: #999999;
-}
-
-.item-notforloan, .item-lost, .item-cancelled, .item-damaged, .item-reserved {
-}
-
-.searchresults td, .searchresults th, .searchresults table {
-       border: 0;
-}
-
-.searchresults tr {
-       border-bottom : 1px solid #CCCCCC;
-}
-
-.searchresults table {
-       border-top : 0px solid #CCCCCC;
-}
-
-p.searchresults {
-       background-color : #EFF1DC;
-}
-
-.searchresults a.reserve {
-       background-color : transparent;
-       color : #006699;/*
-       background-color : #6699CC;
-       border: 1px outset #666666;
-       color : White;*/
-}
-
-.sidebar-box {
-       border: 1px dashed #CCCCCC;
-}
-
-.subfield {
-       background-color: #EFF1DC;
-}
-
-.subfieldvalue {
-       background-color: #FFFFFF;
-}
-
-.submit {
-       background-color: #EEC95A;
-       border: 3px outset #666666;
-       color: #FFFFFF;
-}
-
-.term {
-       background-color: #FFFFCC;
-       color: #990000;
-}
-
-.unavailable {
-       color: #990033;
-}
-
-#footer {
-       border-top: 1px solid #EEEEEE;
-}
-
-#languages ul li a {
-       border: 1px solid #D8DEB8;
-}
-
-#languages ul li a:hover {
-       background-color: #FFFFCC;
-}
-
-#main {
-       background-color: transparent;/*
-       border-top: 1px solid #EEEEEE;*/
-}
-
-#masthead {
-       background-color: #FFFFFF;/*
-       border-bottom: 1px solid #EEEEEE;*/
-}
-
-#members {
-       background-image : url(../images/member-menu-background.gif);
-       background-repeat: repeat-x;
-       border-top: 1px solid #9999CC;
-       border-bottom : 1px solid #9999CC;
-       background-color: #AFBCCF;
-       color: #000066;
-}
-
-#members ul li a:link, #members ul li a:visited, #members span.members {
-       background-image : url(../images/member-menu-background-link.gif);
-       background-repeat: repeat-x;
-       border-left: 1px solid #9999CC;
-       color: #006699;
-}
-
-#members ul li:last-child a {
-       border-right : 1px solid #9999CC;
-}
-
-#members ul li a:hover, #members ul li a:active {
-       background-image : url(../images/member-menu-background-hover.gif);
-       background-repeat: repeat-x;
-}
-
-#members a {
-       text-decoration: none;
-}
-
-#members a.logout:link, #members a.logout:visited, #members a.logout:hover, #members a.logout:active {
-       background-image : url(../images/member-menu-background-logout.gif);
-       background-repeat: repeat-x;
-       color: #000000;
-}
-
-#members a:hover.logout {
-       background-image : url(../images/member-menu-background-logout-hover.gif);
-       background-repeat: repeat-x;
-       color: #000000;
-}
-
-#nav {
-       /*background-color: #EFF1DC;*/
-       border : 1px solid #EFF1DC;
-
-}
-
-#nav h6 {
-       background-color: #E7E7CA;
-       line-height : 1.8em;
-       margin-left: -1px;
-       margin-top : -1px;
-       margin-right : -1px;
-}
-
-#nav li ul li {/*
-       background-color: #E7E7CA;*/
-       border-bottom: 0 solid #D8DEB8;
-       border-left: 0 solid #FFFFCC;
-       border-right: 0 solid #006699;
-       border-top: 0 solid #FFFFCC;
-}
-
-#nav li ul li a {
-       color: #0000FF;
-}
-
-#nav li ul li a:link {
-       color: #335599;
-}
-
-#nav li ul li a:visited {
-       color: #335599;
-}
-
-#nav li ul li a:hover {
-       color: #CC3333;
-}
-
-#nav ul li {
-       /* background-color: #EFF1DC; */
-       border-bottom: 0px solid #CCCC99;
-       border-left: 0 solid #FFFFCC;
-       border-right: 0 solid #006699;
-       border-top: 0 solid #FFFFCC;
-}
-
-#nav ul li+li {
-       border-bottom: 0px solid #CCCC99;
-       border-left: 0 solid #FFFFCC;
-       border-right: 0 solid #006699;
-}
-
-#results, .results {
-       color: #000066;
-}
-
-#search-sidebar {
-       background-color: #F8F8EB;
-}
-
-#sidebar {
-       /*background-color: #F8F8EB;
-       border: 1px dashed #666666;*/
-}
-
-#sidebar .content-block {
-       background-color : #EEEEEE;
-}
-
-#sidebar fieldset {
-       background-color: #F9F9FF;
-}
-
-#sidebar legend {
-       color : #003366;
-}
-
-#sidebar .submit {
-/*     background-color: #EEC95A; */
-       color: #FFFFFF;
-}
-
-#sidebar h3 {
-       color: #000066;
-}
-
-#window {
-       background-color: #E7E7CA;
-       border-left: 1px solid #CCCC99;
-}
-ul.link-tabs {
-}
-
-ul.link-tabs li {
-}
-
-ul.link-tabs li a {
-       border-top: 1px solid #DDDDDD;
-       border-left : 1px solid #DDDDDD;
-       border-right : 1px solid #666666;
-}
-
-ul.link-tabs li.on a {
-       background-color: #FFFFFF;
-       border-bottom: 1px solid #FFFFFF;
-}
-
-ul.link-tabs li.off a {
-       background-color: #EEEEEB;
-       border-bottom: 1px solid #DDDDDD;
-}
-
-ul.link-tabs li.off a:hover {
-       background-color: #FFFFEC;
-       border-top: 1px solid #BEBF84;
-       border-left : 1px solid #BEBF84;
-       border-right : 2px solid #333333;
-}
-
-ul.link-tabs li a.debit {
-       background-color : #FFFF99;
-       color : #990033;
-}
-
-div#holdings, div#descriptions, div#reviews, div#serials, div#publicshelves, div#privateshelves, div#fines, div#waiting, div#overdues, div#issues, div#reserves {
-       border : 1px solid #DDDDDD;
-}
-
-div#holdings table {
-       border-top : 1px solid #DDDDDD;
-       border-right : 1px solid #DDDDDD;
-}
-
-div#holdings td, div#holdings th {
-       border-left : 1px solid #DDDDDD;
-       border-bottom : 1px solid #DDDDDD;
-}
-
-#usermenu {
-       background-image : url(../images/usermenu-background.gif);
-       background-repeat: repeat-x;
-       background-color: #EEEEEB;
-       border-top: 1px solid #EEEEEE;
-       border-bottom: 1px solid #335599;
-       color: #000000;
-}
-
-#usermenu ul li a:link, #usermenu ul li a:visited {
-       background-image : url(../images/usermenu-background.gif);
-       background-repeat: repeat-x;
-       border-left: 1px solid #9999CC;
-       color: #006699;
-}
-
-#usermenu ul li:last-child a {
-       border-right : 1px solid #9999CC;
-}
-
-#usermenu ul li a:hover, #usermenu ul li a:active {
-       background-image : url(../images/usermenu-background-hover.gif);
-       background-repeat: repeat-x;
-}
-
-#usermenu a {
-       text-decoration: none;
-}
-
-table.featured-item {
-       border : 0;
-}
-
-table.featured-item td {
-       border : 1px solid #CCCCCC;
-}
-
-table.featured-item a img {
-}
-
-table.featured-item a.title {
-}
-
-table.featured-item .author {
-}
-
-table.featured-item .publisher {
-}
-h1{
-background-color: #eeeeee;
-color: navy;
-background-image: url(./acceuil.jpg);
-background-repeat:no-repeat;
-}
-h1.authority
-{
-background-image:none;
-
-}
\ No newline at end of file
index 4d8e25a..7e3abdb 100644 (file)
@@ -1,3 +1,6 @@
+@import url("/opac-tmpl/lib/yui/reset-fonts-grids.css");
+@import url("/opac-tmpl/lib/yui/skin.css");
+
 a {
        font-weight : bold;
 }
@@ -138,6 +141,7 @@ div.message {
  
 .dialog input.back {
     background : #FFF url(/opac-tmpl/lib/famfamfam/silk/arrow_left.png) no-repeat 4px center;
+    border: 1px solid #BCBCBC;
        padding : .4em .4em .4em 25px;  
  }
  
@@ -336,3 +340,7 @@ span.lang{
 div.ft {
        clear : both;
 }
+
+.inline {
+    display: inline;
+}
diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc
new file mode 100644 (file)
index 0000000..2f30c9c
--- /dev/null
@@ -0,0 +1,77 @@
+<script type="text/javascript">
+//<![CDATA[
+
+var debug    = "[% debug %]";
+var dformat  = "[% dateformat %]";
+var sentmsg = 0;
+if (debug > 1) {alert("dateformat: " + dformat + "\ndebug is on (level " + debug + ")");}
+
+function Date_from_syspref(dstring) {
+        var dateX = dstring.split(/[-/]/);
+        if (debug > 1 && sentmsg < 1) {sentmsg++; alert("Date_from_syspref(" + dstring + ") splits to:\n" + dateX.join("\n"));}
+        if (dformat === "iso") {
+                return new Date(dateX[0], (dateX[1] - 1), dateX[2]);  // YYYY-MM-DD to (YYYY,m(0-11),d)
+        } else if (dformat === "us") {
+                return new Date(dateX[2], (dateX[0] - 1), dateX[1]);  // MM/DD/YYYY to (YYYY,m(0-11),d)
+        } else if (dformat === "metric") {
+                return new Date(dateX[2], (dateX[1] - 1), dateX[0]);  // DD/MM/YYYY to (YYYY,m(0-11),d)
+        } else {
+                if (debug > 0) {alert("KOHA ERROR - Unrecognized date format: " +dformat);}
+                return 0;
+        }
+}
+
+/* Instead of including multiple localization files as you would normally see with
+   jQueryUI we expose the localization strings in the default configuration */
+jQuery(function($){
+    $.datepicker.regional[''] = {
+        closeText: _('Done'),
+        prevText: _('Prev'),
+        nextText: _('Next'),
+        currentText: _('Today'),
+        monthNames: [_('January'),_('February'),_('March'),_('April'),_('May'),_('June'),
+        _('July'),_('August'),_('September'),_('October'),_('November'),_('December')],
+        monthNamesShort: [_('Jan'), _('Feb'), _('Mar'), _('Apr'), _('May'), _('Jun'),
+        _('Jul'), _('Aug'), _('Sep'), _('Oct'), _('Nov'), _('Dec')],
+        dayNames: [_('Sunday'), _('Monday'), _('Tuesday'), _('Wednesday'), _('Thursday'), _('Friday'), _('Saturday')],
+        dayNamesShort: [_('Sun'), _('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'), _('Sat')],
+        dayNamesMin: [_('Su'),_('Mo'),_('Tu'),_('We'),_('Th'),_('Fr'),_('Sa')],
+        weekHeader: _('Wk'),
+        dateFormat: '[% IF ( dateformat_us ) %]mm/dd/yy[% ELSIF ( dateformat_metric ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]',
+        firstDay: [% CalendarFirstDayOfWeek %],
+        isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %],
+        showMonthAfterYear: false,
+        yearSuffix: ''};
+    $.datepicker.setDefaults($.datepicker.regional['']);
+});
+
+$(document).ready(function(){
+
+$.datepicker.setDefaults({
+        showOn: "both",
+        changeMonth: true,
+        changeYear: true,
+        buttonImage: '[% interface %]/lib/famfamfam/silk/calendar.png',
+        buttonImageOnly: true,
+        showButtonPanel: true,
+        showOtherMonths: true
+    });
+
+    $( ".datepicker" ).datepicker();
+    // http://jqueryui.com/demos/datepicker/#date-range
+    var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({
+        changeMonth: true,
+        numberOfMonths: 1,
+        onSelect: function( selectedDate ) {
+            var option = this.id == "from" ? "minDate" : "maxDate",
+                instance = $( this ).data( "datepicker" );
+                date = $.datepicker.parseDate(
+                    instance.settings.dateFormat ||
+                    $.datepicker._defaults.dateFormat,
+                    selectedDate, instance.settings );
+            dates.not( this ).datepicker( "option", option, date );
+        }
+    });
+});
+//]]>
+</script>
\ No newline at end of file
index 35d395f..1bc9eb3 100644 (file)
@@ -3,8 +3,6 @@
 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
 <link rel="shortcut icon" href="[% IF ( OpacFavicon ) %][% OpacFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
 <link rel="stylesheet" type="text/css" href="[% themelang %]/lib/jquery/jquery-ui.css" />
-<link rel="stylesheet" type="text/css" href="/opac-tmpl/lib/yui/reset-fonts-grids.css" />
-<link rel="stylesheet" type="text/css" href="/opac-tmpl/lib/yui/skin.css" />
 [% SET opaclayoutstylesheet='opac.css' UNLESS opaclayoutstylesheet %]
 [% IF (opaclayoutstylesheet.match('^https?:|^\/')) %]
     <link rel="stylesheet" type="text/css" href="[% opaclayoutstylesheet %]" />
@@ -80,7 +78,8 @@
     var MSG_TAGS_ADDED = _("Tags added: ");
     var MSG_TAGS_DELETED = _("Tags added: ");
     var MSG_TAGS_ERRORS = _("Errors: ");
-    var MSG_MULTI_ADD_TAG_FAILED = _("Unable to add one or more tags.");[% END %][% END %]
+    var MSG_MULTI_ADD_TAG_FAILED = _("Unable to add one or more tags.");
+    var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");[% END %][% END %]
        [% IF ( OPACAmazonCoverImages ) %]$(window).load(function() {
                        verify_images();
                 });[% END %]
index 3f661ad..a82dc42 100644 (file)
@@ -72,9 +72,9 @@
         <option value="callnum">Call number</option>
                [% END %]</select>
 [% IF ( ms_value ) %]
-        <input type="text" id = "transl1" name="q" value="[% ms_value |html %]" class="left" style="width: 35%; font-size: 111%;"/><div id="translControl"></div>
+        <input type="text" title="Type search term" id = "transl1" name="q" value="[% ms_value |html %]" class="left" style="width: 35%; font-size: 111%;"/><div id="translControl"></div>
 [% ELSE %]
-        <input type="text" id = "transl1" name="q" class="left" style="width: 35%; font-size: 111%;"/><div id="translControl"></div>
+        <input type="text" title="Type search term" id = "transl1" name="q" class="left" style="width: 35%; font-size: 111%;"/><div id="translControl"></div>
 [% END %]
    [% IF ( OpacAddMastheadLibraryPulldown ) %]
       <select name="limit" id="select_library" class="left">
index 1a96788..0cb0efe 100644 (file)
@@ -50,7 +50,7 @@
 [% END %]
 [% BLOCK authheadingdisplay %]
     [% IF authid %]<a href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% authid %]">[% heading %]</a>
-    [% ELSIF search %]<a href="/cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operator=contains&marclist=mainentry&and_ora=and&orderby=HeadingAsc&value=[% search %]">[% heading %]</a>
+    [% ELSIF search %]<a href="/cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operator=contains&marclist=mainentry&and_or=and&orderby=HeadingAsc&value=[% search %]">[% heading %]</a>
     [% ELSE %][% heading %]
     [% END %]
 [% END %]
index 295eb5b..3df0221 100644 (file)
@@ -1,7 +1,7 @@
 [% IF ( opaccredits ) %]
        <div class="ft">
-        [% opaccredits %]
-    </div>
+            [% opaccredits %]
+        </div>
 [% END %]
 </div>
 
index 935d943..33d5a3e 100644 (file)
@@ -1,6 +1,6 @@
 [% IF ( PAGE_NUMBERS ) %]<div class="pages">
     <!-- Row of numbers corresponding to search result pages -->
-        [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html %][% END %]">&lt;&lt; Previous</a>[% END %]
+        [% IF ( previous_page_offset.defined ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html %][% END %]">&lt;&lt; Previous</a>[% END %]
     [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %]        <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html%][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
     [% END %]
         [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html %][% END %]">Next &gt;&gt;</a>[% END %] </div>[% END %]
index 2a68959..1845ddb 100644 (file)
@@ -3,21 +3,21 @@
     <p>
     <label>Audience</label>
     <select name="limit" class="subtype">
-            <option value="" SELECTED="selected" >Any</option>
+            <option value="" selected="selected" >Any</option>
       <option value="aud:a">juvenile, general</option>
       <option value="aud:b">pre-primary (0-5)</option>
-      <option value="aud:c">Primary (5-8)</option>
+      <option value="aud:c">primary (5-8)</option>
       <option value="aud:d">children (9-14)</option>
-      <option value="aud:e">Young Adult</option>
-      <option value="aud:k">Adult, serious</option>
-      <option value="aud:m">Adult, General</option>
-      <option value="aud:u">Unknown</option>
+      <option value="aud:e">young Adult</option>
+      <option value="aud:k">adult, serious</option>
+      <option value="aud:m">adult, General</option>
+      <option value="aud:u">unknown</option>
     </select>
     </p>
     <p>
     <label>Print</label>
         <select name="limit" class="subtype">
-      <option value="" selected="selected" >any</option>
+      <option value="" selected="selected" >Any</option>
         <option value="Material-type:r">regular print</option>
         <option value="Material-type:d">large print</option>
         <option value="Material-type:e">newspaper format</option>
         <option value="Material-type:h">hand-written</option>
         <option value="Material-type:i">multimedia</option>
         <option value="Material-type:j">mini-print</option>
+    <option value="Material-type:s">electronic ressource</option>
+    <option value="Material-type:t">microform</option>
         <option value="Material-type:z">other form of textual material</option>
     </select>
     </p>
     <p>
-    <label>Feschrift Ind.</label>
+    <label>Literary genre</label>
     <select name="limit" class="subtype">
       <option value="" selected="selected" >Any</option>
             <option value="Literature-Code:a">fiction</option>
             <option value="Literature-Code:f">short stories</option>
             <option value="Literature-Code:g">poetry</option>
             <option value="Literature-Code:h">speeches, oratory</option>
+            <option value="Literature-Code:i">libretto</option>
             <option value="Literature-Code:y">not a literary text</option>
-            <option value="Literature-Code:z">multiple/other lit. forms</option>
+            <option value="Literature-Code:z">multiple/other literary forms</option>
     </select>
     </p>
         <p>
     <label>Biography</label>
         <select name="limit" class="subtype" size="1">
             <option value="">Any</option>
-            <option value="Biography-code:y">Not a biography</option>
+            <option value="Biography-code:y">not a biography</option>
             <option value="Biography-code:a">autobiography</option>
             <option value="Biography-code:b">individual biography</option>
             <option value="Biography-code:c">collective biography</option>
-            <option value="Biography-code:d">contains biogr. data</option>
+            <option value="Biography-code:d">contains biographical data</option>
     </select>
         </p>
         <p>
             <option value="ctype:r" >literature surveys/reviews</option>
             <option value="ctype:s" >treaties</option>
             <option value="ctype:t" >cartoons or comic strips</option>
+            <option value="ctype:v" >dissertation or thesis (revised)</option>v
+            <option value="ctype:w" >religious text</option>
             <option value="ctype:z" >other</option>
     </select>
         </p>
     <select name="limit" class="subtype">
            <option value="">Any type</option>
            <option value="Type-Of-Serial:a">Periodical</option>
-      <option value="Type-Of-Serial:b">Monographical series</option>
-      <option value="Type-Of-Serial:c">Newspaper</option>
-      <option value="Type-Of-Serial:z">Other</option>
+           <option value="Type-Of-Serial:b">Monographic series</option>
+           <option value="Type-Of-Serial:c">Newspaper</option>
+       <option value="Type-Of-Serial:e">Updating loose-leaf</option>
+       <option value="Type-Of-Serial:f">Database</option>
+       <option value="Type-Of-Serial:g">Updating website</option>
+       <option value="Type-Of-Serial:z">Other</option>
     </select>
     </p>
     <p>
         <option value="Frequency-code:i">Three times a year</option>
         <option value="Frequency-code:j">Semiannual</option>
         <option value="Frequency-code:k">Annual</option>
-        <option value="Frequency-code:l">Biannual</option>
+        <option value="Frequency-code:l">Biennial</option>
         <option value="Frequency-code:m">Triennial</option>
         <option value="Frequency-code:n">Three times a week</option>
         <option value="Frequency-code:o">Three times a month</option>
-        <option value="Frequency-code:u">Unknown</option>
         <option value="Frequency-code:y">Without periodicity</option>
-        <option value="Frequency-code:i">Other</option>
+        <option value="Frequency-code:u">Unknown</option>
+        <option value="Frequency-code:z">Other</option>
     </select>
     </p>
     <p>
     <label>Regularity</label>
     <select name="limit" class="subtype">
             <option value="">Any regularity</option>
-        <option value="Regularity-code:u">Unknown</option>
-        <option value="Regularity-code:a">Regular</option>
-        <option value="Regularity-code:b">Normalised irregular</option>
+        <option value="Regularity-code:a">regular</option>
+        <option value="Regularity-code:b">normalised irregular</option>
         <option value="Regularity-code:y">irregular</option>
+        <option value="Regularity-code:u">unknown</option>
     </select>
         </p>
 
         <option value="Graphics-type:z">other non-projected graphic type</option>
     </select>
     <select name="limit" class="subtype">
-            <option value="">any</option>
+            <option value="">Any</option>
             <option value="Graphics-support:a">canvas</option>
             <option value="Graphics-support:b">bristol board</option>
             <option value="Graphics-support:c">cardboard/illustration board</option>
             <option value="Graphics-support:l">porcelaine</option>
             <option value="Graphics-support:m">stone</option>
             <option value="Graphics-support:n">wood</option>
-            <option value="Graphics-support:u">unknown</option>
             <option value="Graphics-support:v">mixed collection</option>
             <option value="Graphics-support:e">synthetics</option>
             <option value="Graphics-support:f">skin</option>
             <option value="Graphics-support:h">metal</option>
             <option value="Graphics-support:i">paper</option>
             <option value="Graphics-support:z">others</option>
+            <option value="Graphics-support:u">unknown</option>
     </select>
         </p>
index 352d6b3..5a07d95 100644 (file)
@@ -5,7 +5,7 @@
   [% IF ( OPACFinesTab ) %]
   [% IF ( accountview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-account.pl">my fines</a></li>
   [% END %]
-  [% IF ( userupdateview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-userupdate.pl">my personal details</a></li>
+  [% IF ( userupdateview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-memberentry.pl">my personal details</a></li>
   [% IF ( TagsEnabled ) %]
     [% IF ( tagsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-tags.pl?mine=1">my tags</a></li>
   [% END %]
index 13a2c36..9bfd103 100644 (file)
@@ -80,7 +80,7 @@ function openBasket() {
     if ( strCookie ) {
         var iW = 820;
         var iH = 450;
-        var optWin = "dependant=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=no,location=yes,height="+iH+",width="+iW;
+        var optWin = "status=yes,scrollbars=yes,resizable=yes,toolbar=no,location=yes,height="+iH+",width="+iW;
         var loc = CGIBIN + "opac-basket.pl?" + strCookie;
         var basket = open(loc, "basket", optWin);
         if (window.focus) {basket.focus()}
@@ -354,7 +354,7 @@ function sendBasket() {
 
     var loc = CGIBIN + "opac-sendbasket.pl?" + strCookie;
 
-    var optWin="dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100";
+    var optWin="scrollbars=yes,resizable=yes,height=600,width=900,top=50,left=100";
     var win_form = open(loc,"win_form",optWin);
 }
 
@@ -365,7 +365,7 @@ function downloadBasket() {
 
     var loc = CGIBIN + "opac-downloadcart.pl?" + strCookie;
 
-    open(loc,"win_form",'dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
+    open(loc,"win_form",'scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
 }
 
 function printBasket() {
@@ -397,6 +397,16 @@ function showLess() {
     document.location = loc;
 }
 
+function holdSel() {
+    var items = document.getElementById('records').value;
+    if (items) {
+        parent.opener.document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers=" + items;
+        window.close();
+    } else {
+        alert(MSG_NO_RECORD_SELECTED);
+    }
+}
+
 function updateBasket(updated_value,target) {
        if(target){
        target.$('#basketcount').html("<span>"+updated_value+"</span>");
index 5e30183..398a89c 100644 (file)
@@ -7,35 +7,12 @@ function Dopop(link) {
        newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes,resizeable=yes');
 }
 
-$.datepicker.setDefaults({
-        showOn: "both",
-        changeMonth: true,
-        changeYear: true,
-        buttonImage: '/opac-tmpl/lib/famfamfam/silk/calendar.png',
-        buttonImageOnly: true,
-        showButtonPanel: true
-    });
-
 $(document).ready(function(){
        $(".close").click(function(){
                window.close();
        });
        $(".focus").focus();
-    $( ".datepicker" ).datepicker();
-    // http://jqueryui.com/demos/datepicker/#date-range
-    var dates = $( ".datepickerfrom, .datepickerto" ).datepicker({
-        changeMonth: true,
-        numberOfMonths: 1,
-        onSelect: function( selectedDate ) {
-            var option = this.id == "from" ? "minDate" : "maxDate",
-                instance = $( this ).data( "datepicker" );
-                date = $.datepicker.parseDate(
-                    instance.settings.dateFormat ||
-                    $.datepicker._defaults.dateFormat,
-                    selectedDate, instance.settings );
-            dates.not( this ).datepicker( "option", option, date );
-        }
-    });
+
        // clear the basket when user logs out
        $("#logout").click(function(){
                var nameCookie = "bib_list";
index cd85b18..f28747f 100644 (file)
@@ -26,12 +26,11 @@ if (typeof(readCookie) == "undefined") {
        }
 }
 KOHA.Tags = {
-       add_tag_button: function(){
-               var mybibnum = $(this).attr("title");
-               var mynewtag = "newtag" + mybibnum;
+    add_tag_button: function(bibnum, tag){
+        var mynewtag = "newtag" + bibnum;
                var mytagid = "#" + mynewtag;
                var mydata = {CGISESSID: readCookie('CGISESSID')};      // Someday this should be OPACSESSID
-               mydata[mynewtag] = $(mytagid).val();    // need [bracket] for variable property id
+        mydata[mynewtag] = tag;        // need [bracket] for variable property id
                var response;   // AJAX from server will assign value to response.
                $.post(
                        "/cgi-bin/koha/opac-tags.pl",
@@ -61,20 +60,23 @@ KOHA.Tags = {
        },
        set_tag_status : function(tagid, newstatus) {
                $(tagid).html(newstatus);
-               $(tagid).css({display:"inline"});
+        $(tagid).show();
        },
        append_tag_status : function(tagid, newstatus) {
                $(tagid).append(newstatus);
-               $(tagid).css({display:"inline"});
+        $(tagid).show();
        },
+    clear_all_tag_status : function() {
+        $(".tagstatus").empty().hide();
+    },
 
        tag_message: {
        tagsdisabled : function(arg) {return (MSG_TAGS_DISABLED);},
        scrubbed_all_bad : function(arg) {return (MSG_TAG_ALL_BAD);},
        badparam : function(arg) {return (MSG_ILLEGAL_PARAMETER+" "+arg);},
        scrubbed : function(arg) {return (MSG_TAG_SCRUBBED+" "+arg);},
-    failed_add_tag : function(arg) {return (MSG_ADD_TAG_FAILED+ " "+arg+" "+MSG_ADD_TAG_FAILED_NOTE);},
-    failed_delete  : function(arg) {return (MSG_DELETE_TAG_FAILED+ " "+arg+" "+MSG_DELETE_TAG_FAILED_NOTE);},
+    failed_add_tag : function(arg) {return (MSG_ADD_TAG_FAILED+ " '"+arg+"'. \n"+MSG_ADD_TAG_FAILED_NOTE);},
+    failed_delete  : function(arg) {return (MSG_DELETE_TAG_FAILED+ " '"+arg+"'. \n"+MSG_DELETE_TAG_FAILED_NOTE);},
        login : function(arg) {return (MSG_LOGIN_REQUIRED);}
        },
 
@@ -92,7 +94,7 @@ KOHA.Tags = {
                        mydata,
                        function(data){
                                eval(data);
-                $(".tagstatus").empty();
+                KOHA.Tags.clear_all_tag_status();
                 var bibErrors = false;
 
                 // Display the status for each tagged bib
diff --git a/koha-tmpl/opac-tmpl/prog/en/lib/jquery/images/ui-icons_888888_256x240.png b/koha-tmpl/opac-tmpl/prog/en/lib/jquery/images/ui-icons_888888_256x240.png
new file mode 100644 (file)
index 0000000..6d02426
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/en/lib/jquery/images/ui-icons_888888_256x240.png differ
index 55eea18..e08fff2 100644 (file)
 <fieldset>
 <!-- PUB RANGE OPTION -->
 <legend>Publication date range:</legend>
-<span>For example:  1999-2001.  You could also use "-1987" for everything published before 1987 or "2008-" for everything published after 2008.</span>
+<p>For example:  1999-2001.  You could also use "-1987" for everything published in and before 1987 or "2008-" for everything published in 2008 and after.</p>
 <input type="text" size="30" name="limit-yr" title="Enter search terms" value="" />
 </fieldset>
 <!-- /PUB RANGE OPTION -->
index a73c8bb..b5fca46 100644 (file)
@@ -84,8 +84,10 @@ please choose against which one you would like to authenticate: </p>
 </ol></fieldset>
 
 <input type="submit" value="Log In" class="submit" />
-<div id="nologininstructions">  <h5>Don't have a password yet?</h5><p> If you don't have a password yet, stop by the circulation desk the next time you're in the library. We'll happily set one up for you.</p>
-<h5>Don't have a library card?</h5><p> If you don't have a library card, stop by your local library to sign up.  </p></div>
+<div id="nologininstructions">
+    <h5>Don't have a password yet?</h5><p> If you don't have a password yet, stop by the circulation desk the next time you're in the library. We'll happily set one up for you.</p>
+    <h5>Don't have a library card?</h5><p> If you don't have a library card, stop by your local library to sign up[% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<span id="registrationinstructions"> or  <a href="/cgi-bin/koha/opac-memberentry.pl">register here</a></span>[% END %].  </p>
+</div>
 </form>
 
 
index 93f27b9..e0bf5a9 100644 (file)
@@ -33,7 +33,7 @@
                     <option value="match">in any heading</option>
                     <option value="mainentry">in main entry</option>
                 </select>
-                <input type="hidden" name="and_ora" value="and" />
+                <input type="hidden" name="and_or" value="and" />
                 <input type="hidden" name="excluding" value="" />
             </li>
             <li><label for="orderby">Order by: </label><select name="orderby" id="orderby">
index 0672027..90a259e 100644 (file)
@@ -1,3 +1,5 @@
+[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnList ) %]
+
 [% INCLUDE 'doc-head-open.inc' %]
 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your cart
     [% IF ( print_basket ) %]</title>
@@ -22,8 +24,6 @@
     <script type="text/javascript">
     //<![CDATA[
 
-var MSG_NO_RECORD_SELECTED = _("Please select one or more items");
-
 $.tablesorter.addParser({
     // set a unique id
     id: 'links',
@@ -49,12 +49,11 @@ $(document).ready(function()
     $(".cb").click(function(){
       enableCheckboxActions();
     });
+    enableCheckboxActions();
     }
 );
 
-[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
-var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");
-
+[% IF ( TagsInputEnabled && loggedinusername ) %]
 function tagSelected() {
     var bibs = document.getElementById('records').value;
     if (bibs) {
@@ -70,6 +69,8 @@ function tagCanceled() {
     $("#tagsel_form").hide();
     $("#tagsel_tag").show();
     $("#tag_hides").show();
+    $("#tagsel_new").val("");
+    $(".tagstatus").empty().hide();
 }
 
 function tagAdded() {
@@ -94,7 +95,7 @@ function tagAdded() {
     KOHA.Tags.add_multitags_button(bibs, tag);
     return false;
 }
-[% END %][% END %][% END %]
+[% END %]
     $(document).ready(function(){
         $("#CheckAll").click(function(){
             var checked = [];
@@ -117,23 +118,8 @@ function tagAdded() {
             return false;
         });
 
-[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
-          $("#tagsel_button").click(function(){
-              tagAdded();
-              return false;
-          });
-[% END %][% END %][% END %]
     });
-[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
-    function holdSel() {
-        var items = document.getElementById('records').value;
-        if (items) {
-            document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers=" + items;
-        } else {
-            alert(MSG_NO_RECORD_SELECTED);
-        }
-    }
-[% END %][% END %]
+
 function enableCheckboxActions(){
     // Enable/disable controls if checkboxes are checked
     var checkedBoxes = $(".checkboxed input:checkbox:checked");
@@ -166,30 +152,38 @@ function enableCheckboxActions(){
     <li><a class="hide close" href="opac-basket.pl">Hide window</a></li>
 </ul>
 </div>
+[% END %]
+
+[% UNLESS ( print_basket ) %]
+<div id="selections-toolbar">
+    <a id="CheckAll" href="#">Select all</a>
+    <a id="CheckNone" href="#">Clear all</a>
+    <span class="sep">|</span>
+    <span class="links" id="tag_hides">
+        <span id="selections">Select titles to: </span>
+        <a href="#" class="deleteshelf disabled" onclick="delSelRecords(); return false;">Remove</a>
+        [% IF ( opacuserlogin ) %]
+          [% IF ( virtualshelves ) %][% IF ( loggedinusername ) %]
+          <a href="#" class="newshelf disabled" onclick="addSelToShelf(); return false;">Add to a list</a>
+          [% END %][% END %]
+          [% IF ( RequestOnOpac ) %]<a href="#" class="hold disabled" onclick="holdSel(); return false;">Place hold</a>[% END %]
+          [% IF ( TagsInputEnabled && loggedinusername ) %]
+          <a href="#" id="tagsel_tag" class="disabled" onclick="tagSelected(); return false;">Tag</a>
+          [% END %]
         [% END %]
+    </span>
+    [% IF ( TagsInputEnabled && loggedinusername ) %]
+    <span id="tagsel_form" style="display:none">
+        <label for="tagsel_new">New tag:</label>
+        <input name="tagsel_new" id="tagsel_new" maxlength="100" />
+        <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="Add" type="submit" value="Add" onclick="tagAdded(); return false;" />
+        <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;">Cancel</a>
+    </span>
+    [% END %]
+</div>
+[% END %]
 
 [% IF ( verbose ) %]
-    [% UNLESS ( print_basket ) %]<div id="selections-toolbar"><a id="CheckAll" href="#">Select all</a> <a id="CheckNone" href="#">Clear all</a> <span class="sep">|</span> <span class="links"><span id="selections">Select titles to: </span>
-<span id="tag_hides">
-<a href="#" class="deleteshelf disabled" onclick="delSelRecords(); return false;">Remove</a>
-[% IF ( opacuserlogin ) %]
-    [% IF ( virtualshelves ) %][% IF ( loggedinusername ) %]
-         | <a href="#" class="newshelf disabled" onclick="addSelToShelf(); return false;">Add to a list</a>
-    [% END %][% END %]
-    [% IF ( RequestOnOpac ) %]| <a href="#" class="hold disabled" onclick="holdSel(); return false;">Place hold</a>[% END %]
-    [% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
-    | <a href="#" id="tagsel_tag" class="disabled" onclick="tagSelected(); return false;">Tag</a>[% END %][% END %]
-[% END %]
-</span>
-     <span id="tagsel_form" style="display:none">
-       <label for="tagsel_new" style="display:inline">New&nbsp;tag:</label>
-       <input name="tagsel_new" id="tagsel_new" maxlength="100" style="display:inline"/>
-       <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button"
-           type="submit" value="Add" style="display:inline" />
-       <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a>
-     </span>
-     </span>
-</div>[% END %]
             <form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
     [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
     <h3>
@@ -346,30 +340,7 @@ function enableCheckboxActions(){
             </form>
 
 [% ELSE %]
-[% UNLESS ( print_basket ) %]
 <form action="/cgi-bin/koha/opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
-<div id="selections-toolbar">
-    <a id="CheckAll" href="#">Select all</a>
-    <a id="CheckNone" href="#">Clear all</a>
-    <span class="sep">|</span> <span class="links"><span id="selections">Select titles to: </span>
-        <a href="#" class="deleteshelf disabled" onclick="delSelRecords(); return false;">Remove</a>
-    [% IF ( opacuserlogin ) %]
-        [% IF ( virtualshelves ) %][% IF ( loggedinusername ) %]
-          <a href="#" class="newshelf disabled" onclick="addSelToShelf(); return false;">Add to a list</a>
-        [% END %][% END %]
-        [% IF ( RequestOnOpac ) %] <a href="#" class="hold disabled" onclick="holdSel(); return false;">Place hold</a>[% END %]
-        [% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
-         <a href="#" class="disabled" id="tagsel_tag" onclick="tagSelected(); return false;">Tag</a>[% END %][% END %]
-    [% END %]
-    </span>
-         [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<span id="tagsel_form" style="display:none">
-           <label for="tagsel_new" style="display:inline">New&nbsp;tag:</label>
-           <input name="tagsel_new" id="tagsel_new" maxlength="100"  style="display:inline"/>
-           <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add"  style="display:inline"/>
-           <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a>
-         </span>[% END %][% END %][% END %]</span>
-</div>
-[% END %]
     <table id="itemst">
     <thead>
         <tr>
@@ -395,7 +366,9 @@ function enableCheckboxActions(){
                 <a href="#" onclick="openBiblio('[% BIBLIO_RESULT.dest %]',[% BIBLIO_RESULT.biblionumber %])">[% BIBLIO_RESULT.title |html %][% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %][% subtitl.subfield |html %][% END %][% END %]</a>
                 <!-- COinS / Openurl -->
                 <span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.au=[% BIBLIO_RESULT.author %]&amp;rft.btitle=[% BIBLIO_RESULT.title |url %]&amp;rft.date=[% BIBLIO_RESULT.publicationyear %]&amp;rft.tpages=[% BIBLIO_RESULT.size %]&amp;rft.isbn=[% BIBLIO_RESULT.isbn |url %]&amp;rft.aucorp=&amp;rft.place=[% BIBLIO_RESULT.place %]&amp;rft.pub=[% BIBLIO_RESULT.publisher |url %]&amp;rft.edition=[% BIBLIO_RESULT.edition %]&amp;rft.series=[% BIBLIO_RESULT.series %]&amp;rft.genre="></span>
-                [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<div id="newtag[% BIBLIO_RESULT.biblionumber %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</div>[% END %][% END %][% END %]
+                [% IF ( TagsInputEnabled && loggedinusername ) %]
+                <span id="newtag[% BIBLIO_RESULT.biblionumber %]_status" class="tagstatus results_summary" style="display:none">Tag status here.</span>
+                [% END %]
             </td>
             <td>[% BIBLIO_RESULT.author %]</td>
             <td>
index 1d0523a..fa5ec3d 100644 (file)
@@ -1,4 +1,6 @@
 [% USE KohaDates %]
+[% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnDetail ) %]
+[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnDetail ) %]
 
 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]
 [% INCLUDE 'doc-head-close.inc' %]
     <script type="text/javascript" src="https://apis.google.com/js/plusone.js">
       {lang: '[% lang %]'}
     </script>
+    <script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
 [% END %]
 [% IF ( OpacStarRatings != 'disable' ) %]<script type="text/javascript" src="/opac-tmpl/prog/en/lib/jquery/plugins/jquery.rating.js"></script>
 <link rel="stylesheet" type="text/css" href="/opac-tmpl/prog/en/css/jquery.rating.css" />[% END %]
 
 [% IF ( OpacHighlightedWords ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.highlight-3.js"></script>[% END %]
+
 <script type="text/JavaScript" language="JavaScript">
 //<![CDATA[
 
 
      $(document).ready(function() { 
         $('#bibliodescriptions').tabs();
-[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]$("#tagform").hide();
-        $("#addtagl").show();
-        $("#addtagl a").click(function(){
-            $("#addtagl").hide();
-            $("#tagform, #tagform a").show();
+
+[% IF ( TagsInputEnabled && loggedinusername ) %]
+        $(".tag_add").click(function(){
+            var thisid = $(this).attr("id");
+            thisid = thisid.replace("tag_add","");
+            $(this).hide();
+            $("#tagform"+thisid).show();
+            $("#newtag"+thisid).focus();
+            $("#newtag"+thisid+"_status").empty().hide();
+            return false;
+        });
+        $(".cancel_tag_add").click(function(){
+            var thisid = $(this).attr("id");
+            thisid = thisid.replace("cancel","");
+            $("#tagform"+thisid).hide();
+            $("#tag_add"+thisid).show();
+            $("#newtag"+thisid).val("");
+            $("#newtag"+thisid+"_status").empty().hide();
             return false;
         });
-        $("#tagform a").click(function(){
-            $("#addtagl").show();
-            $("#tagform").hide();
+        $(".tagbutton").click(function(){
+            var thisid = $(this).attr("title");
+            var tag = $("#newtag"+thisid).val();
+            if (!tag || (tag == "")) {
+                alert(MSG_NO_TAG_SPECIFIED);
+                return false;
+            }
+            KOHA.Tags.add_tag_button(thisid, tag);
             return false;
-        });[% END %][% END %][% END %]
-        $("#holdingst").tablesorter({[% IF ( dateformat == 'metric' ) %]
+        });
+[% END %]
+
+        $(".holdingst").tablesorter({[% IF ( dateformat == 'metric' ) %]
     dateFormat: 'uk',[% END %]
             widgets : ['zebra'],
             sortList: [[0,0]]
         [% IF ( NovelistSelectProfile ) %]
         novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){});
         [% END %]
-       [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
-        $(".tagbutton").click(KOHA.Tags.add_tag_button);[% END %][% END %][% END %]
-
 
     [% IF ( OpacBrowseResults && busc ) %]
         if (arrPagination.length > 0) {
@@ -292,9 +313,6 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
  });
 //]]>
 </script>
-[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]<style type="text/css">
-    #addtagl { display: none; }
-</style>[% END %][% END %][% END %]
 <style type="text/css">
 .branch-info-tooltip {
   display: none;
@@ -502,8 +520,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
        </span>
 [% END %]
 
-[% IF ( TagsEnabled ) %]
-    [% IF ( TagsShowOnDetail ) %]
+[% IF ( TagsShowEnabled ) %]
         <div class="results_summary">
         [% IF ( TagLoop ) %]
         <span class="label">Tags from this library:</span>
@@ -514,28 +531,23 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     [% END %]
         </div>
 [% END %]
-[% IF ( opacuserlogin ) %]
-  [% IF ( loggedinusername ) %]
-   [% IF ( TagsEnabled ) %]
-      [% IF ( TagsInputOnDetail ) %]
+[% IF ( TagsInputEnabled ) %]
       <div class="results_summary">
-        <span class="label" id="addtagl"><a href="#">Add</a></span>
-         <form name="tagform[% biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl" id="tagform">
-                <label for="newtag[% biblionumber %]">New:</label><input name="newtag[% biblionumber %]" id="newtag[% biblionumber %]" maxlength="100" />
+        [% IF ( loggedinusername ) %]
+            <a class="tag_add" id="tag_add[% biblionumber %]" href="#">Add</a>
+            <form id="tagform[% biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl" style="display:none;">
+                <label for="newtag[% biblionumber %]">New tag(s):</label>
+                <input name="newtag[% biblionumber %]" id="newtag[% biblionumber %]" maxlength="100" type="text"/>
                 <input name="tagbutton" class="input tagbutton" title="[% biblionumber %]" type="submit" value="Add" />
-                <a href="#">Cancel</a>
+                <a class="cancel_tag_add" id="cancel[% biblionumber %]" href="#">(done)</a>
             </form>
             <span id="newtag[% biblionumber %]_status" class="tagstatus" style="display:none;">
                 Tag status here.
             </span>
-            <br />
-            [% ELSE %]
-                <span id="login4tags" class="tagstatus">Log in to add tags.</span>
-            [% END %]
+        [% ELSE %]
+            <span id="login4tags">Log in to add tags.</span>
         [% END %]
         </div>
-    [% END %]
-   [% END %]
 [% END %]
 
         [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsSeries ) %][% IF ( SyndeticsSERIES1Exists ) %]
@@ -643,9 +655,12 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 <div id="bibliodescriptions" class="toptabs">
 
 <ul>   
-[% IF ( defaulttab == 'holdings' ) %]<li id="tab_holdings" class="ui-tabs-selected">[% ELSE %]<li id="tab_holdings">[% END %]
-    <a href="#holdings">Holdings ( [% count %] )</a>
-</li>
+    [% IF ( defaulttab == 'holdings' ) %]<li id="tab_holdings" class="ui-tabs-selected">[% ELSE %]<li id="tab_holdings">[% END %]
+        <a href="#holdings">[% IF SeparateHoldings %][% LoginBranchname %] holdings[% ELSE %]Holdings[% END %] ( [% itemloop.size || 0 %] )</a>
+    </li>
+    [% IF (SeparateHoldings) %]
+        <li><a href="#otherholdings">Other holdings ( [% otheritemloop.size || 0 %] )</a></li>
+    [% END %]
 <li id="tab_descriptions"> <a href="#descriptions">Title notes</a></li>
 [% IF ( SYNDETICS_TOC ) %]
     <li id="tab_toc"> <a href="#toc">TOC</a></li>
@@ -701,9 +716,14 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     </li>
 [% END %]
 
-[% IF ( OPACLocalCoverImages ) %][% IF ( localimages ) %]
+[% IF ( OPACLocalCoverImages && localimages.size ) %]
     <li id="tab_images"><a href="#images">Images</a></li>
+[% END %]
+
+[% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]
+    <li id="tab_html5media"><a href="#html5media">Play media</a></li>
 [% END %][% END %]
+
 </ul>
 
 [% IF ( serialcollection ) %]
@@ -729,69 +749,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 </div>
 [% END %]
 
+
 <div id="holdings">
-[% IF ( count ) %]
+[% IF ( itemloop.size ) %]
     [% IF ( lotsofitems ) %]
        <p>This record has many physical items. <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]&amp;viewallitems=1#holdings">Click here to view them all.</a></p>
     [% ELSE %]
-    <table id="holdingst">
-        <thead><tr>
-            [% IF ( item_level_itypes ) %]<th id="item_itemtype">Item type</th>[% END %]
-            <th id="item_location">Location</th>
-            [% IF ( itemdata_ccode ) %]<th id="item_ccode">Collection</th>[% END %]
-            <th id="item_callnumber">Call number</th>
-            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron">Vol info</th>[% END %]
-            [% IF ( itemdata_uri ) %]<th id="item_url">url</th>[% END %]
-            [% IF ( itemdata_copynumber ) %]<th id="item_copy">Copy</th>[% END %]
-            <th id="item_status">Status</th>
-            [% IF ( itemdata_itemnotes ) %]<th id="item_notes">Notes</th>[% END %]
-            <th id="item_datedue">Date due</th>
-            [% IF ( OPACShowBarcode ) %]<th>Barcode</th>[% END %]
-        [% IF holds_count.defined %]
-            <th>Item holds</th>
-        [% ELSIF show_priority %]
-            <th>Item hold queue priority</th>
-        [% END %]
-        </tr></thead>
-           <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
-      <tr>[% IF ( item_level_itypes ) %]<td class="itype">[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %]
-             <td class="location">
-    [% UNLESS ( singleBranchMode ) %]
-        <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
-        [% IF ( ITEM_RESULT.branchurl ) %]
-        <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
-        [% ELSE %]
-        [% ITEM_RESULT.branchname %]
-        [% END %]
-        </span>
-        <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
-    [% END %]
-    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
-    </td>
-            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
-        <td class="call_no">[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#shelfbrowser">Browse shelf</a>)[% END %][% END %]</td>
-            [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %]
-          [% IF ( itemdata_uri ) %]<td class="url"><a href="[% ITEM_RESULT.uri %]">[% ITEM_RESULT.uri %]</a></td>[% END %]
-               [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber %]</td>[% END %]
-              <td class="status">[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
-             [% IF ( itemdata_itemnotes ) %]<td class="notes">[% ITEM_RESULT.itemnotes %]</td>[% END %]
-        <td class="date_due">[% ITEM_RESULT.datedue | $KohaDates %]</td>
-        [% IF ( OPACShowBarcode ) %]<td class="barcode">[% ITEM_RESULT.barcode %]</td>[% END %]
-        [% IF holds_count.defined || show_priority %]
-        <td class="holds_count">
-            [% IF holds_count.defined %] [% ITEM_RESULT.holds_count %] [% END %]
-            [% IF ITEM_RESULT.priority %]
-                [% IF holds_count.defined %]
-                (priority [% ITEM_RESULT.priority %])
-                [% ELSE %]
-                [% ITEM_RESULT.priority %]
-                [% END %]
-            [% END %]
-                </td>
-        [% END %]
-           </tr>
-           [% END %]</tbody>
-       </table>
+        [% INCLUDE items_table items=itemloop tab="holdings" %]
     [% END %]
     [% IF holds_count.defined || priority %]
     <div id="bib_holds">
@@ -817,65 +781,20 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     [% END %]
 [% END %]
 
-[% IF ( OpenOPACShelfBrowser ) %]
-<div id="shelfbrowser">
-<h5 style="text-align: center;">[% IF ( starting_homebranch ) %]Browsing [% starting_homebranch %] Shelves[% END %][% IF ( starting_location ) %], Shelving location: [% starting_location %][% END %][% IF ( starting_ccode ) %], Collection code: [% starting_ccode %][% END %] <a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]">Close shelf browser</a></h5>
-
-        
-        <table><tr>
-        <td rowspan="2" style="width:20px;"><div id="browser_previous"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% IF ( shelfbrowser_prev_biblionumber ) %][% shelfbrowser_prev_biblionumber %][% ELSE %][% biblionumber %][% END %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_prev_itemnumber %]#shelfbrowser">Previous</a></div></td>
-[% FOREACH PREVIOUS_SHELF_BROWS IN PREVIOUS_SHELF_BROWSE %]
-        <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% PREVIOUS_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% PREVIOUS_SHELF_BROWS.itemnumber %]#shelfbrowser">
-    [% IF ( OPACAmazonCoverImages ) %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_isbn ) %]<img border="0" src="http://images.amazon.com/images/P/[% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %].01._AA75_PU_PU-5_.jpg" alt="" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
-    [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( content_identifier_exists ) %]
-    [% IF ( using_https ) %]
-    <img border="0" src="https://secure.syndetics.com/index.aspx?isbn=[% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_upc ) %]&amp;upc=[% PREVIOUS_SHELF_BROWS.browser_normalized_upc %][% END %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_oclc ) %]&amp;oclc=[% PREVIOUS_SHELF_BROWS.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
-    [% ELSE %]<img border="0" src="http://www.syndetics.com/index.aspx?isbn=[% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_upc ) %]&amp;upc=[% PREVIOUS_SHELF_BROWS.browser_normalized_upc %][% END %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_oclc ) %]&amp;oclc=[% PREVIOUS_SHELF_BROWS.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />[% END %]
-    [% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %][% END %]
-    [% IF ( GoogleJackets ) %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_isbn ) %]<div style="block" title="[% PREVIOUS_SHELF_BROWS.biblionumber |url %]" class="[% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %]" id="gbs-thumbnail-preview[% loop.count %]"></div>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
-    [% IF ( BakerTaylorEnabled ) %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_isbn ) %]
-    <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %]" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
-
-</a></td>
-[% END %]
-
-[% FOREACH NEXT_SHELF_BROWS IN NEXT_SHELF_BROWSE %]
-       <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% NEXT_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% NEXT_SHELF_BROWS.itemnumber %]#shelfbrowser">
-
-    [% IF ( OPACAmazonCoverImages ) %][% IF ( NEXT_SHELF_BROWS.browser_normalized_isbn ) %]
-    <img border="0" src="http://images.amazon.com/images/P/[% NEXT_SHELF_BROWS.browser_normalized_isbn %].01._AA75_PU_PU-5_.jpg" alt="" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
-
-       [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( content_identifier_exists ) %]
-    [% IF ( using_https ) %]
-    <img border="0" src="https://secure.syndetics.com/index.aspx?isbn=[% NEXT_SHELF_BROWS.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( NEXT_SHELF_BROWS.browser_normalized_upc ) %]&amp;upc=[% NEXT_SHELF_BROWS.browser_normalized_upc %][% END %][% IF ( NEXT_SHELF_BROWS.browser_normalized_oclc ) %]&amp;oclc=[% NEXT_SHELF_BROWS.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
-    [% ELSE %]<img border="0" src="http://www.syndetics.com/index.aspx?isbn=[% NEXT_SHELF_BROWS.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( NEXT_SHELF_BROWS.browser_normalized_upc ) %]&amp;upc=[% NEXT_SHELF_BROWS.browser_normalized_upc %][% END %][% IF ( NEXT_SHELF_BROWS.browser_normalized_oclc ) %]&amp;oclc=[% NEXT_SHELF_BROWS.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />[% END %]
-    [% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %][% END %]
-
-    [% IF ( GoogleJackets ) %][% IF ( NEXT_SHELF_BROWS.browser_normalized_isbn ) %]<div style="block" title="[% NEXT_SHELF_BROWS.biblionumber |url %]" class="[% NEXT_SHELF_BROWS.browser_normalized_isbn %]" id="gbs-thumbnail-preview[% loop.count %]"></div>[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
-    [% IF ( BakerTaylorEnabled ) %][% IF ( NEXT_SHELF_BROWS.browser_normalized_isbn ) %]
-    <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% NEXT_SHELF_BROWS.browser_normalized_isbn %]" />[% ELSE %]<span class="no-image">No cover image available</span>[% END %][% END %]
-
-</a></td>
-[% END %]
-<td rowspan="2"><div id="browser_next"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% IF ( shelfbrowser_next_biblionumber ) %][% shelfbrowser_next_biblionumber %][% ELSE %][% biblionumber %][% END %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_next_itemnumber %]#shelfbrowser">Next</a></div></td>
-</tr>
-
-<tr>
-[% FOREACH PREVIOUS_SHELF_BROWS IN PREVIOUS_SHELF_BROWSE %]
-<td class="top">[% PREVIOUS_SHELF_BROWS.itemcallnumber %]<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% PREVIOUS_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% PREVIOUS_SHELF_BROWS.itemnumber %]#shelfbrowser">[% PREVIOUS_SHELF_BROWS.title |html %]</a></td>
-[% END %]
-
-[% FOREACH NEXT_SHELF_BROWS IN NEXT_SHELF_BROWSE %]
-       <td class="top" style="width:20px;">[% NEXT_SHELF_BROWS.itemcallnumber %]<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% NEXT_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% NEXT_SHELF_BROWS.itemnumber %]#shelfbrowser">[% NEXT_SHELF_BROWS.title |html %]</a></td>
-[% END %]
-</tr>
-</table>
-        
-</div>
-[% END %]
+[% INCLUDE shelfbrowser tab='holdings' %]
 <br clear="all" />
 </div>
 
+[% IF (SeparateHoldings) %]
+    <div id="otherholdings">
+        [% IF (otheritemloop.size) %]
+            [% INCLUDE items_table items=otheritemloop tab="otherholdings" %]
+        [% ELSE %]
+            No other items.
+        [% END %]
+        [% INCLUDE shelfbrowser tab='otherholdings' %]
+    </div>
+[% END %]
 
 <div id="descriptions">
 <div class="content_set">
@@ -977,6 +896,8 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     [% FOREACH subscription IN subscriptions %]
     [% IF ( subscription.branchname ) %]<h3>At library: [% subscription.branchname %]</h3>[% ELSE %]
     [% IF ( subscription.branchcode ) %]<h3>At library: [% subscription.branchcode %]</h3>[% END %][% END %]
+    [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
+    <span style="display:none;"> [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber %]</p>[% END %]</span>
     [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes FILTER html_line_break %] </p>[% END %]
     <p>Subscription from: [% subscription.histstartdate | $KohaDates %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate | $KohaDates %] [% ELSE %] now (current)[% END %]</p>
     [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist %] </p>[% END %]
@@ -1138,7 +1059,20 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 </table>
 </div>[% END %][% END %]
 
-[% IF ( OPACLocalCoverImages ) %]
+[% IF ( HTML5MediaEnabled ) %]
+<div id="html5media">
+        <p>
+        <[% HTML5MediaParent %] controls preload=none>
+          [% FOREACH HTML5MediaSet IN HTML5MediaSets %]
+            <[% HTML5MediaSet.child  %] src="[% HTML5MediaSet.srcblock %]"[% HTML5MediaSet.typeblock %] />
+          [% END %]
+            [[% HTML5MediaParent %] tag not supported by your browser.]
+        </[% HTML5MediaParent %]>
+        </p>
+</div>
+[% END %]
+
+[% IF ( OPACLocalCoverImages && localimages.size ) %]
 <div id="images">
 <p>Click on an image to view it in the image viewer</p>
 [% FOREACH image IN localimages %]
@@ -1215,11 +1149,11 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     <div id="social_networks">
         <span>Share</span>
         <div><a id="facebook" href="http://www.facebook.com/sharer.php?u=[% current_url |url %]&amp;t=[% title |url %]" title="Share on Facebook">Facebook</a></div>
-        <div><a id="twitter" href="http://twitter.com/share" title="Share on Twitter">Twitter</a></div>
         <div><a id="linkedin" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=[% current_url |url %]&amp;title=[% title |url %]" title="Share on LinkedIn">LinkedIn</a></div>
         <div><a id="delicious" href="http://www.delicious.com/save?url=[% current_url |url %]&amp;title=[% title |url %]" title="Share on Delicious">Delicious</a></div>
         <div><a id="email" href="mailto:?subject=[% title |url %]&amp;body=[% title |url %] ([% current_url |url %])" title="Share by email">Email</a></div>
-        <div><g:plusone size="small"></g:plusone></div>
+        <div><g:plusone size="small" annotation="none"></g:plusone></div>
+        <div><a id="twitter" href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-text="[% title %]" data-lang="[% lang %]">Tweet</a></div>
     </div>
 [% END %]
 
@@ -1252,3 +1186,194 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 [% END %]
 
 [% INCLUDE 'opac-bottom.inc' %]
+
+[%# End of template %]
+
+[% BLOCK items_table %]
+    <table class="holdingst">
+        <thead><tr>
+            [% IF ( item_level_itypes ) %]<th id="item_itemtype">Item type</th>[% END %]
+            <th id="item_location">Location</th>
+            [% IF ( itemdata_ccode ) %]<th id="item_ccode">Collection</th>[% END %]
+            <th id="item_callnumber">Call number</th>
+            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron">Vol info</th>[% END %]
+            [% IF ( itemdata_uri ) %]<th id="item_url">url</th>[% END %]
+            [% IF ( itemdata_copynumber ) %]<th id="item_copy">Copy</th>[% END %]
+            <th id="item_status">Status</th>
+            [% IF ( itemdata_itemnotes ) %]<th id="item_notes">Notes</th>[% END %]
+            <th id="item_datedue">Date due</th>
+            [% IF ( OPACShowBarcode ) %]<th>Barcode</th>[% END %]
+        [% IF holds_count.defined %]
+            <th>Item holds</th>
+        [% ELSIF show_priority %]
+            <th>Item hold queue priority</th>
+        [% END %]
+        </tr></thead>
+           <tbody>[% FOREACH ITEM_RESULT IN items %]
+      <tr>[% IF ( item_level_itypes ) %]<td class="itype">[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %]
+             <td class="location">
+    [% UNLESS ( singleBranchMode ) %]
+        <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
+        [% IF ( ITEM_RESULT.branchurl ) %]
+        <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
+        [% ELSE %]
+        [% ITEM_RESULT.branchname %]
+        [% END %]
+        </span>
+        <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
+    [% END %]
+    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
+    </td>
+            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
+        <td class="call_no">[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#[% tab %]">Browse shelf</a>)[% END %][% END %]</td>
+            [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %]
+          [% IF ( itemdata_uri ) %]<td class="url"><a href="[% ITEM_RESULT.uri %]">[% ITEM_RESULT.uri %]</a></td>[% END %]
+               [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber %]</td>[% END %]
+              <td class="status">[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
+             [% IF ( itemdata_itemnotes ) %]<td class="notes">[% ITEM_RESULT.itemnotes %]</td>[% END %]
+        <td class="date_due">[% ITEM_RESULT.datedue | $KohaDates %]</td>
+        [% IF ( OPACShowBarcode ) %]<td class="barcode">[% ITEM_RESULT.barcode %]</td>[% END %]
+        [% IF holds_count.defined || show_priority %]
+        <td class="holds_count">
+            [% IF holds_count.defined %] [% ITEM_RESULT.holds_count %] [% END %]
+            [% IF ITEM_RESULT.priority %]
+                [% IF holds_count.defined %]
+                (priority [% ITEM_RESULT.priority %])
+                [% ELSE %]
+                [% ITEM_RESULT.priority %]
+                [% END %]
+            [% END %]
+                </td>
+        [% END %]
+           </tr>
+           [% END %]</tbody>
+       </table>
+[% END %][%# end of items_table block %]
+
+[% BLOCK shelfbrowser %]
+    [% IF ( OpenOPACShelfBrowser and shelfbrowser_tab == tab) %]
+        <div id="shelfbrowser">
+            <h5 style="text-align: center;">
+                [% IF ( starting_homebranch ) %]Browsing [% starting_homebranch %] Shelves[% END %]
+                [% IF ( starting_location ) %], Shelving location: [% starting_location %][% END %]
+                [% IF ( starting_ccode ) %], Collection code: [% starting_ccode %][% END %]
+                <a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]">Close shelf browser</a>
+            </h5>
+
+            <table>
+                <tr>
+                    <td rowspan="2" style="width:20px;">
+                        <div id="browser_previous">
+                            <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% IF ( shelfbrowser_prev_biblionumber ) %][% shelfbrowser_prev_biblionumber %][% ELSE %][% biblionumber %][% END %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_prev_itemnumber %]#shelfbrowser">Previous</a>
+                        </div>
+                    </td>
+                    [% FOREACH PREVIOUS_SHELF_BROWS IN PREVIOUS_SHELF_BROWSE %]
+                        <td>
+                            <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% PREVIOUS_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% PREVIOUS_SHELF_BROWS.itemnumber %]#shelfbrowser">
+                                [% IF ( OPACAmazonCoverImages ) %]
+                                    [% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_isbn ) %]
+                                        <img border="0" src="http://images.amazon.com/images/P/[% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %].01._AA75_PU_PU-5_.jpg" alt="" />
+                                    [% ELSE %]
+                                        <span class="no-image">No cover image available</span>
+                                    [% END %]
+                                [% END %]
+                                [% IF ( SyndeticsEnabled ) %]
+                                    [% IF ( SyndeticsCoverImages ) %]
+                                        [% IF ( content_identifier_exists ) %]
+                                            [% IF ( using_https ) %]
+                                                <img border="0" src="https://secure.syndetics.com/index.aspx?isbn=[% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_upc ) %]&amp;upc=[% PREVIOUS_SHELF_BROWS.browser_normalized_upc %][% END %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_oclc ) %]&amp;oclc=[% PREVIOUS_SHELF_BROWS.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
+                                            [% ELSE %]
+                                                <img border="0" src="http://www.syndetics.com/index.aspx?isbn=[% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_upc ) %]&amp;upc=[% PREVIOUS_SHELF_BROWS.browser_normalized_upc %][% END %][% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_oclc ) %]&amp;oclc=[% PREVIOUS_SHELF_BROWS.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
+                                            [% END %]
+                                        [% ELSE %]
+                                            <span class="no-image">No cover image available</span>
+                                        [% END %]
+                                    [% END %]
+                                [% END %]
+                                [% IF ( GoogleJackets ) %]
+                                    [% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_isbn ) %]
+                                        <div style="block" title="[% PREVIOUS_SHELF_BROWS.biblionumber |url %]" class="[% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %]" id="gbs-thumbnail-preview[% loop.count %]"></div>
+                                    [% ELSE %]
+                                        <span class="no-image">No cover image available</span>
+                                    [% END %]
+                                [% END %]
+                                [% IF ( BakerTaylorEnabled ) %]
+                                    [% IF ( PREVIOUS_SHELF_BROWS.browser_normalized_isbn ) %]
+                                        <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% PREVIOUS_SHELF_BROWS.browser_normalized_isbn %]" />
+                                    [% ELSE %]
+                                        <span class="no-image">No cover image available</span>
+                                    [% END %]
+                                [% END %]
+                            </a>
+                        </td>
+                    [% END %]
+
+                    [% FOREACH NEXT_SHELF_BROWS IN NEXT_SHELF_BROWSE %]
+                        <td>
+                            <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% NEXT_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% NEXT_SHELF_BROWS.itemnumber %]#shelfbrowser">
+                                [% IF ( OPACAmazonCoverImages ) %]
+                                    [% IF ( NEXT_SHELF_BROWS.browser_normalized_isbn ) %]
+                                        <img border="0" src="http://images.amazon.com/images/P/[% NEXT_SHELF_BROWS.browser_normalized_isbn %].01._AA75_PU_PU-5_.jpg" alt="" />
+                                    [% ELSE %]
+                                        <span class="no-image">No cover image available</span>
+                                    [% END %]
+                                [% END %]
+
+                                [% IF ( SyndeticsEnabled ) %]
+                                    [% IF ( SyndeticsCoverImages ) %]
+                                        [% IF ( content_identifier_exists ) %]
+                                            [% IF ( using_https ) %]
+                                                <img border="0" src="https://secure.syndetics.com/index.aspx?isbn=[% NEXT_SHELF_BROWS.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( NEXT_SHELF_BROWS.browser_normalized_upc ) %]&amp;upc=[% NEXT_SHELF_BROWS.browser_normalized_upc %][% END %][% IF ( NEXT_SHELF_BROWS.browser_normalized_oclc ) %]&amp;oclc=[% NEXT_SHELF_BROWS.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
+                                            [% ELSE %]
+                                                <img border="0" src="http://www.syndetics.com/index.aspx?isbn=[% NEXT_SHELF_BROWS.browser_normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %][% IF ( NEXT_SHELF_BROWS.browser_normalized_upc ) %]&amp;upc=[% NEXT_SHELF_BROWS.browser_normalized_upc %][% END %][% IF ( NEXT_SHELF_BROWS.browser_normalized_oclc ) %]&amp;oclc=[% NEXT_SHELF_BROWS.browser_normalized_oclc %][% END %]&amp;type=xw10" alt="" />
+                                            [% END %]
+                                        [% ELSE %]
+                                            <span class="no-image">No cover image available</span>
+                                        [% END %]
+                                    [% END %]
+                                [% END %]
+
+                                [% IF ( GoogleJackets ) %]
+                                    [% IF ( NEXT_SHELF_BROWS.browser_normalized_isbn ) %]
+                                        <div style="block" title="[% NEXT_SHELF_BROWS.biblionumber |url %]" class="[% NEXT_SHELF_BROWS.browser_normalized_isbn %]" id="gbs-thumbnail-preview[% loop.count %]"></div>
+                                    [% ELSE %]
+                                        <span class="no-image">No cover image available</span>
+                                    [% END %]
+                                [% END %]
+                                [% IF ( BakerTaylorEnabled ) %]
+                                    [% IF ( NEXT_SHELF_BROWS.browser_normalized_isbn ) %]
+                                        <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% NEXT_SHELF_BROWS.browser_normalized_isbn %]" />
+                                    [% ELSE %]
+                                        <span class="no-image">No cover image available</span>
+                                    [% END %]
+                                [% END %]
+                            </a>
+                        </td>
+                    [% END %]
+
+                    <td rowspan="2">
+                        <div id="browser_next">
+                            <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% IF ( shelfbrowser_next_biblionumber ) %][% shelfbrowser_next_biblionumber %][% ELSE %][% biblionumber %][% END %]&amp;shelfbrowse_itemnumber=[% shelfbrowser_next_itemnumber %]#shelfbrowser">Next</a>
+                        </div>
+                    </td>
+                </tr>
+
+                <tr>
+                    [% FOREACH PREVIOUS_SHELF_BROWS IN PREVIOUS_SHELF_BROWSE %]
+                        <td class="top">
+                            [% PREVIOUS_SHELF_BROWS.itemcallnumber %]
+                            <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% PREVIOUS_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% PREVIOUS_SHELF_BROWS.itemnumber %]#shelfbrowser">[% PREVIOUS_SHELF_BROWS.title |html %]</a>
+                        </td>
+                    [% END %]
+
+                    [% FOREACH NEXT_SHELF_BROWS IN NEXT_SHELF_BROWSE %]
+                        <td class="top" style="width:20px;">
+                            [% NEXT_SHELF_BROWS.itemcallnumber %]
+                            <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% NEXT_SHELF_BROWS.biblionumber %]&amp;shelfbrowse_itemnumber=[% NEXT_SHELF_BROWS.itemnumber %]#shelfbrowser">[% NEXT_SHELF_BROWS.title |html %]</a>
+                        </td>
+                    [% END %]
+                </tr>
+            </table>
+        </div>
+    [% END %]
+[% END %][%# end of shelfbrowser block %]
index 6b1e365..f594ffc 100644 (file)
@@ -9,9 +9,9 @@
        <ol><li><label for="format">Download cart:</label>
         <select name="format" id="format">
         <option value="">-- Choose format --</option>
-           <option value="iso2709">iso2709</option>
-           <option value="ris">RIS</option>
-           <option value="bibtex">BibTex</option>
+        <option value="ris">RIS (Zotero, EndNote, others)</option>
+        <option value="bibtex">BibTeX</option>
+        <option value="iso2709">MARC</option>
            [% FOREACH csv_profile IN csv_profiles %]
            <option value="[% csv_profile.export_format_id %]">CSV - [% csv_profile.profile %]</option>
            [% END %]
index e3c9a21..5712c6a 100644 (file)
@@ -17,9 +17,9 @@
                <ol><li><label for="format">Download list:</label>
                <select name="format" id="format">
             <option value="">-- Choose format --</option>
-                   <option value="iso2709">iso2709</option>
-                   <option value="ris">RIS</option>
-                   <option value="bibtex">BibTex</option>
+            <option value="ris">RIS (Zotero, EndNote, others)</option>
+            <option value="bibtex">BibTeX</option>
+            <option value="iso2709">MARC</option>
                    [% FOREACH csv_profile IN csv_profiles %]
                    <option value="[% csv_profile.export_format_id %]">CSV - [% csv_profile.profile %]</option>
                    [% END %]
index 6b47afa..c37a6ef 100644 (file)
@@ -200,12 +200,15 @@ function showlayer(numlayer){
                    </td>
                    <td>    [% serial.serialseq %]
                    </td>
-                   <td>    [% IF ( serial.status1 ) %]Waiting[% END %]
-                       [% IF ( serial.status2 ) %]Arrived[% END %]
-                       [% IF ( serial.status3 ) %]Late[% END %]
-                       [% IF ( serial.status4 ) %]Missing[% END %]
-            [% IF ( serial.status5 ) %]Not available[% END %]
-                       [% IF ( serial.status7 ) %]Claimed[% END %]
+            <td>
+              [% IF ( serial.status1 ) %]Expected[% END %]
+              [% IF ( serial.status2 ) %]Arrived[% END %]
+              [% IF ( serial.status3 ) %]Late[% END %]
+              [% IF ( serial.status4 ) %]Missing[% END %]
+              [% IF ( serial.status5 ) %]Not available[% END %]
+              [% IF ( serial.status6 ) %]Delete[% END %]
+              [% IF ( serial.status7 ) %]Claimed[% END %]
+              [% IF ( serial.status8 ) %]Stopped[% END %]
                    </td>
                    <td class="subscriptionidfilterclass">    [% serial.subscriptionid %]
                    </td>
index cc67ff2..61235e6 100644 (file)
@@ -56,6 +56,9 @@
                <li><label for="password">Password:</label><input type="password" id="password" size="10" name="password" /></li>
                </ol>    <fieldset class="action">
         <input type="submit" value="Log In" class="submit" />
+
+        [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<div id="patronregistration">Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></div>[% END %]
+
         </fieldset></fieldset>
        </form>
        </div>
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry-update-submitted.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry-update-submitted.tt
new file mode 100644 (file)
index 0000000..21fe7de
--- /dev/null
@@ -0,0 +1,28 @@
+[% INCLUDE 'doc-head-open.inc' %]
+[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Updates submitted
+[% INCLUDE 'doc-head-close.inc' %]
+</head>
+<body id="opac-patron-update-submitted">
+<div id="doc3" class="yui-t1">
+   <div id="bd">
+[% INCLUDE 'masthead.inc' %]
+
+<div id="yui-main">
+    <div class="yui-b">
+        <div id="update-submitted" class="container">
+
+            <h3><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]'s account</a> &#8674; Updates to your record</h3>
+            <div class="dialog message">
+                <h3>Thank you</h3>
+                <p>Your updates have been submitted. A librarian will review your updates before applying them.</p>
+            </div>
+        </div>
+    </div>
+</div>
+<div class="yui-b">
+<div id="leftmenus" class="container">
+[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
+</div>
+</div>
+</div>
+[% INCLUDE 'opac-bottom.inc' %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-memberentry.tt
new file mode 100644 (file)
index 0000000..d41917c
--- /dev/null
@@ -0,0 +1,757 @@
+[% USE KohaDates %]
+[% SET userupdateview = 1 %]
+
+    [% INCLUDE 'doc-head-open.inc' %]
+        [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; [% IF action == 'edit' %]Update your personal details[% ELSE %]Register a new account[% END %]
+    [% INCLUDE 'doc-head-close.inc' %]
+
+    <script type="text/javascript">
+        //<![CDATA[
+        $(document).ready(function() {
+            [% IF action == 'edit' && !OPACPatronDetails %]
+                $("#memberentry-form :input").attr('readonly', true);
+                $("#borrower_branchcode").attr('disabled',true);
+                $("#borrower_title").attr('disabled',true);
+                $('#memberentry-form :radio').attr('disabled',true);
+                $('span.required').remove();
+                $('label.required').removeClass('required');
+            [% ELSE %]
+                $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });
+            [% END %]
+        });
+    //]]>
+    </script>
+</head>
+[% IF action == 'edit' %]
+<body id="opac-patron-update">
+[% ELSE %]
+<body id="opac-patron-registration">
+[% END %]
+    <div id="doc3" class="yui-t1">
+        <div id="bd">
+            [% INCLUDE 'masthead.inc' %]
+
+            <div id="yui-main">
+                <div class="yui-b">
+                    <div class="yui-g">
+                        [% IF action == 'edit' %]
+                        <div id="update-account" class="container">
+                        [% ELSE %]
+                        <div id="add-account" class="container">
+                        [% END %]
+                        [% IF action == 'edit' %]
+                            <h3><a href="/cgi-bin/koha/opac-user.pl">[% borrower.firstname %] [% borrower.surname %]'s account</a> &#8674; Personal details</h3>
+                        [% ELSE %]
+                            <h3>Register a new account</h3>
+                        [% END %]
+
+                            [% IF action == 'edit' %]
+                            [% UNLESS OPACPatronDetails %]
+                                <div class="dialog message">To make changes to your record please contact the library.</div>
+                            [% END %]
+                            [% END %]
+
+                            [% IF empty_mandatory_fields %]
+                                <div class="dialog alert">You have not filled out all required fields. Please fill in all missing fields and resubmit.</div>
+                            [% END %]
+
+                            [% IF failed_captcha %]
+                                <div class="dialog alert">You typed in the wrong characters in the box before submitting. Please try again.</div>
+                            [% END %]
+
+                            <form method="post" action="/cgi-bin/koha/opac-memberentry.pl" id="memberentry-form">
+
+                                [% UNLESS
+                                    hidden.defined('branchcode')
+                                %]
+
+                                <fieldset class="rows" id="memberentry_library">
+
+                                    <legend id="library_legend">Library</legend>
+                                        <ol>
+                                            [% UNLESS hidden.defined('branchcode') %]
+                                                <li>
+                                                    [% IF mandatory.defined('branchcode') %]
+                                                        <label for="borrower_branchcode" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_branchcode">
+                                                    [% END %]
+                                                    Home Library:</label>
+
+                                                    <select id="borrower_branchcode" name="borrower_branchcode">
+                                                        [% FOREACH b IN branches %]
+                                                            [% IF b.value == borrower.branchcode %]
+                                                                <option value="[% b.value %]" selected="selected">[% b.branchname %]</option>
+                                                            [% ELSE %]
+                                                                <option value="[% b.value %]">[% b.branchname %]</option>
+                                                            [% END %]
+                                                        [% END %]
+                                                    </select>
+                                                </li>
+                                            [% END %]
+                                        </ol>
+                                    </fieldset>
+                                [% END %]
+
+                                [% UNLESS
+                                    hidden.defined('title') && hidden.defined('surname') && hidden.defined('firstname') &&
+                                    hidden.defined('dateofbirth') && hidden.defined('initials') && hidden.defined('othernames') &&
+                                    hidden.defined('sex')
+                                %]
+                                    <fieldset class="rows" id="memberentry_identity">
+                                        <legend id="identity_legend">Identity</legend>
+
+                                        <ol>
+                                            [% UNLESS hidden.defined('title') %]
+                                                <li>
+                                                    [% IF mandatory.defined('title') %]
+                                                        <label for="borrower_title" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_title">
+                                                    [% END %]
+                                                    Salutation:</label>
+
+                                                    <select id="borrower_title" name="borrower_title">
+                                                        <option value="">&nbsp;</option>
+                                                        [% FOREACH mt IN member_titles %]
+                                                            [% IF mt == borrower.title %]
+                                                                <option value="[% mt %]" selected="selected">[% mt %]</option>
+                                                            [% ELSE %]
+                                                                <option value="[% mt %]">[% mt %]</option>
+                                                            [% END %]
+                                                        [% END %]
+                                                    </select>
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('surname') %]
+                                                <li>
+                                                    [% IF mandatory.defined('surname') %]
+                                                        <label for="borrower_surname" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_surname">
+                                                    [% END %]
+                                                    Surname:</label>
+
+                                                    <input type="text" id="borrower_surname" name="borrower_surname" value="[% borrower.surname %]" />
+                                                    [% IF mandatory.defined('surname') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('firstname') %]
+                                                <li>
+                                                    [% IF mandatory.defined('firstname') %]
+                                                        <label for="borrower_firstname" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_firstname">
+                                                    [% END %]
+                                                    First name:</label>
+
+                                                    <input type="text" id="borrower_firstname" name="borrower_firstname" value="[% borrower.firstname %]" />
+                                                    [% IF mandatory.defined('firstname') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('dateofbirth') %]
+                                                <li>
+                                                    [% IF mandatory.defined('dateofbirth') %]
+                                                        <label for="borrower_dateofbirth" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_dateofbirth">
+                                                    [% END %]
+                                                    Date of birth:</label>
+
+                                                    <input type="text" id="borrower_dateofbirth" name="borrower_dateofbirth" value="[% borrower.dateofbirth | $KohaDates %]" size="10" />
+
+                                                    [% UNLESS action == 'edit' && !OPACPatronDetails %]
+                                                        <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a><p></p>
+                                                    [% END %]
+
+                                                    [% IF mandatory.defined('dateofbirth') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('initials') %]
+                                                <li>
+                                                    [% IF mandatory.defined('initials') %]
+                                                        <label for="borrower_initials" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_initials">
+                                                    [% END %]
+                                                    Initials:</label>
+
+                                                    <input type="text" id="borrower_initials" name="borrower_initials" value="[% borrower.initials %]" />
+                                                    [% IF mandatory.defined('initials') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('othernames') %]
+                                                <li>
+                                                    [% IF mandatory.defined('othernames') %]
+                                                        <label for="borrower_othernames" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_othernames">
+                                                    [% END %]
+                                                    Other names:</label>
+
+                                                    <input type="text" id="borrower_othernames" name="borrower_othernames" value="[% borrower.othernames %]" />
+                                                    [% IF mandatory.defined('othernames') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('sex') %]
+                                                <li class="radio">
+                                                    <label for="sex-female">Female:</label>
+                                                    [% IF borrower.sex == 'F' %]
+                                                        <input type="radio" name="borrower_sex" id="sex-female" value="F" checked="checked" />
+                                                    [% ELSE %]
+                                                        <input type="radio" name="borrower_sex" id="sex-female" value="F" />
+                                                    [% END %]
+
+                                                    <label for="sex-male">Male:</label>
+                                                    [% IF borrower.sex == 'M' %]
+                                                        <input type="radio" name="borrower_sex" id="sex-male" value="M" checked="checked" />
+                                                    [% ELSE %]
+                                                        <input type="radio" name="borrower_sex" id="sex-male" value="M" />
+                                                    [% END %]
+
+                                                    <label for="sex-none">N/A:</label>
+                                                    [% IF borrower.sex == '' %]
+                                                        <input type="radio" name="borrower_sex" id="sex-none" value="" checked="checked" />
+                                                    [% ELSE %]
+                                                        <input type="radio" name="borrower_sex" id="sex-none" value="" />
+                                                    [% END %]
+
+                                                    [% IF mandatory.defined('sex') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+                                        </ol>
+                                    </fieldset>
+                                [% END %]
+
+                                [% UNLESS
+                                    hidden.defined('streetnumber') && hidden.defined('address') && hidden.defined('address2') &&
+                                    hidden.defined('city') && hidden.defined('state') && hidden.defined('zipcode') &&
+                                    hidden.defined('country')
+                                %]
+                                    <fieldset class="rows" id="memberentry_mainaddress">
+                                        <legend id="mainaddress_legend">Main address</legend>
+
+                                        <ol>
+                                            [% UNLESS hidden.defined('streetnumber') %]
+                                                <li>
+                                                    [% IF mandatory.defined('streetnumber') %]
+                                                        <label for="borrower_streetnumber" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_streetnumber">
+                                                    [% END %]
+                                                    Street number:</label>
+
+                                                    <input type="text" id="borrower_streetnumber" name="borrower_streetnumber" value="[% borrower.streetnumber %]" />
+                                                    [% IF mandatory.defined('streetnumber') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('address') %]
+                                                <li>
+                                                    [% IF mandatory.defined('address') %]
+                                                        <label for="borrower_address" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_address">
+                                                    [% END %]
+                                                    Address:</label>
+
+                                                    <input type="text" id="borrower_address" name="borrower_address" value="[% borrower.address %]" />
+                                                    [% IF mandatory.defined('address') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('address2') %]
+                                                <li>
+                                                    [% IF mandatory.defined('address2') %]
+                                                        <label for="borrower_address2" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_address2">
+                                                    [% END %]
+                                                    Address 2:</label>
+
+                                                    <input type="text" id="borrower_address2" name="borrower_address2" value="[% borrower.address2 %]" />
+                                                    [% IF mandatory.defined('address2') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('city') %]
+                                                <li>
+                                                    [% IF mandatory.defined('city') %]
+                                                        <label for="borrower_city" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_city">
+                                                    [% END %]
+                                                    City:</label>
+
+                                                    <input type="text" id="borrower_city" name="borrower_city" value="[% borrower.city %]" />
+                                                    [% IF mandatory.defined('city') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('state') %]
+                                                <li>
+                                                    [% IF mandatory.defined('state') %]
+                                                        <label for="borrower_state" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_state">
+                                                    [% END %]
+                                                    State:</label>
+
+                                                    <input type="text" id="borrower_state" name="borrower_state" value="[% borrower.state %]" />
+                                                    [% IF mandatory.defined('state') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('zipcode') %]
+                                                <li>
+                                                    [% IF mandatory.defined('zipcode') %]
+                                                        <label for="borrower_zipcode" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_zipcode">
+                                                    [% END %]
+                                                    Zip/Postal code:</label>
+
+                                                    <input type="text" id="borrower_zipcode" name="borrower_zipcode" value="[% borrower.zipcode %]" />
+                                                    [% IF mandatory.defined('zipcode') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('country') %]
+                                                <li>
+                                                    [% IF mandatory.defined('country') %]
+                                                        <label for="borrower_country" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_country">
+                                                    [% END %]
+                                                    Country:</label>
+
+                                                    <input type="text" id="borrower_country" name="borrower_country" value="[% borrower.country %]" />
+                                                    [% IF mandatory.defined('country') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                        </ol>
+                                    </fieldset>
+                                [% END %]
+
+                                [% UNLESS
+                                    hidden.defined('phone') && hidden.defined('phonepro') && hidden.defined('mobile') &&
+                                    hidden.defined('email') && hidden.defined('emailpro') && hidden.defined('fax')
+                                %]
+                                    <fieldset class="rows" id="memberentry_contact">
+                                        <legend id="contact_legend">Contact information</legend>
+
+                                        <ol>
+                                            [% UNLESS hidden.defined('phone') %]
+                                                <li>
+                                                    [% IF mandatory.defined('phone') %]
+                                                        <label for="borrower_phone" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_phone">
+                                                    [% END %]
+                                                    Primary phone:</label>
+
+                                                    <input type="text" id="borrower_phone" name="borrower_phone" value="[% borrower.phone %]" />
+                                                    [% IF mandatory.defined('phone') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('phonepro') %]
+                                                <li>
+                                                    [% IF mandatory.defined('phonepro') %]
+                                                        <label for="borrower_phonepro" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_phonepro">
+                                                    [% END %]
+                                                    Secondary phone:</label>
+
+                                                    <input type="text" id="borrower_phonepro" name="borrower_phonepro" value="[% borrower.phonepro %]" />
+                                                    [% IF mandatory.defined('phonepro') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('mobile') %]
+                                                <li>
+                                                    [% IF mandatory.defined('mobile') %]
+                                                        <label for="borrower_mobile" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_mobile">
+                                                    [% END %]
+                                                    Mobile phone:</label>
+
+                                                    <input type="text" id="borrower_mobile" name="borrower_mobile" value="[% borrower.mobile %]" />
+                                                    [% IF mandatory.defined('mobile') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('email') %]
+                                                <li>
+                                                    [% IF mandatory.defined('email') %]
+                                                        <label for="borrower_email" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_email">
+                                                    [% END %]
+                                                    Primary email:</label>
+
+                                                    <input type="text" id="borrower_email" name="borrower_email" value="[% borrower.email %]" />
+                                                    [% IF mandatory.defined('email') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('emailpro') %]
+                                                <li>
+                                                    [% IF mandatory.defined('emailpro') %]
+                                                        <label for="borrower_emailpro" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_emailpro">
+                                                    [% END %]
+                                                    Secondary email:</label>
+
+                                                    <input type="text" id="borrower_emailpro" name="borrower_emailpro" value="[% borrower.emailpro %]" />
+                                                    [% IF mandatory.defined('emailpro') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('fax') %]
+                                                <li>
+                                                    [% IF mandatory.defined('fax') %]
+                                                        <label for="borrower_fax" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_fax">
+                                                    [% END %]
+                                                    Fax:</label>
+
+                                                    <input type="text" id="borrower_fax" name="borrower_fax" value="[% borrower.fax %]" />
+                                                    [% IF mandatory.defined('fax') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+                                        </ol>
+                                    </fieldset>
+                                [% END %]
+
+                                [% UNLESS
+                                    hidden.defined('B_address') && hidden.defined('B_address2') && hidden.defined('B_city') &&
+                                    hidden.defined('B_state') && hidden.defined('B_zipcode') && hidden.defined('B_county') &&
+                                    hidden.defined('B_phone') && hidden.defined('B_email') && hidden.defined('contactnote')
+                                %]
+                                    <fieldset class="rows" id="memberentry_alternateaddress">
+                                        <legend id="alternateaddress_legend">Alternate address</legend>
+
+                                        <ol>
+                                            [% UNLESS hidden.defined('B_address') %]
+                                                <li>
+                                                    [% IF mandatory.defined('B_address') %]
+                                                        <label for="borrower_B_address" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_B_address">
+                                                    [% END %]
+                                                    Address:</label>
+
+                                                    <input type="text" id="borrower_B_address" name="borrower_B_address" value="[% borrower.B_address %]" />
+                                                    [% IF mandatory.defined('B_address') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('B_address2') %]
+                                                <li>
+                                                    [% IF mandatory.defined('B_address2') %]
+                                                        <label for="borrower_B_address2" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_B_address2">
+                                                    [% END %]
+                                                    Address 2:</label>
+
+                                                    <input type="text" id="borrower_B_address2" name="borrower_B_address2" value="[% borrower.B_address2 %]" />
+                                                    [% IF mandatory.defined('B_address2') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('B_city') %]
+                                                <li>
+                                                    [% IF mandatory.defined('B_city') %]
+                                                        <label for="borrower_B_city" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_B_city">
+                                                    [% END %]
+                                                    City:</label>
+
+                                                    <input type="text" id="borrower_B_city" name="borrower_B_city" value="[% borrower.B_city %]" />
+                                                    [% IF mandatory.defined('B_city') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('B_state') %]
+                                                <li>
+                                                    [% IF mandatory.defined('B_state') %]
+                                                        <label for="borrower_B_state" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_B_state">
+                                                    [% END %]
+                                                    State:</label>
+
+                                                    <input type="text" id="borrower_B_state" name="borrower_B_state" value="[% borrower.B_state %]" />
+                                                    [% IF mandatory.defined('B_state') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('B_zipcode') %]
+                                                <li>
+                                                    [% IF mandatory.defined('B_zipcode') %]
+                                                        <label for="borrower_B_zipcode" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_B_zipcode">
+                                                    [% END %]
+                                                    Zip/Postal code:</label>
+
+                                                    <input type="text" id="borrower_B_zipcode" name="borrower_B_zipcode" value="[% borrower.B_zipcode %]" />
+                                                    [% IF mandatory.defined('B_zipcode') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('B_country') %]
+                                                <li>
+                                                    [% IF mandatory.defined('B_country') %]
+                                                        <label for="borrower_B_country" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_B_country">
+                                                    [% END %]
+                                                    Country:</label>
+
+                                                    <input type="text" id="borrower_B_country" name="borrower_B_country" value="[% borrower.B_country %]" />
+                                                    [% IF mandatory.defined('B_country') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('B_phone') %]
+                                                <li>
+                                                    [% IF mandatory.defined('B_phone') %]
+                                                        <label for="borrower_B_phone" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_B_phone">
+                                                    [% END %]
+                                                    Phone:</label>
+
+                                                    <input type="text" id="borrower_B_phone" name="borrower_B_phone" value="[% borrower.B_phone %]" />
+                                                    [% IF mandatory.defined('B_phone') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('B_email') %]
+                                                <li>
+                                                    [% IF mandatory.defined('B_email') %]
+                                                        <label for="borrower_B_email" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_B_email">
+                                                    [% END %]
+                                                    Email:</label>
+
+                                                    <input type="text" id="borrower_B_email" name="borrower_B_email" value="[% borrower.B_email %]" />
+                                                    [% IF mandatory.defined('B_email') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('contactnote') %]
+                                                <li>
+                                                    [% IF mandatory.defined('contactnote') %]
+                                                        <label for="borrower_contactnote" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_contactnote">
+                                                    [% END %]
+                                                    Contact Note:</label>
+
+                                                    <textarea id="borrower_contactnote" name="borrower_contactnote" cols="40" rows="2">[% borrower.contactnote %]</textarea>
+                                                    [% IF mandatory.defined('contactnote') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                        </ol>
+                                    </fieldset>
+                                [% END %]
+
+                                [% UNLESS
+                                    hidden.defined('altcontactsurname') && hidden.defined('altcontactfirstname') && hidden.defined('altcontactaddress1') &&
+                                    hidden.defined('altcontactaddress2') && hidden.defined('altcontactaddress3') && hidden.defined('altcontactstate') &&
+                                    hidden.defined('altcontactzipcode') && hidden.defined('altcontactcountry') && hidden.defined('altcontactphone')
+                                %]
+                                    <fieldset class="rows" id="memberentry_alternatecontact">
+                                        <legend id="alternatecontact_legend">Alternate contact</legend>
+
+                                        <ol>
+                                            [% UNLESS hidden.defined('altcontactsurname') %]
+                                                <li>
+                                                    [% IF mandatory.defined('altcontactsurname') %]
+                                                        <label for="borrower_altcontactsurname" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_altcontactsurname">
+                                                    [% END %]
+                                                    Surname:</label>
+
+                                                    <input type="text" id="borrower_altcontactsurname" name="borrower_altcontactsurname" value="[% borrower.altcontactsurname %]" />
+                                                    [% IF mandatory.defined('altcontactsurname') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('altcontactfirstname') %]
+                                                <li>
+                                                    [% IF mandatory.defined('altcontactfirstname') %]
+                                                        <label for="borrower_altcontactfirstname" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_altcontactfirstname">
+                                                    [% END %]
+                                                    First name:</label>
+
+                                                    <input type="text" id="borrower_altcontactfirstname" name="borrower_altcontactfirstname" value="[% borrower.altcontactfirstname %]" />
+                                                    [% IF mandatory.defined('altcontactfirstname') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('altcontactaddress1') %]
+                                                <li>
+                                                    [% IF mandatory.defined('altcontactaddress1') %]
+                                                        <label for="borrower_altcontactaddress1" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_altcontactaddress1">
+                                                    [% END %]
+                                                    Address:</label>
+
+                                                    <input type="text" id="borrower_altcontactaddress1" name="borrower_altcontactaddress1" value="[% borrower.altcontactaddress1 %]" />
+                                                    [% IF mandatory.defined('altcontactaddress1') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('altcontactaddress2') %]
+                                                <li>
+                                                    [% IF mandatory.defined('altcontactaddress2') %]
+                                                        <label for="borrower_altcontactaddress2" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_altcontactaddress2">
+                                                    [% END %]
+                                                    Address 2:</label>
+
+                                                    <input type="text" id="borrower_altcontactaddress2" name="borrower_altcontactaddress2" value="[% borrower.altcontactaddress2 %]" />
+                                                    [% IF mandatory.defined('altcontactaddress2') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('altcontactaddress3') %]
+                                                <li>
+                                                    [% IF mandatory.defined('altcontactaddress3') %]
+                                                        <label for="borrower_altcontactaddress3" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_altcontactaddress3">
+                                                    [% END %]
+                                                    City:</label>
+
+                                                    <input type="text" id="borrower_altcontactaddress3" name="borrower_altcontactaddress3" value="[% borrower.altcontactaddress3 %]" />
+                                                    [% IF mandatory.defined('altcontactaddress3') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('altcontactstate') %]
+                                                <li>
+                                                    [% IF mandatory.defined('altcontactstate') %]
+                                                        <label for="borrower_altcontactstate" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_altcontactstate">
+                                                    [% END %]
+                                                    State:</label>
+
+                                                    <input type="text" id="borrower_altcontactstate" name="borrower_altcontactstate" value="[% borrower.altcontactstate %]" />
+                                                    [% IF mandatory.defined('altcontactstate') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('altcontactzipcode') %]
+                                                <li>
+                                                    [% IF mandatory.defined('altcontactzipcode') %]
+                                                        <label for="borrower_altcontactzipcode" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_altcontactzipcode">
+                                                    [% END %]
+                                                    Zip/Postal code:</label>
+
+                                                    <input type="text" id="borrower_altcontactzipcode" name="borrower_altcontactzipcode" value="[% borrower.altcontactzipcode %]" />
+                                                    [% IF mandatory.defined('altcontactzipcode') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('altcontactcountry') %]
+                                                <li>
+                                                    [% IF mandatory.defined('altcontactcountry') %]
+                                                        <label for="borrower_altcontactcountry" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_altcontactcountry">
+                                                    [% END %]
+                                                    Country:</label>
+
+                                                    <input type="text" id="borrower_altcontactcountry" name="borrower_altcontactcountry" value="[% borrower.altcontactcountry %]" />
+                                                    [% IF mandatory.defined('altcontactcountry') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+
+                                            [% UNLESS hidden.defined('altcontactphone') %]
+                                                <li>
+                                                    [% IF mandatory.defined('altcontactphone') %]
+                                                        <label for="borrower_altcontactphone" class="required">
+                                                    [% ELSE %]
+                                                        <label for="borrower_altcontactphone">
+                                                    [% END %]
+                                                    Phone:</label>
+
+                                                    <input type="text" id="borrower_altcontactphone" name="borrower_altcontactphone" value="[% borrower.altcontactphone %]" />
+                                                    [% IF mandatory.defined('altcontactphone') %]<span class="required">Required</span>[% END %]
+                                                </li>
+                                            [% END %]
+                                        </ol>
+                                    </fieldset>
+                                [% END %]
+
+                                [% UNLESS action == 'edit' %]
+                                    <fieldset class="rows" id="memberentry_captcha">
+                                        <ol>
+                                            <li>
+                                                <label for="captcha" class="required">Verification:</label>
+
+                                                <input type="text" name="captcha" id="captcha" />
+                                                <input type="hidden" name="captcha_digest" value="[% captcha_digest %]" />
+
+                                                <span class="hint">Please type this following characters into the preceding box: <strong>[% captcha %]</strong></span>
+                                            </li>
+                                        </ol>
+                                    </fieldset>
+                                [% END %]
+
+                                [% IF action == 'edit' %]
+                                    [% IF OPACPatronDetails %]
+                                        <fieldset class="action">
+                                            <input type="hidden" name="action" value="update" />
+                                            <input type="submit" value="Submit update request" />
+                                        </fieldset>
+                                    [% END %]
+                                [% ELSE %]
+                                    <fieldset class="action">
+                                        <input type="hidden" name="action" value="create" />
+                                        <input type="submit" value="Submit" />
+                                    </fieldset>
+                                [% END %]
+
+                            </form>
+
+                        </div><!--/div id="update-account" -->
+                    </div>
+                </div>
+            </div>
+
+            <div class="yui-b">
+                <div id="leftmenus" class="container">
+                    [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
+                </div>
+            </div>
+        </div>
+[% INCLUDE 'opac-bottom.inc' %]
index 907835f..d10ab7b 100644 (file)
         </p></div>
     [% END %]
     
-    [% IF ( Ask_data ) %]
-        [% IF ( OpacPasswordChange ) %]
+    [% IF ( OpacPasswordChange ) %]
+        [% IF ( Ask_data ) %]
         <form action="/cgi-bin/koha/opac-passwd.pl" name="mainform" id="mainform" method="post"><fieldset class="brief">
                        [% UNLESS ( ShortPass ) %]<div class="hint">Your password must be at least [% minpasslen %] characters long.</div>[% END %]
           <ol>  <li><label for="Oldkey">Current password:</label> <input type="password" id="Oldkey" size="25"  name="Oldkey" /></li>
             <li><label for="Newkey">New password:</label> <input type="password" id="Newkey"  size="25"  name="Newkey" /></li>
             <li><label for="Confirm">Re-type new password:</label> <input type="password"  id="Confirm" size="25" name="Confirm" /></li></ol></fieldset>
             <fieldset class="action"><input type="submit" value="Submit changes" class="submit" /> <a href="/cgi-bin/koha/opac-user.pl" class="cancel">Cancel</a></fieldset>
-    </form>
-        [% ELSE %]
-            <div class="dialog alert">You can't change your password.</div>
+        </form>
         [% END %]
+    [% ELSE %]
+        <div class="dialog alert">You can't change your password.</div>
     [% END %]
     
     [% IF ( password_updated ) %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-confirmation.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-confirmation.tt
new file mode 100644 (file)
index 0000000..968faa0
--- /dev/null
@@ -0,0 +1,70 @@
+[% INCLUDE 'doc-head-open.inc' %]
+[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog
+[% INCLUDE 'doc-head-close.inc' %]
+</head>
+<body id="opac-main">
+[% IF ( OpacNav ) %]<div id="doc3" class="yui-t1">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
+   <div id="bd">
+[% INCLUDE 'masthead.inc' %]
+
+<div id="yui-main">
+    <div class="yui-b">
+        <div id="loggedin" class="yui-ge">
+            <div class="yui-u first">
+                <h1>Registration Complete!</h1>
+
+                <p>You have successfully registered your new account. To log in, use the following credentials:</p>
+
+                <p>
+                    Username: [% borrower.userid %]
+                    <br/>
+                    Password: [% password_cleartext %]
+                </p>
+
+                <p>For your convenience, the login box on this page has been pre-filled with this data. Please log in[% IF OpacPasswordChange %] and change your password[% END %].</p>
+
+                <div id="PatronSelfRegistrationAdditionalInstructions">[% PatronSelfRegistrationAdditionalInstructions %]</div>
+            </div>
+
+            [% IF ( opacuserlogin || OpacNavRight ) %]
+                <div class="yui-u">
+                    [% IF ( opacuserlogin ) %]
+                        [% UNLESS ( loggedinusername ) %]
+                            [% UNLESS ( casAuthentication ) %]
+                                <div id="login" class="container clearfix">
+                                    <form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="auth">
+                                        <input type="hidden" name="koha_login_context" value="opac" />
+
+                                        <fieldset class="brief">
+                                            <legend>Log in to your account:</legend>
+
+                                            <ol>
+                                                <li><label for="userid">Login:</label><input type="text" id="userid" size="10" name="userid" value="[% borrower.userid %]" /></li>
+                                                <li><label for="password">Password:</label><input type="password" id="password" size="10" name="password" value="[% password_cleartext %]" /></li>
+                                            </ol>
+
+                                            <fieldset class="action">
+                                                <input type="submit" value="Log In" class="submit" />
+                                            </fieldset>
+                                        </fieldset>
+                                    </form>
+                                </div>
+                            [% END %]
+                        [% END %]
+                    [% END %]
+
+                    [% IF ( OpacNavRight ) %]<div id="opacrightsidebar" class="container">[% OpacNavRight %]</div>[% END %]
+                </div>
+            [% END %]
+        </div>
+    </div>
+</div>
+
+[% IF ( OpacNav ) %]<div class="yui-b">
+    <div id="opacnav" class="container">
+        [% INCLUDE 'navigation.inc' %]
+    </div>
+[% END %]
+
+</div>
+[% INCLUDE 'opac-bottom.inc' %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-email-sent.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-email-sent.tt
new file mode 100644 (file)
index 0000000..649e999
--- /dev/null
@@ -0,0 +1,28 @@
+[% INCLUDE 'doc-head-open.inc' %]
+[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Please confirm your registration
+[% INCLUDE 'doc-head-close.inc' %]
+</head>
+<body id="opac-confirmation-pending">
+[% IF ( OpacNav ) %]<div id="doc3" class="yui-t1">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
+   <div id="bd">
+[% INCLUDE 'masthead.inc' %]
+
+<div id="yui-main">
+    <div class="yui-b">
+        <div id="confirmation-pending" class="dialog message">
+            <h1>Please confirm your registration</h1>
+
+                        <p>A confirmation email has been sent to the email address <strong>[% email %]</strong>.</p>
+
+                        <p>Your account will not be activated until you follow the link provided in the confirmation email.</p></div>
+        </div>
+</div>
+
+[% IF ( OpacNav ) %]<div class="yui-b">
+    <div id="opacnav" class="container">
+        [% INCLUDE 'navigation.inc' %]
+    </div>
+[% END %]
+
+</div>
+[% INCLUDE 'opac-bottom.inc' %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-invalid.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-invalid.tt
new file mode 100644 (file)
index 0000000..12dac1d
--- /dev/null
@@ -0,0 +1,30 @@
+[% INCLUDE 'doc-head-open.inc' %]
+[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog
+[% INCLUDE 'doc-head-close.inc' %]
+</head>
+<body id="opac-main">
+[% IF ( OpacNav ) %]<div id="doc3" class="yui-t1">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
+   <div id="bd">
+[% INCLUDE 'masthead.inc' %]
+
+<div id="yui-main">
+    <div class="yui-b">
+        <div id="loggedin" class="yui-ge">
+            <div class="yui-u first">
+                <h1>Registration invalid!</h1>
+
+                <p>There were problems processing your registration. Please contact your library for help.</p>
+
+            </div>
+        </div>
+    </div>
+</div>
+
+[% IF ( OpacNav ) %]<div class="yui-b">
+    <div id="opacnav" class="container">
+        [% INCLUDE 'navigation.inc' %]
+    </div>
+[% END %]
+
+</div>
+[% INCLUDE 'opac-bottom.inc' %]
index 8096baf..53ccbbf 100644 (file)
@@ -1,5 +1,6 @@
 [% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog &rsaquo;  Placing a hold
 [% INCLUDE 'doc-head-close.inc' %]
+[% INCLUDE 'calendar.inc' %]
 <script type="text/javascript">
 // <![CDATA[
  var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
                           [% UNLESS ( bibitemloo.bib_available ) %]
                             <div class="bibmessage">No available items.</div>
                           [% ELSE %]
-                            <div class="bibmessage">This title cannot be requested.</div>
+                            [% IF ( bibitemloo.already_patron_possession ) %]
+                                <div class="bibmessage">This title cannot be requested because it's already in your possession.</div>
+                            [% ELSE %]
+                                <div class="bibmessage">This title cannot be requested.</div>
+                            [% END %]
                           [% END %]
                         [% END %]
 
index 53e6e4e..2e3ad22 100644 (file)
@@ -1,3 +1,6 @@
+[% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnList ) %]
+[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnList ) %]
+
 [% INCLUDE 'doc-head-open.inc' %]
 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;
 [% IF ( searchdesc ) %]
@@ -38,9 +41,9 @@ function holdBiblioNums(numList) {
     // numList: biblio numbers separated by "/"
     $("#hold_form_biblios").attr("value", numList);
     $("#hold_form").submit();
-}[% END %]
+}[% END %][% END %]
 
-[% IF ( TagsEnabled ) %]
+[% IF ( TagsInputEnabled && loggedinusername ) %]
 function tagSelected() {
     var checkedBoxes = $(".searchresults :checkbox:checked");
     if ($(checkedBoxes).size() == 0) {
@@ -56,6 +59,8 @@ function tagCanceled() {
     $("#tagsel_form").hide();
     $("#tagsel_tag").show();
     $("#sort_by").show();
+    $("#tagsel_new").val("");
+    $("#tagsel_status, .tagstatus").empty().hide();
 }
 
 function tagAdded() {
@@ -67,6 +72,7 @@ function tagAdded() {
 
     var tag = $("#tagsel_new").val();
     if (!tag || (tag == "")) {
+        alert(MSG_NO_TAG_SPECIFIED);
         return false;
     }
 
@@ -78,7 +84,7 @@ function tagAdded() {
 
     KOHA.Tags.add_multitags_button(bibs, tag);
     return false;
-}[% END %][% END %]
+}[% END %]
 [% IF ( OpacHighlightedWords ) %]
 var q_array = new Array();  // holds search terms if available
 
@@ -123,7 +129,7 @@ $(document).ready(function(){
     [% END %]
     param1 += "<\/select> <input type=\"submit\" class=\"submit\" value=\""+_("Save")+"\" />";
     [% ELSE %]
-        var param1 = "<a id=\"addto\" class=\"addtocart\" href=\"#\">Add to cart<\/a>";
+        var param1 = "<a id=\"addto\" class=\"addtocart\" href=\"#\">" + _("Add to cart") + "<\/a>";
     [% END %]
 [% ELSE %]
         var param1 = "<label for=\"addto\">"+_("Add to list: ")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>";
@@ -161,7 +167,6 @@ $(document).ready(function(){
     });
     [% END %]
 [% END %]
-    [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %]$("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>");[% END %][% END %]
 
     function cartList(){
         if($("#addto").find("option:selected").attr("value") == "addtolist"){
@@ -218,10 +223,7 @@ $(document).ready(function(){
         $("#highlight_toggle_on" ).hide().click(function() {highlightOn() ;});
         $("#highlight_toggle_off").show().click(function() {highlightOff();});[% END %][% END %]
 
-[% IF ( opacuserlogin ) %]    [% IF ( TagsEnabled ) %]
-        $(".tagbutton").click(KOHA.Tags.add_tag_button);
-        [% IF ( TagsInputOnList ) %]
-        [% IF ( loggedinusername ) %]
+[% IF ( TagsInputEnabled && loggedinusername ) %]
             $("#tagsel_tag").click(function(){
                 tagSelected();
                 return false;
@@ -235,31 +237,35 @@ $(document).ready(function(){
                 return false;
             });
 
-            $(".tag_results_add").click(function(){
+            $(".tag_add").click(function(){
                 var thisid = $(this).attr("id");
                 thisid = thisid.replace("tag_add","");
                 $(this).hide();
                 $("#tagform"+thisid).show();
                 $("#newtag"+thisid).focus();
+                $("#newtag"+thisid+"_status").empty().hide();
                 return false;
-            })
-
+            });
             $(".cancel_tag_add").click(function(){
                 var thisid = $(this).attr("id");
                 thisid = thisid.replace("cancel","");
-                $(this).parent().hide();
+                $("#tagform"+thisid).hide();
                 $("#tag_add"+thisid).show();
+                $("#newtag"+thisid).val("");
+                $("#newtag"+thisid+"_status").empty().hide();
                 return false;
-            })
-
-        [% ELSE %]
-            $("#tagsel_tag").click(function(){
-                window.location = "/cgi-bin/koha/opac-user.pl";
+            });
+            $(".tagbutton").click(function(){
+                var thisid = $(this).attr("title");
+                var tag = $("#newtag"+thisid).val();
+                if (!tag || (tag == "")) {
+                    alert(MSG_NO_TAG_SPECIFIED);
+                    return false;
+                }
+                KOHA.Tags.add_tag_button(thisid, tag);
                 return false;
             });
-        [% END %]
-        [% END %]
-    [% END %][% END %]
+[% END %]
     [% IF OpenLibraryCovers %]KOHA.OpenLibrary.GetCoverFromIsbn();[% END %]
     [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
     [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
@@ -395,22 +401,20 @@ $(document).ready(function(){
             <span id="placehold"><!-- input class="submit" type="submit" value="Place Hold"/ --></span>
             <div id="holdDetails"></div>
 
-            [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
-                        [% IF ( TagsInputOnList ) %]
-                            <span id="tagsel_span"></span>
-                          [% IF ( loggedinusername ) %]
+            [% IF ( TagsInputEnabled && loggedinusername ) %]
+                            <span id="tagsel_span">
+                              <input id="tagsel_tag" class="submit" type="submit" value="Tag"/>
+                            </span>
                             <span id="tagsel_form" style="display:none">
                               <label for="tagsel_new">New tag:</label>
                               <input name="tagsel_new" id="tagsel_new" maxlength="100" />
-                              <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add" />
-                              <a href="#" id="tagsel_cancel">Cancel</a>
+                              <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="Add" type="submit" value="Add" />
+                              <a href="#" id="tagsel_cancel">(done)</a>
                             </span>
                             <span id="tagsel_status" class="tagsel_tatus" style="display:none;">
                               Tag status here.
                             </span>
-                          [% END %]
-                        [% END %]
-                [% END %][% END %][% END %]
+            [% END %]
         </div>
 
         </td></tr>
@@ -542,18 +546,15 @@ $(document).ready(function(){
                 [% END %]
 
                 [% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %]
-                [% IF ( opacuserlogin ) %][% IF ( TagsEnabled ) %]
-                                [% IF ( TagsShowOnList ) %]
+                [% IF ( TagsShowEnabled ) %]
                                 [% IF ( SEARCH_RESULT.TagLoop.size ) %]
                                         <div class="results_summary"><span class="label">Tags:</span>
                                         <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&amp;q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
                                             [% END %]
                                         </ul>
-                                   [% END %]
-                                    [% IF ( SEARCH_RESULT.TagLoop.size ) %]
-                                    </div>[% END %]
+                                        </div>
                                 [% END %]
-                                [% END %][% END %]
+                [% END %]
                 [% IF ( SEARCH_RESULT.searchhighlightblob ) %]<span class="results_summary"><span class="label">Match:</span> [% SEARCH_RESULT.searchhighlightblob %]</span>[% END %]
 
 
@@ -598,14 +599,18 @@ $(document).ready(function(){
                     [% END %]
                 [% END %]
 
-                [% IF ( TagsInputOnList ) %]
+                [% IF ( TagsInputEnabled ) %]
                     [% IF ( loggedinusername ) %]
-                        <a class="tag_results_add" id="tag_add[% SEARCH_RESULT.biblionumber %]" href="#">Add tag</a>
-                        <span id="tagform[% SEARCH_RESULT.biblionumber %]" class="tag_results_input"><label for="newtag[% SEARCH_RESULT.biblionumber %]">New tag(s):</label><input name="newtag[% SEARCH_RESULT.biblionumber %]" id="newtag[% SEARCH_RESULT.biblionumber %]" maxlength="100" />
-                        <input name="tagbutton" class="tagbutton" title="[% SEARCH_RESULT.biblionumber %]" type="submit" value="Add" /> <a class="cancel_tag_add" id="cancel[% SEARCH_RESULT.biblionumber %]" href="#">Cancel</a>
+                        <a class="tag_add" id="tag_add[% SEARCH_RESULT.biblionumber %]" href="#">Add tag</a>
+                        <span id="tagform[% SEARCH_RESULT.biblionumber %]" class="tag_results_input" style="display:none;">
+                          <label for="newtag[% SEARCH_RESULT.biblionumber %]">New tag(s):</label>
+                          <input name="newtag[% SEARCH_RESULT.biblionumber %]" id="newtag[% SEARCH_RESULT.biblionumber %]" maxlength="100" />
+                          <input name="tagbutton" class="tagbutton" title="[% SEARCH_RESULT.biblionumber %]" type="submit" value="Add" />
+                          <a class="cancel_tag_add" id="cancel[% SEARCH_RESULT.biblionumber %]" href="#">(done)</a>
+                        </span>
                         <span id="newtag[% SEARCH_RESULT.biblionumber %]_status" class="tagstatus" style="display:none;">
-                        Tag status here.
-                        </span></span>
+                          Tag status here.
+                        </span>
                     [% ELSIF ( loop.first ) %]<span id="login4tags">Log in to add tags.</span>
                     [% END %]
                 [% END %]
index 471dddb..8f31917 100644 (file)
@@ -1,12 +1,13 @@
+[% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnList ) %]
+[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnList ) %]
+
 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;   [% IF ( viewshelf ) %]Contents of [% shelfname |html %][% ELSE %]Your lists[% END %][% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <script type="text/javascript">
 //<![CDATA[
-var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");
 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
-var MSG_NO_RECORD_SELECTED = _("Please select one or more items");
 
 [% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
 function holdSelections() {
@@ -24,7 +25,8 @@ function holdSelections() {
     }
 }
 [% END %][% END %]
-[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]function tagSelected() {
+[% IF ( TagsInputEnabled && loggedinusername ) %]
+function tagSelected() {
     var checkedBoxes = $("input:checkbox:checked");
     if ($(checkedBoxes).size()) {
         $("#tagsel_tag").hide();
@@ -39,6 +41,8 @@ function tagCanceled() {
     $("#tagsel_form").hide();
     $("#tagsel_tag").show();
     $(".tag_hides").show();
+    $("#tagsel_new").val("");
+    $(".tagstatus").empty().hide();
 }
 
 function tagAdded() {
@@ -62,7 +66,7 @@ function tagAdded() {
 
     KOHA.Tags.add_multitags_button(bibs, tag);
     return false;
-}[% END %][% END %][% END %]
+}[% END %]
 
 function enableCheckboxActions(){
     // Enable/disable controls if checkboxes are checked
@@ -102,35 +106,51 @@ $(function() {
     $(".cb").click(function(){
       enableCheckboxActions();
     });
+    enableCheckboxActions();
 
-    [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %]
-          $("#addtags").click(function(){
+[% IF ( TagsInputEnabled && loggedinusername ) %]
+        $("#tagsel_tag").click(function(){
             tagSelected();
             return false;
-          });
-          $("#addtags").html("<a id=\"tagsel_tag\" href=\"#\" class=\"disabled\">"+_("Tag")+"<\/a> ");
-
-        $(".tagbutton").click(KOHA.Tags.add_tag_button);
-      [% IF ( loggedinusername ) %]
-            $("#tagsel_tag").click(function(){
-                tagSelected();
-                return false;
-            });
-            $("#tagsel_cancel").click(function(){
-                tagCanceled();
-                return false;
-            });
-            $("#tagsel_button").click(function(){
-                tagAdded();
-                return false;
-            });
-        [% ELSE %]
-            $("#tagsel_tag").click(function(){
-                window.location = "/cgi-bin/koha/opac-user.pl";
-                return false;
-            });
-        [% END %]
-        [% END %][% END %][% END %]
+        });
+        $("#tagsel_cancel").click(function(){
+            tagCanceled();
+            return false;
+        });
+        $("#tagsel_button").click(function(){
+            tagAdded();
+            return false;
+        });
+
+        $(".tag_add").click(function(){
+            var thisid = $(this).attr("id");
+            thisid = thisid.replace("tag_add","");
+            $(this).hide();
+            $("#tagform"+thisid).show();
+            $("#newtag"+thisid).focus();
+            $("#newtag"+thisid+"_status").empty().hide();
+            return false;
+        });
+        $(".cancel_tag_add").click(function(){
+            var thisid = $(this).attr("id");
+            thisid = thisid.replace("cancel","");
+            $("#tagform"+thisid).hide();
+            $("#tag_add"+thisid).show();
+            $("#newtag"+thisid).val("");
+            $("#newtag"+thisid+"_status").empty().hide();
+            return false;
+        });
+        $(".tagbutton").click(function(){
+          var thisid = $(this).attr("title");
+          var tag = $("#newtag"+thisid).val();
+          if (!tag || (tag == "")) {
+              alert(MSG_NO_TAG_SPECIFIED);
+              return false;
+          }
+          KOHA.Tags.add_tag_button(thisid, tag);
+          return false;
+        });
+[% END %]
   [% IF ( loggedinusername && allowremovingitems ) %]
   $("#myform").submit(function(){
     var checkedBoxes = $(".checkboxed input:checkbox:checked");
@@ -261,9 +281,9 @@ $(function() {
               [% IF ( itemsloop ) %]
                   <div id="toolbar" class="list-actions">
 
-                      <a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfid=[% shelfnumber %]" class="download" onclick="open(CGIBIN+'opac-downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false;">Download list</a>
+                      <a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfid=[% shelfnumber %]" class="download" onclick="open(CGIBIN+'opac-downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false;">Download list</a>
 
-[% IF ( opacuserlogin ) %]<span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber %]" class="send" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send list</a></span>[% END %]
+[% IF ( opacuserlogin ) %]<span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber %]" class="send" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=[% shelfnumber %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send list</a></span>[% END %]
 
 <a class="print" href="opac-shelves.pl" onclick="print(); return false;">Print list</a>
 
@@ -285,16 +305,16 @@ $(function() {
                                       [% IF ( RequestOnOpac ) %]
                                         <span id="placehold"></span>
                                       [% END %]
-                                      [% IF ( loggedinusername ) %]
-                                        [% IF ( TagsEnabled ) %]
-                                          <span id="addtags"></span>
-                                          <span id="tagsel_form" style="display:none">
-                                          <label for="tagsel_new" style="display:inline">New&nbsp;tag:</label>
-                                          <input name="tagsel_new" id="tagsel_new" maxlength="100" style="display:inline"/>
-                                          <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add" style="display:inline" />
-                                          <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a>
-                                          </span>
-                                        [% END %]
+                                      [% IF ( TagsInputEnabled && loggedinusername ) %]
+                                        <span id="addtags">
+                                          <a id="tagsel_tag" href="#" class="disabled">Tag</a>
+                                        </span>
+                                        <span id="tagsel_form" style="display:none">
+                                          <label for="tagsel_new">New tag:</label>
+                                          <input name="tagsel_new" id="tagsel_new" maxlength="100" />
+                                          <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add" />
+                                          <a href="#" id="tagsel_cancel">Cancel</a>
+                                        </span>
                                       [% END %]
                     [% IF ( loggedinusername && allowremovingitems ) %]<span id="removeitems"></span>[% END %]</span>
                   </div>
@@ -352,8 +372,7 @@ $(function() {
           [% END %]
           [% END %][% ELSE %]This record has no items.[% END %]</span>
             [% END %]
-        [% IF ( TagsEnabled ) %]
-          [% IF ( TagsShowOnList ) %]
+          [% IF ( TagsShowEnabled ) %]
             [% IF ( itemsloo.TagLoop.size ) %]
               <div class="results_summary">
               <span class="label">Tags:</span>
@@ -363,24 +382,27 @@ $(function() {
               </div>
             [% END %]
           [% END %]
-                [% IF ( TagsInputOnList ) %]
-          [% IF ( loggedinusername ) %]
-                        <label for="newtag[% itemsloo.biblionumber %]">New tag:</label>
+
+    <span class="results_summary actions">
+        <span class="label">Actions:</span>
+
+        [% IF ( TagsInputEnabled ) %]
+              [% IF ( loggedinusername ) %]
+                    <a class="tag_add" id="tag_add[% itemsloo.biblionumber %]" href="#">Add tag</a>
+                    <span id="tagform[% itemsloo.biblionumber %]" class="tag_results_input" style="display:none;">
+                        <label for="newtag[% itemsloo.biblionumber %]">New tag(s):</label>
                         <input name="newtag[% itemsloo.biblionumber %]" id="newtag[% itemsloo.biblionumber %]" maxlength="100" />
                         <input name="tagbutton" class="tagbutton" title="[% itemsloo.biblionumber %]" type="submit" value="Add" />
+                        <a class="cancel_tag_add" id="cancel[% itemsloo.biblionumber %]" href="#">(done)</a>
+                    </span>
                     <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">
                         Tag status here.
                     </span>
-                    [% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span>
-                  [% END %]
-                [% ELSE %]
-            [% IF ( loggedinusername ) %]
-              <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus results_summary" style="display:none;">Tag status here.</span>
-            [% END %]
-                [% END %]
-        [% END %]
+              [% ELSIF ( loop.first ) %]
+                    <span class="tagstatus" id="login4tags">Log in to add tags.</span>
+              [% END %]
+          [% END %]
 
-<span class="results_summary actions"><span class="label">Actions:</span>
       [% IF ( RequestOnOpac ) %]
           [% UNLESS ( itemsloo.norequests ) %]
             [% IF ( opacuserlogin ) %]
@@ -395,7 +417,7 @@ $(function() {
           [% END %]
         [% END %]
 
-        [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( virtualshelves ) %]<a class="addtolist" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]'); return false;">Save to another list</a>
+        [% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( virtualshelves ) %]<a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% itemsloo.biblionumber %]'); return false;">Save to another list</a>
           [% END %][% END %][% END %]
           [% IF ( opacbookbag ) %]
               [% IF ( itemsloo.incart ) %]
@@ -452,7 +474,7 @@ $(function() {
 
             
             [% IF ( edit ) %]
-                <h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> <a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelfnumber %]"><em>[% shelfname |html %]</em></a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Editing</h3>
+                <h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> &#8674; <a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelfnumber %]"><em>[% shelfname |html %]</em></a> &#8674; Editing</h3>
                 <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
                   <input type="hidden" name="op" value="modifsave" />
                   <input type="hidden" name="display" value="[% display %]" />
@@ -463,9 +485,10 @@ $(function() {
                       <li>
                         <label for="sortfield" >Sort this list by: </label>
                         <select name="sortfield" id="sortfield">
-                          [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
-                          [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
-                          [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
+                          [% IF ( sortfield == "title" ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
+                          [% IF ( sortfield == "author" ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
+                          [% IF ( sortfield == "copyrightdate" ) %]<option value="copyrightdate" selected="selected">Year</option>[% ELSE %]<option value="copyrightdate">Year</option>[% END %]
+                          [% IF ( sortfield == "itemcallnumber" ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
                         </select>
                       </li>
                       <li>
@@ -652,9 +675,10 @@ $(function() {
                       <li>
                         <label for="sortfield" >Sort this list by: </label>
                         <select name="sortfield" id="sortfield">
-                          [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
-                          [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
-                          [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %]
+                          <option value="title">Title</option>
+                          <option value="author">Author</option>
+                          <option value="copyrightdate">Year</option>
+                          <option value="itemcallnumber">Call number</option>
                         </select>
                       </li>
                       <li>
index 49c3f66..3c62e55 100644 (file)
@@ -63,7 +63,9 @@ $.tablesorter.addParser({
             .click(function(){
               $("#myform").submit();
               return false;
-            });[% END %]
+            });
+            enableCheckboxActions();
+            [% END %]
        });
 
       function Check(f) {
index 43b8329..c28d84f 100644 (file)
@@ -3,6 +3,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home
 [% INCLUDE 'doc-head-close.inc' %]
+[% INCLUDE 'calendar.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.metadata.min.js"></script>
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <script type="text/JavaScript">
index 32b4f56..b0d2445 100644 (file)
@@ -3,9 +3,10 @@
 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
 <link rel="shortcut icon" href="[% themelang %]/includes/favicon.ico" type="image/x-icon" />
 
-<link rel="stylesheet" type="text/css" href="[% yuipath %]/reset-fonts-grids.css" />
-<link rel="stylesheet" type="text/css" href="[% yuipath %]/skin.css" />
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/sco.css" />
+[% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
+
+[% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]
 </head>
 <body>
 <div id="doc" class="yui-t7">
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/printslip.tt
new file mode 100644 (file)
index 0000000..eaa0d30
--- /dev/null
@@ -0,0 +1,26 @@
+[% INCLUDE 'doc-head-open.inc' %]
+<title>[% title %]</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/print.css" />
+[% IF stylesheet %]
+<link rel="stylesheet" type="text/css" href="[% stylesheet %]" />
+[% END %]
+
+<script language="javascript">
+    function printThenClose() {
+        window.print();
+        window.close();
+    }
+</script>
+</head>
+<body id="circ_printslip" class="circ" onload="printThenClose();">
+<div id="receipt">
+
+[% IF plain %]
+<pre>
+[% slip %]
+</pre>
+[% ELSE %]
+[% slip %]
+[% END %]
index 8178412..7e363d2 100644 (file)
@@ -26,6 +26,8 @@ function closeNow()
 }
 </script> 
 
+[% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
+[% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]
 
 </head>
 
index 66cace5..3f6438f 100644 (file)
@@ -8,18 +8,22 @@
 <script type="text/javascript" src="[% yuipath %]/container/container-min.js"></script>
 <script type="text/javascript" src="[% yuipath %]/menu/menu-min.js"></script>
 <script type="text/javascript" src="[% themelang %]/lib/jquery/jquery.js"></script>
+<script type="text/javascript" src="[% themelang %]/lib/jquery/jquery-ui.js"></script>
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <script type="text/javascript">//<![CDATA[
-function sco_init(valid_session) {
-    if (valid_session == 1) {
-        setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]); 
-    }
+function sco_init() {
+    setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]);
 }
 function dofocus() {    // named function req'd for body onload event by some FF and IE7 security models
     // alert("dofocus called");
     $(".focus:last").select();
 }
+var slip_re = /slip/;
+function printx_window(print_type) {
+  var handler = print_type.match(slip_re) ? "printslip" : "moremember";
 
+  return false;
+}
 function checkout_confirm(patronid) {
     var   barcode = $("#barcode").val();
     // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
@@ -28,13 +32,6 @@ function checkout_confirm(patronid) {
         window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
         return false;
     }
-    if (this.valid_session == 0) {
-        // probably should force logout like above ? --atz 6/09
-        if (confirm('Session has expired.  Click \'OK\' to continue processing this item.  Click Cancel if you are not ' + patronid)){
-            this.op.value='logout';
-            this.patronid.value='';
-        }
-    }
     return true;
 }
 
@@ -75,9 +72,8 @@ $.tablesorter.addParser({
 });
 
 $(document).ready(function() {
-    [% IF ( patronid ) %] sco_init(1);
-    [% ELSIF ( timedout ) %] sco_init(1);
-    [% END %]
+    dofocus();
+    [% IF ( patronid ) %]sco_init();[% END %]
     $("#loanTable").tablesorter({
         [% IF ( dateformat_metric ) %]
             dateFormat: 'uk',
@@ -92,15 +88,21 @@ $(document).ready(function() {
     });
 });
 //]]>
-
+$(document).ready(function(){
+    $("#logout_form").submit(function(){
+        if(confirm("Would you like to print a receipt?")){
+            window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&amp;print=qslip");
+        }
+        return true;
+    });
+});
 </script>
 [% IF ( opacuserjs ) %]<script type="text/javascript">[% opacuserjs %]</script>[% END %]
+[% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]
 
-
-<link rel="stylesheet" type="text/css" href="[% yuipath %]/reset-fonts-grids.css" />
-<link rel="stylesheet" type="text/css" href="[% yuipath %]/skin.css" />
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/sco.css" />
 [% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
+[% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
 
 </head>
 <body onload="dofocus();">
@@ -111,13 +113,13 @@ $(document).ready(function() {
 <div id="bd">
 
 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
-<div class="dialog alert"><h3>Item cannot be checked out.</h3><p>Sorry, This item cannot be checked out at this station.  </p>
+<div class="dialog alert"><h3>Item cannot be checked out.</h3><p>Sorry, this item cannot be checked out at this station.  </p>
 [% IF ( title ) %]<p>Title: <em>[% title |html %]</em> </p>[% END %]
 <p>
    [% IF ( circ_error_UNKNOWN_BARCODE ) %]
     <em>MESSAGE 1:</em> The system does not recognize this barcode.
-   [% ELSIF ( circ_error_TOO_MANY ) %]
-    <em>MESSAGE 2:</em> You have borrowed too many items and can't check out any more.
+   [% ELSIF ( circ_error_max_loans_allowed ) %]
+    <em>MESSAGE 2:</em> You have checked out too many items and can't check out any more.
    [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
     <em>MESSAGE 3:</em> This item is checked out to someone else.
    [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
@@ -125,13 +127,13 @@ $(document).ready(function() {
    [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
     <em>MESSAGE 5:</em> This item is not for loan.
    [% ELSIF ( circ_error_DEBT ) %]
-    <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot borrow.
+    <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot check out.
    [% ELSIF ( circ_error_WTHDRAWN ) %]
     <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
    [% ELSIF ( circ_error_RESTRICTED ) %]
     <em>MESSAGE 8:</em>
    [% ELSIF ( circ_error_RESERVED ) %]
-    <em>MESSAGE 9:</em> This item is reserved for another patron.
+    <em>MESSAGE 9:</em> This item is on hold for another patron.
    [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
     <em>MESSAGE 10:</em>
    [% ELSIF ( circ_error_EXPIRED ) %]
@@ -147,44 +149,67 @@ $(document).ready(function() {
    [% END %]
    Please see a member of the library staff.
 </p>
-<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" method="post">
-<input type="hidden" name="op" value="login" />
-<input type="hidden" name="patronid" value="[% patronid %]" />
 [% IF ( returnitem ) %]
 [% IF ( AllowSelfCheckReturns ) %]
-<input type="hidden" name="barcode" value="[% barcode %]" />
-<input type="button" name="returnbook" value="Return this item" class="return" onclick="this.form.op.value='returnbook';this.form.submit();"  />
+<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
+    <input type="hidden" name="op" value="returnbook" />
+    <input type="hidden" name="patronid" value="[% patronid %]" />
+    <input type="hidden" name="barcode" value="[% barcode %]" />
+    <input type="submit" name="returnbook" value="Return this item" class="return" />
+</form>
 [% END %]
 [% END %]
-<input type="submit" name= "confirm" value="Return to Account Summary" class="back focus" />
+<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
+    <input type="hidden" name="op" value="" />
+    <input type="hidden" name="patronid" value="[% patronid %]" />
+    <input type="hidden" name="barcode" value="[% barcode %]" />
+    <input type="submit" name= "confirm" value="Return to account summary" class="back focus" />
 </form>
 [% END %]
 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
 <div class="dialog alert"><h3>Please confirm the checkout:</h3>
 <p>[% IF ( confirm_renew_issue ) %]This item is already checked out to you.[% END %]</p>
 
-<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" method="post">
-<input type="hidden" name="op" value="checkout" />
-<input type="hidden" name="patronid" value="[% patronid %]" />
-<input type="hidden" name="barcode" value="[% barcode %]" />
-<input type="hidden" name="confirmed" value="" />
 [% IF ( renew ) %]
 [% IF ( AllowSelfCheckReturns ) %]
-<input type="button" value="Return item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();"  />
+    <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
+        <input type="hidden" name="op" value="returnbook" />
+        <input type="hidden" name="patronid" value="[% patronid %]" />
+        <input type="hidden" name="barcode" value="[% barcode %]" />
+        <input type="hidden" name="confirmed" value="" />
+        <input type="submit" value="Return item" name="confirm" class="return" />
+    </form>
 [% END %]
 [% END %]
-[% UNLESS ( renew ) %]<input type="button" value="Renew item" name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
-[% ELSE %]<input type="button" value="Renew item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %]
-<input type="button" value="Cancel" class="cancel" onclick="this.form.op.value='';this.form.submit();return true;"  />
-</form>
+
+[% UNLESS ( renew ) %]
+    <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
+        <input type="hidden" name="op" value="checkout" />
+        <input type="hidden" name="patronid" value="[% patronid %]" />
+        <input type="hidden" name="barcode" value="[% barcode %]" />
+        <input type="hidden" name="confirmed" value="1" />
+        <input type="submit" value="Renew item" name="confirm" class="renew" />
+      </form>
+[% ELSE %]
+    <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
+        <input type="hidden" name="op" value="checkout" />
+        <input type="hidden" name="patronid" value="[% patronid %]" />
+        <input type="hidden" name="barcode" value="[% barcode %]" />
+        <input type="hidden" name="confirmed" value="1" />
+        <input type="submit" value="Renew item" class="renew" />
+    </form>
+[% END %]
+    <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
+      <input type="hidden" name="op" value="" />
+      <input type="hidden" name="patronid" value="[% patronid %]" />
+      <input type="submit" value="Cancel" class="cancel" />
+    </form>
 </div>
 [% END %]
 
 [% IF ( nopermission ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Access denied</h3>
 Sorry, this self-checkout station has lost authentication.  Please contact the administrator to resolve this problem. </div>
 [% END %]
-[% IF ( timed_out ) %]<!-- This is what is displayed if login has timed out -->
-<div class="dialog alert"><h3>Session timed out</h3>Sorry, your session has timed out, please log in again.</div>[% END %]
 [% IF ( different_ip ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Session lost</h3>You are accessing self-checkout from a different IP address! please log in again.</div>[% END %]
 [% IF ( invalid_username_or_password ) %]
 <!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Record not found</h3><p>Your userid was not found in the database.  Please try again.</p></div>[% END %]
@@ -211,23 +236,18 @@ Sorry, this self-checkout station has lost authentication.  Please contact the a
        [% END %]
        [% END %]
 
-       [% IF ( timedout ) %]
-       <div class="dialog message"><h4>Sorry</h4><p>Your session has timed out due to inactivity.  Please sign in.</p></div>
-       <br />
-       [% END %]
        [% IF ( validuser ) %]
   [% IF ( display_patron_image ) %]<div class="yui-ge"><div class="yui-u first">[% END %]
        <div id="newcheckout" class="sco_entry">
        <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
        <fieldset><legend> Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
        <label for="barcode">Scan a new item or enter its barcode:</label>
-       <input id="barcode" name="barcode" size="20" class="focus" />
+    <input id="barcode" name="barcode" size="20" class="focus" autocomplete="off" />
        <input type="hidden" name="op" value="checkout" />
        <input type="hidden" name="patronid" value="[% patronid %]" />
-       <input type="hidden" name="valid_session" value="1" />
        <input type="submit" value="Submit" class="submit" /></fieldset>
        </form>
-       <div><form method="post" action="/cgi-bin/koha/sco/sco-main.pl?op=logout" ><input type="submit" value="Finish" class="finish" /></form></div>
+    <div><form method="post" action="#" id="logout_form"><input type="submit" value="Finish" class="finish" /></form></div>
        </div> <!-- sco_entry --> <!-- newcheckout -->
   [% IF ( display_patron_image ) %]</div> <!-- /yui-u first -->[% END %]
   [% IF ( display_patron_image ) %]
@@ -255,19 +275,21 @@ Sorry, this self-checkout station has lost authentication.  Please contact the a
        [% IF ( ISSUE.overdue ) %]<td class="overdue">[% ISSUE.date_due | $KohaDates %]</td>[% ELSE %]<td>[% ISSUE.date_due | $KohaDates %]</td>[% END %]
        <td>
     <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
-    <input type="hidden" name="op" value="checkout" />
     <input type="hidden" name="patronid" value="[% patronid %]" />
     <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
-    <input type="hidden" name="confirmed" value=""  />
         [% IF ( ISSUE.norenew ) %]
-          [% IF ( ISSUE.AllowSelfCheckReturns ) %]
-          <input type="button" value="Return Item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();"  />
+          [% IF ( AllowSelfCheckReturns ) %]
+            <input type="submit" value="Check in item" name="confirm" class="return" />
+            <input type="hidden" name="op" value="returnbook" />
+            <input type="hidden" name="confirmed" value=""  />
           [% ELSE %]
-          <span>No renewals allowed</span>
+            <span>No renewals allowed</span>
           [% END %]
         [% ELSE %]
-            [% UNLESS ( ISSUE.renew ) %]<input type="button" value="Renew Item"  name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
-            [% ELSE %]<input type="button" value="Renew Item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %]
+            <input type="hidden" name="op" value="checkout" />
+            <input type="hidden" name="confirmed" value="1" />
+            [% UNLESS ( ISSUE.renew ) %]<input type="submit" value="Renew item"  name="confirm" class="renew" />
+            [% ELSE %]<input type="submit" value="Renew item" class="renew" />[% END %]
         [% END %]
     </form>
        </td>
@@ -292,7 +314,7 @@ Sorry, this self-checkout station has lost authentication.  Please contact the a
        <input type="password" id="patronpw" size="20" name="patronpw" />
        [% ELSE %]
        <fieldset class="checkout"><label for="patronid">Please enter your card number:</label> 
-       <input type="text" id="patronid" class="focus" size="20" name="patronid" />
+    <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
        [% END %]
 
        [% FOREACH INPUT IN INPUTS %]<input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">[% END %]
index 64afc0b..fe08fd3 100644 (file)
                                 </xsl:call-template>
                             </xsl:with-param>
                         </xsl:call-template>
-                       </a>
-                    <xsl:text> </xsl:text><xsl:call-template name="part"/>
-            <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+            </a>
+            <xsl:call-template name="part"/>
+            <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
         </xsl:for-each>
 
         <!-- 490 Series not traced, Ind1 = 0 -->
         </xsl:for-each>
         </xsl:if>
 
+        <xsl:for-each select="marc:datafield[@tag=511]">
+            <span class="results_summary summary">
+                <span class="label">
+                    <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
+                </span>
+                <xsl:call-template name="subfieldSelect">
+                    <xsl:with-param name="codes">a</xsl:with-param>
+                </xsl:call-template>
+            </span>
+        </xsl:for-each>
+
         <xsl:for-each select="marc:datafield[@tag=520]">
         <span class="results_summary summary"><span class="label">
         <xsl:choose>
                 </xsl:choose>
                 <!-- add relator code too between brackets-->
                 <xsl:if test="marc:subfield[@code='4' or @code='e']">
-                    <xsl:text>[</xsl:text>
+                    <span class="relatorcode">
+                    <xsl:text> [</xsl:text>
                     <xsl:choose>
                         <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
                         <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
                     </xsl:choose>
                     <xsl:text>]</xsl:text>
+                    </span>
                 </xsl:if>
             </a>
             <xsl:if test="marc:subfield[@code=9]">
index fe500a6..a086d31 100644 (file)
         <xsl:text>). </xsl:text>
       </span>
     </xsl:if>
-    <xsl:if test="count(key('item-by-status', 'On Orangemanr'))>0">
+    <xsl:if test="count(key('item-by-status', 'On order'))>0">
       <span class="unavailable">
         <xsl:text>On order (</xsl:text>
         <xsl:value-of select="count(key('item-by-status', 'On order'))"/>
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/article_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/article_b.gif
new file mode 100644 (file)
index 0000000..22f50d0
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/article_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/audiovisual_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/audiovisual_b.gif
new file mode 100644 (file)
index 0000000..e5b101d
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/audiovisual_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/binary_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/binary_b.gif
new file mode 100644 (file)
index 0000000..497ce89
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/binary_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/book_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/book_b.gif
new file mode 100644 (file)
index 0000000..ee79e8a
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/book_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/handwriting_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/handwriting_b.gif
new file mode 100644 (file)
index 0000000..d767a8c
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/handwriting_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/map_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/map_b.gif
new file mode 100644 (file)
index 0000000..816110d
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/map_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/periodical_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/periodical_b.gif
new file mode 100644 (file)
index 0000000..3249ec4
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/periodical_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/picture_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/picture_b.gif
new file mode 100644 (file)
index 0000000..652dfb1
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/picture_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/score_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/score_b.gif
new file mode 100644 (file)
index 0000000..31a2118
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/score_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/sons_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/sons_b.gif
new file mode 100644 (file)
index 0000000..a81ad42
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/sons_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/sound_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/sound_b.gif
new file mode 100644 (file)
index 0000000..d563c82
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/sound_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/thesis_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/thesis_b.gif
new file mode 100644 (file)
index 0000000..78bb330
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/thesis_b.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/unknown_b.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/unknown_b.gif
new file mode 100644 (file)
index 0000000..1630b7b
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/sudoc/unknown_b.gif differ
index fbb8d69..72fc95c 100644 (file)
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.09.00.065';
+    our $VERSION = '3.11.00.014';
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install
index f834985..9085630 100755 (executable)
@@ -28,17 +28,17 @@ use C4::NewsChannels;
 use C4::Review qw/numberofreviews/;
 use C4::Suggestions qw/CountSuggestion/;
 use C4::Tags qw/get_count_by_tag_status/;
-my $query     = new CGI;
+use Koha::Borrower::Modifications;
 
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+my $query = new CGI;
+
+my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
     {
         template_name   => "intranet-main.tmpl",
         query           => $query,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => {
-            catalogue => 1,
-        },
+        flagsrequired   => { catalogue => 1, },
     }
 );
 
@@ -50,14 +50,30 @@ $template->param(
     koha_news_count => $koha_news_count
 );
 
-my $pendingcomments = numberofreviews(0);
-my $pendingtags = get_count_by_tag_status(0);
-my $pendingsuggestions       = CountSuggestion("ASKED");
+my $branch =
+  C4::Context->preference("IndependantBranches")
+  && !$flags->{'superlibrarian'}
+  ? C4::Context->userenv()->{'branch'}
+  : undef;
+
+my $pendingcomments    = numberofreviews(0);
+my $pendingtags        = get_count_by_tag_status(0);
+my $pendingsuggestions = CountSuggestion("ASKED");
+my $pending_borrower_modifications =
+  Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
 
 $template->param(
-    pendingcomments    => $pendingcomments,
-    pendingtags        => $pendingtags,
-    pendingsuggestions => $pendingsuggestions
+    pendingcomments                => $pendingcomments,
+    pendingtags                    => $pendingtags,
+    pendingsuggestions             => $pendingsuggestions,
+    pending_borrower_modifications => $pending_borrower_modifications,
 );
 
+#
+# warn user if he is using mysql/admin login
+#
+unless ($loggedinuser) {
+    $template->param(adminWarning => 1);
+}
+
 output_html_with_http_headers $query, $cookie, $template->output;
index f8aa4f1..d25dba9 100755 (executable)
@@ -135,8 +135,8 @@ foreach my $borrower(@$results[$from..$to-1]){
 
   my %row = (
     count => $index++,
-       %$borrower,
-       %{$categories_dislay{$$borrower{categorycode}}},
+    %$borrower,
+    (defined $categories_dislay{ $borrower->{categorycode} }?   %{ $categories_dislay{ $borrower->{categorycode} } }:()),
     overdues => $od,
     issues => $issue,
     odissue => "$od/$issue",
index 830800e..1d8f1e5 100755 (executable)
@@ -26,6 +26,7 @@ use C4::Context;
 use C4::Members;
 use C4::Branch;
 use C4::Category;
+use Koha::Borrower::Modifications;
 
 my $query = new CGI;
 my $branch = $query->param('branchcode');
@@ -76,11 +77,15 @@ else {
     $template->param(categories=>\@categories);
 }
 
+
+my $pending_borrower_modifications =
+  Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
+
 $template->param( 
         "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1",
         no_add => $no_add,
+        pending_borrower_modifications => $pending_borrower_modifications,
             );
-my @letters = map { {letter => $_} } ( 'A' .. 'Z');
-$template->param( letters => \@letters );
+$template->param( 'alphabet' => C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' );
 
 output_html_with_http_headers $query, $cookie, $template->output;
diff --git a/members/members-update-do.pl b/members/members-update-do.pl
new file mode 100755 (executable)
index 0000000..e7b7b28
--- /dev/null
@@ -0,0 +1,64 @@
+#!/usr/bin/perl
+
+# Parts Copyright Biblibre 2010
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use strict;
+use warnings;
+
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Context;
+use C4::Members;
+use C4::Branch;
+use C4::Category;
+use Koha::Borrower::Modifications;
+
+my $query = new CGI;
+
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "about.tmpl",
+        query           => $query,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { borrowers => 1 },
+        debug           => 1,
+    }
+);
+
+my @params = $query->param;
+
+foreach my $param (@params) {
+    if ( $param =~ "^modify_" ) {
+        my (undef, $borrowernumber) = split( /_/, $param );
+
+        my $action = $query->param($param);
+
+        if ( $action eq 'approve' ) {
+            Koha::Borrower::Modifications->ApproveModifications( $borrowernumber );
+        }
+        elsif ( $action eq 'deny' ) {
+            Koha::Borrower::Modifications->DenyModifications( $borrowernumber );
+        }
+        elsif ( $action eq 'ignore' ) {
+
+        }
+    }
+}
+
+print $query->redirect("/cgi-bin/koha/members/members-update.pl");
diff --git a/members/members-update.pl b/members/members-update.pl
new file mode 100755 (executable)
index 0000000..334d83b
--- /dev/null
@@ -0,0 +1,65 @@
+#!/usr/bin/perl
+
+# Parts Copyright Biblibre 2010
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use strict;
+use warnings;
+
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Context;
+use C4::Members;
+use C4::Branch;
+use C4::Category;
+use Koha::Borrower::Modifications;
+
+my $query = new CGI;
+
+my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
+    {
+        template_name   => "members/members-update.tmpl",
+        query           => $query,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { borrowers => 1 },
+        debug           => 1,
+    }
+);
+
+my $branch =
+  C4::Context->preference("IndependantBranches")
+  && !$flags->{'superlibrarian'}
+  ? C4::Context->userenv()->{'branch'}
+  : undef;
+
+my $pending_modifications =
+  Koha::Borrower::Modifications->GetPendingModifications($branch);
+
+my $borrowers;
+foreach my $pm (@$pending_modifications) {
+    $borrowers->{ $pm->{'borrowernumber'} } =
+      GetMember( borrowernumber => $pm->{'borrowernumber'} );
+
+}
+
+$template->param(
+    PendingModifications => $pending_modifications,
+    borrowers            => $borrowers,
+);
+
+output_html_with_http_headers $query, $cookie, $template->output;
index 0524ecb..3928286 100755 (executable)
@@ -85,7 +85,9 @@ my $quickslip = 0;
 my $flagsrequired;
 if ($print eq "page") {
     $template_name = "members/moremember-print.tmpl";
-    $flagsrequired = { borrowers => 1 };
+    # circ staff who process checkouts but can't edit
+    # patrons still need to be able to access print view
+    $flagsrequired = { circulate => "circulate_remaining_permissions" };
 } elsif ($print eq "slip") {
     $template_name = "members/moremember-receipt.tmpl";
     # circ staff who process checkouts but can't edit
index 5a732a9..d66702e 100755 (executable)
@@ -97,8 +97,8 @@ if ( $individual || $writeoff ) {
 if ( $total_paid and $total_paid ne '0.00' ) {
     if ( $total_paid < 0 or $total_paid > $total_due ) {
         $template->param(
-            error => sprintf( 'You must pay a value less than or equal to %f.2',
-                $total_due )
+            error_over => 1,
+            total_due => $total_due
         );
     } else {
         if ($individual) {
index 31a62e6..914c36e 100755 (executable)
@@ -64,8 +64,8 @@ if($destination eq "circ"){
        }
 } else {
        if($dateexpiry){
-               print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$borrowernumber&dateexpiry=$dateexpiry");
+        print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber&dateexpiry=$dateexpiry");
        } else {
-               print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$borrowernumber");
+        print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber");
        }
 }
diff --git a/misc/bin/koha-index-daemon-ctl.sh b/misc/bin/koha-index-daemon-ctl.sh
new file mode 100755 (executable)
index 0000000..03cdca8
--- /dev/null
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+### BEGIN INIT INFO
+# Provides:          koha-index-daemon-$DBNAME
+# Required-Start:    $local_fs $syslog
+# Required-Stop:     $local_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# X-Interactive:     false
+# Short-Description: Start/stop koha-index-daemon for $DBNAME
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+USER=__KOHA_USER__
+GROUP=__KOHA_GROUP__
+DBNAME=__DB_NAME__
+NAME=koha-index-daemon-$DBNAME
+LOGDIR=__LOG_DIR__
+PERL5LIB=__PERL_MODULE_DIR__
+KOHA_CONF=__KOHA_CONF_DIR__/koha-conf.xml
+ERRLOG=$LOGDIR/koha-index-daemon.err
+STDOUT=$LOGDIR/koha-index-daemon.log
+OUTPUT=$LOGDIR/koha-index-daemon-output.log
+
+export KOHA_CONF
+export PERL5LIB
+
+INDEXDAEMON="koha-index-daemon"
+INDEXDAEMON_OPTS="--timeout 30 --conf $KOHA_CONF \
+                  --directory /var/tmp/koha-index-daemon-$DBNAME"
+
+DAEMONOPTS="--name=$NAME \
+            --errlog=$ERRLOG \
+            --stdout=$STDOUT \
+            --output=$OUTPUT \
+            --verbose=1 --respawn --delay=30"
+
+USER="--user=$USER.$GROUP"
+
+
+case "$1" in
+    start)
+      log_daemon_msg "Starting Koha indexing daemon ($DBNAME)"
+      if daemon $DAEMONOPTS $USER -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
+        log_end_msg 0
+      else
+        log_end_msg 1
+      fi
+      ;;
+    stop)
+      log_daemon_msg "Stopping Koha indexing daemon ($DBNAME)"
+      if daemon $DAEMONOPTS $USER --stop -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
+        log_end_msg 0
+      else
+        log_end_msg 1
+      fi
+      ;;
+    restart)
+      log_daemon_msg "Restarting the Koha indexing daemon ($DBNAME)"
+      if daemon $DAEMONOPTS $USER --restart -- $INDEXDAEMON $INDEXDAEMON_OPTS; then
+        log_end_msg 0
+      else
+        log_end_msg 1
+      fi
+      ;;
+    *)
+      log_success_msg "Usage: /etc/init.d/$NAME {start|stop|restart}"
+      exit 1
+      ;;
+esac
index fdd6a21..17150a9 100755 (executable)
@@ -1,22 +1,22 @@
 #!/bin/sh
 # Script to create daily backups of the Koha database.
 # Based on a script by John Pennington
+
+DATABASE=`xmlstarlet sel -t -v 'yazgfs/config/database' $KOHA_CONF`
+HOSTNAME=`xmlstarlet sel -t -v 'yazgfs/config/hostname' $KOHA_CONF`
+PORT=`xmlstarlet sel -t -v 'yazgfs/config/port' $KOHA_CONF`
+USER=`xmlstarlet sel -t -v 'yazgfs/config/user' $KOHA_CONF`
+PASS=`xmlstarlet sel -t -v 'yazgfs/config/pass' $KOHA_CONF`
 BACKUPDIR=`xmlstarlet sel -t -v 'yazgfs/config/backupdir' $KOHA_CONF`
-KOHA_DATE=`date '+%y%m%d'`
+KOHA_DATE=`date '+%Y%m%d'`
 KOHA_BACKUP=$BACKUPDIR/koha-$KOHA_DATE.sql.gz
 
-mysqldump --single-transaction -u koha -ppassword koha | gzip -9 > $KOHA_BACKUP
-
-#mv $KOHA_BACKUP /home/kohaadmin &&
-#chown kohaadmin.users /home/kohaadmin/koha-$KOHA_DATE.dump.gz &&
-#chmod 600 /home/kohaadmin/koha-$KOHA_DATE.dump.gz &&
-# Makes the compressed dump file property of the kohaadmin user.
-# Make sure that you replace kohaadmin with a real user.
+mysqldump --single-transaction --user=$USER --password="$PASS" --port=$PORT --host=$HOST $DATABASE| gzip -9 > $KOHA_BACKUP
 
 if [ -f $KOHA_BACKUP ] ; then
-echo "$KOHA_BACKUP was successfully created." | mail kohaadmin -s $KOHA_BACKUP
+echo "$KOHA_BACKUP was successfully created." | mail $USER -s $KOHA_BACKUP
 else
-echo "$KOHA_BACKUP was NOT successfully created." | mail kohaadmin -s $KOHA_BACKUP
+echo "$KOHA_BACKUP was NOT successfully created." | mail $USER -s $KOHA_BACKUP
 fi
 
 # Notifies kohaadmin of (un)successful backup creation
diff --git a/misc/cronjobs/delete_expired_opac_registrations.pl b/misc/cronjobs/delete_expired_opac_registrations.pl
new file mode 100755 (executable)
index 0000000..c7c3375
--- /dev/null
@@ -0,0 +1,80 @@
+#!/usr/bin/perl
+
+# Copyright 2009-2010 Kyle Hall
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use Modern::Perl;
+use Getopt::Long;
+
+BEGIN {
+
+    # find Koha's Perl modules
+    # test carefully before changing this
+    use FindBin;
+    eval { my $lib = "$FindBin::Bin/../kohalib.pl"; require $lib };
+}
+
+use C4::Context;
+use C4::Members qw/ DelMember /;
+
+my $help;
+my $confirm;
+
+GetOptions(
+    'h|help'    => \$help,
+    'c|confirm' => \$confirm,
+);
+my $usage = << 'ENDUSAGE';
+
+This script remove confirmed OPAC based patron registrations
+that have not been changed from the patron category specified
+in the system preference PatronSelfRegistrationDefaultCategory
+within the required time period.
+
+This script has the following parameters :
+    -h --help:    This message
+
+    -c --confirm: Without this flag set, this script will do nothing.
+ENDUSAGE
+
+if ( $help || !$confirm ) {
+    print $usage;
+    exit;
+}
+
+## Delete accounts that haven't been upgraded from the 'temporary' category code'
+my $delay =
+  C4::Context->preference('PatronSelfRegistrationExpireTemporaryAccountsDelay');
+my $category_code =
+  C4::Context->preference('PatronSelfRegistrationDefaultCategory');
+
+my $query = "
+    SELECT borrowernumber
+    FROM borrowers
+    WHERE
+        categorycode = ?
+      AND
+        DATEDIFF( DATE( NOW() ), DATE(dateenrolled) ) = ? )
+";
+
+my $dbh = C4::Context->dbh;
+my $sth = $dbh->prepare($query);
+$sth->execute( $category_code, $delay );
+
+while ( my ($borrowernumber) = $sth->fetchrow_array() ) {
+    DelMember($borrowernumber);
+}
diff --git a/misc/cronjobs/delete_unverified_opac_registrations.pl b/misc/cronjobs/delete_unverified_opac_registrations.pl
new file mode 100755 (executable)
index 0000000..6909c70
--- /dev/null
@@ -0,0 +1,70 @@
+#!/usr/bin/perl
+
+# Copyright 2009-2010 Kyle Hall
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use Modern::Perl;
+use Getopt::Long;
+
+BEGIN {
+
+    # find Koha's Perl modules
+    # test carefully before changing this
+    use FindBin;
+    eval { my $lib = "$FindBin::Bin/../kohalib.pl"; require $lib };
+}
+
+use C4::Context;
+use C4::Members qw/ DelMember /;
+
+my $help;
+my $confirm;
+my $hours = 24;
+
+GetOptions(
+    'h|help'    => \$help,
+    'c|confirm' => \$confirm,
+    't|time=i'  => \$hours,
+);
+my $usage = << 'ENDUSAGE';
+
+This script removes unconfirmed OPAC based patron registrations
+that have not been confirmed within the required time period.
+
+This script has the following parameters :
+    -h --help:    This message
+
+    -t --time:    The length in hours to wait before removing an unconfirmed registration.
+                  Defaults to 24 hours if not set.
+
+    -c --confirm: Without this flag set, this script will do nothing.
+ENDUSAGE
+
+if ( $help || !$confirm ) {
+    print $usage;
+    exit;
+}
+
+my $dbh = C4::Context->dbh;
+
+$dbh->do( "
+         DELETE FROM borrower_modifications
+         WHERE
+             borrowernumber = 0
+           AND
+             TIME_TO_SEC( TIMEDIFF( NOW(), timestamp )) / 3600 > ?
+", undef, $hours );
index e83bd39..76f20d3 100755 (executable)
@@ -432,17 +432,11 @@ END_SQL
                 next PERIOD;
             }
 
-            my $letter_template = C4::Letters::GetLetter (
-                module => 'circulation',
-                letter_code => $overdue_rules->{"letter$i"},
-                branchcode => $branchcode
-            );
-
             # $letter->{'content'} is the text of the mail that is sent.
             # this text contains fields that are replaced by their value. Those fields must be written between brackets
             # The following fields are available :
            # itemcount is interpreted here as the number of items in the overdue range defined by the current notice or all overdues < max if(-list-all).
-            # <date> <itemcount> <firstname> <lastname> <address1> <address2> <address3> <city> <postcode>
+            # <date> <itemcount> <firstname> <lastname> <address1> <address2> <address3> <city> <postcode> <country>
 
             my $borrower_sql = <<'END_SQL';
 SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email
@@ -509,7 +503,6 @@ END_SQL
 
                 my $letter = parse_letter(
                     {   letter_code     => $overdue_rules->{"letter$i"},
-                        letter          => $letter_template,
                         borrowernumber  => $borrowernumber,
                         branchcode      => $branchcode,
                         items           => \@items,
@@ -551,6 +544,7 @@ END_SQL
                             address2       => $address2,
                             city           => $city,
                             postcode       => $postcode,
+                            country        => $country,
                             email          => $email,
                             itemcount      => $itemcount,
                             titles         => $titles,
@@ -579,6 +573,7 @@ END_SQL
                                 address2       => $address2,
                                 city           => $city,
                                 postcode       => $postcode,
+                                country        => $country,
                                 email          => $email,
                                 itemcount      => $itemcount,
                                 titles         => $titles,
@@ -604,17 +599,16 @@ END_SQL
                 print @output_chunks;
         }
         # Generate the content of the csv with headers
-        my $content = join(";", qw(title name surname address1 address2 zipcode city email itemcount itemsinfo due_date issue_date)) . "\n";
+        my $content = join(";", qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n";
         $content .= join( "\n", @output_chunks );
             
         my $attachment = {
             filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt',
-            type => 'text/plain; charset="utf-8"',
+            type => 'text/plain',
             content => $content, 
         };
 
         my $letter = {
-            'content-type' => 'text/plain; charset="utf-8"',
             title   => 'Overdue Notices',
             content => 'These messages were not sent directly to the patrons.',
         };
@@ -677,9 +671,11 @@ sub parse_letter {
     }
 
     my $currency_format;
-    if ($params->{'letter'}->{'content'} =~ m/<fine>(.*)<\/fine>/o) { # process any fine tags...
+    if ( defined $params->{'letter'}->{'content'}
+        and $params->{'letter'}->{'content'} =~ m/<fine>(.*)<\/fine>/o )
+    {    # process any fine tags...
         $currency_format = $1;
-        $params->{'letter'}->{'content'} =~ s/<fine>.*<\/fine>/<<items.fine>>/o;
+        $params->{'letter'}->{'content'} =~ s/<fine>.*<\/fine>/<<item.fine>>/o;
     }
 
     my @item_tables;
@@ -687,7 +683,7 @@ sub parse_letter {
         my $item_format = '';
         foreach my $item (@$i) {
             my $fine = GetFine($item->{'itemnumber'}, $params->{'borrowernumber'});
-            if (!$item_format) {
+            if ( !$item_format and defined $params->{'letter'}->{'content'} ) {
                 $params->{'letter'}->{'content'} =~ m/(<item>.*<\/item>)/;
                 $item_format = $1;
             }
@@ -704,14 +700,13 @@ sub parse_letter {
         }
     }
 
-    return C4::Letters::GetProcessedLetter (
+    return C4::Letters::GetPreparedLetter (
         module => 'circulation',
         letter_code => $params->{'letter_code'},
-        letter => $params->{'letter'},
         branchcode => $params->{'branchcode'},
         tables => \%tables,
         substitute => $substitute,
-        repeat => { item => \@item_tables }
+        repeat => { item => \@item_tables },
     );
 }
 
@@ -744,7 +739,7 @@ sub prepare_letter_for_printing {
     if ( exists $params->{'outputformat'} && $params->{'outputformat'} eq 'csv' ) {
         if ($csv->combine(
                 $params->{'firstname'}, $params->{'lastname'}, $params->{'address1'},  $params->{'address2'}, $params->{'postcode'},
-                $params->{'city'},      $params->{'email'},    $params->{'itemcount'}, $params->{'titles'}
+                $params->{'city'}, $params->{'country'}, $params->{'email'}, $params->{'itemcount'}, $params->{'titles'}
             )
           ) {
             return $csv->string, "\n";
index 690f216..2357ed8 100755 (executable)
@@ -29,6 +29,7 @@ use Mail::Sendmail;
 use Text::CSV_XS;
 use CGI;
 use Carp;
+use Encode;
 
 use vars qw($VERSION);
 
@@ -192,9 +193,9 @@ foreach my $report_id (@ARGV) {
         warn "ERROR: No saved report $report_id found";
         next;
     }
-    my $sql         => $report->{savedsql};
-    my $report_name => $report->{report_name};
-    my $type        => $report->{type};
+    my $sql         = $report->{savedsql};
+    my $report_name = $report->{report_name};
+    my $type        = $report->{type};
 
     $verbose and print "SQL: $sql\n\n";
     if (defined($report_name) and $report_name ne "")
@@ -245,8 +246,8 @@ foreach my $report_id (@ARGV) {
         my %mail = (
             To      => $to,
             From    => $from,
-            Subject => $subject,
-            Message => $message 
+            Subject => encode('utf8', $subject ),
+            Message => encode('utf8', $message )
         );
         sendmail(%mail) or carp 'mail not sent:' . $Mail::Sendmail::error;
     } else {
index 1de5a48..a5a376f 100755 (executable)
@@ -60,6 +60,7 @@ my $sth = $dbh->prepare("
      WHERE serial.status = 1 
        AND periodicity <> 32
        AND DATE_ADD(planneddate, INTERVAL CAST(graceperiod AS SIGNED) DAY) < NOW()
+       AND subscription.closed = 0
      ");
 $sth->execute();
 
index 43b5550..244c2ac 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # This script should be used only with UNIMARC flavour
 # It is designed to report some missing information from biblio
-# table into  marc data
+# table into marc data
 #
 use strict;
 use warnings;
@@ -13,63 +13,221 @@ BEGIN {
 }
 
 use C4::Biblio;
+use Getopt::Long;
+
+sub _read_marc_code {
+    my $input = shift;
+    my ( $field, $subfield );
+    if ( $input =~ /^(\d{3})$/ ) {
+        $field = $1;
+    }
+    elsif ( $input =~ /^(\d{3})(\w)$/ ) {
+        $field    = $1;
+        $subfield = $2;
+    }
+    return ( $field, $subfield );
+}
+
+my ( $run, $help, $verbose, $where, $date_created_marc, $date_modified_marc );
+GetOptions(
+    'help|h'                 => \$help,
+    'verbose|v'              => \$verbose,
+    'run'                    => \$run,
+    'where:s'                => \$where,
+    'date-created-marc|c:s'  => \$date_created_marc,
+    'date-modified-marc|m:s' => \$date_modified_marc,
+);
+my $debug = $ENV{DEBUG};
+$verbose = 1 if $debug;
+
+# display help ?
+if ($help) {
+    print_usage();
+    exit 0;
+}
+
+$verbose and print "================================\n";
+
+# date created MARC field/subfield
+$date_created_marc = '099c' unless $date_created_marc;
+my ( $c_field, $c_subfield ) = _read_marc_code($date_created_marc);
+die "date-created-marc '$date_created_marc' is not correct." unless $c_field;
+if ($verbose) {
+    print "Date created on $c_field";
+    print $c_subfield if defined $c_subfield;    # use of defined to allow 0
+    print "\n";
+}
+
+# date last modified MARC field/subfield
+$date_modified_marc = '099d' unless $date_modified_marc;
+my ( $m_field, $m_subfield ) = _read_marc_code($date_modified_marc);
+die "date-modified-marc '$date_modified_marc' is not correct." unless $m_field;
+die
+"When date-created-marc and date-modified-marc are on same field, they should have distinct subfields"
+  if ( $c_field eq $m_field )
+  && ( !defined $c_subfield
+    || !defined $m_subfield
+    || $c_subfield eq $m_subfield );
+if ($verbose) {
+    print "Date last modified on $m_field";
+    print $m_subfield if defined $m_subfield;    # use of defined to allow 0
+    print "\n";
+}
+
+my $dbh;
+my $sth_prepared;
 
 sub updateMarc {
-    my $id = shift;
-    my $dbh = C4::Context->dbh;
-    my $field;
+    my $id     = shift;
     my $biblio = GetMarcBiblio($id);
 
-    return unless $biblio;
-
-    if(!$biblio->field('099'))
-    {
-        $field = new MARC::Field('099','','',
-                    'c' => '',
-                    'd'=>'');
-        $biblio->add_fields($field);
+    unless ($biblio) {
+        $debug and warn '[ERROR] GetMarcBiblio did not return any biblio.';
+        return;
     }
 
-    $field = $biblio->field('099');
+    my $c_marc_field = $biblio->field($c_field);
+    my $m_marc_field = $biblio->field($m_field);
 
-    my $sth = $dbh->prepare("SELECT DATE_FORMAT(datecreated,'%Y-%m-%d') as datecreated,
-                                    DATE_FORMAT(timestamp,'%Y-%m-%d') as timestamp,
-                                    frameworkcode
-                                    FROM biblio
-                                    WHERE biblionumber = ?");
-    $sth->execute($id);
-    (my $bibliorow = $sth->fetchrow_hashref);
+    my $c_marc_value;
+    if ($c_marc_field) {
+        $c_marc_value =
+          defined $c_subfield
+          ? $c_marc_field->subfield($c_subfield)
+          : $c_marc_field->data();
+    }
+    $c_marc_value = '' unless defined $c_marc_value;
+
+    my $m_marc_value;
+    if ($m_marc_field) {
+        $m_marc_value =
+          defined $m_subfield
+          ? $m_marc_field->subfield($m_subfield)
+          : $m_marc_field->data();
+    }
+    $m_marc_value ||= '';
+
+    $sth_prepared = $dbh->prepare(
+        q{
+        SELECT
+            DATE_FORMAT(datecreated,'%Y-%m-%d') AS datecreatediso,
+            DATE_FORMAT(timestamp,'%Y-%m-%d') AS datemodifiediso,
+            frameworkcode
+        FROM biblio
+        WHERE biblionumber = ?
+    }
+    ) unless $sth_prepared;
+    $sth_prepared->execute($id);
+    my $bibliorow     = $sth_prepared->fetchrow_hashref;
     my $frameworkcode = $bibliorow->{'frameworkcode'};
+    my $c_db_value    = $bibliorow->{'datecreatediso'} || '';
+    my $m_db_value    = $bibliorow->{'datemodifiediso'} || '';
+
+    # do nothing if already sync
+    return if ( $c_marc_value eq $c_db_value && $m_marc_value eq $m_db_value );
 
-    $field->update( 'c' => $bibliorow->{'datecreated'},
-                    'd' => $bibliorow->{'timestamp'}
-                    );
+    # do apply to database ?
+    return 1 unless $run;
 
-     if(&ModBiblio($biblio, $id, $frameworkcode))
-     {
-        print "\r$id";
-     }
+    # update MARC record
 
+    # date created field
+    unless ($c_marc_field) {
+        $biblio->add_fields( new MARC::Field( $c_field, '', '' ) );
+        $debug and warn "[WARN] $c_field did not exist.";
+        $c_marc_field = $biblio->field($c_field);
+
+        # when on same field
+        if ( $m_field eq $c_field ) {
+            $m_marc_field = $c_marc_field;
+        }
+    }
+    if ( defined $c_subfield ) {
+        $c_marc_field->update( $c_subfield, $c_db_value );
+    }
+    else {
+        $c_marc_field->update($c_db_value);
+    }
+
+    # date last modified field
+    unless ($m_marc_field) {
+        $biblio->add_fields( new MARC::Field( $m_field, '', '' ) );
+        $debug and warn "[WARN] $m_field did not exist.";
+        $m_marc_field = $biblio->field($m_field);
+    }
+    if ( defined $m_subfield ) {
+        $m_marc_field->update( $m_subfield, $m_db_value );
+    }
+    else {
+        $m_marc_field->update($m_db_value);
+    }
+
+    # apply to databse
+    if ( &ModBiblio( $biblio, $id, $frameworkcode ) ) {
+        return 1;
+    }
+
+    $debug and warn '[ERROR] ModBiblio failed.';
+    return;
 }
 
 sub process {
 
-    my $dbh = C4::Context->dbh;
+    $dbh = C4::Context->dbh;
+    my $mod_count = 0;
 
-    my $sth = $dbh->prepare("SELECT biblionumber FROM biblio");
+    my $query = q{
+        SELECT biblionumber
+        FROM biblio
+        JOIN biblioitems USING (biblionumber)
+    };
+    $query .= qq{ WHERE $where} if $where;
+    my $sth = $dbh->prepare($query);
     $sth->execute();
 
-    while(my $biblios = $sth->fetchrow_hashref)
-    {
-        updateMarc($biblios->{'biblionumber'});
-        print ".";
+    $verbose and print "Number of concerned biblios: " . $sth->rows . "\n";
+
+    while ( my $biblios = $sth->fetchrow_hashref ) {
+        $verbose and print 'Bib ' . $biblios->{'biblionumber'} . ':';
+        my $ret = updateMarc( $biblios->{'biblionumber'} );
+        if ($ret) {
+            $verbose and print 'modified';
+            $mod_count++;
+        }
+        $verbose and print "\n";
     }
 
+    $verbose and print "Number of modified biblios: " . $mod_count . "\n";
 }
 
-if (lc(C4::Context->preference('marcflavour')) eq "unimarc"){
-process();
-} 
+if ( lc( C4::Context->preference('marcflavour') ) eq "unimarc" ) {
+    $verbose
+      and !$run
+      and print "*** Not in run mode, modifications will not be applyed ***\n";
+
+    $verbose and print "================================\n";
+    process();
+}
 else {
-       print "this script is UNIMARC only and should be used only on unimarc databases\n";
+    print
+"This script is UNIMARC only and should be used only on UNIMARC databases\n";
+}
+
+sub print_usage {
+    print <<_USAGE_;
+Synchronizes date created and date last modified from biblio table to MARC data.
+Does not update biblio if dates are already synchronized.
+UNIMARC specific.
+
+Parameters:
+    --help or -h                show this message
+    --verbose or -v             verbose logging
+    --run                       run the command else modifications will not be applyed to database
+    --where                     (optional) use this to limit execution to some biblios :
+                                write a SQL where clause using biblio and/or biblioitems fields
+    --date-created-marc or c    (optional) date created MARC field and optional subfield,
+                                099c by default
+    --date-modified-marc or m   (optional) date last modified MARC field and optional subfield,
+                                099d by default
+_USAGE_
 }
index a9fee95..e0f905c 100755 (executable)
@@ -35,6 +35,7 @@ my ( $input_marc_file, $number, $offset) = ('',0,0);
 my ($version, $delete, $test_parameter, $skip_marc8_conversion, $char_encoding, $verbose, $commit, $fk_off,$format,$biblios,$authorities,$keepids,$match, $isbn_check, $logfile);
 my $cleanisbn = 1;
 my ($sourcetag,$sourcesubfield,$idmapfl, $dedup_barcode);
+my $framework = '';
 
 $|=1;
 
@@ -62,6 +63,7 @@ GetOptions(
     'idmap:s' => \$idmapfl,
     'cleanisbn!'     => \$cleanisbn,
     'dedupbarcode' => \$dedup_barcode,
+    'framework=s' => \$framework,
 );
 $biblios=!$authorities||$biblios;
 
@@ -154,7 +156,7 @@ if ($authorities){
 }
 else {
    ( $tagid, $subfieldid ) =
-            GetMarcFromKohaField( "biblio.biblionumber", '' );
+            GetMarcFromKohaField( "biblio.biblionumber", $framework );
        $tagid||="001";
 }
 
@@ -185,7 +187,7 @@ RECORD: while (  ) {
     last unless ( $record );
     $i++;
     print ".";
-    print "\r$i" unless $i % 100;
+    print "\n$i" unless $i % 100;
     
     # transcode the record to UTF8 if needed & applicable.
     if ($record->encoding() eq 'MARC-8' and not $skip_marc8_conversion) {
@@ -308,7 +310,7 @@ RECORD: while (  ) {
                        }
                        else 
                        {
-                eval { ( $biblionumber, $biblioitemnumber ) = AddBiblio($record, '', { defer_marc_save => 1 }) };
+                eval { ( $biblionumber, $biblioitemnumber ) = AddBiblio($record, $framework, { defer_marc_save => 1 }) };
             }
             if ( $@ ) {
                 warn "ERROR: Adding biblio $biblionumber failed: $@\n";
@@ -326,7 +328,7 @@ RECORD: while (  ) {
             C4::Biblio::_strip_item_fields($clone_record, '');
             # This sets the marc fields if there was an error, and also calls
             # defer_marc_save.
-            ModBiblioMarc( $clone_record, $biblionumber, '' );
+            ModBiblioMarc( $clone_record, $biblionumber, $framework );
             if ( $error_adding ) {
                 warn "ERROR: Adding items to bib $biblionumber failed: $error_adding";
                                printlog({id=>$id||$originalid||$biblionumber, op=>"insertitem",status=>"ERROR"}) if ($logfile);
@@ -339,7 +341,7 @@ RECORD: while (  ) {
                        }
             if ($dedup_barcode && grep { exists $_->{error_code} && $_->{error_code} eq 'duplicate_barcode' } @$errors_ref) {
                 # Find the record called 'barcode'
-                my ($tag, $sub) = C4::Biblio::GetMarcFromKohaField('items.barcode', '');
+                my ($tag, $sub) = C4::Biblio::GetMarcFromKohaField('items.barcode', $framework);
                 # Now remove any items that didn't have a duplicate_barcode error,
                 # erase the barcodes on items that did, and re-add those items.
                 my %dupes;
@@ -372,7 +374,7 @@ RECORD: while (  ) {
                     printlog({id=>$id||$originalid||$biblionumber, op=>"insertitem",status=>"ERROR"}) if ($logfile);
                     # if we failed because of an exception, assume that
                     # the MARC columns in biblioitems were not set.
-                    ModBiblioMarc( $record, $biblionumber, '' );
+                    ModBiblioMarc( $record, $biblionumber, $framework );
                     next RECORD;
                 } else {
                     printlog({id=>$id||$originalid||$biblionumber, op=>"insert",status=>"ok"}) if ($logfile);
@@ -594,6 +596,12 @@ to add the record is retried, thereby giving the record a blank barcode. This
 is useful when something has set barcodes to be a biblio ID, or similar
 (usually other software.)
 
+=item B<-framework>
+
+This is the code for the framework that the requested records will have attached
+to them when they are created. If not specified, then the default framework
+will be used.
+
 =back
 
 =cut
index 0e24df5..b72ab2c 100755 (executable)
@@ -93,6 +93,10 @@ if ($process_zebraqueue and $do_not_clear_zebraqueue) {
     die $msg;
 }
 
+if ($reset) {
+    $noshadow = 1;
+}
+
 if ($noshadow) {
     $noshadow = ' -n ';
 }
@@ -667,7 +671,7 @@ Parameters:
                             or -s.
 
     -r                      clear Zebra index before
-                            adding records to index
+                            adding records to index. Implies -w.
 
     -d                      Temporary directory for indexing.
                             If not specified, one is automatically
diff --git a/misc/release_notes/release_notes_3_10_0.txt b/misc/release_notes/release_notes_3_10_0.txt
new file mode 100644 (file)
index 0000000..a1ebdef
--- /dev/null
@@ -0,0 +1,2231 @@
+RELEASE NOTES FOR KOHA 3.10.0
+23 nov. 2012
+========================================================================
+
+Koha is the first free and open source software library automation package 
+(ILS). Development is sponsored by libraries of varying types and sizes, 
+volunteers, and support companies from around the world.  
+The website for the Koha project is 
+
+    http://koha-community.org/
+
+Koha 3.10.0 can be downloaded from:
+
+    http://download.koha-community.org/koha-3.10.00.tar.gz
+
+Installation instructions can be found at:
+
+    http://wiki.koha-community.org/wiki/Installation_Documentation
+    
+    OR in the INSTALL files that come in the tarball
+
+
+Koha 3.10.0 is a major release, that comes with many new features.
+
+
+It includes 160 enhancement and 456 bugfixes.
+
+
+Plack for staff interface
+=========================
+
+The most important feature that comes with Koha 3.10.0 is Plack 
+compatibility for the staff interface. In Koha 3.8.0, 
+the OPAC was already plack-ready. A lot of work (more than 30 
+bugfixes) has been made to make the staff interface Plack-compliant.
+
+The Koha team made many tests, and BibLibre has published a blog entry 
+about performance improvements: using Plack for staff interface 
+will improve your productivity by 25%.
+
+If you’re interested by the complete details for of the tests, you can 
+have a look at:
+
+http://www.biblibre.com/en/blog/entry/plack-for-staff-interface-in-310-why-you-will-want-it
+
+However, Plack is not activated by default when you install Koha 
+(and not activated when you upgrade from a previous version. 
+If you want to activate it, everything you need is described on the wiki page:
+
+http://wiki.koha-community.org/wiki/Plack#Running_Intranet
+
+
+Enhancements and new features in 3.10.0
+======================
+
+About
+----------
+       8301    Display additional system information (preferences) on About page to minimize support cases
+To minimize support questions regarding common mistakes, the About page now 
+has an additional tab that displays warnings if deprecated and/or mutually
+exclusive system preferences are used.
+
+Example: Bug 8298 Can't call method  subfield  on an undefined value at
+Biblio.pm (sub _AddBiblioNoZebra)
+
+       8641    Add information warning about log-in as root user to About->System information
+If you are logged in as database administrative user,a lot of things
+do not work.
+
+It seems that this is a pitfall for a lot of newbies.
+To prevent frustration and support questions, this patch adds some information
+to About->System Information.
+
+Acquisitions
+----------
+       5335    Define VAT/taxes at orderline level, with default value for supplier and list of valid tax rates
+Before this patch, VAT rate was defined at vendor level. With this 
+new feature, the system preference gist is now a list of tax rates.
+Each vendor has its own default tax rate, and on each orderline the 
+librarian can choose the tax rate to apply, the default being the vendor
+default one.
+       5337    In Acquisition, EAN search will return results
+In acquisition module, scanning an EAN results in a correct search
+       5339    Parcel closing in acq
+A new feature has been added to enable closing of a parcel.
+Once a parcel is closed, no items can be added.
+When the librarian closes a parcel, invoice information can be entered.
+Invoice detail includes:
+    - shipment date.
+    - billing date.
+    - shipment cost and budget used for shipment cost.
+       5356    Shipping billing address improvements
+The library will be able to choose shipping and billing address at basket level.
+If that information is filled at basket level, then they won't have to be
+filled at the basketgroup level. If shipping and billing addresses are filled at basket
+level, the information will be stored in the comment section of the basket. That
+will be useful for libraries having a single basketgroup for the supplier, but
+different shipping/billing address
+       7168    Search orders by basket group name
+This patch adds the possibility to search orders by the basket group name
+       7175    Improve order receiving page
+When system preference AcqCreateItem= ordering , this development allows 
+the user to choose what items are received by listing all created items and 
+providing a checkbox for each one.
+
+       7302    CSV export of a basketgroup
+This patch adds CSV export for basketgroups
+       7304    Working on funds ergonomic display and funds management by multiple librarians
+This patch adds more permissions for budgets.
+The librarian can now:
+    - add users to a budget.
+    - Set restrictions to:
+      - None.
+      - Owner.
+      - Owner and users.
+      - Owner, users and library.
+    - Restricted users cannot spend on these budgets (nor can they modify them)
+       7583    Undo receive
+This patch adds a feature to reverse receipt an item in acquisitions 
+- or undo a receipt if you happen to have clicked the wrong title or a 
+title by accident
+       7757    Edit basket vendor after it has been created
+This patch adds the ability to change the vendor for an
+individual basket.
+       7903    Add an ordernumber column in orders history table
+This patch adds ordernumber column in order's history table
+
+Add an ordernumber column in the search results table of orders. It should
+help as far as order tracking is concerned.
+       8028    Make table collapsing on parcel.pl sticky
+The tables on parcel.pl defaulted to show only the first five items in the table,
+and librarians had to click the a link to display all the items. Every time the
+page is reloaded the table got re-collapsed, and the librarian had to click again.
+With this patch, parcel.pl now remembers which way the table was set and keeps it
+that way until it is changed again.
+       8099    DataTables in Acquisision module: acqui-home.tt
+This patch adds a DataTables filter in Acquisision module: acqui-home.tt
+       8100    DataTables in Acquisision module: neworderbiblio.tt
+This patch adds a DataTables filter in Acquisision module: neworderbiblio.tt
+       8102    DataTables in Acquisision module: supplier.tt
+This patch adds a DataTables filter in Acquisision module: supplier.tt
+       8106    DataTables in Acquisision module: addorderiso2709.tt
+This patch adds a DataTables filter in Acquisision module: addorderiso2709.tt
+       8117    Divide budget periods into two tabs
+Budget periods are now divided into two tabs : active and inactive
+budget periods.
+       8652    There is no default value for the late orders
+On the lateorders.pl, we don't want to see all the late orders.
+With this patch, the date interval is based on the estimated delivery date and
+the delay parameter is based on the closing date.
+
+Architecture, internals, and plumbing
+----------
+       7065    Reserves table needs a primary key
+The reserves (and old_reserves) tables need a primary key.
+reservernumber should be used for consistency's sake.  This will allow the
+possibility of multiple holds per biblio/patron combination, and a host of other
+improvements.
+       7248    Caching for services
+This patch moves all caching services to the Koha namespace.
+This patch is a first step that will let us add more caching services to 
+improve speed and scalability in the future.
+This patch works in conjunction with 8089 and 8092
+       7444    Use T::T date plugin to display dates omnibus
+With this patch, all dates can now be displayed through a 
+Template::Toolkit plug-in. All existing code must be updated.
+Dates can/should/must now be displayed by:
+* adding [% USE KohaDates %] at the beginning of the template.
+* use [% mydate   KohaDates %] for mydate date variable.
+* remove .pl code that update date format before sending the string
+to the template.
+
+This entry is an omnibus, as many patches will be necessary.
+       7729    Svc API should allow modification of items
+The svc new_biblio and biblio scripts and now create item as well
+
+The svc API also support deletion of items - maybe using HTTP DELETE
+method.
+       8089    Use Koha::Cache everywhere
+
+
+       8092    Koha should use CHI caching framework
+This patch adds CHI support for caching and its already-existing cache drivers.
+
+Cataloging
+----------
+       3462    Link see also in authorities
+The see also statements in Authorities are linked to the
+authority they were referencing
+       6448    EAN-13 barcode support
+We are migrating one library from custom software to Koha, and they are using
+EAN-13 zero-padded barcodes (primary key in legacy system) instead of ISBN or
+ISSN. Since books already have barcodes on them, we can't change it.
+To make things more interesting, at least one barcode reader reports it as
+UPC-A without first leading zero, since EAN-13 has backwards compatibility with
+it.
+       7412    Pre-filling items in cataloging
+Pre-filling of items: remember what was in the previous item filled, 
+to be able to create multiple items quickly.
+By default, all subfields are prefilled when the PrefillItem system 
+preference is on, unless you specify which fields you want to prefill in the 
+SubfieldsToUseWhenPrefill system preference.
+For example, with a value of 'f u v', only the $f, $u and $v will be pre-filled.
+       7601    Preference for default language for field 008 Range 35-37 (instead of hard coded "eng")
+This patch adds the DefaultLanguageField008 system preference, that is
+used to populate the default 008 MARC21 field, Range 35-37
+       7613    OCLC Connexion Gateway, including extension svc/import_bib
+This patch adds OCLC Connexion Gateway, including extension svc/import_bib
+to let libraries populate their catalog with OCLC (or other) external sources.
+This patch includes:
+  * C4::ImportBatch: create sub GetImportBatchByFilename($filename) which will get
+the last import_batches record with the filename.
+  * svc/import_bib:
+    -  POST request structure:
+param1: val.
+param2: val.
+<?xml version= 1.0  encoding= UTF-8 ?>
+<record ...
+</record>
+    -  call C4::ImportBatch::GetImportBatchByFilename( webservice ); if in 'stage'
+status use it, otherwise create new one AddImportBatch() using POST param.
+    -  call C4::ImportBatch::AddBiblioToBatch() and AddItemsToImportBiblio().
+    -  if import mode = 'direct' call C4::ImportBatch::BatchCommitBibRecords().
+  * misc/cronjobs/import_webservice_batch.pl:
+    -  input params: framework (default 'default').
+    -  call C4::ImportBatch::GetImportBatchByFilename( webservice ); if in 'stage'
+status.
+    -  call C4::ImportBatch::BatchCommitBibRecords().
+  * OCLC requests listening daemon connexion_import.pl.
+    -  base on HTTP::Server or similar.
+    -  command line params: config file.
+    -  config values as per spec.
+    -  first get the auth cookie from auth url, then make request to import url
+       7652    Add item barcode on top of its editing form
+This patch displays the item barcode on top of its editing form. It's
+more useful for the common user than the itemnumber which has no practical 
+application for the user.
+       7739    Batch edit items of a title
+A new option - Edit items in batch - is made available under the Edit 
+menu in  the catalog detail page. When this option is selected the 
+batch item modification tool is called with all items under this record 
+passed as parameters.
+User can then edit all items of this record in batch. Once changes are 
+saved the 'done' link takes the user back to the catalog detail page of 
+this record.
+       7992    New plugin about Automatic Number incrementing inventory. Prefix management from a authorised values list
+The plug-in Koha about the Automatic Number incrementing inventory are not
+perfect.
+This patch adds a new plug-in which offers more opportunities with a prefix 
+management from a authorized values list.
+
+  1 / Create a list of authorized values(INVENTORY_NUMBER). In which the code is
+the prefix and the description the last number assigned.
+
+  2/ A space between the prefix and number.
+
+
+  3 / From a holding record, after indicate the prefix when you click on the
+plug-in -> Koha search the last number from authorized values assigned in the
+list and increment n +1 level meter (description).
+       8185    Plugin for linking records in MARC21
+In cataloging/value_builder there is a plug-in for linking records.
+But is only for UNIMARC (unimarc_field_4XX.pl), this patch add a plug-in for MARC21.
+       8208    Add "create authority" button to auth_finder plugin
+Right now if you want to link a heading to a new authority record, you have to
+either use BiblioAddsAuthorities to automatically generate the authority, or
+create a new authority in the authority module, and wait for the indexer to
+catch up. This patch adds a create authority button that -- like the fast add
+functionality in circulation -- allows you to create an authority and immediately
+populate the heading.
+       8524    Add barcode plugin that does not autofill
+The current barcode plug-in uses the autobarcode system preference to 
+decide which type of barcode to generate, then *always* inserts a barcode.
+This patch adds a plug-in which will only insert the barcode when the plug-in 
+link is clicked.
+       8674    Need a delete biblios script
+The script misc/batchdeletebiblios.pl batch deletes bibliographic 
+records which contain a biblionumber present in file passed in parameter.
+If a bibliographic record has items, it is not deleted.
+       8801    Offer to batch delete items of a bibliographic record
+This patch adds a link in 'Edit' menu to go directly to batch deletion of items.
+
+Circulation
+----------
+       4118    Add Collection Code (CCODE) to Statistics Table
+This patch adds the collection code added to the statistics table in
+addition to itemtype.
+       5549    Hourly Loans
+This patch fixes some problems to hourly loans features which had been 
+introduced in Koha 3.8
+       7420    Add max fines to circulation matrix
+This patch adds a capped charge per item.
+It adds an Overdue Fines Cap section at the bottom of the Circulation
+Rules page with inputs for item type and patron category.
+       7563    Silent print slips using Firefox PlugIn jsPrintSetup and new staff client preference
+This patch implement silent printing for slips. 
+
+In opposition to the solution with an additional Firefox (Portable) installation
+(see: http://wiki.koha-community.org/wiki/Using_Portable_Firefox_as_a_Koha_Client), 
+this solution works with the standard Firefox installation (+ PlugIn jsPrintSetup) .
+
+jsPrintSetup e.g. allows to set printer, print silent, change header and footer,
+see: http://jsprintsetup.mozdev.org/
+
+The overall concept is to have a new staff client system preference 
+(intranetslipprinterjs) where one can enter the necessary JavaScript.
+
+If this preference is empty, Koha falls back to the default behaviour.
+
+Example of intranetslipprinterjs configuration:
+
+function printThenClose() {
+ try
+  {
+        //Try to print using jsPrintSetup Plug-In in Firefox
+        //If it is not installed fall back to default prnting
+        jsPrintSetup.clearSilentPrint();   
+        jsPrintSetup.setOption('printSilent', 1);
+               
+       //Choose printer using one or more of the following functions
+       //jsPrintSetup.getPrintersList...
+       //jsPrintSetup.setPrinter...
+
+       //Set Header and footer...
+        jsPrintSetup.setOption('headerStrLeft', '');
+        jsPrintSetup.setOption('headerStrCenter', '');
+        jsPrintSetup.setOption('headerStrRight', '');
+        jsPrintSetup.setOption('footerStrLeft', '');
+        jsPrintSetup.setOption('footerStrCenter', '');
+        jsPrintSetup.setOption('footerStrRight', '');   
+               
+        jsPrintSetup.print();     
+        window.close();
+  }
+catch(err)
+  {   
+        //Default printing if jsPrint-setup is not available
+        window.print();
+        window.close();
+  }
+} 
+
+if you've installed jsPrintSetup PlugIn in Firefox from now on, 
+slips will print silently with Firefox and will show default behaviour
+if jsPrintSetup is not installed or if you make use of an other browser. 
+
+All other printing will behave like before.
+       7621    Circulation: Match age restriction of title with borrower's age without using categories
+Public libraries and school libraries often have to deal with a lot of age
+restrictions, [e.g. FSK (see www.fsk.de) or PEGI (Pan European Game
+Information, see www.pegi.info)] and/or with regional rules regarding movies
+(virtually every canton in Switzerland has it's own rules).
+
+The classic way to implement age restrictions is to make use of a lot of
+categories. This gets soon very complicated, and is not easily maintainable. The
+librarians need an easy way to maintain age restrictions per title, otherwise
+they will not accept Koha.
+
+This patch adds a robust and easily configurable way to match age restriction
+against the borrower's age.
+
+The concept.
+  1) Have information about age restriction in a field (521$a Target audience
+ is suggested) The entry can be anywhere in the field. It reads like
+PEGI 3 or FSK 12 (or any other 'tag' + age).
+  2) Have a preference 'AgeRestrictionMarker' where such tags are defined. It is a
+text field with a list like
+PEGI,FSK,Age...
+  3) Update your MARC cataloging frameworks to link the 521$a (or any other one) to
+biblioitems.agerestriction.
+  4) Add a limit into a biblio record, for example PEGI 12, if you've defined PEGI in 
+AgeRestrictionMarker.
+If a borrower tries to check out a restricted book and does not have the
+appropriate age, the circulation module will block the check out and issue a
+message like Age restriction 12 
+The AgeRestrictionOverride let you choose if your librarians can or can't
+override age restriction.
+       7647    Checkout History Sort
+With popular items the checkout history can be quite long and it is a challenge
+to sort through and find one library's history of a book.
+This patch puts a table sorter on the checkout history.
+       7704    Independent Branches sys pref change to let librarians choose which things to share
+Before this patch, when independantbranches was ON and canreservefromotherbranch 
+was set to Allow, attempting to checkin the item at the other branch 
+is made, system disallows checkin. Now the item is checked in and an 
+automatic transfer to the home branch is setup.
+       7751    Decrease loan period on items with a high number of holds
+Controlled by a system preference, this will reduce the amount of time something
+can be onloan, if it has a lot of holds on it:
+The loan duration is reduced by decreaseLoanHighHoldsDuration days for items 
+with more than decreaseLoanHighHoldsValue holds
+       7849    Instant Fine Calculation at Checkin
+Add the ability for fines to be calculated at checkin.  This will be 
+helpful for hourly based items so the cronjob for fines doesn't have to be 
+run on such a frequent interval.
+
+
+       7986    Export issues
+This patch adds filters and export button (in iso2709 or csv format) on 
+issues table.
+The export will export bibliographic and items informations, that can be put 
+on a USB key and given to your patron.
+If the patron is a library, he can import this file into his local ILS.
+(This is a common usage in France, where large library check-out hundreds of books
+for a long period to small villages)
+       8167    Add syspref allow a choice of blocking, non-blocking, or do nothing when issuing lost items.
+This patch adds a system preference IssueLostItem to define the 
+behaviour in case of issuing a 'lost' item:
+    - do nothing (checkout without any warning).
+    - request for confirmation.
+    - issue a non-blocking warning.
+       8477    Display home & holding branches when checking in
+This patch adds home and holding branch display when checking in an item.
+       8693    Sort biblio checkout history by checkout date instead of patron name
+issuehistory.pl is displaying a timeline of checkouts for a particular
+title, so it makes more sense to display the list chronologically.
+
+Command-line Utilities
+----------
+       5600    Bulk MARC biblio export script
+This patch adds a command line interface for tools/export.pl
+export.pl [--format=format] [--date=date] [--dont_export_items]
+  [--deleted_barcodes] [--clean] --filename=outputfile
+    * format is either 'xml' or 'marc' (default)
+    * date should be entered as the 'dateformat' system preference is set
+      (dd/mm/yyyy for metric, yyyy-mm-dd for iso, mm/dd/yyyy for us)
+    * records exported are the ones that have been modified since 'date'
+    * if --deleted_barcodes is used, a list of barcodes of items deleted
+      since 'date' is produced (or from all deleted items if no date is
+      specified)
+    * --clean removes NSE/NSB
+       7213    Document /svc/ HTTP API and provide example command-line client
+This patch adds a script that can be used from commandline to play with
+the svc/ API for integrating biblio records into Koha.
+This script can be used from other scripts as C<Koha::SVC> module or run
+directly using syntax:
+  koha-svc.pl http://koha-dev:8080/cgi-bin/koha/svc svc-user svc-password 
+  $biblionumber [bib-42.xml]
+
+       7447    Allow to specify a date in overdue_notice.pl
+
+
+
+       7675    New script for changing selinux file labels on perl scripts
+On some Linux distributions like RedHat, Fedora, CentOS you can use
+SELinux for enhanced security. Among others, this involves file labeling
+(security context).
+In other distributions SELinux can be installed additionally.
+
+The script added by this patch xt/set-selinux-labels lets you update and
+restore such labels on the perl script in a Koha installation.
+Note that there is more to it to get Koha running with SELinux, but this is a
+first step.
+       7963    Parallel HTTP requests when checking URLs
+Current script check-url.pl checks URL found in 856$u by sending HTTP
+requests, one by one. This patch adds a new script which send multiple
+requests simultaneously. The checking is something like 20 times faster.
+
+This script is based on AnyEvent and AnyEvent::HTTP CPAN modules, that are
+required dependencies if you want to use it.
+       8063    Hold print notices do not sort by branch
+The gather_print_notices.pl cronjob for printing hold notices mails all notices
+as one file and does not separate out the notices by branch.  For libraries with
+multiple branches this results in large files being received by individual
+branches that need to be read/sorted/printed or ignored.
+This patch adds a --split (or -s) parameter to gather_print_notices.pl that
+let the library create a separate file for each (borrower) branch
+       8376    Command line utility for exporting borrowers
+
+
+
+
+Database
+----------
+       7792    Redefine the field branchcode as PRIMARY KEY of branches
+The table branches had a UNIQUE KEY `branchcode`, that is moved to PRIMARY KEY
+(There's no noticeable consequence to this change)
+       7794    Redefine the field id as PRIMARY KEY of sessions
+Table sessions had a UNIQUE KEY `id`, that is moved to PRIMARY KEY.
+(There's no noticeable consequence to this change)
+       8268    Koha should offer way to backup entire db
+Right now, if libraries with hosted installations want copies of the database
+for backup purposes, they have to request that their vendors provide them with a
+copy. With this feature, it is possible for vendors to easily enable their
+customers to easily download backups of their database via the Export tool.
+       8757    Longer size text for authorized values description
+This patch improve the size of authorized values descriptions.
+Authorised Values have many uses, and, among others things, store in SUGGEST the
+potential  reasons  (then stored in the  suggestions  table) for which a
+suggestion can be refused.
+To give better informations to borrowers, some librairies would like to see
+longer  lib_opac  fields (the  lib  field should follow the movement, of
+course), this patch make this field 255 chars long.
+
+Developer documentation
+----------
+       6716    Database Documentation
+The database documentation available at 
+http://schema.koha-community.org has been updated and improved
+
+Hold requests
+----------
+       5911    Transport Cost Matrix of transporting an item between branches
+This patch adds a new administrative page that serves to manage the
+relative costs of transporting an item between branches. “Cost” does not
+directly correspond to currency, but rather is a measurement of the difficulty
+of transporting the item between the two branches.
+
+For each branch, it is possible to specify a numeric value indicating the
+'cost' of transporting the item from that branch to every other branch. A toggle
+is also available to block all transport from any branch to any other
+branch. The toggle does not change the 'cost' value associated with the
+transport between any two branches.
+
+A system preference has been added to control whether holds are filled using the
+Transport Cost Matrix, or not.
+
+If the system is configured to use the Transport Cost Matrix for filling holds,
+then when attempting to fill a hold, the system will search for the lowest cost
+branch, and attempt to fill the hold with an item from that branch first.
+Branches of equal cost will be selected from randomly. The branch or branches
+of the next highest cost will be selected from only if all the branches in the
+previous group are unable to fill the hold.
+
+The system use the item's current holding branch when determining whether
+the item can fulfill a hold using the Transport Cost Matrix. This behaviour
+can be overruled if the AutomaticItemReturn system preference is enabled.
+       8004    Items on hold lose transfer after being scanned twice
+When a hold is placed on an item where the pickup location is different than the
+holding library, Koha initiates a branch transfer for that item to fill that
+hold when items is run through the returns system.
+
+If the item is then run through returns a second time, the system is supposed to
+close that transfer as a 'wrongtransfer', and open a new transfer with the same
+from and to branches as the original.
+
+The problem is that the original transfer is closed, but the new transfer is not
+created. This is because at some point, someone replaced the template variable
+WrongTransfer, which had previously contained the branchcode for the library to
+transfer to, with the full name of the library instead ( I assume to make a look
+nicer ).
+
+The consequence of this, is the the name of the library is passed to
+updateWrongTransfer instead of the branchcode, causing the failure.
+       8449    Improve wording and styling for "cancelled holds" on Holds Awaiting Pickup screen
+This patch changes the div classes, so that the prompts for action
+stand out and actually grab the attention of the user.
+
+It also adds more precise, descriptive language for the prompt messages and
+fixes the grammar (e.g. comma splices). The most important part being the 
+second instruction where staff are prompted to check-in the item to continue
+processing the hold for the next patron in the holds queue.
+       8454    Holds to Pull : Show pull list on load. Otherwise, it looks like the pull list is empty.
+Currently, when you click  Holds to pull from the Circulation menu, the only
+thing that you see is a white screen and a side navigation bar that says  Refine
+Results .
+
+Since there appears to be no results to refine, the holds to pull list appears
+completely empty. Staff have to know to click  Submit on the Refine Results 
+form to get anything.
+
+This patch set the run_report  flag to ON for the initial load. The
+report uses the default 2 days mentioned in the Refine Results form, so there
+is continuity across the board.
+       8585    Add System Preference to specify Holds to Pull List Start Date
+When you are on the  Holds to Pull  page in the Circulation module, the
+default Start Date  in the  Refine Results  section is 2 days in the past.
+
+This patch introduce a system preference that changes the number of days to
+however many the librarian chooses. If the system preference isn't set, the
+default of 2 days will continue to be used.
+
+I18N/L10N
+----------
+       8019    Preserve language choice between Browser sessions
+If I select a language in Staff client or Opac, I expect it to be
+persistent between browser sessions.
+
+This is not the case. Koha forgets the selection as soon as all Broser 
+instances are closed, and starts up the next session with the Browser's 
+preferred language.
+With this patch, the language choice is stored for up to 3 years from the last
+login.
+
+Installation and upgrade (command-line installer)
+----------
+       8485    Make koha_perl_deps.pl batch friendly
+This patch adds a switch to the koha_perl_deps.pl script so it is more batch
+friendly. 
+The new parameter -B (for batch) make it output just the library name,
+preserving the other switches semantics.
+
+It is useful to do things like:
+
+for k in $(for i in $(./koha_perl_deps.pl -m -B   perl -pi -e 's/::/-/g'   tr
+'[A-Z]' '[a-z]')
+  do
+    echo lib$i-perl
+  done)
+do
+ apt-cache search $k
+done
+
+Label printing
+----------
+       7846    Get_batch_summary reimplements GROUP BY in perl code
+This patch does not add any feature, but improves by a factor 100 the 
+speed of Manage Batch for label printing screen 
+
+Lists
+----------
+       7788    Tiny problems with calling GetShelf
+This patch just cleans and removes some dead code:
+The first patch deals with two unused calls to GetShelf in
+opac/opac-downloadshelf.pl and virtualshelves/downloadshelf.pl.
+       7805    Exposing the new list permissions in opac and staff
+The next step after 7310: Exposing the new permissions to add and
+delete lists.
+
+Important note: The owner can always add, but needs perms to remove.
+
+MARC Authority data support
+----------
+       2060    Ability to import Authorities from Staff Client
+This patch adds a feature to import authority record files.
+The biblio records staging and importing into the catalog has been extended to handle 
+authorities.
+The matching rules have also be extended to handle authorities.
+       5910    Authorities : allow users to search on all auth types
+This patch adds a 'search all authorities types' feature for
+UNIMARC libraries.
+       7475    Option to overlay authorities
+Right now it is impossible to overlay existing records when importing new
+authority records. This patch adds a script that handles the following overlay
+options:
+    * Overlay (or discard) based on matching preferred headings (1xx in MARC21, 2xx
+in UNIMARC).
+    * Overlay (or discard) based on matching LCCNs (010 in MARC21).
+    * Overlay (or discard) based on matching control numbers (001 for both MARC21
+and UNIMARC).
+    * Overlay (or discard) based on matching an earlier form of the heading
+(4xx$w/2=[aeo] in MARC21, 4xx$5=a in UNIMARC).
+    * Select which record to keep based on the date last modified (003 in MARC21).
+
+This script enable libraries to keep their authority records up to date
+with the latest national authority files, without polluting the local authority
+file with numerous copies of authority records (every time they are updated).
+       8203    Should be possible to save individual authorities
+Right now there is no convenient way to save an individual authority
+record.
+This patch adds a Save button to the authority view in the staff client which
+allows records to be saved as MARC, MARCXML, and (at least for MARC21) MADS.
+       8207    Modify authority type frameworks to allow see also fields to link to thesauri
+Right now if you were to link a field in an authority to a thesaurus, it 
+will not work properly. The authority type frameworks require some adjustments 
+to allow see also headings to be linked to thesauri (such as adding subfield $9).
+
+       8332    Add relationships to auth_finder for authority links
+In addition to the work in bug 8207 that enables auth_finder use, it
+would be very useful when creating authorities to have the auth_finder plug-in
+automatically fill out the relationship information in $w (in MARC21).
+       8627    Fixing pipe values in MARC21 controlfield 008 of authorities
+In MARC21, within field 008 pipe values (i.e. character   ) were not 
+passed correctly in the plug-in script 
+value_builder/marc21_field_008_authorities.pl to the template, resulting 
+in replacement of these character positions.
+
+MARC Bibliographic data support
+----------
+       8138    Add 773$t field to xslt
+This patch adds MARC21 773$t field if exists to result list of both OPAC 
+and staff client.
+This require to have XSLT display activated 
+
+
+Notices
+----------
+       3461    Duplicate overdue email notices caused by message settings not being controled by CircControl in System Prerfrences
+trivial
+       4246    Koha support for Itiva Talking Tech phone notification service
+Implements support for Talking Tech I-tiva phone notification for 
+OVERDUE,  PREDUE and HOLD notifications.
+Overdues respect triggers as configured for the patron's branch.
+Predue and Holds notifications respect patron's messaging preference choices.
+A new column for phone notification is added if the 
+TalkingTechItivaPhoneNotification system preference is turned on.
+
+Record of phone messages being sent to patrons is added to the patron's
+Notices tab; notice of success or failure can be retrieved from I-tiva.
+
+See the TalkingTech.README for installation and set-up instructions.
+
+OPAC
+----------
+       3708    Add another customizable region to the OPAC: right sidebar
+This patch creates a new system preference, OpacNavRight, in
+which the librarian can add HTML which will appear on the OPAC
+main page under the login form. If the user is logged in the content
+will appear in place of the login form.
+       4255    Add item type to facet list
+Itemtype is added to the facet list
+       4460    Amazon's AssociateID tag not used in links so referred revenue lost
+Though Koha enables usage of Amazon's AssociateID tag in the enhanced content
+configuration, no code currently uses it when generating links to Amazon.  Thus
+if a person searching the catalog clicks on a link taking them to Amazon for a
+purchase, Amazon doesn't have the tag and cannot associate the account
+accordingly.  Thus, any possible revenue is lost.
+       6494    Opacmysummaryhtml on reading history
+The opacmysummaryhtml sytem preference is also shown on the reading history
+since it's pretty much a longer version of the my summary anyway.
+
+       6774    Optionally display barcode on OPAC detail page
+This patch optionally displays barcode on OPAC detail normal view 
+including in XSLT view
+       7153    Show Open Library as Search Target in "More Searches" in OPAC detail page
+This patch show Open Library as Search Target in  More Searches  in OPAC
+detail page.
+       7161    Open Library - Larger image, Read, borrow and checked-out status
+This patch modifies Open Library JavaScript to:
+  1. Use jscmd=data instead of default, this provides ebooks availability
+  information. This will allow us to display read/borrow/checkedout icons.
+  2. Show larger image in opac-detail page.
+  3. Show read/borrow/checked-out status in opac-detail page below the image
+       7398    Show number of holds on a title in the OPAC details
+Like on the staff client, it is now possible to show the number of holds
+currently on a title. This will allow patrons to know how long a wait is going
+to be without having to log into the OPAC.
+This patch adds a new system preference, OPACShowHoldsCount, that will
+control whether the total number of holds shown on the OPAC detail page or not.
+       7470    Babeltheque improvement and social networks links (like, +1,...)
+This patch make a new implementation of babeltheque in Koha, more 
+complete and better integrated (for the moment in community version,
+babeltheque is not configurable and hardcoded in opac-bottom.inc).
+There are 3 features in this one:
+  - adds social network information in search results.
+  - adds babeltheque data in opac-detail.
+  - adds social network links in opac-detail too (google+, twitter, mail ...)
+French article with screenshots:
+http://docmiop.wordpress.com/2012/01/18/quand-babeltheque-enrichit-koha/
+       7570    Add item availability status to cart
+For items in the cart (opac-basket.pl), only location and call no. are
+displayed, This patch adds the display of item availability status as well.
+       7959    Update OPAC suggestions interface to match lists
+The OPAC's suggestions list is similar to that of lists in that there is an
+action you can take directly (new suggestion) and an action you can take if
+items are selected (delete suggestion). The toolbar now match the one on
+lists in that the delete option should only be available if an item is selected.
+       7977    Add a "Quote-of-the-day" feature to the OPAC homepage
+This patch adds the option of displaying a select quote
+for the day on the OPAC homepage. It include the addition
+of a QOD editor in the tools section of the staff interface
+which allow the addition, editing, and deletion of quotes.
+A single system preference enable/disable the display of
+the QOD on the OPAC homepage. A new granular permission has
+also been added to control user access to the QOD editor tool.
+       7980    Group search results tag input with other actions
+If TagsInputOnList in enabled there was a 'new tag' form field displayed with
+each search result. This page changes this so that it behaves much like the
+tag link at the top of the search results where clicking the link displays
+the form field.
+
+The per-line add tag functionality is grouped with other  actions  (like
+ place hold,   add to cart,  etc). Clicking the link display the form and
+automatically move the focus to the entry field.
+       7991    Display in a holding summary tab information about serial record
+This patch displays in a holding summary tab informations about serial
+record.
+It is UNIMARC specific, and probably French-specific.
+
+It add the following fields: branch (955$9), holding summary (955$r) and
+call (930$a).
+
+which is information imported from SUDOC (French universities common
+catalog)
+
+example :
+http://catalogue.univ-aix-marseille.fr/cgi-bin/koha/opac-detail
+.pl?biblionumber=725747
+       8001    Add some styling to the tags to allow them to be distinctive
+This patch allows the title and the tag terms in the user's tag list 
+to be styled differently in order to make things prettier.
+       8205    Should be possible to hide unused authorities in OPAC
+For libraries which load complete authority files into their Koha installations,
+authority records which are not in use can overwhelm those that are in the
+ Browse subjects and authors  in the OPAC. This patch adds an OPACShowUnusedAuthorities
+system preference that can be set to 'off' so that the display can be limited to only
+those authorities referenced in the bibliographic database.
+       8206    Add additional search options to authority browser in OPAC
+The OPAC authority browser used to have several boxes for the different types of
+authority searches that are possible. This was confusing to users, and rather
+ugly. However, the additional options were useful for libraries with massive
+authority files. This patch adds a dropdown to the authority search page on the
+OPAC which can be easily hidden using CSS, but offers the option to choose
+whether to look in main entries, headings, or anywhere.
+       8210    Headings in OPAC bib details should link to authority record
+There should be a link to used authority records from the bibliographic
+details display. This is already done in 5888 for the  normal  display.
+       8263    Make OPAC stylesheet preferences more consistent
+This patch merge opaclayoutstylesheet and opacstylesheet that could
+just be one pref (just as opaccolorstylesheet already advertises).
+       8496    Show local cover images on lists view in OPAC
+This patch adds local cover images to lists in the OPAC.
+       8525    Highlight matches on details page
+After doing a search and going to the details page, it can sometimes be
+difficult to see exactly *why* a record was returned by a search. It would be
+very useful to highlight the matches on the details page in the same way we
+highlight them on the results page.
+       8597    New theme for the OPAC with a mobile view
+This patch adds a new theme for the OPAC which includes a mobile version.
+This patch adds the following system preferences:
+    * OpacMainUserBlockMobile- alternate content for MainUserBlock for mobile.
+    * OPACMobileUserCSS- custom CSS for mobile views only.
+    * OpacShowFiltersPulldownMobile- whether or not to show the index
+      dropdown on the mobile view.
+    * OpacShowLibrariesPulldownMobile- whether or not to show the library
+      dropdown on the mobile view.
+
+In order to activate the theme, change the opacthemes system preference to 
+'ccsr' and make sure that your opaccolorstylesheet is set to 'colors.css.'
+       8759    Add labels for library and sorting on OPAC advanced search
+We've had reports of patrons being confused by the lack of labels directly
+attached to the library and sorting pulldowns on the OPAC advanced search.
+With this patch, these pulldowns have explicit labels.
+
+Packaging
+----------
+       6684    Koha-remove should check the number of arguments it gets
+Currently, koha-remove does not check that at least one instancename was
+provided as an argument, so running it with arguments causes an Apache reload,
+which might come as a surprise.
+If no instancename is given as argument it print it's usage.
+
+
+Patrons
+----------
+       3374    Display patron attributes in the same format as other patron data
+Patrons' 'Additional attributes and identifiers' are displayed
+in the same format as other standard patron data: in a list of label/data
+pairs.
+       5742    Batch edit patrons
+This patch adds a batch patron edit tool that includes the
+patron attributes in it.
+An example use of this would be for school libraries
+that keep track of home rooms as an attribute - that changes each year and it
+would be great to be able to batch edit that.
+       7671    Add a real primary key "accountlinesid" in accountlines
+All selects in accountlines are 'WHERE borrowernumber = ? AND accountno=?' 
+Best practice is to have an id. This patch adds id as identifier and modifies calls 
+to accountlines to use it
+       7839    Enhancement: Show routing lists attached to patron in Patron record
+This patch adds a tab called Routing Lists to the Patron record between 
+Fines  and Circulation History.
+It lists all the subscription titles that the patron has routed to them. Each
+title has a link to the subscription record and a link to the edit window of the
+routing list.
+       7955    Statistics tab in patron module
+This patch adds a tab (in the patron module) with statistics (number
+of issues by item type,...)
+       8080    Login and password no longer pre-filled by the browser when creating a new patron
+When creating a new patron, if you have chosen to let your browser remember your
+login and password for you, the login and password fields will be pre-filled
+with them, leading to a system error 'the passwords entered do not match' 
+since the second password field was not filled.
+With this patch, these fields are always blank.
+       8130    Attach PDF files to a patron record
+This patch adds a feature that allows librarians to attach unlimited arbitrary
+files to a patron record.
+It can be used to store a PDF document with a patron record.
+       8431    Increase the borrower attribute field size from 64 characters to 255
+Some libraries like to store more verbose data in a borrower attribute
+field. The character limit has been upped from 64 to 255.
+
+Reports
+----------
+       7249    Report webservices
+This patch adds report webservice, with caching support, and public
+visibility setting.
+Each report can now be declared public and accessible (WARNING: without
+authentication) from OPAC.
+To improve performance, it's also possible to cache for up to 30 days 
+
+       7993    Saved report with hierarchies
+This patch introduces grouping and subgrouping for SQL reports.
+Libraries:
+  -  can create groups (no pre-defined grouping)
+  -  can move report from one hierarchy to another (modify)
+  -  have 2 levels of hierarchy (group and sub groups)
+
+This patch adds 2 authorized value lists:  REPORT_GROUP and REPORT_SUBGROUP.
+When you register or modify a report, you first choose a  group  (code) and 
+then a subgroup  (lib_opac which represent the link between both).
+
+Example:
+  REPORT_GROUP.
+    Code lib lib_opac.
+    CIRC Circulation PRT.
+    CIRC Circulation RET.
+    CAT Cataloging BIB.
+    CAT Cataloging EX.
+    CAT Cataloging AUT.
+    ...etc.
+
+  REPORT_SUBGROUP.
+    Code lib lib_OPAC.
+    PRT Check-outs CIRC.
+    RET Check-ins CIRC.
+    BIB Biblios BIB CAT.
+    EX Biblio EX CAT.
+    AUT Biblio AUT CAT.
+
+From Summary and Statistics  when saving the report, a proposal from the
+list of tabs (hierarchy) to classify the report as a topic of their choice.
+
+Other changes introduced by this patch:
+  * From .../cgi-bin/koha/reports/guided_reports.pl?phase= First show the 
+    top of hierarchies as tabs and then clicking on the opening of
+    the hierarchy. Reports are provided in a table with headers that are 
+    sortable.
+  * After you save the report there is now a link from this page 'Start the 
+    new report'.
+  * Columns are also sortable.
+       8256    Reports webservice should allow selection by name
+At the moment, reports cannot be selected from the reports webservice by name,
+only by report ID. This patch adds the feature to select a report by name.
+
+Searching
+----------
+       6566    Checking if DB records are properly indexed
+This patch adds a small script that checks that each record in the DB is
+properly indexed.
+
+parameters:
+\t-h this help screen
+\t-c confirm (without this parameter, you get the help screen
+\t-z insert a signal in zebraqueue to force indexing of non indexed biblios
+\t-s silent throw no warnings except for non indexed records. Otherwise throw a
+warn every 1000 biblios to show progress
+
+Syntax:
+\t./batchCheckNonIndexedBiblios.pl -h
+\t./batchCheckNonIndexedBiblios.pl -c
+
+       7286    Introduce rebuild_zebra_sliced.zsh to recursively rebuild zebra & be error proof
+
+
+
+       7401    Show shelving location facet instead of branch facet when only 1 branch configured
+If there is only one branch configured in Koha, it doesn't make any sense to put
+a limiter on branchcode in search results.  Having a limiter on shelving
+locations within that branch, though, would be very handy.
+       7417    Include alternate forms from authorities in bibliographic searches
+This patch enables the search on authorities see-from in biblio 
+searches. Although authority records include references from unused terms,
+at present Koha does not take advantage of them when searching bibliographic
+records. It would be very useful if Koha could (optionally) include all the
+see-from terms in bibliographic records for indexing purposes. In order
+to do this, it will be necessary to inject see-from headings into bib 
+records immediately before exporting them for indexing by Zebra (or solr,
+or any other indexing engine that Koha may use).
+The price for this feature, if you use it, is a much slower catalog
+indexing speed. (by a factor 2 or 3)
+       8211    Add "subject (broader)," "subject (narrower)," and "subject (related)" options for search
+With the addition of DOM indexing, it is now possible to do  exploded
+searches which search for records with broader, narrower, and other related
+headings by searching authorities for the specified term, then using
+authorities that match the specified criteria to do a more inclusive search
+for bib records.
+       8492    Restrict OpacSuppression to IP addresses outside of an IP range
+This enhancement extends the OpacSuppression feature with an optional IP address
+range within which results are _not_ suppressed.
+       8726    Did you mean? plugin for broader/narrower/related terms
+Building on the work in bug 8211, this patch add a  Did you mean? 
+plug-in which will suggest that users review broader, narrower, and related
+terms when they do subject searches, thus making the functionality usable
+to the general public.
+
+Serials
+----------
+       5357    Subscription search and displays
+This patch improve many ergonomic aspects of the serials module:
+  * The search page is improved and some fields are added to search on
+(issn, subscription number, library, internal note, callnumber).
+  * The subscription list result is modified. The pipe will be removed in case
+of a repeated title & issn (the title & issn are repeated).
+  * The internal note was not displayed on staff interface. It is now displayed in
+serial issues and in various places where it can be useful.
+  * An option has been added to limit subscription search by branch.
+       8432    Improvement of serials search results list
+This patch adds fields in the search result list : branch, callnumber 
+(in separate columns), history, expirydate, number of routing lists attached.
+
+SIP2
+----------
+       8216    Enable critic tests on SIP modules
+SIP modules continued to issue a number of perlcritic warnings. 
+This patch adds C4/SIP to the testcritic directories and addresses those 
+issues which are warnings (mainly return undef and subroutine prototypes)
+It also removes some dead code that was no longer used.
+       8271    Teach SIPServer to set its own lib path
+Teach SIPServer.pm to set its own lib path. SIPServer.pm requires that
+C4/SIP 
+is added to its lib path This has been done by passing this directory
+to it via -I. By using FindBin it can set the path for itself correctly. 
+This will also work if the C4/SIP directory tree is moved to a 
+non-standard location This patch also remove the now redundant -I. from
+sip_run.sh.
+
+Staff Client
+----------
+       7949    A different favicon for the staff client
+At the moment the favicon used in the staff client is the same as the one for
+the OPAC. A different one would make it more legible when having both opened in
+various tabs.
+
+System Administration
+----------
+       8083    Granular parameters permissions
+This patch introduce 'manage_circ_rules' and
+'parameters_remaining_permissions' parameters subpermissions.
+
+Add  GranularParametersPermissions  boolean system preference, No default. If set to yes
+use aforementioned subpermissions in admin/* functions, otherwise just use
+parameters flag
+       8412    Add color icon set
+This patch adds coloring images to ccodes.
+The goalis to make it so that libraries can use one of the authorized
+values (shelving location or collection code) to store the color of the material
+and then make that searchable on the advanced search page.
+To do this for collection codes you'd need to add the following jqueries:
+intranetuserjs
+  $(document).ready(function(){
+    $( #advsearch-tab-ccode a:contains('Collection') ).text( Color );
+    $( #holdings th:contains('Collection') ).text( Color );
+  });
+opacuserjs
+  $(document).ready(function(){
+    $( #advsearch-tab-ccode a:contains('Collection') ).text( Color );
+    $('#item_ccode').text( Color );
+  });
+And update the frameworks to change the 952$8 label to say Color.
+This patch just has images, no code.
+
+Templates
+----------
+       2930    Put 'other name' on checkout screen
+Put 'other name' on checkout screen
+
+This patch adds 'other name' to the include which is used
+to display patron names and adds this include in several
+places where it can be used in place of direct output.
+
+The patron-title include has been modified to handle the
+two possible variable scopes throughout patron-related
+templates. This is a hack similar to having both
+circ-menu.tt and circ-menu.inc, but keeping both in the
+same file.
+
+Changes to some scripts were necessary to make the
+othernames variable available to the include.
+
+This patch also corrects some title tags and fixes
+some incorrect capitalization (see Bug 2780).
+       5184    Upgrade jQuery to the latest version
+This patch updates JQuery library to version 1.7.2
+       5345    DataTables in Koha
+Table sorter & filters have been added everywhere in Koha
+We avoid adding sorters & filters where perf is a caveat (like circulation)
+       6689    Improve styling of table pager
+This patch change the style of the pager which has been added to some
+tables sorted by the jQuery tablesorter. 
+       7747    Replace YUI autocomplete with jQueryUI
+This patch introduce jQueryUI in Koha, widget autocomplete.
+       7905    Multi-line notes are displayed on one line in Staff Serials page
+In Serials, on the summary of a subscription, four different notes
+(nonpublic note, public note, and 2 notes for history) are displayed in
+one line for each. But when we edit the subscription, it's possible
+(and tempting) to type the content on several lines.
+
+This patch try to display these notes on several lines in an elegant way (not so
+easy because the layout seems to be optimized for one-line informations).
+       7926    Acq search results show empty parenthesis for orders without basket group
+Search results in acquisitions show a column for basket group with  name of
+basket group (basket group number)  that will only be () when there is no basket
+group for an order line.
+       8107    Disabled buttons not distinguishable from enabled buttons.
+Disabled buttons in Koha appear no different than enabled buttons. This
+patch adds some CSS in Koha to make disabled buttons distinguishable from 
+enabled ones.
+       8143    Upgrade jQuery tabs to current jQueryUI version
+We use a very old version of jQuery tabs in many places. Each instance 
+should be updated to work with the latest jQueryUI.
+
+
+       8181    Replace DynArch calendar widget with jQueryUI version
+Currently Koha uses a JavaScript calendar plug-in from
+http://www.dynarch.com/projects/calendar/old/.
+This older version of the plug-in is open source but is now unmaintained and
+the newer version is not open source. This plug-in has been replaced by the
+jQueryUI datepicker widget:
+  http://jqueryui.com/demos/datepicker/
+       8283    Replace usage of YUI Cookie utility with jQuery Cookie plugin
+This patch continues the work to eliminate usage of YUI by using jQuery
+Cookie plug-in instead of YUI Cookie..
+       8319    Headings on statistics tab are confusing
+On the statistics tab on the patron record the table headings are
+confusing to the average library staff member.  This patch change the language
+to something a bit clearer.
+       8405    Add IntranetBiblioDefaultView and BiblioDefaultView to XSLT.pm
+When displaying the result lists with XSLT, the link to the detailed
+bibliographic record was hard-coded to the default view (detail.pl or opac-
+detail.pl) and there was no way to accommodate for the system preference value since it was
+not taken into account in XSLT.pm.
+This patch make the default view available in the XSLT.
+
+       8655    Re-order items on administration page to better match configuration priority
+This patch reorders the administration home page for a better usability:
+The administration home page says 'Configure these parameters in the order they
+appear', but cities and road types appear before circulation and fine rules.
+Circ rules have a higher priority.
+       8718    Normal catalog detail view in staff client doesn't show missing serials or subscription history note
+Normal catalog detail view in staff client doesn't show missing
+serials or subscription history note.
+This patch adds librariannote (staff subscription history note) and missing
+list to the normal catalog detail view in staff client.
+       8989    Availability facet needs an id
+Facets in search results (both in the staff interface and in the OPAC)
+have ids for CSS styling, except for the availability facet.
+
+This patch adds one, especially since this feature seems to have been
+broken for a while and this would allow us to hide it. 
+
+Test Suite
+----------
+       5327    Omnibus for unit tests required for all C4 modules
+The patches attached to this entry are related to unit tests developers
+run when a patch is added to Koha.
+       8353    Add test to compare system preferences in db to syspref.sql
+This patch adds a script, xt/check_sysprefs.t that check all the 
+system preferences in your system, and warn you if any system preferences
+are missing
+       8649    C4::Search needs a unit test
+This patch adds unit tests for searching
+       8728    T/db_dependent/Reserve.t test doesn't use resdate and expdate arguments for AddReserve
+The AddReserve routine had resdate and expdate added in between arguments (not
+appended) in 2009/2010ish so we need to adjust the t/db_dependent/Reserve.t accordingly.
+       8768    T/ItemType.t fails because DBD::Mock has no empty result set
+ItemType.t fails because the second test attempts to retrieve a non existent
+result set causing an error in DBI
+The intention of the test is that all returns 0 on an empty table so DBD::Mock
+should be populated with an empty result set otherwise the test suite fails
+
+
+
+Tools
+----------
+       7351    Ability to edit a range of holidays
+The new feature that allows you to enter a range of holidays did not let you
+edit the range. So if you have a long range of dates and you messed up you'd 
+have to edit them one by one. This patch adds a way to edit/delete a range of 
+dates.
+       7784    Improve clarity of batch modification operations
+In the batch item modification interfaces:
+
+ Checking the box right next the subfield label will disable the entry 
+and delete the values of that subfield on all selected items 
+
+It's more accurate to say  disable the entry and delete the contents of
+the subfield. Some enhancements:
+
+ - indicate this by emptying/resetting the field and adding a disabled
+attribute.
+ - append a note which says  The contents of this field will be deleted.
+
+It would also be helpful to add a note saying that leaving fields empty will
+make no changes to any records.
+       8202    Add authorities to export tool
+This patch adds the feature to export authorities in the export tool
+       8279    CAS Debugging improvements
+Adds more precise debug informations for easier CAS troubleshootings resolution.
+Before this patch, whenever ticket validation failed, the debug message was
+'Invalid ticket'.
+But ticket validation may fail for other reasons: CAS server not reachable,
+casServerUrl system preference is wrong...
+This patch adds the reason for ticket validation failing.
+
+
+Z39.50 / SRU / OpenSearch Servers
+----------
+       3087    Z39.50 server returns usmarc format records for UNIMARC DB
+When marcflavour is UNIMARC, Koha Z39.50 used to return biblio records 
+in UNIMARC format. But it also returned that biblio record format
+is 'usmarc'. There is an incompatibility. Z39.50 clients who interpret 
+this value won't display correctly biblio records.
+WARNING = All UNIMARC libraries must upgrade their zebra configuration and restart zebra,
+or searches will always return 0 results !!!
+Upgrading zebra is automatically done with 'make upgrade'. Libraries using git must go
+to the bugzilla entry to see what must be changed.
+       8570    Add pagination to the Z39.50 results page
+When doing Z39.50 searches, a maximum of 20 results are show even if 
+there are a lot more matching results returned by the server.
+This patch adds some pagination code to the Z39.50 results pages so all results
+returned by the Z39.50 server can be accessed.
+
+
+Critical bugs fixed in 3.10.0
+======================
+
+(this list include all bugfixes since the previous major version. Most of them have already been fixed in maintainance releases)
+
+
+Acquisitions
+----------
+       8247    blocker Adding basket doesn't save basket name, internal or vendor note
+       8495    blocker Javascript error when creating a new order
+       8903    blocker Can't receive any orders
+       8439    critical        Printing basketgroup does not work on plack
+       8637    critical        Lack of control on mandatory in orderreveive.tt
+       8832    critical        Can't enter a tax rate on vendor or when ordering
+       3969    major   Budget Search Doesn't Work
+       7112    major   Having two prices in 020$c causes basket creation to fail from staged marc import
+       7921    major   Software error while placing order
+       8201    major   Can't change receive date
+       8395    major   Order receive not sorting right
+
+Architecture, internals, and plumbing
+----------
+       8486    blocker Critical error in Koha::Calendar::days_between calculation
+       8842    blocker Plack and tools/holidays.pl
+       9064    blocker Statistics.ccode specified inconsistently
+       7119    critical        General code-cleaning, tidy/whitespace omnibus
+       7818    critical        Support DOM mode for Zebra indexing of bibliographic records
+       8636    critical        Some dependencies are not listed by the installer
+       8315    major   Fix 'C4::Output 3.02' errors in Koha
+       8384    major   Some Perl scripts do not compile
+       8463    major   Koha/SearchEngine/Solr/Search.pm fails perlcritic test
+       8892    major   Plack variable scoping in basket.pl
+       8997    major   Dead code in C4/Language causing useless SQL queries
+       9005    major   Changing sysprefs requires restart under Plack
+       9085    major   Installer will not run with DEBUG set
+
+Authentication
+----------
+       8919    critical        ExtendedPatronAttributes not populated from LDAP
+
+Browser compatibility
+----------
+       8414    major   Intranet header toplinks display white rather than blue in < IE8
+       8547    major   Enabling star ratings causes javascript errors that cause IE to have a boo boo
+
+Cataloging
+----------
+       8071    blocker Link beween bib and authorities with the authid
+       8818    blocker Authority linker error on Z cataloging
+       8447    critical        Can't save new records / indicator error
+       8576    critical        Software error on authority edition when using merge
+       8665    critical        DOM indexing fails to index some bib records
+       8829    critical        Can't import authorities
+       8860    critical        Can't merge if you don't have fast cataloging permissions
+       8503    major   Software error n edit items with EasyAnalyticalRecords
+
+Circulation
+----------
+       8154    blocker The export today's checked in barcodes generated file is always empty
+       8800    blocker SpecifyDueDate && useDaysMode=Datedue wrong behaviour
+       5644    critical        Dropbox mode doesn't set the correct date
+       8056    critical        CircAutoPrintQuickSlip set to clear doesn't work
+       8077    critical        Overdues with fines won't run
+       8251    critical        Patrons are systematically debarred at checkin
+       8253    critical        Fix fine doubling, when upgrading from 3.6 to 3.8 (or later)
+       8418    critical        Koha::Calendar is_holiday ignores all user data
+       8966    critical        Koha::Calendar::is_holiday truncates the date
+       6151    major   IndependantBranches and HomeOrHoldingBranchReturn can prevent items from being checked in
+       6976    major   User hold limit can be avoided by users in OPAC
+       8082    major   The:  IssuingInProcess  configuration setting is working in reverse.
+       8213    major   "Cancel All" button on holds over tab cancels both holds over and holds waiting
+       8420    major   Tool statisticfines.pl(bz 6858) and hourly loan(bz5549)
+       8656    major   Koha::Calendar not loading both sets of special dates
+       8738    major   DateTime object being compared to a date string in circulation
+       8939    major   Fines Charged During Grace Period
+
+Command-line Utilities
+----------
+       9001    critical        Zebraqueue_daemon is deprecated and must go
+
+Database
+----------
+       6428    blocker Refered column 'items.coded_location_qualifier' does not exist
+       9066    critical        VirtualShelves database access not Plack + MariaDB compatible
+       8182    major   Problem with overdue fine calculations after upgrade
+
+Documentation
+----------
+       7936    major   General ticket for help file updates
+       8945    major   Koha 3.10 Help Files Update
+
+Hold requests
+----------
+       7641    critical        Add ability to suspend reserves.
+       8448    major   Holds Awaiting Pickup : Cancelling a hold on a waiting item with multiple holds displays a blank screen instead of a warning prompt
+
+Installation and upgrade (command-line installer)
+----------
+       8135    critical        Services Directory and itemrecorddisplay.pl File Missing After Install
+       8289    critical        Upgrading from 2.2 does not work anymore
+       8780    major   Lower dependency version for DateTime::TimeZone
+       8784    major   Missing files in debian.packages list
+
+Installation and upgrade (web-based installer)
+----------
+       8159    critical        Error in kohastructure.sql
+       7984    major   Fix the upload_local_cover_images permission
+
+Label printing
+----------
+       8140    blocker Error when exporting label xml
+       8490    blocker Error when adding label layout under plack
+       8442    critical        Error when printing labels under plack
+
+Lists
+----------
+       8706    critical        Private lists can be accessed by anyone
+
+MARC Authority data support
+----------
+       8520    critical        Authorities display incorrectly in staff results
+       8743    critical        ZOOM error when merging authority change to biblios
+       8905    major   Error when accessing invalid authority
+
+MARC Bibliographic record staging/import
+----------
+       7329    critical        The "undo import into catalog" command deletes items onloan without checking
+
+Notices
+----------
+       8267    blocker Overdue notices not working
+       8607    blocker Overdue_notices is broken
+       7848    major   Issues data missing from circulation notices
+
+OPAC
+----------
+       5981    blocker OPAC: Add limits to search history
+       8381    blocker Paging broken in OPAC search results
+       8144    critical        775 tag in the MARC record causes display issue
+       8293    critical        Software error when clicking on first or last result of each page on OPAC
+       8953    critical        Opac-userupdate encoding issues
+       8095    major   Printed lists in the OPAC not easy to read
+       8145    major   Opac-tags.pl fails when DEBUG is set
+       8204    major   Authority viewer in OPAC ugly, unfriendly, and mostly useless
+       8513    major   OPAC detail page broken with XSLT
+       8572    major   Attempting to view an invalid authority in the OPAC gives an error instead of 404
+       8678    major   XSLT stylesheets output XML, but HTML is needed
+       8885    major   OPAC with ccsr theme in IE9
+
+Packaging
+----------
+       7589    blocker Tinymce editor broken in .deb packages - in 'en' templates
+       8890    blocker Packages can't be built on master, db dependent test
+       7924    critical        Fix handling of command line arguments in koha-remove
+       8162    critical        Packaging scripts create user incorrectly
+
+Patrons
+----------
+       9122    blocker Writing off fees broken
+       7068    major   Autobarcode not working when duplicating patrons
+       8057    major   Error when adding a patron with email address
+       8980    major   Untranslatable strings in modborrowers.pl
+
+Reports
+----------
+       8128    blocker Can't seem to run new sql reports
+       8072    critical        Reports wizard dies
+       8329    major   GetLostItems in C4::Items.pm has a SELECT *
+       8811    major   Can't run report after saving
+
+Searching
+----------
+       8172    major   Missing dereference marker for buildQuery parameter in addbooks.pl
+       8233    major   New search engine layer - introduce solr without breaking anything else
+       8805    major   Add a biblio-zebra-indexdefs.xsl for NORMARC
+       9050    major   Rebuild_zebra should use the adelete action so it doesn't fail when deleting a record not in the index
+
+SIP2
+----------
+       7619    blocker 3M self checkout don't work in France
+       8336    major   SIP Server does not process renewal transaction correctly
+
+Staff Client
+----------
+       9010    blocker Quote of the day: diacritics & other utf8 chars not displayed correctly
+       7998    critical        3.8 UI cleanup, tweaks to new styles
+       8379    critical        Encoding problem under Plack
+
+System Administration
+----------
+       8002    critical        Can't add patron attribute type in newer installation
+       8497    critical        Strange behavior when modifying the 'timeout' system preference.
+
+Templates
+----------
+       3652    critical        XSS vulnerabilities
+       8428    critical        Can't save contracts
+       8078    major   My summary showing contents of incorrect tab
+       8229    major   Tabs in marc subfield structure is not shown correctly
+       8356    major   Moveitem.tt and linkitem.tt have cataloging typo
+       8622    major   Koha themes broken
+       8644    major   JQueryUI CSS file should not contain customizations
+
+Test Suite
+----------
+       8846    blocker T/SuggestionEngine_ExplodedTerms.t sneakily uses database
+       9036    critical        00-load.t checks Koha::Cache::Memcached when it should not
+       9053    critical        Test::MockModule and DBD::Mock should be required
+       9054    critical        00-load should not try to load modules with optional dependencies
+       9039    major   Tests in the basic test suite should only test code based on required dependencies/modules
+
+Tools
+----------
+       8904    blocker Plack variable scoping in tools/overduerules
+       8035    critical        Bibs with comments show an error in opac
+       9046    critical        Items are not exported with the tools/export.pl
+       8707    major   Tags always say approved
+
+Z39.50 / SRU / OpenSearch Servers
+----------
+       8027    major   Wrong order for parameters in Z39.50 SQL INSERT
+
+
+Other bugs fixed in 3.10.0
+======================
+
+(this list include all bugfixes since the previous major version. Most of them have already been fixed in maintainance releases)
+
+
+About
+----------
+       8282    normal  Bug in modules list in about.pl
+       8910    minor   Silent warnings triggered in about.pl
+       7143    trivial Bug for tracking changes to the about page
+       8313    trivial Add ASHS to 'Koha team' page, for sponsorship of the 'star-ratings' feature
+
+Acquisitions
+----------
+       6394    normal  Purchase order has french hard coded in
+       7129    normal  Actual cost showing too many zeros
+       7178    normal  Improve order item creation
+       7604    normal  Link on basket group name for closed basket groups is broken
+       8152    normal  Clicking cancel on edit suggestion redirect to the suggestion detail
+       8184    normal  Duplicate budget page lacks heading and breadcrumbs
+       8224    normal  Aqplan.pl and aqbudgets: authorized values doesn't appear in planning list
+       8382    normal  It is not possible to cancel an order when receiving on a filtered page in parcel.pl
+       8575    normal  Number of items expected is wrong
+       8629    normal  Update of statistics fields on fund selection in order creation/edition
+       8659    normal  Inactive funds in neworderempty not disabled in IE/Opera
+       8680    normal  Z39.50 searches for ISBN/ISSN problematic in the Acquistions Module
+       8944    normal  Fix wording on invoice search
+       7990    minor   Bad html attribute into aqplan.tt : styl= insted of style=
+       8040    minor   A menu misnamed in budgets
+       8166    minor   Adding new currencies & exchange rates if not fill any field it save blank record
+       8183    minor   Acqui/parcels.pl plack scoping
+       8223    minor   Properly format SQL query in C4::Bookseller::GetBookSeller
+       8440    minor   Dates does not appear in suggestions management
+       8666    minor   Prevent to create baskets for inactive suppliers
+       8820    minor   Don't show orders table if there are no orders
+       8831    minor   Gstrate should say 'Tax rate'
+
+Architecture, internals, and plumbing
+----------
+       4321    normal  C4::Biblio::GetBiblio is badly coded
+       4330    normal  Copyright statements out of date
+       7299    normal  ILSDI HoldItem service does't set the itemnumber in reserves table
+       7379    normal  Copynumber is displayed 'as is' when linked to autorised values
+       7857    normal  Database upgrade fails with plack
+       7941    normal  Fix version numbers in modules and set up a system to keep them up to date
+       8311    normal  Mis-scoped function call in C4::Auth
+       8434    normal  Notice generation fails for Advanced Notices, Item Due, and Overdues when run in shell (due to error in Letters.pm)
+       8648    normal  SearchResults uses SQL query rather than GetMarcFromKohaField
+       8679    normal  Remove usage of Amazon API
+       8705    normal  Software error on help of main page
+       8804    normal  Quiet errors in the log from Auth.pm
+       8915    normal  Referential integrity constraints and InnoDB vs MyISAM storage engine
+       2553    minor   Alphabetize dropdown menus
+       6679    minor   Fixing code so it passes basic Perl::Critic tests
+       8017    minor   Remove unnecessary processing on return of GetAllIssues
+       8761    minor   Correct compile time warnings in C4::Circulation
+       4491    trivial Cleaning some weird code in *search.pl
+       8727    trivial Correct help text in rebuild_zebra_sliced.sh
+       8850    trivial Can't place hold on title with ILS-DI
+
+Authentication
+----------
+       7810    normal  C4/Auth.pm - on plack restart session is undefined
+       8787    minor   If OpacMaintenance is on the requested page is loaded
+
+Cataloging
+----------
+       2399    normal  All status fields in the item edit interface offer two blank/null entries per dropdown instead of one
+       3413    normal  Repeatable tickbox not sticking 1st time round
+       4198    normal  Deleting an authority refreshes the page
+       4838    normal  Repeated authority headings break biblio record data entry form
+       6939    normal  DefaultClassificationSource not used in 942$2
+       7961    normal  Local cover images should support CSV link files
+       8116    normal  Z3950 empty search causes silent warning in koha-error_log
+       8161    normal  Cataloging home page should be accessible to users with permission to edit catalog or edit items
+       8175    normal  Items.materials check logs error or displays incorrectly in details.pl
+       8180    normal  Cataloguing/additem.pl plack scoping
+       8386    normal  Error in duplicate detection message for authorities
+       8550    normal  Z39.50 searches for ISBN/ISSN problematic
+       8586    normal  Small bug in die if no mapping in framework for biblioitems.biblioitemnumber
+       8692    normal  Authorities search form does not correspond to current search query
+       8823    normal  CatalogModuleRelink Creates Multiple Links between Bib and Auth record  ($9 RLIN)
+       8862    normal  Merge.pl contains untranslatable strings
+       8191    minor   New value for 8 position in coded data field 100 in unimarc
+       8709    minor   Subfield 0 does not show in MARC detail in intranet
+
+Circulation
+----------
+       3387    normal  WITHDRAWN items shouldn't check in
+       6858    normal  Adds staticfines.pl for static fines processing
+       8005    normal  Lost item is not anonymized when checked in
+       8043    normal  Today's checkouts are in Previous checkouts in circulation.pl
+       8045    normal  Problems on Due date when checking in
+       8129    normal  Quick slips issuing does not work
+       8178    normal  Circ/circulation.pl under plack duplicates checkout rows
+       8275    normal  Xml parsing error when the webservice GetPatronInfo/show_loans is called
+       8370    normal  Default checkout, hold and return policy for all library => wrong term
+       8455    normal  Check ins processed through "Check Out" tab of the Patron Record ignore Circulation System Preferences
+       8498    normal  Can't specify an hour when specifying due date
+       8532    normal  Old/iffy data causes error checking out
+       8590    normal  Checked out from missing on patron detail
+       8640    normal  GetHardDueDate functions incorrectly
+       8675    normal  Renewing item to specified date creates a due date with HH:MM set to 00:00
+       8834    normal  Call to C4::Context::preference fails to pass $self in Circulation.pm
+       8841    normal  Duedates set by Returnbeforeexpiry lack HH:MM
+       8971    normal  Sort holds queue report using DataTables
+       8972    normal  Due Date set to 100 years ago.
+       7948    minor   Printing transfer slip loses barcode field focus
+       8006    minor   Loading offline circulation does not anonymize
+       8234    minor   Dates are not well sorted on Transfers to receive
+       8422    minor   Fix impossible warning in circulation.pl when OverduesBlockCirc set to Block
+       8569    minor   Paying for a lost item overwrites nonpublic notes
+       8826    minor   Initialization of hash triggers error log entries.
+       8772    trivial Uninitialized variable triggers error log entry in smart_rules.pl
+       8880    trivial Uninitialized variable triggers error log entry in circulation.pl
+
+Command-line Utilities
+----------
+       8844    normal  UNIMARC_sync_date_created_with_marc_biblio.pl creates a modification log
+       8741    minor   Crontab.example missing username, fails in some systems
+       6267    trivial Custom http user-agent in check-url.pl (fix for books.google.com 401 error)
+
+Database
+----------
+       6557    normal  Biblioitems.totalissues unused
+
+Documentation
+----------
+       8568    minor   Fix some errors in docs for scripts provided by the Debian packages
+       6350    trivial Bug for tracking updates to the history file
+       8670    trivial Update POD of C4::Branch::GetBranches() to use TT syntax
+       8961    trivial Typo in intranet-tmpl/prog/en/modules/help/offline_circ/list.tt
+
+Hold requests
+----------
+       7951    normal  Suspending holds needs a system preference
+       8419    normal  Suspended holds appear on the daily holds queue
+       8479    normal  Opac Holds being created with priority set to NULL
+       8700    normal  RESERVESLIP fields not being replaced correctly
+       7815    minor   Order pickup library list by name rather than by code
+
+Holidays
+----------
+       8110    normal  Add tests for Calendar modules
+       9078    normal  Is_holiday should honour holiday exceptions
+
+I18N/L10N
+----------
+       7943    normal  Untranslatable strings in OPAC's authority search
+       8633    normal  Translate script hardcoded to prog template
+       9018    normal  Po file for ccsr theme missing on translate.koha-community.org
+       6141    minor   Html glitches causing problems to translator
+       8062    minor   Cart email broken for non english templates
+       8872    minor   Improve encoding for xslt files, showmarc and opac-showmarc
+       9020    trivial Translate new permissions for 3.10
+
+Installation and upgrade (command-line installer)
+----------
+       7820    normal  Missing packages from install_misc/debian.packages
+       8724    normal  Upgrade from NoZebra installs is broken
+       8478    minor   Update Ubuntu related files
+       8742    trivial Example uses perl 5.8 in Makefile.PL
+       8749    trivial Missing Ubuntu library files in ubuntu.packages and ubuntu.12.04.packages
+
+Installation and upgrade (web-based installer)
+----------
+       5795    normal  Missing ReservesControlBranch system pref in database installer
+       9024    normal  Add additional sample data to German installer
+       9058    normal  Norwegian default for CalendarFirstDayOfWeek
+       9023    minor   Update installer txt files to have more accurate information
+       8222    trivial The zip code field is mandatory by default
+
+Label printing
+----------
+       7952    normal  PDF::Reuse under plack writes to console STDOUT instead to browser
+       8375    normal  Common diacritics not shown correctly when exporting batch label to PDF
+       8796    normal  Patron cards not starting on designated card
+
+Lists
+----------
+       1963    normal  Problem with deleted biblio in a virtual shelf
+       8719    normal  Private lists always sorted by title (even when author or date is selected)
+
+MARC Authority data support
+----------
+       6720    normal  Saved authorities always show as 'Default'
+       7455    normal  Authority subfields are cloned in the wrong field
+       7872    normal  C4::Items should use C4::Koha methods instead of duplicating SQL queries
+       8523    normal  Authority hierarchies only support UNIMARC
+       8581    normal  Authority display doesn't like GND records
+       8653    normal  With DOM indexing turned on subject authority links are not indexed
+       8744    normal  Thesaurus in authorities should not lock fields
+       8750    normal  Chronological terms authorities not correctly indexed
+       8870    normal  UNIMARC authorities search doesn't display properly information
+       8914    normal  Blank search that returns invalid authorities fails under Plack
+       9070    normal  Searching for authority from tag editor for field 650 gives error
+
+MARC Bibliographic data support
+----------
+       8136    normal  Changes the expected lenght of 100$a in rebuild_zebra.pl
+
+MARC Bibliographic record staging/import
+----------
+       8350    normal  Searching for a 10 or 13 digit string (with a number in it) that does not exist in one's catalog will fail to affect SQL statement correctly in C4::Breeding
+
+Notices
+----------
+       3383    normal  Item due reminder digests - cannot display title information
+       8606    normal  Talking Tech broken by user-configurable slips feature
+       6090    minor   Empty mails in message_queue are sent
+       8378    minor   <fine> syntax not working on overdues anymore
+       5490    trivial Is smsoverdues.pl an orphan
+
+OPAC
+----------
+       3280    normal  Opac/opac-sendbasket.pl security leaky
+       4064    normal  Uninitialized variable errors in opac-search.pl
+       4173    normal  Statuses not appearing in the OPAC
+       5409    normal  Call number is not show on Opac search result page.
+       7586    normal  Search: Language restriction does  NOT show expected results (no items shown)
+       7932    normal  Twitter share doesn't work with socialnetworks
+       8108    normal  Remove unused images from the OPAC
+       8197    normal  Software error when you have cleaned cookies in your browser and try to past the url to opac-topissues.pl
+       8226    normal  'OpacFooter' markup/css improvements
+       8255    normal  Local cover images should be cacheable
+       8617    normal  Problem with display of comments waiting for moderation in OPAC
+       8626    normal  Encoding problem with = in cart emails
+       8708    normal  RSS feed for new comments is broken
+       8791    normal  OPAC UNIMARC XSLT details : subject with subfield 3
+       8810    normal  Opac: Cart should display branchname instead of branchcode
+       8827    normal  YUI CSS files no longer found on Yahoo servers
+       8873    normal  JavaScript error in Opac displaying tag cloud
+       8923    normal  Add ids to repeated pagination menus to allow for CSS customization
+       8941    normal  Make title display properly for NORMARC OPAC detail view
+       8947    normal  Search does not work with CCSR theme and language = nb-NO
+       8973    normal  HTML and URL escape missing in OPAC templates
+       7500    minor   Use CSS Sprites for faster page loading
+       7642    minor   The number that appears when hovering over a tag in the tag cloud isn't the number of items with that tag
+       7873    minor   Title sort in OPAC basket doesn't work
+       7877    minor   Note on expiration in the opac worded wrongish
+       7929    minor   Duplicate id "availability" on XSLT result page
+       8139    minor   Fix the CSS for the recent comments to prevent leftmenu overlapping it.
+       8232    minor   Comments in OPAC contain untranslatable javascript messages
+       8272    minor   OPAC : date expiration format
+       8314    minor   Missing MARCISBNS param in opac-detail.pl
+       8322    minor   Removing space between end of marc data and fullstops
+       8335    minor   Missing Icon PR.png or typo in MARC21slim2OPACDetail.xsl
+       8357    minor   UNIMARCslim2OPACDetail.xsl, title without class and too links to views
+       8408    minor   Odd OPAC message when OPAC Renewals are disabled and OPACFineNoRenewals is set to blank
+       8441    minor   Hide MODS export for UNIMARC
+       8476    minor   Little bug in OPAC XSLT on OPACURLOpenInNewWindow
+       8936    minor   Search RSS  feeds does not show there items when subscribing in Firefox
+       8988    minor   Item status uses authorized value description for intranet
+       7367    trivial General OPAC typo omnibus
+       8323    trivial User created lists not sorting properly
+       8544    trivial Make RSS icon styleable
+
+Packaging
+----------
+       7968    normal  Create meta-packages to simplify installation of koha
+       8020    normal  Prepare debian packages for 3.8 release
+       8235    minor   Packaging scripts get upset with non-Debian perl modules
+       8982    minor   Koha-create rejects --database option
+       8008    trivial Fix typo in man page for koha-create
+
+Patrons
+----------
+       6634    normal  Manager_id not populated when paying fines
+       7411    normal  Remove diacritics when automatically generating userid
+       7628    normal  Required format is not enforced for Patron Categories
+       7643    normal  Can't upload and import zipped file of patron images
+       8025    normal  Patron attribute not selected if value is zero
+       8391    normal  Cannot view reading record through staff client
+       8514    normal  Display of patron results changed display order
+       8739    normal  Partial Fine Payments Saving Amount Paid Incorrectly
+       7630    minor   Warning on moremember.pl about param without key
+       8014    minor   On the patron entry form hide "restricted until" field if "Restricted: No" is checked
+       8150    minor   Patron circulation history has a fossil navagation bar
+       8196    minor   Members/memberentry.pl?op=add shows all extended attribute values from database
+       8392    minor   Memberentry is not enforcing birthdate restrictions
+       8427    minor   Patron search results not consistent
+       8533    minor   Non-numeric cardnumbers screw up autoMemberNum
+       8863    minor   When clearing a patron attribute, they are all cleared
+       8869    minor   Duplicate member check doesn't disable submit button on bottom.
+       8978    minor   Patron's dateexpiry is erroneously updated if dateexpiry in UnWantedField syspref
+
+Reports
+----------
+       8588    normal  Duplicate field IDs cause problems with SQL report parameter entry
+       8594    normal  A report containing a subquery that has a 'limit' will have that limit stripped out
+       8596    normal  Reports interface date picker doesn't force ISO formatted dates
+
+Searching
+----------
+       7722    normal  Insidious problem with searching
+       7847    normal  OPAC search dies with plack
+       8209    normal  "Did you mean?" suggestions based on authorities
+       8458    normal  $stemmed_operand in C4::Search _build_stemmed_operand is not initialized.
+       8657    normal  Default sort by call number does not work
+       8954    normal  Languages list in advanced search always in english
+       8958    normal  Facets are not fully UNIMARC compliant
+       6886    minor   Single branch mode should disable showing the branch name in front of all callnumbers
+       8041    minor   In admin search, items can be lost and  for loan
+       8217    minor   Focus on search box in Detail page (staff search)
+       8916    minor   Hide Curriculum index in advanced search for unimarc marcflavor
+       8012    trivial DefaultSortOrder and OPACdefaultSortOrder are set to "ascending" on install
+
+Self checkout
+----------
+       8111    normal  Language chooser display problem in self-checkout
+       8518    minor   Self checkout does not display debt amount if syspref AllowFineOverride is set to allow
+       7953    trivial Opacuserjs to the sco template
+
+Serials
+----------
+       8176    normal  $sqlwhere is undefined in C4::Serials in GetSubscriptions
+       8716    normal  Reordering of routing list entries doesn't work
+       3456    minor   Serials receipt note
+       8227    minor   Remove compile time warning from C4::Serials
+       6655    trivial Sorting order of serial issues in OPAC
+
+SIP2
+----------
+       3638    normal  Status of hold not changed when item checked in via SIP2 Interface
+       6335    normal  Branch not set consistently in all SIP transactions
+       7787    normal  SIP server closes the TCP connection when it receives an invalid message
+
+Staff Client
+----------
+       7599    normal  Cart JavaScript contains untranslatable English strings
+       8481    normal  Items table is showing in opac-MARCdetail.pl but not in MARCdetail.pl
+       8812    normal  Staff Client: Patron search should display branch name instead of branch code in results table
+       8949    normal  Trying to view help on a page without any help results in a Perl error
+       8996    normal  In result page items with negative notforloan are available
+       9017    normal  Quote of the day: Table footer not translated
+       5312    minor   XHTML correction in authority summary
+       8009    minor   Item descriptive data not populated on pay.pl
+       8593    minor   Add unique IDs to pending approval markup on staff client home page
+       8646    minor   Certain search terms cause browser "script taking too long" error
+       8793    minor   Fix materialTypeCode/typeOf008 icons for NORMARC XSLT
+       8895    minor   Warning in systempreferences.pl: Use of uninitialized value in length...
+       7368    trivial General staff client typo omnibus
+
+System Administration
+----------
+       4177    normal  Opaccloud missing from the system preferences interface
+       8702    normal  System preferences search does not allow accented letters
+       9107    normal  DidYouMeanFromAuthorities syspref obsolete
+       8119    minor   Show hint when disabling active currency checkbox
+       8122    minor   Add a link to new library group creation from empty groups message
+       8261    minor   Cannot search system preferences from Local Use tab
+       8907    minor   Last updated date does not appear on currency edit form
+       8713    trivial Warning message triggered by clicking keyword to marc mapping.
+       8714    trivial Poorly ordered and triggers warning in marctagstructure.pl
+       8849    trivial Error log generated when not a demo system
+
+Templates
+----------
+       6037    normal  Invalid markup, missing breadcrumbs on Keyword to MARC Mapping page
+       6617    normal  Table of contents not printing right if entered right
+       7127    normal  Templates must be valid XHTML
+       7842    normal  Inconsistencies in Notices interface
+       7982    normal  Typo in moremember-receipt.tt
+       8124    normal  Hide option to download results of items with no checkouts report
+       8160    normal  Link to cataloging appears for users without cataloging permission
+       8241    normal  Remove stray references to YUI autocomplete
+       8281    normal  Remove unused YUI files
+       8385    normal  Searchengine/solr/indexes.tt fails 'prove ./xt/tt_valid.t' test
+       8398    normal  Missing image file in staff global css
+       8522    normal  Markup errors cause problems with customized CSS
+       8549    normal  DataTables upgrade broke display of next/previous buttons in table controls
+       8573    normal  Translation difficult in picture-upload.tt due to nested sentence in if/foreach/if/elsif - construction
+       8598    normal  No patron image or home library on Files & Statistics tabs
+       8621    normal  Template for sending out carts not formatting correctly
+       8623    normal  Javascript libraries should be outside theme directories
+       8931    normal  Submit buttons have blue background
+       8934    normal  Fix typo and language on transport cost matrix
+       8975    normal  Search results should say on order in staff client
+       6855    minor   Bullet point showing in wrong place on error message
+       7483    minor   A more detailed breadcrumb for authority management
+       7690    minor   Hidelostitems not working in Normal Display
+       7889    minor   Use standard style for errors and messages
+       7987    minor   Typo causing invalid markup in circulation.tt
+       8048    minor   Better spacing on categories for attributes
+       8187    minor   Batch patron modification missing from tools sidebar menu
+       8194    minor   Layout problem on subscription add when showing manual history
+       8195    minor   The selected link in include menus must be bold
+       8288    minor   Showmarc.tt should not include full doc-head-close.inc
+       8318    minor   Update StatisticsFields description
+       8321    minor   Fix OPACShowBarcode description
+       8339    minor   Div id="login" should be id="login_controls" in header.inc
+       8351    minor   Fix wording when undoing an import
+       8556    minor   "Mark seen and continue" not translatable in inventory.tt
+       8624    minor   Famfamfam should be outside theme directory
+       8677    minor   Table overlapping to the right on holds waiting
+       8696    minor   Tools menu says export bibs still
+       8711    minor   Alternating colors messed up on reports
+       8717    minor   Wrong subscription notes are showing in catalogue detail view of serials in staff client
+       8721    minor   Typo in  AllowItemsOnHoldCheckout
+       8730    minor   Browse overlaying powered by
+       8737    minor   Incorrect icon at login in staff client
+       8765    minor   Add series title to intranet search results
+       8766    minor   OPACBaseURL still called as OPACBaseurl in many files
+       8851    minor   Strange blue bar above serials results
+       8898    minor   Remove unused mainmenu include and related styles in the staff client
+       8912    minor   Remove unused hold-menu.inc
+       8933    minor   Transport cost matrix capitalization wrong
+       8935    minor   Transport cost matrix could be prettier
+       3521    trivial Items table in catalogue/detail.pl and cataloguing/additem.pl is sorted nonsensically
+       8764    trivial Template change "Authors" to "Additional authors" in OPAC
+
+Test Suite
+----------
+       8022    normal  Permissions test doesn't check all languages
+       8383    normal  Need test to check that Perl files will compile
+       8413    normal  Space in barcode breaks GET request in benchmark_staff.pl
+       8470    minor   Remove  depreciated  H:T:P test file
+       7994    trivial Syntax error in yaml (syspref) files
+
+Tools
+----------
+       8843    normal  Cannot export bibliographic records by call number
+       6372    minor   Batch progress bar does not check for 0 size jobs; should be in separate js too
+       8861    minor   Undefined variables in batchMod.pl trigger error logs
+       8453    trivial Need spaces after radio buttons on inventory
+
+Transaction logs
+----------
+       7241    normal  Circulation action logs record biblionumber instead of item number
+
+translate.koha-community.org
+----------
+       8968    normal  JavaScript String not translatable
+
+Z39.50 / SRU / OpenSearch Servers
+----------
+       3782    normal  Delivered z39.50 targets wrong for NY Public Library and NY University Library
+       8171    normal  Improper escaping of quotes during z39.50 queries leads to broken html
+       8704    normal  Typo in etc/koha-conf.xml
+
+
+New sysprefs in 3.10.0
+======================
+
+  * autoBarcode
+  * BorrowerMandatoryField
+  * MaxFine
+  * OpacNavRight
+  * QuoteOfTheDay
+  * NoZebra
+  * defaultSortField
+  * defaultSortOrder
+  * OPACdefaultSortField
+  * OPACdefaultSortOrder
+  * itemBarcodeInputFilter
+  * OPACItemsResultsDisplay
+  * AllowReturnToBranch
+  * OPACShowHoldQueueDetails
+  * OPACSearchForTitleIn
+  * OPACMySummaryHTML
+  * UseTransportCostMatrix
+  * SvcMaxReportRows
+  * decreaseLoanHighHolds
+  * decreaseLoanHighHoldsValue
+  * decreaseLoanHighHoldsDuration
+  * ReservesControlBranch
+  * IssueLostItem
+  * SuspendHoldsIntranet
+  * SuspendHoldsOpac
+  * DefaultLanguageField008
+  * OPACShowBarcode
+  * OPACShowUnusedAuthorities
+  * EnableBorrowerFiles
+  * UpdateTotalIssuesOnCirc
+  * IntranetSlipPrinterJS
+  * OpacSuppressionByIPRange
+  * PrefillItem
+  * SubfieldsToUseWhenPrefill
+  * AgeRestrictionMarker
+  * AgeRestrictionOverride
+  * IncludeSeeFromInSearches
+  * OPACMobileUserCSS
+  * OpacMainUserBlockMobile
+  * OpacShowLibrariesPulldownMobile
+  * OpacShowFiltersPulldownMobile
+  * AuthDisplayHierarchy
+  * OPACdidyoumean
+  * INTRAdidyoumean
+  * BlockReturnOfWithdrawnItems
+  * HoldsToPullStartDate
+
+
+System requirements
+======================
+
+    Important notes:
+    
+    * Perl 5.10 is required
+    * Zebra is required
+
+
+Documentation
+======================
+
+The Koha manual is maintained in DocBook.The home page for Koha 
+documentation is 
+
+    http://koha-community.org/documentation/
+
+As of the date of these release notes, only the English version of the
+Koha manual is available:
+
+    http://manual.koha-community.org/3.10.0/en/
+
+The Git repository for the Koha manual can be found at
+
+    http://git.koha-community.org/gitweb/?p=kohadocs.git;a=summary
+
+
+Translations
+======================
+
+Complete or near-complete translations of the OPAC and staff
+interface are available in this release for the following languages:
+
+
+  * English (USA)
+  * Arabic (90%)
+  * Armenian (90%)
+  * Chinese (Taiwan) (69%)
+  * Danish (70%)
+  * English (New Zealand) (91%)
+  * French (100%)
+  * French (Canada) (69%)
+  * German (100%)
+  * German (Switzerland) (100%)
+  * Italian (100%)
+  * Norwegian Bokmål (66%)
+  * Portuguese (Brazil) (100%)
+  * Slovak (100%)
+  * Spanish (93%)
+
+
+Partial translations are available for various other languages.
+
+The Koha team welcomes additional translations; please see
+
+    http://wiki.koha-community.org/wiki/Translating_Koha
+
+for information about translating Koha, and join the koha-translate 
+list to volunteer:
+
+    http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-translate
+
+The most up-to-date translations can be found at:
+
+    http://translate.koha-community.org/
+
+
+Release Team
+======================
+
+The release team for Koha 3.10.0 is
+
+  Release Manager:       Paul Poulain <paul.poulain@biblibre.com>
+  Documentation Manager: Nicole C Engard <nengard@gmail.com>
+  Translation Manager:   Frédéric Demians <frederic@tamil.fr>
+  Translation Team:      Katrin Fischer <Katrin.Fischer@bsz-bw.de>,
+                         Marijana Glavica <mglavica@ffzg.hr>
+  QA Manager:            Ian Walls <koha.sekjal@gmail.com>
+  QA Team:               Marcel de Rooy <M.de.Rooy@rijksmuseum.nl>,
+                         Jonathan Druart <jonathan.druart@biblibre.com>,
+                         Mason James <mtj@kohaaloha.com>
+  Bug Wranglers:         Magnus Enger <magnus@enger.priv.no>,
+                         Katrin Fischer <Katrin.Fischer@bsz-bw.de>,
+                         Dobrica Pavlinušić <dpavlin@rot13.org>
+  Packaging Manager:     Robin Sheat <robin@catalyst.net.nz>
+  Packaging Assistant:   Mason James <mtj@kohaaloha.com>
+
+  Release Maintainer (3.4.x): Chris Nighswonger <cnighswonger@foundations.edu>
+  Release Maintainer (3.6.x): Jared Camins-Esakov <jcamins@cpbibliography.com>
+  Release Maintainer (3.8.x): Chris Cormack <chrisc@catalyst.net.nz>
+
+
+Credits
+======================
+
+We thank the following libraries who are known to have sponsored
+new features in Koha 3.10.0:
+  * BdP de la Meuse
+  * Brooklyn Law School Library
+  * Central Kansas Library System (CKLS), Plum Creek Library System and Washoe County Library System
+  * Centre collégial des services regroupés (CCSR)
+  * Corpus Christi Public Libraries
+  * Los Gatos Public Library and Harrison Carmel Public Library
+  * North Central Regional Library (NCRL)
+  * Northeast Kansas Library System (NEKLS)
+  * Talking Tech
+  * Universidad Nacional de Córdoba
+  * Université d'Aix-Marseille
+  * Université de Lyon 3
+  * Université de Rennes 2
+  * Université de St Etienne
+  * VOKAL
+  * Washoe County Library System
+
+We thank the following individuals who contributed patches to Koha 3.10.0.
+  *      1     Joseph Alway
+  *      2     Nuño López Ansótegui
+  *     13     Tomas Cohen Arazi
+  *      4     Alex Arnaud
+  *      1     Marc Balmer
+  *      5     D Ruth Bavousett
+  *      2     Gaetan Boisson
+  *      1     Ivan Brown
+  *    162     Jared Camins-Esakov
+  *     31     Colin Campbell
+  *      7     Frédérick Capovilla
+  *     14     Galen Charlton
+  *     14     David Cook
+  *     32     Chris Cormack
+  *      3     Christophe Croullebois
+  *      2     Elliott Davis
+  *      5     Stéphane Delaune
+  *     14     Frédéric Demians
+  *     77     Jonathan Druart
+  *     70     Nicole Engard
+  *     11     Magnus Enger
+  *     26     Katrin Fischer
+  *      6     Amit Gupta
+  *      5     Chris Hall
+  *     72     Kyle M Hall
+  *      2     Claire Hernandez
+  *     40     Mason James
+  *      9     Srdjan Jankovic
+  *      7     Bart Jorgensen
+  *      1     Jorgia Kelsey
+  *      1     Piotr Kowalski
+  *      1     Henri-Damien Laurent
+  *    102     Owen Leonard
+  *      1     Frère Sébastien Marie
+  *     29     Julian Maurice
+  *      1     Melia Meggs
+  *      6     Matthias Meusburger
+  *      4     Sophie Meynieux
+  *      1     Christopher Nighswonger
+  *     21     Chris Nighswonger
+  *     23     Dobrica Pavlinusic
+  *      3     Maxime Pelletier
+  *      3     Shari Perkins
+  *    306     Paul Poulain
+  *      6     Meenakshi R
+  *      5     MJ Ray
+  *      4     Liz Rea
+  *     26     Marcel de Rooy
+  *     34     Fridolyn SOMERS
+  *      3     Mathieu Saby
+  *     14     Adrien Saurat
+  *     19     Robin Sheat
+  *      1     Simon Story
+  *      1     Zeno Tajoli
+  *      8     Lyon3 Team
+  *      6     Mirko Tietgen
+  *     25     Mark Tompsett
+  *      2     Duncan Tyler
+  *      1     Kathryn Tyree
+  *     22     Marc Veron
+  *      1     Aleksa Vujicic
+  *      1     Stacey Walker
+  *      5     Ian Walls
+  *      1     Robert Williams
+  *      4     christophe croullebois
+  *      1     root
+  *      1     Savitra sirohi
+  *      1     Koha user
+  *      3     wajasu
+  *      1     Serhij Dubyk {Сергій Дубик}
+
+We thank the following companies who contributed patches to Koha 3.10.0
+  *     102 ACPL                                                                                          
+  *       1 Abbaye de La Trappe
+  *       1 Amigos Library Services
+  *      26 BSZ BW                                                                                         
+  *     491 BibLibre                                                                                    
+  *      10 BigBallOfWax                                                                          
+  *     151 ByWater-Solutions                                                                   
+  *     162 C & P Bibliography                                                                    
+  *      61 Catalyst                                                                                 
+  *       1 Cilea                                                                                           
+  *      14 Equinox                                                                                   
+  *      21 Foundations                                                                              
+  *      40 KohaAloha                                                                                  
+  *      10 Libeo                                                                                          
+  *      11 Libriotech                                                                                 
+  *       2 MASmedios                                                                                  
+  *      13 Nucsoft OSS Labs
+  *      31 PTFS-Europe                                                                              
+  *       1 Progilone
+  *      14 Prosentient Systems
+  *      26 Rijksmuseum                                                                               
+  *       5 Software.coop                                                                             
+  *      14 Tamil                                                                                           
+  *       7 Université Jean Moulin Lyon 3
+  *       3 Université Rennes 2
+  *       3 abunchofthings.net
+  *       3 gmx.de
+  *       1 littleover.derby.sch.uk
+  *       1 msys.ch
+  *       3 mypacks.net
+  *      23 rot13.org                                                                                      
+  *       1 ubuntu
+  *      62 unidentified
+  *      22 veron.ch
+
+We also especially thank the following individuals who tested patches
+for Koha 3.10.0.
+  *       1 Koha Team Lyon 3
+  *       1 Joseph Alway
+  *       1 Pierre Angot
+  *       9 Tomas Cohen Arazi
+  *       2 Alex Arnaud
+  *       1 Larry Baerveldt
+  *       1 Marc Balmer
+  *       5 Gaetan Boisson
+  *     256 Jared Camins-Esakov
+  *       1 Colin Campbell
+  *       1 François Charbonnier
+  *      16 Galen Charlton
+  *       2 David Cook
+  *     162 Chris Cormack
+  *       7 Elliott Davis
+  *       5 Michael Davis
+  *       1 Stéphane Delaune
+  *       2 Stephane Delaye
+  *       1 Stéphane Delaye
+  *      13 Frédéric Demians
+  *      87 Jonathan Druart
+  *      47 Nicole C. Engard
+  *       9 Magnus Enger
+  *      81 Katrin Fischer
+  *       2 Mathilde Formery
+  *       3 Marijana Glavica
+  *       1 Corinne HAYET
+  *     107 Kyle M Hall
+  *      27 Mason James
+  *      60 Owen Leonard
+  *       1 MathildeF
+  *      25 Julian Maurice
+  *      11 Melia Meggs
+  *       3 Matthias Meusburger
+  *       1 Sophie Meynieux
+  *       5 Joy Nelson
+  *       2 Chris Nighswonger
+  *      10 Dobrica Pavlinusic
+  *       6 Shari Perkins
+  *     687 Paul Poulain
+  *       2 MJ Ray
+  *      14 Liz Rea
+  *       9 Martin Renvoize
+  *      22 Marcel de Rooy
+  *       1 Fridolyn SOMERS
+  *       1 Adrien Saurat
+  *       7 Robin Sheat
+  *       6 Delaye Stephane
+  *       1 Zeno Tajoli
+  *      17 Mirko Tietgen
+  *      43 Marc Veron
+  *       2 Stacey Walker
+  *       9 Ian Walls
+  *       1 jmbroust
+  *       1 jorgia
+  *       3 mveron
+  *      20 wajasu
+
+We regret any omissions.  If a contributor has been inadvertently missed,
+please send a patch against these release notes to 
+koha-patches@lists.koha-community.org.
+
+
+Revision control notes
+======================
+
+The Koha project uses Git for version control.  The current development 
+version of Koha can be retrieved by checking out the master branch of 
+
+    git://git.koha-community.org/koha.git
+
+The branch for this version of Koha and future bugfixes in this release line is 3.10.x.
+
+
+Bugs and feature requests
+======================
+
+Bug reports and feature requests can be filed at the Koha bug
+tracker at
+
+    http://bugs.koha-community.org/
+
+
+He rau ringa e oti ai.
+(Many hands finish the work)
+
+##### Autogenerated release notes updated last on 23 nov. 2012 15:25:13 Z #####
index 89c993f..cd46997 100755 (executable)
@@ -59,7 +59,7 @@ sub text_replace_tag ($$) {
     # value [tag=input], meta
     my $tag = lc($1) if $t =~ /^<(\S+)/s;
     my $translated_p = 0;
-    for my $a ('alt', 'content', 'title', 'value','label') {
+    for my $a ('alt', 'content', 'title', 'value', 'label', 'placeholder') {
     if ($attr->{$a}) {
         next if $a eq 'label' && $tag ne 'optgroup';
         next if $a eq 'content' && $tag ne 'meta';
index 99a75bf..032117d 100755 (executable)
@@ -102,7 +102,7 @@ sub text_extract (*) {
         } elsif ($kind eq C4::TmplTokenType::TAG && %$attr) {
             # value [tag=input], meta
             my $tag = lc($1) if $t =~ /^<(\S+)/s;
-            for my $a ('alt', 'content', 'title', 'value','label') {
+            for my $a ('alt', 'content', 'title', 'value', 'label', 'placeholder') {
                 if ($attr->{$a}) {
                     next if $a eq 'label' && $tag ne 'optgroup';
                     next if $a eq 'content' && $tag ne 'meta';
index 5656228..115012e 100755 (executable)
@@ -90,7 +90,13 @@ if ( $op eq "do_search" ) {
         $displaynext = 1;
     }
 
-    my @field_data = ( { term => "marclist" , val => $query->param("marclist") || ''} );
+    my @field_data = (
+        { term => "marclist",  val => $marclist[0] },
+        { term => "and_or",    val => $and_or[0] },
+        { term => "excluding", val => $excluding[0] },
+        { term => "operator",  val => $operator[0] },
+        { term => "value",     val => $value[0] },
+    );
 
     my @numbers = ();
 
index 195e244..3e17cf1 100755 (executable)
@@ -122,7 +122,7 @@ if ($show_marc) {
         my @subfields_data;
 
 # skip UNIMARC fields <200, they are useless for a patron
-        next if C4::Context->preference('MarcFlavour') eq 'UNIMARC' && $field->tag() <200;
+        next if C4::Context->preference('marcflavour') eq 'UNIMARC' && $field->tag() <200;
 
 # if tag <10, there's no subfield, use the "@" trick
         if ( $field->tag() < 10 ) {
@@ -134,6 +134,9 @@ if ($show_marc) {
             $subfield_data{marc_tag}      = $field->tag();
             push( @subfields_data, \%subfield_data );
         }
+        elsif ( C4::Context->preference('marcflavour') eq 'MARC21' && $field->tag() eq 667 ) {
+            # tagfield 667 is a nonpublic general note in MARC21, which shouldn't be shown in the OPAC
+        }
         else {
             my @subf = $field->subfields;
 
index d9ecdfa..22c922b 100755 (executable)
@@ -49,6 +49,7 @@ use MARC::Field;
 use List::MoreUtils qw/any none/;
 use C4::Images;
 use Koha::DateUtils;
+use C4::HTML5Media;
 
 BEGIN {
        if (C4::Context->preference('BakerTaylorEnabled')) {
@@ -471,6 +472,8 @@ foreach my $subscription (@subscriptions) {
     $cell{branchcode}        = $subscription->{branchcode};
     $cell{branchname}        = GetBranchName($subscription->{branchcode});
     $cell{hasalert}          = $subscription->{hasalert};
+    $cell{callnumber}        = $subscription->{callnumber};
+    $cell{closed}            = $subscription->{closed};
     #get the three latest serials.
     $serials_to_display = $subscription->{opacdisplaycount};
     $serials_to_display = C4::Context->preference('OPACSerialIssueDisplayCount') unless $serials_to_display;
@@ -482,13 +485,6 @@ foreach my $subscription (@subscriptions) {
 
 $dat->{'count'} = scalar(@items);
 
-# If there is a lot of items, and the user has not decided
-# to view them all yet, we first warn him
-# TODO: The limit of 50 could be a syspref
-my $viewallitems = $query->param('viewallitems');
-if ($dat->{'count'} >= 50 && !$viewallitems) {
-    $template->param('lotsofitems' => 1);
-}
 
 my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber, $record ) );
 
@@ -517,6 +513,12 @@ $template->param( show_priority => $has_hold ) ;
 my $norequests = 1;
 my $branches = GetBranches();
 my %itemfields;
+my (@itemloop, @otheritemloop);
+my $currentbranch = C4::Context->userenv ? C4::Context->userenv->{branch} : undef;
+if ($currentbranch and C4::Context->preference('OpacSeparateHoldings')) {
+    $template->param(SeparateHoldings => 1);
+}
+my $separatebranch = C4::Context->preference('OpacSeparateHoldingsBranch');
 for my $itm (@items) {
     $itm->{holds_count} = $item_reserves{ $itm->{itemnumber} };
     $itm->{priority} = $priority{ $itm->{itemnumber} };
@@ -567,6 +569,24 @@ for my $itm (@items) {
         $itm->{transfertfrom} = $branches->{$transfertfrom}{branchname};
         $itm->{transfertto}   = $branches->{$transfertto}{branchname};
      }
+    my $itembranch = $itm->{$separatebranch};
+    if ($currentbranch and C4::Context->preference('OpacSeparateHoldings')) {
+        if ($itembranch and $itembranch eq $currentbranch) {
+            push @itemloop, $itm;
+        } else {
+            push @otheritemloop, $itm;
+        }
+    } else {
+        push @itemloop, $itm;
+    }
+}
+
+# If there is a lot of items, and the user has not decided
+# to view them all yet, we first warn him
+# TODO: The limit of 50 could be a syspref
+my $viewallitems = $query->param('viewallitems');
+if (scalar(@itemloop) >= 50 && !$viewallitems) {
+    $template->param('lotsofitems' => 1);
 }
 
 ## get notes and subjects from MARC record
@@ -695,7 +715,8 @@ if(C4::Context->preference("ISBD")) {
 }
 
 $template->param(
-    ITEM_RESULTS        => \@items,
+    itemloop            => \@itemloop,
+    otheritemloop       => \@otheritemloop,
     subscriptionsnumber => $subscriptionsnumber,
     biblionumber        => $biblionumber,
     subscriptions       => \@subs,
@@ -756,6 +777,11 @@ if (C4::Context->preference("OPACLocalCoverImages")){
                $template->param(OPACLocalCoverImages => 1);
 }
 
+# HTML5 Media
+if ( (C4::Context->preference("HTML5MediaEnabled") eq 'both') or (C4::Context->preference("HTML5MediaEnabled") eq 'opac') ) {
+    $template->param( C4::HTML5Media->gethtml5media($record));
+}
+
 my $syndetics_elements;
 
 if ( C4::Context->preference("SyndeticsEnabled") ) {
@@ -855,8 +881,7 @@ if ( C4::Context->preference( "SocialNetworks" ) ) {
 
 # Shelf Browser Stuff
 if (C4::Context->preference("OPACShelfBrowser")) {
-    # pick the first itemnumber unless one was selected by the user
-    my $starting_itemnumber = $query->param('shelfbrowse_itemnumber'); # || $items[0]->{itemnumber};
+    my $starting_itemnumber = $query->param('shelfbrowse_itemnumber');
     if (defined($starting_itemnumber)) {
         $template->param( OpenOPACShelfBrowser => 1) if $starting_itemnumber;
         my $nearby = GetNearbyItems($starting_itemnumber,3);
@@ -873,6 +898,13 @@ if (C4::Context->preference("OPACShelfBrowser")) {
             PREVIOUS_SHELF_BROWSE => $nearby->{prev},
             NEXT_SHELF_BROWSE => $nearby->{next},
         );
+
+        # in which tab shelf browser should open ?
+        if (grep { $starting_itemnumber == $_->{itemnumber} } @itemloop) {
+            $template->param(shelfbrowser_tab => 'holdings');
+        } else {
+            $template->param(shelfbrowser_tab => 'otherholdings');
+        }
     }
 }
 
@@ -958,7 +990,7 @@ my $defaulttab =
         ? 'subscriptions' :
     $opac_serial_default eq 'serialcollection' && @serialcollections > 0
         ? 'serialcollection' :
-    $opac_serial_default eq 'holdings' && $dat->{'count'} > 0
+    $opac_serial_default eq 'holdings' && scalar (@itemloop) > 0
         ? 'holdings' :
     $subscriptionsnumber
         ? 'subscriptions' :
diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl
new file mode 100755 (executable)
index 0000000..7f8230d
--- /dev/null
@@ -0,0 +1,306 @@
+#!/usr/bin/perl
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use Modern::Perl;
+
+use CGI;
+use Digest::MD5 qw( md5_base64 md5_hex );
+use String::Random qw( random_string );
+
+use C4::Auth;
+use C4::Output;
+use C4::Members;
+use Koha::Borrower::Modifications;
+use C4::Branch qw(GetBranchesLoop);
+
+my $cgi = new CGI;
+my $dbh = C4::Context->dbh;
+
+my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+    {
+        template_name   => "opac-memberentry.tmpl",
+        type            => "opac",
+        query           => $cgi,
+        authnotrequired => 1,
+    }
+);
+
+unless ( C4::Context->preference('PatronSelfRegistration') || $borrowernumber )
+{
+    print $cgi->redirect("/cgi-bin/koha/opac-main.pl");
+    exit;
+}
+
+my $action = $cgi->param('action') || q{};
+if ( $action eq q{} ) {
+    if ($borrowernumber) {
+        $action = 'edit';
+    }
+    else {
+        $action = 'new';
+    }
+}
+
+$template->param(
+    action            => $action,
+    hidden            => GetHiddenFields(),
+    mandatory         => GetMandatoryFields($action),
+    member_titles     => GetTitles(),
+    branches          => GetBranchesLoop(),
+    OPACPatronDetails => C4::Context->preference('OPACPatronDetails'),
+);
+
+if ( $action eq 'create' ) {
+
+    my %borrower = ParseCgiForBorrower($cgi);
+
+    %borrower = DelEmptyFields(%borrower);
+
+    my @empty_mandatory_fields = CheckMandatoryFields( \%borrower, $action );
+
+    if (@empty_mandatory_fields) {
+        $template->param(
+            empty_mandatory_fields => \@empty_mandatory_fields,
+            borrower               => \%borrower
+        );
+    }
+    elsif (
+        md5_base64( $cgi->param('captcha') ) ne $cgi->param('captcha_digest') )
+    {
+        $template->param(
+            failed_captcha => 1,
+            borrower       => \%borrower
+        );
+    }
+    else {
+        if (
+            C4::Context->boolean_preference(
+                'PatronSelfRegistrationVerifyByEmail')
+          )
+        {
+            ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+                {
+                    template_name   => "opac-registration-email-sent.tmpl",
+                    type            => "opac",
+                    query           => $cgi,
+                    authnotrequired => 1,
+                }
+            );
+            $template->param( 'email' => $borrower{'email'} );
+
+            my $verification_token = md5_hex( \%borrower );
+            $borrower{'password'} = random_string("..........");
+
+            Koha::Borrower::Modifications->new(
+                verification_token => $verification_token )
+              ->AddModifications(\%borrower);
+
+            #Send verification email
+            my $letter = C4::Letters::GetPreparedLetter(
+                module      => 'members',
+                letter_code => 'OPAC_REG_VERIFY',
+                tables      => {
+                    borrower_modifications =>
+                      [ $verification_token, $verification_token ],
+                },
+            );
+
+            C4::Letters::EnqueueLetter(
+                {
+                    letter                 => $letter,
+                    message_transport_type => 'email',
+                    to_address             => $borrower{'email'},
+                    from_address =>
+                      C4::Context->preference('KohaAdminEmailAddress'),
+                }
+            );
+        }
+        else {
+            ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+                {
+                    template_name   => "opac-registration-confirmation.tmpl",
+                    type            => "opac",
+                    query           => $cgi,
+                    authnotrequired => 1,
+                }
+            );
+
+            $template->param( OpacPasswordChange =>
+                  C4::Context->preference('OpacPasswordChange') );
+
+            my ( $borrowernumber, $password ) = AddMember_Opac(%borrower);
+
+            $template->param( password_cleartext => $password );
+            $template->param(
+                borrower => GetMember( borrowernumber => $borrowernumber ) );
+            $template->param(
+                PatronSelfRegistrationAdditionalInstructions =>
+                  C4::Context->preference(
+                    'PatronSelfRegistrationAdditionalInstructions')
+            );
+        }
+    }
+}
+elsif ( $action eq 'update' ) {
+
+    my %borrower = ParseCgiForBorrower($cgi);
+
+    my %borrower_changes = DelEmptyFields(%borrower);
+    my @empty_mandatory_fields =
+      CheckMandatoryFields( \%borrower_changes, $action );
+
+    if (@empty_mandatory_fields) {
+        $template->param(
+            empty_mandatory_fields => \@empty_mandatory_fields,
+            borrower               => \%borrower
+        );
+
+        $template->param( action => 'edit' );
+    }
+    else {
+        ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+            {
+                template_name   => "opac-memberentry-update-submitted.tmpl",
+                type            => "opac",
+                query           => $cgi,
+                authnotrequired => 1,
+            }
+        );
+
+        my %borrower_changes = DelUnchangedFields( $borrowernumber, %borrower );
+
+        my $m =
+          Koha::Borrower::Modifications->new(
+            borrowernumber => $borrowernumber );
+
+        $m->DelModifications;
+        $m->AddModifications(\%borrower_changes);
+        $template->param(
+            borrower => GetMember( borrowernumber => $borrowernumber ),
+        );
+    }
+}
+elsif ( $action eq 'edit' ) {    #Display logged in borrower's data
+    $template->param(
+        borrower => GetMember( borrowernumber => $borrowernumber ), );
+}
+
+my $captcha = random_string("CCCCC");
+
+$template->param(
+    captcha        => $captcha,
+    captcha_digest => md5_base64($captcha)
+);
+
+output_html_with_http_headers $cgi, $cookie, $template->output;
+
+sub GetHiddenFields {
+    my %hidden_fields;
+
+    my $BorrowerUnwantedField =
+      C4::Context->preference("PatronSelfRegistrationBorrowerUnwantedField");
+
+    my @fields = split( /\|/, $BorrowerUnwantedField );
+    foreach (@fields) {
+        next unless m/\w/o;
+        $hidden_fields{$_} = 1;
+    }
+
+    return \%hidden_fields;
+}
+
+sub GetMandatoryFields {
+    my ($action) = @_;
+
+    my %mandatory_fields;
+
+    my $BorrowerMandatoryField =
+      C4::Context->preference("PatronSelfRegistrationBorrowerMandatoryField");
+
+    my @fields = split( /\|/, $BorrowerMandatoryField );
+
+    foreach (@fields) {
+        $mandatory_fields{$_} = 1;
+    }
+
+    if ( $action eq 'create' || $action eq 'new' ) {
+        $mandatory_fields{'email'} = 1
+          if C4::Context->boolean_preference(
+            'PatronSelfRegistrationVerifyByEmail');
+    }
+
+    return \%mandatory_fields;
+}
+
+sub CheckMandatoryFields {
+    my ( $borrower, $action ) = @_;
+
+    my @empty_mandatory_fields;
+
+    my $mandatory_fields = GetMandatoryFields($action);
+    delete $mandatory_fields->{'cardnumber'};
+
+    foreach my $key ( keys %$mandatory_fields ) {
+        push( @empty_mandatory_fields, $key )
+          unless ( defined( $borrower->{$key} ) && $borrower->{$key} );
+    }
+
+    return @empty_mandatory_fields;
+}
+
+sub ParseCgiForBorrower {
+    my ($cgi) = @_;
+
+    my %borrower;
+
+    foreach ( $cgi->param ) {
+        if ( $_ =~ '^borrower_' ) {
+            my ($key) = substr( $_, 9 );
+            $borrower{$key} = $cgi->param($_);
+        }
+    }
+
+    $borrower{'dateofbirth'} =
+      C4::Dates->new( $borrower{'dateofbirth'} )->output("iso")
+      if ( defined( $borrower{'dateofbirth'} ) );
+
+    return %borrower;
+}
+
+sub DelUnchangedFields {
+    my ( $borrowernumber, %new_data ) = @_;
+
+    my $current_data = GetMember( borrowernumber => $borrowernumber );
+
+    foreach my $key ( keys %new_data ) {
+        if ( $current_data->{$key} eq $new_data{$key} ) {
+            delete $new_data{$key};
+        }
+    }
+
+    return %new_data;
+}
+
+sub DelEmptyFields {
+    my (%borrower) = @_;
+
+    foreach my $key ( keys %borrower ) {
+        delete $borrower{$key} unless $borrower{$key};
+    }
+
+    return %borrower;
+}
index a52d40a..19425f7 100755 (executable)
@@ -46,57 +46,58 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
 
 # get borrower information ....
 my ( $borr ) = GetMemberDetails( $borrowernumber );
-my $sth =  $dbh->prepare("UPDATE borrowers SET password = ? WHERE borrowernumber=?");
 my $minpasslen = C4::Context->preference("minPasswordLength");
-if (   $query->param('Oldkey')
-    && $query->param('Newkey')
-    && $query->param('Confirm') )
-{
-    if ( goodkey( $dbh, $borrowernumber, $query->param('Oldkey') ) ) {
-        if ( $query->param('Newkey') eq $query->param('Confirm')
-            && length( $query->param('Confirm') ) >= $minpasslen )
-        {    # Record password
-            my $clave = md5_base64( $query->param('Newkey') );
-            $sth->execute( $clave, $borrowernumber );
-            $template->param( 'password_updated' => '1' );
-            $template->param( 'borrowernumber'   => $borrowernumber );
+if ( C4::Context->preference("OpacPasswordChange") ) {
+    my $sth =  $dbh->prepare("UPDATE borrowers SET password = ? WHERE borrowernumber=?");
+    if (   $query->param('Oldkey')
+        && $query->param('Newkey')
+        && $query->param('Confirm') )
+    {
+        if ( goodkey( $dbh, $borrowernumber, $query->param('Oldkey') ) ) {
+            if ( $query->param('Newkey') eq $query->param('Confirm')
+                && length( $query->param('Confirm') ) >= $minpasslen )
+            {    # Record password
+                my $clave = md5_base64( $query->param('Newkey') );
+                $sth->execute( $clave, $borrowernumber );
+                $template->param( 'password_updated' => '1' );
+                $template->param( 'borrowernumber'   => $borrowernumber );
+            }
+            elsif ( $query->param('Newkey') ne $query->param('Confirm') ) {
+                $template->param( 'Ask_data'       => '1' );
+                $template->param( 'Error_messages' => '1' );
+                $template->param( 'PassMismatch'   => '1' );
+            }
+            elsif ( length( $query->param('Confirm') ) < $minpasslen ) {
+                $template->param( 'Ask_data'       => '1' );
+                $template->param( 'Error_messages' => '1' );
+                $template->param( 'ShortPass'      => '1' );
+            }
+            else {
+                $template->param( 'Error_messages' => '1' );
+            }
         }
-        elsif ( $query->param('Newkey') ne $query->param('Confirm') ) {
+        else {
             $template->param( 'Ask_data'       => '1' );
             $template->param( 'Error_messages' => '1' );
-            $template->param( 'PassMismatch'   => '1' );
+            $template->param( 'WrongPass'      => '1' );
         }
-        elsif ( length( $query->param('Confirm') ) < $minpasslen ) {
-            $template->param( 'Ask_data'       => '1' );
+    }
+    else {
+
+        # Called Empty, Ask for data.
+        $template->param( 'Ask_data' => '1' );
+        if (!$query->param('Oldkey') && ($query->param('Newkey') || $query->param('Confirm'))){
+            # Old password is empty but one of the others isnt
             $template->param( 'Error_messages' => '1' );
-            $template->param( 'ShortPass'      => '1' );
+            $template->param( 'WrongPass'      => '1' );
         }
-        else {
+        elsif ($query->param('Oldkey') && (!$query->param('Newkey') || !$query->param('Confirm'))){
+            # Oldpassword is entered but one of the other fields is empty
             $template->param( 'Error_messages' => '1' );
+            $template->param( 'PassMismatch'   => '1' );
         }
     }
-    else {
-        $template->param( 'Ask_data'       => '1' );
-        $template->param( 'Error_messages' => '1' );
-        $template->param( 'WrongPass'      => '1' );
-    }
-}
-else {
-   
-    # Called Empty, Ask for data.
-    $template->param( 'Ask_data' => '1' );
-       if (!$query->param('Oldkey') && ($query->param('Newkey') || $query->param('Confirm'))){
-               # Old password is empty but one of the others isnt
-               $template->param( 'Error_messages' => '1' );
-               $template->param( 'WrongPass'      => '1' );
-       }
-       elsif ($query->param('Oldkey') && (!$query->param('Newkey') || !$query->param('Confirm'))){
-               # Oldpassword is entered but one of the other fields is empty
-               $template->param( 'Error_messages' => '1' );
-               $template->param( 'PassMismatch'   => '1' );
-       }
 }
-
 $template->param(firstname => $borr->{'firstname'},
                                                        surname => $borr->{'surname'},
                                                        minpasslen => $minpasslen,
diff --git a/opac/opac-registration-verify.pl b/opac/opac-registration-verify.pl
new file mode 100755 (executable)
index 0000000..a45b534
--- /dev/null
@@ -0,0 +1,82 @@
+#!/usr/bin/perl
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+use Modern::Perl;
+
+use CGI;
+
+use C4::Auth;
+use C4::Output;
+use C4::Members;
+use Koha::Borrower::Modifications;
+
+my $cgi = new CGI;
+my $dbh = C4::Context->dbh;
+
+unless ( C4::Context->preference('PatronSelfRegistration') ) {
+    print $cgi->redirect("/cgi-bin/koha/opac-main.pl");
+    exit;
+}
+
+my $token = $cgi->param('token');
+my $m = Koha::Borrower::Modifications->new( verification_token => $token );
+
+my ( $template, $borrowernumber, $cookie );
+if ( $m->Verify() ) {
+    ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+        {
+            template_name   => "opac-registration-confirmation.tmpl",
+            type            => "opac",
+            query           => $cgi,
+            authnotrequired => 1,
+        }
+    );
+
+    $template->param(
+        OpacPasswordChange => C4::Context->preference('OpacPasswordChange') );
+
+    my $borrower = Koha::Borrower::Modifications->GetModifications({ verification_token => $token });
+
+    my $password;
+    ( $borrowernumber, $password ) = AddMember_Opac(%$borrower);
+
+    if ($borrowernumber) {
+        Koha::Borrower::Modifications->DelModifications({ verification_token => $token });
+
+        $template->param( password_cleartext => $password );
+        $template->param(
+            borrower => GetMember( borrowernumber => $borrowernumber ) );
+        $template->param(
+            PatronSelfRegistrationAdditionalInstructions =>
+              C4::Context->preference(
+                'PatronSelfRegistrationAdditionalInstructions')
+        );
+    }
+
+}
+else {
+    ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+        {
+            template_name   => "opac-registration-invalid.tmpl",
+            type            => "opac",
+            query           => $cgi,
+            authnotrequired => 1,
+        }
+    );
+}
+
+output_html_with_http_headers $cgi, $cookie, $template->output;
index bb23752..4ff9478 100755 (executable)
@@ -490,7 +490,7 @@ foreach my $biblioNum (@biblionumbers) {
         # If there is no loan, return and transfer, we show a checkbox.
         $itemLoopIter->{notforloan} = $itemLoopIter->{notforloan} || 0;
 
-        my $branch = C4::Circulation::_GetCircControlBranch($itemLoopIter, $borr);
+        my $branch = ( C4::Context->preference('ReservesControlBranch') eq 'ItemHomeLibrary' ) ? $itemInfo->{'homebranch'} : $borr->{'branchcode'};
 
         my $branchitemrule = GetBranchItemRule( $branch, $itemInfo->{'itype'} );
         my $policy_holdallowed = 1;
@@ -537,6 +537,11 @@ foreach my $biblioNum (@biblionumbers) {
         $biblioLoopIter{holdable} = undef;
         $anyholdable = undef;
     }
+    if(not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowernumber,$biblioNum)) {
+        $biblioLoopIter{holdable} = undef;
+        $biblioLoopIter{already_patron_possession} = 1;
+        $anyholdable = undef;
+    }
 
     push @$biblioLoop, \%biblioLoopIter;
 }
index 7677d86..9708176 100755 (executable)
@@ -71,7 +71,7 @@ BEGIN {
 }
 
 my ($template,$borrowernumber,$cookie);
-
+my $lang = C4::Templates::getlanguage($cgi, 'opac');
 # decide which template to use
 my $template_name;
 my $template_type = 'basic';
@@ -178,7 +178,7 @@ $template->param(
 );
 
 # load the language limits (for search)
-my $languages_limit_loop = getAllLanguages();
+my $languages_limit_loop = getAllLanguages($lang);
 $template->param(search_languages_loop => $languages_limit_loop,);
 
 # load the Type stuff
@@ -418,7 +418,6 @@ my ($error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_
 my @results;
 
 ## I. BUILD THE QUERY
-my $lang = C4::Templates::getlanguage($cgi, 'opac');
 ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,\@limits,\@sort_by, 0, $lang);
 
 sub _input_cgi_parse {
@@ -762,6 +761,16 @@ for (my $i=0;$i<@servers;$i++) {
         }
         # no hits
         else {
+            my $nohits = C4::Context->preference('OPACNoResultsFound');
+            if ($nohits and $nohits=~/{QUERY_KW}/){
+                # extracting keywords in case of relaunching search
+                (my $query_kw=$query_desc)=~s/ and|or / /g;
+                $query_kw = Encode::decode_utf8($query_kw);
+                my @query_kw=($query_kw=~ /([-\w]+\b)(?:[^,:]|$)/g);
+                $query_kw=join('+',@query_kw);
+                $nohits=~s/{QUERY_KW}/$query_kw/g;
+                $template->param('OPACNoResultsFound' =>$nohits);
+            }
             $template->param(
                 searchdesc => 1,
                 query_desc => $query_desc,
index eee3d38..1c942d5 100755 (executable)
@@ -127,7 +127,7 @@ $bordat[0] = $borr;
 # Warningdate is the date that the warning starts appearing
 if ( $borr->{dateexpiry} && C4::Context->preference('NotifyBorrowerDeparture') &&
     Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) <
-    Date_to_Days( $today_year, $today_month, $today_day ) ) 
+    Date_to_Days( $today_year, $today_month, $today_day ) )
 {
     # borrower card soon to expire, warn the borrower
     $borr->{'warndeparture'} = $borr->{dateexpiry};
@@ -154,58 +154,58 @@ my @issuedat;
 my $itemtypes = GetItemTypes();
 my $issues = GetPendingIssues($borrowernumber);
 if ($issues){
-       foreach my $issue ( sort { $b->{date_due}->datetime() cmp $a->{date_due}->datetime() } @{$issues} ) {
-               # check for reserves
-               my ( $restype, $res, undef ) = CheckReserves( $issue->{'itemnumber'} );
-               if ( $restype ) {
-                       $issue->{'reserved'} = 1;
-               }
-               
-               my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
-               my $charges = 0;
-               foreach my $ac (@$accts) {
-                       if ( $ac->{'itemnumber'} == $issue->{'itemnumber'} ) {
-                               $charges += $ac->{'amountoutstanding'}
-                                 if $ac->{'accounttype'} eq 'F';
-                               $charges += $ac->{'amountoutstanding'}
-                                 if $ac->{'accounttype'} eq 'L';
-                       }
-               }
-               $issue->{'charges'} = $charges;
-
-               # get publictype for icon
-
-               my $publictype = $issue->{'publictype'};
-               $issue->{$publictype} = 1;
-
-               # check if item is renewable
-               my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
-               ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
+    foreach my $issue ( sort { $b->{date_due}->datetime() cmp $a->{date_due}->datetime() } @{$issues} ) {
+        # check for reserves
+        my ( $restype, $res, undef ) = CheckReserves( $issue->{'itemnumber'} );
+        if ( $restype ) {
+            $issue->{'reserved'} = 1;
+        }
+
+        my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
+        my $charges = 0;
+        foreach my $ac (@$accts) {
+            if ( $ac->{'itemnumber'} == $issue->{'itemnumber'} ) {
+                $charges += $ac->{'amountoutstanding'}
+                  if $ac->{'accounttype'} eq 'F';
+                $charges += $ac->{'amountoutstanding'}
+                  if $ac->{'accounttype'} eq 'L';
+            }
+        }
+        $issue->{'charges'} = $charges;
+
+        # get publictype for icon
+
+        my $publictype = $issue->{'publictype'};
+        $issue->{$publictype} = 1;
+
+        # check if item is renewable
+        my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
+        ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
         if($status && C4::Context->preference("OpacRenewalAllowed")){
             $issue->{'status'} = $status;
         }
-               $issue->{'too_many'} = 1 if $renewerror and $renewerror eq 'too_many';
-               $issue->{'on_reserve'} = 1 if $renewerror and $renewerror eq 'on_reserve';
-
-               if ( $issue->{'overdue'} ) {
-                       push @overdues, $issue;
-                       $overdues_count++;
-                       $issue->{'overdue'} = 1;
-               }
-               else {
-                       $issue->{'issued'} = 1;
-               }
-               # imageurl:
-               my $itemtype = $issue->{'itemtype'};
-               if ( $itemtype ) {
-                       $issue->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{$itemtype}->{'imageurl'} );
-                       $issue->{'description'} = $itemtypes->{$itemtype}->{'description'};
-               }
-               push @issuedat, $issue;
-               $count++;
-               
-               my $isbn = GetNormalizedISBN($issue->{'isbn'});
-               $issue->{normalized_isbn} = $isbn;
+        $issue->{'too_many'} = 1 if $renewerror and $renewerror eq 'too_many';
+        $issue->{'on_reserve'} = 1 if $renewerror and $renewerror eq 'on_reserve';
+
+        if ( $issue->{'overdue'} ) {
+            push @overdues, $issue;
+            $overdues_count++;
+            $issue->{'overdue'} = 1;
+        }
+        else {
+            $issue->{'issued'} = 1;
+        }
+        # imageurl:
+        my $itemtype = $issue->{'itemtype'};
+        if ( $itemtype ) {
+            $issue->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{$itemtype}->{'imageurl'} );
+            $issue->{'description'} = $itemtypes->{$itemtype}->{'description'};
+        }
+        push @issuedat, $issue;
+        $count++;
+
+        my $isbn = GetNormalizedISBN($issue->{'isbn'});
+        $issue->{normalized_isbn} = $isbn;
 
                 # My Summary HTML
                 if (my $my_summary_html = C4::Context->preference('OPACMySummaryHTML')){
@@ -217,7 +217,7 @@ if ($issues){
                     $issue->{biblionumber} ? $my_summary_html =~ s/{BIBLIONUMBER}/$issue->{biblionumber}/g : $my_summary_html =~ s/{BIBLIONUMBER}//g;
                     $issue->{MySummaryHTML} = $my_summary_html;
                 }
-       }
+    }
 }
 $template->param( ISSUES       => \@issuedat );
 $template->param( issues_count => $count );
@@ -257,7 +257,7 @@ foreach my $res (@reserves) {
     if ( $res->{'expirationdate'} eq '0000-00-00' ) {
       $res->{'expirationdate'} = '';
     }
-    
+
     my $publictype = $res->{'publictype'};
     $res->{$publictype} = 1;
     $res->{'waiting'} = 1 if $res->{'found'} eq 'W';
@@ -291,7 +291,7 @@ foreach my $res (@reserves) {
         if ( ( $res->{'found'} eq 'W' ) ) {
             my $item = $res->{'itemnumber'};
             $item = GetBiblioFromItemNumber($item,undef);
-            $res->{'wait'}= 1; 
+            $res->{'wait'}= 1;
             $res->{'holdingbranch'}=$item->{'holdingbranch'};
             $res->{'biblionumber'}=$item->{'biblionumber'};
             $res->{'barcode'} = $item->{'barcode'};
@@ -317,7 +317,7 @@ foreach my $res (@reserves) {
     # can be cancelled
     #$res->{'cancelable'} = 1 if ($res->{'wait'} && $res->{'atdestination'} && $res->{'found'} ne "1");
     $res->{'cancelable'} = 1 if    ($res->{wait} and not $res->{found}) or (not $res->{wait} and not $res->{intransit});
-    
+
 }
 
 $template->param( WAITING => \@waiting );
@@ -341,12 +341,12 @@ if (C4::Context->preference('BakerTaylorEnabled')) {
 if (C4::Context->preference("OPACAmazonCoverImages") or 
     C4::Context->preference("GoogleJackets") or
     C4::Context->preference("BakerTaylorEnabled") or
-       C4::Context->preference("SyndeticsCoverImages")) {
+    C4::Context->preference("SyndeticsCoverImages")) {
         $template->param(JacketImages=>1);
 }
 
 if ( GetMessagesCount( $borrowernumber, 'B' ) ) {
-       $template->param( bor_messages => 1 );
+    $template->param( bor_messages => 1 );
 }
 
 if ( $borr->{'opacnote'} ) {
@@ -357,7 +357,7 @@ if ( $borr->{'opacnote'} ) {
 }
 
 $template->param(
-    bor_messages_loop  => GetMessages( $borrowernumber, 'B', 'NONE' ),
+    bor_messages_loop    => GetMessages( $borrowernumber, 'B', 'NONE' ),
     waiting_count      => $wcount,
     patronupdate => $patronupdate,
     OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
@@ -368,7 +368,7 @@ $template->param(
 $template->param( DHTMLcalendar_dateformat  => C4::Dates->DHTMLcalendar() );
 $template->param(
     SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'),
-    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds') ,
+    AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;
index b3f4398..abcb396 100755 (executable)
@@ -52,5 +52,10 @@ if (C4::Context->preference('SelfCheckHelpMessage')) {
     $template->param(SelfCheckHelpMessage => C4::Context->preference('SelfCheckHelpMessage'));
 }
 
+$template->param(
+    SCOUserJS  => C4::Context->preference('SCOUserJS'),
+    SCOUserCSS => C4::Context->preference('SCOUserCSS'),
+);
+
 output_html_with_http_headers $query, $cookie, $template->output;
 
diff --git a/opac/sco/printslip.pl b/opac/sco/printslip.pl
new file mode 100755 (executable)
index 0000000..e8a5685
--- /dev/null
@@ -0,0 +1,68 @@
+#!/usr/bin/perl
+
+# Copyright 2012 ByWater Solutions
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+=head1 printslip.pl
+
+Script to allow SCO patrons to print a receipt for their checkout.
+
+It is called from sco-main.pl
+
+=cut
+
+
+use strict;
+use warnings;
+use CGI;
+use C4::Context;
+use C4::Auth qw/:DEFAULT get_session/;
+use C4::Output;
+use C4::Members;
+use C4::Koha;
+
+my $input = new CGI;
+my $sessionID = $input->cookie("CGISESSID");
+my $session = get_session($sessionID);
+
+my $print = $input->param('print');
+my $error = $input->param('error');
+
+# patrons still need to be able to print receipts
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "/sco/printslip.tmpl",
+        query           => $input,
+        type            => "opac",
+    }
+);
+
+my $borrowernumber = $input->param('borrowernumber');
+my $branch=C4::Context->userenv->{'branch'};
+my ($slip, $is_html);
+if (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, $print eq "qslip")) {
+    $slip = $letter->{content};
+    $is_html = $letter->{is_html};
+}
+
+$template->{VARS}->{slip} = $slip;
+$template->{VARS}->{plain} = !$is_html;
+$template->{VARS}->{title} = "Print Receipt for $borrowernumber";
+$template->{VARS}->{stylesheet} = C4::Context->preference("SlipCSS");
+$template->{VARS}->{error} = $error;
+
+output_html_with_http_headers $input, $cookie, $template->output;
index 26a8774..25a3594 100755 (executable)
@@ -56,16 +56,16 @@ unless (C4::Context->preference('WebBasedSelfCheck')) {
 
 if (C4::Context->preference('AutoSelfCheckAllowed')) 
 {
-       my $AutoSelfCheckID = C4::Context->preference('AutoSelfCheckID');
-       my $AutoSelfCheckPass = C4::Context->preference('AutoSelfCheckPass');
-       $query->param(-name=>'userid',-values=>[$AutoSelfCheckID]);
-       $query->param(-name=>'password',-values=>[$AutoSelfCheckPass]);
+    my $AutoSelfCheckID = C4::Context->preference('AutoSelfCheckID');
+    my $AutoSelfCheckPass = C4::Context->preference('AutoSelfCheckPass');
+    $query->param(-name=>'userid',-values=>[$AutoSelfCheckID]);
+    $query->param(-name=>'password',-values=>[$AutoSelfCheckPass]);
     $query->param(-name=>'koha_login_context',-values=>['sco']);
 }
 my ($template, $loggedinuser, $cookie) = get_template_and_user({
     template_name   => "sco/sco-main.tmpl",
     authnotrequired => 0,
-      flagsrequired => { circulate => "circulate_remaining_permissions" },
+    flagsrequired => { circulate => "circulate_remaining_permissions" },
     query => $query,
     type  => "opac",
     debug => 1,
@@ -91,14 +91,13 @@ $template->param(AllowSelfCheckReturns => $allowselfcheckreturns);
 
 
 my $issuerid = $loggedinuser;
-my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed, $timedout) = (
+my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed) = (
     $query->param("op")         || '',
     $query->param("patronid")   || '',
     $query->param("patronlogin")|| '',
     $query->param("patronpw")   || '',
     $query->param("barcode")    || '',
     $query->param("confirmed")  || '',
-    $query->param("timedout")   || '', #not actually using this...
 );
 
 my $issuenoconfirm = 1; #don't need to confirm on issue.
@@ -239,12 +238,13 @@ if ($borrower->{cardnumber}) {
         patronlogin => $patronlogin,
         patronpw => $patronpw,
         noitemlinks => 1 ,
+        borrowernumber => $borrower->{'borrowernumber'},
     );
     my $inputfocus = ($return_only      == 1) ? 'returnbook' :
                      ($confirm_required == 1) ? 'confirm'    : 'barcode' ;
     $template->param(
         inputfocus => $inputfocus,
-               nofines => 1,
+        nofines => 1,
         "dateformat_" . C4::Context->preference('dateformat') => 1,
     );
     if (C4::Context->preference('ShowPatronImageInWebBasedSelfCheck')) {
@@ -263,4 +263,9 @@ if ($borrower->{cardnumber}) {
     );
 }
 
+$template->param(
+    SCOUserJS  => C4::Context->preference('SCOUserJS'),
+    SCOUserCSS => C4::Context->preference('SCOUserCSS'),
+);
+
 output_html_with_http_headers $query, $cookie, $template->output;
index 7207e64..de4b0f3 100755 (executable)
@@ -20,8 +20,8 @@
 
 # test comment
 
-use strict;
-#use warnings; FIXME - Bug 2505
+use Modern::Perl;
+
 use C4::Auth;
 use CGI;
 use C4::Context;
@@ -30,6 +30,8 @@ use C4::Output;
 use C4::Koha;
 use C4::Circulation;
 use C4::Dates qw/format_date format_date_in_iso/;
+use C4::Branch;
+use C4::Biblio;
 
 =head1 NAME
 
@@ -53,27 +55,30 @@ $filters[2] = format_date_in_iso( $filters[2] );
 $filters[3] = format_date_in_iso( $filters[3] );
 my $podsp          = $input->param("PlacedOnDisplay");
 my $rodsp          = $input->param("ReceivedOnDisplay");
-my $aodsp          = $input->param("AcquiredOnDisplay");    ##added by mason.
 my $calc           = $input->param("Cellvalue");
 my $output         = $input->param("output");
 my $basename       = $input->param("basename");
 
-my ($template, $borrowernumber, $cookie)
-       = get_template_and_user({template_name => $fullreportname,
-                               query => $input,
-                               type => "intranet",
-                               authnotrequired => 0,
-                               flagsrequired => {reports => '*'},
-                               debug => 1,
-                               });
-our $sep     = $input->param("sep");
+my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+    {
+        template_name   => $fullreportname,
+        query           => $input,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { reports => '*' },
+        debug           => 1,
+    }
+);
+
+our $sep     = $input->param("sep") // '';
 $sep = "\t" if ($sep eq 'tabulation');
-$template->param(do_it => $do_it,
-        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
-               );
+$template->param(
+    do_it                    => $do_it,
+    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+);
 if ($do_it) {
     my $results =
-      calculate( $line, $column, $podsp, $rodsp, $aodsp, $calc, \@filters );
+      calculate( $line, $column, $podsp, $rodsp, $calc, \@filters );
     if ( $output eq "screen" ) {
         $template->param( mainloop => $results );
         output_html_with_http_headers $input, $cookie, $template->output;
@@ -112,31 +117,15 @@ if ($do_it) {
 }
 else {
     my $dbh = C4::Context->dbh;
-    my @select;
-    my %select;
     my $req;
     $req = $dbh->prepare("SELECT distinctrow id,name FROM aqbooksellers ORDER BY name");
     $req->execute;
-    my @select;
-    push @select, "";
-       $select{''} = "All Suppliers";
-    while ( my ( $value, $desc ) = $req->fetchrow ) {
-        push @select, $desc;
-        $select{$value}=$desc;
-    }
-    my $CGIBookSellers = CGI::scrolling_list(
-        -name   => 'Filter',
-        -id     => 'supplier',
-        -values => \@select,
-        -labels   => \%select,
-        -size     => 1,
-        -multiple => 0
-    );
+    my $booksellers = $req->fetchall_arrayref({});
 
     $req = $dbh->prepare("SELECT DISTINCTROW itemtype,description FROM itemtypes ORDER BY description");
     $req->execute;
-    undef @select;
-    undef %select;
+    my @select;
+    my %select;
     push @select, "";
     $select{''} = "All Item Types";
     while ( my ( $value, $desc ) = $req->fetchrow ) {
@@ -183,11 +172,11 @@ else {
     $select{''} = "All";
     my $hassort1;
     while ( my ($value) = $req->fetchrow ) {
-               if ($value) {
-                       $hassort1 = 1;
-                       push @select, $value;
-                       $select{$value} = $value;
-               }
+        if ($value) {
+            $hassort1 = 1;
+            push @select, $value;
+            $select{$value} = $value;
+        }
     }
     my $CGISort1 = CGI::scrolling_list(
         -name     => 'Filter',
@@ -211,12 +200,12 @@ else {
     my $hglghtsort2;
 
     while ( my ($value) = $req->fetchrow ) {
-               if ($value) {
-                       $hassort2 = 1;
-                       $hglghtsort2 = !($hassort1);
-                       push @select, $value;
-                       $select{$value} = $value;
-               }
+        if ($value) {
+            $hassort2    = 1;
+            $hglghtsort2 = !($hassort1);
+            push @select, $value;
+            $select{$value} = $value;
+        }
     }
     my $CGISort2 = CGI::scrolling_list(
         -name     => 'Filter',
@@ -237,25 +226,40 @@ else {
 
     my $CGIsepChoice = GetDelimiterChoices;
 
+    my $branches = GetBranches;
+    my @branches;
+    foreach ( sort keys %$branches ) {
+        push @branches, $branches->{$_};
+    }
+
+    my $ccode_subfield_structure = GetMarcSubfieldStructureFromKohaField('items.ccode', '');
+    my $ccode_label;
+    my $ccode_avlist;
+    if($ccode_subfield_structure) {
+        $ccode_label = $ccode_subfield_structure->{liblibrarian};
+        $ccode_avlist = GetAuthorisedValues($ccode_subfield_structure->{authorised_value});
+    }
+
     $template->param(
-        CGIBookSeller => $CGIBookSellers,
+        booksellers   => $booksellers,
         CGIItemType   => $CGIItemTypes,
         CGIBudget     => $CGIBudget,
         hassort1      => $hassort1,
         hassort2      => $hassort2,
-        HlghtSort2    => $hglghtsort2,
         CGISort1      => $CGISort1,
         CGISort2      => $CGISort2,
         CGIextChoice  => $CGIextChoice,
         CGIsepChoice  => $CGIsepChoice,
-               date_today => C4::Dates->new()->output()
+        branches      => \@branches,
+        ccode_label   => $ccode_label,
+        ccode_avlist  => $ccode_avlist,
     );
 
 }
 output_html_with_http_headers $input, $cookie, $template->output;
 
 sub calculate {
-    my ( $line, $column, $podsp, $rodsp, $aodsp, $process, $filters ) = @_;
+    my ( $line, $column, $podsp, $rodsp, $process, $filters ) = @_;
     my @mainloop;
     my @loopfooter;
     my @loopcol;
@@ -264,6 +268,9 @@ sub calculate {
     my %globalline;
     my $grantotal = 0;
 
+    $podsp ||= 0;
+    $rodsp ||= 0;
+
     # extract parameters
     my $dbh = C4::Context->dbh;
 
@@ -271,109 +278,93 @@ sub calculate {
     # Checking filters
     #
     my @loopfilter;
-    for ( my $i = 0 ; $i <= 8 ; $i++ ) {
-        my %cell;
-        if ( @$filters[$i] ) {
+    for ( my $i = 0 ; $i <= @$filters ; $i++ ) {
+        if( defined @$filters[$i] and @$filters[$i] ne '' ) {
+            my %cell;
             if ( ( ( $i == 1 ) or ( $i == 3 ) ) and ( @$filters[ $i - 1 ] ) ) {
-                $cell{err} = 1 if ( @$filters[$i] < @$filters[ $i - 1 ] );
+                $cell{err} = 1 if ( @$filters[$i] lt @$filters[ $i - 1 ] );
             }
             # format the dates filters, otherwise just fill as is
-            if ($i>=4) {
-                $cell{filter} .= @$filters[$i];
+            if ($i >= 4) {
+                $cell{filter} = @$filters[$i];
             } else {
-                $cell{filter} .= format_date(@$filters[$i]);
+                $cell{filter} = format_date(@$filters[$i]);
             }
-            $cell{crit}   .= "Placed On From" if ( $i == 0 );
-            $cell{crit}   .= "Placed On To" if ( $i == 1 );
-            $cell{crit}   .= "Received On From" if ( $i == 2 );
-            $cell{crit}   .= "Received On To" if ( $i == 3 );
-
-#            $cell{crit} .= "Acquired On From" if ( $i == 4 );
-#            $cell{crit} .= "Acquired On To"   if ( $i == 5 );
-
-            $cell{crit} .= "BookSeller" if ( $i == 4 );
-            $cell{crit} .= "Doc Type"   if ( $i == 5 );
-            $cell{crit} .= "Budget"     if ( $i == 6 );
-            $cell{crit} .= "Sort1"      if ( $i == 7 );
-            $cell{crit} .= "Sort2"      if ( $i == 8 );
+            $cell{crit} = $i;
             push @loopfilter, \%cell;
         }
     }
 
-    my @linefilter;
-
-    $linefilter[0] = @$filters[0] if ( $line =~ /closedate/ );
-    $linefilter[1] = @$filters[1] if ( $line =~ /closedate/ );
-    $linefilter[0] = @$filters[2] if ( $line =~ /received/ );
-    $linefilter[1] = @$filters[3] if ( $line =~ /received/ );
-
-    $linefilter[0] = @$filters[4]  if ( $line =~ /bookseller/ );
-    $linefilter[0] = @$filters[5]  if ( $line =~ /itemtype/ );
-    $linefilter[0] = @$filters[6]  if ( $line =~ /budget/ );
-    $linefilter[0] = @$filters[7]  if ( $line =~ /sort1/ );
-    $linefilter[0] = @$filters[8] if ( $line =~ /sort2/ );
-
-    my @colfilter;
-    $colfilter[0] = @$filters[0] if ( $column =~ /closedate/ );
-    $colfilter[1] = @$filters[1] if ( $column =~ /closedate/ );
-    $colfilter[0] = @$filters[2] if ( $column =~ /received/ );
-    $colfilter[1] = @$filters[3] if ( $column =~ /received/ );
-
-    $colfilter[0] = @$filters[4]  if ( $column =~ /bookseller/ );
-    $colfilter[0] = @$filters[5]  if ( $column =~ /itemtype/ );
-    $colfilter[0] = @$filters[6]  if ( $column =~ /budget/ );
-    $colfilter[0] = @$filters[7]  if ( $column =~ /sort1/ );
-    $colfilter[0] = @$filters[8]  if ( $column =~ /sort2/ );
-
-    # 1st, loop rows.
-    my $linefield;
-    if ( ( $line =~ /closedate/ ) and ( $podsp == 1 ) ) {
-
-        #Display by day
-        $linefield .= "concat(hex(weekday($line)+1),'-',dayname($line))";
-    }
-    elsif ( ( $line =~ /closedate/ ) and ( $podsp == 2 ) ) {
-
-        #Display by Month
-        $linefield .= "concat(hex(month($line)),'-',monthname($line))";
-    }
-    elsif ( ( $line =~ /closedate/ ) and ( $podsp == 3 ) ) {
-
-        #Display by Year
-        $linefield .= "Year($line)";
-
-    }
-    elsif ( ( $line =~ /received/ ) and ( $rodsp == 1 ) ) {
-
-        #Display by day
-        $linefield .= "concat(hex(weekday($line)+1),'-',dayname($line))";
-    }
-    elsif ( ( $line =~ /received/ ) and ( $rodsp == 2 ) ) {
-
-        #Display by Month
-        $linefield .= "concat(hex(month($line)),'-',monthname($line))";
+    my %filter;
+    my %field;
+    foreach ($line, $column) {
+        $filter{$_} = [];
+        $field{$_} = $_;
+        given ($_) {
+            when (/closedate/) {
+                $filter{$_}->[0] = @$filters[0];
+                $filter{$_}->[1] = @$filters[1];
+                my $a = $_;
+                given ($podsp) {
+                    when (1) { $field{$a} = "concat(hex(weekday($a)+1),'-',dayname($a))" }
+                    when (2) { $field{$a} = "concat(hex(month($a)),'-',monthname($a))" }
+                    when (3) { $field{$a} = "Year($a)" }
+                    default  { $field{$a} = $a }
+                }
+            }
+            when (/received/) {
+                $filter{$_}->[0] = @$filters[2];
+                $filter{$_}->[1] = @$filters[3];
+                my $a = $_;
+                given ($rodsp) {
+                    when (1) { $field{$a} = "concat(hex(weekday($a)+1),'-',dayname($a))" }
+                    when (2) { $field{$a} = "concat(hex(month($a)),'-',monthname($a))" }
+                    when (3) { $field{$a} = "Year($a)" }
+                    default  { $field{$a} = $a }
+                }
+            }
+            when (/bookseller/) {
+                $filter{$_}->[0] = @$filters[4];
+            }
+            when (/homebranch/) {
+                $filter{$_}->[0] = @$filters[5];
+            }
+            when (/ccode/) {
+                $filter{$_}->[0] = @$filters[6];
+            }
+            when (/itemtype/) {
+                $filter{$_}->[0] = @$filters[7];
+            }
+            when (/budget/) {
+                $filter{$_}->[0] = @$filters[8];
+            }
+            when (/sort1/) {
+                $filter{$_}->[0] = @$filters[9];
+            }
+            when (/sort2/) {
+                $filter{$_}->[0] = @$filters[10];
+            }
+        }
     }
-    elsif ( ( $line =~ /received/ ) and ( $rodsp == 3 ) ) {
 
-        #Display by Year
-        $linefield .= "Year($line)";
+    my @linefilter = @{ $filter{$line} };
+    my $linefield = $field{$line};
+    my @colfilter = @{ $filter{$column} };
+    my $colfield = $field{$column};
 
-    }
-    else {
-        $linefield .= $line;
-    }
-
-    my $strsth;
-    $strsth .=
-      "SELECT DISTINCTROW $linefield FROM (aqorders, aqbasket )
-                LEFT JOIN items ON (aqorders.biblionumber= items.biblionumber)
-                LEFT JOIN biblioitems ON (aqorders.biblionumber= biblioitems.biblionumber)
-                LEFT JOIN aqbudgets  ON (aqorders.budget_id = aqbudgets.budget_id )
-
-                LEFT JOIN aqbooksellers ON (aqbasket.booksellerid=aqbooksellers.id) WHERE (aqorders.basketno=aqbasket.basketno)
-                AND $line IS NOT NULL AND $line <> '' ";
-    
-       if (@linefilter) {
+    # 1st, loop rows.
+    my $strsth = "
+        SELECT DISTINCTROW $linefield
+        FROM aqorders
+          LEFT JOIN aqbasket ON (aqorders.basketno = aqbasket.basketno)
+          LEFT JOIN aqorders_items ON (aqorders.ordernumber = aqorders_items.ordernumber)
+          LEFT JOIN items ON (aqorders_items.itemnumber = items.itemnumber)
+          LEFT JOIN biblioitems ON (aqorders.biblionumber = biblioitems.biblionumber)
+          LEFT JOIN aqbudgets  ON (aqorders.budget_id = aqbudgets.budget_id )
+          LEFT JOIN aqbooksellers ON (aqbasket.booksellerid = aqbooksellers.id)
+        WHERE $line IS NOT NULL AND $line <> '' ";
+
+    if (@linefilter) {
         if ( $linefilter[1] ) {
             if ( $linefilter[0] ) {
                 $strsth .= " AND $line BETWEEN ? AND ? ";
@@ -408,62 +399,27 @@ sub calculate {
     else {
         $sth->execute;
     }
-       while ( my ($celvalue) = $sth->fetchrow ) {
-               my %cell;
-               if ($celvalue) {
-                       $cell{rowtitle} = $celvalue;
-                       push @loopline, \%cell;
-               }
-               $cell{totalrow} = 0;
-       }
-    # 2nd, loop cols.
-    my $colfield;
-    if ( ( $column =~ /closedate/ ) and ( $podsp == 1 ) ) {
-
-        #Display by day
-        $colfield .= "concat(hex(weekday($column)+1),'-',dayname($column))";
-    }
-    elsif ( ( $column =~ /closedate/ ) and ( $podsp == 2 ) ) {
-
-        #Display by Month
-        $colfield .= "concat(hex(month($column)),'-',monthname($column))";
-    }
-    elsif ( ( $column =~ /closedate/ ) and ( $podsp == 3 ) ) {
-
-        #Display by Year
-        $colfield .= "Year($column)";
-
-    }
-    elsif ( ( $column =~ /received/ ) and ( $rodsp == 1 ) ) {
-
-        #Display by day
-        $colfield .= "concat(hex(weekday($column)+1),'-',dayname($column))";
-    }
-    elsif ( ( $column =~ /received/ ) and ( $rodsp == 2 ) ) {
-
-        #Display by Month
-        $colfield .= "concat(hex(month($column)),'-',monthname($column))";
-    }
-    elsif ( ( $column =~ /received/ ) and ( $rodsp == 3 ) ) {
-
-        #Display by Year
-        $colfield .= "Year($column)";
-
-    }
-    else {
-        $colfield .= $column;
+    while ( my ($celvalue) = $sth->fetchrow ) {
+        my %cell;
+        if ($celvalue) {
+            $cell{rowtitle} = $celvalue;
+            push @loopline, \%cell;
+        }
+        $cell{totalrow} = 0;
     }
 
-    my $strsth2;
-    $strsth2 .=
-      "SELECT distinctrow $colfield FROM (aqorders, aqbasket )
-                 LEFT JOIN items ON (aqorders.biblionumber= items.biblionumber)
-                 LEFT JOIN biblioitems ON (aqorders.biblionumber= biblioitems.biblionumber)
-                 LEFT JOIN aqbudgets  ON (aqorders.budget_id = aqbudgets.budget_id )
-
-                 LEFT JOIN aqbooksellers ON (aqbasket.booksellerid=aqbooksellers.id)
-                 WHERE (aqorders.basketno=aqbasket.basketno) AND 
-                 $column IS NOT NULL AND $column <> '' ";
+    # 2nd, loop cols.
+    my $strsth2 = "
+        SELECT DISTINCTROW $colfield
+        FROM aqorders
+          LEFT JOIN aqbasket ON (aqorders.basketno = aqbasket.basketno)
+          LEFT JOIN aqorders_items ON (aqorders.ordernumber = aqorders_items.ordernumber)
+          LEFT JOIN items ON (aqorders_items.itemnumber = items.itemnumber)
+          LEFT JOIN biblioitems ON (aqorders.biblionumber = biblioitems.biblionumber)
+          LEFT JOIN aqbudgets  ON (aqorders.budget_id = aqbudgets.budget_id )
+          LEFT JOIN aqbooksellers ON (aqbasket.booksellerid = aqbooksellers.id)
+        WHERE $column IS NOT NULL AND $column <> ''
+    ";
 
     if (@colfilter) {
         if ( $colfilter[1] ) {
@@ -488,7 +444,6 @@ sub calculate {
         }
     }
 
-
     $strsth2 .= " GROUP BY $colfield";
     $strsth2 .= " ORDER BY $colfield";
 
@@ -503,13 +458,13 @@ sub calculate {
     else {
         $sth2->execute;
     }
-       while ( my $celvalue = $sth2->fetchrow ) {
-               my %cell;
-               if ($celvalue) {
-                       $cell{coltitle} = $celvalue;
-                       push @loopcol, \%cell;
-               }
-       }
+    while ( my $celvalue = $sth2->fetchrow ) {
+        my %cell;
+        if ($celvalue) {
+            $cell{coltitle} = $celvalue;
+            push @loopcol, \%cell;
+        }
+    }
 
     my $i = 0;
     my @totalcol;
@@ -528,18 +483,26 @@ sub calculate {
     # preparing calculation
     my $strcalc;
     $strcalc .= "SELECT $linefield, $colfield, ";
-    $strcalc .= "SUM( aqorders.quantity ) " if ( $process == 1 );
-    $strcalc .= "SUM( aqorders.quantity * aqorders.listprice ) "
-      if ( $process == 2 );
-    $strcalc .= "FROM (aqorders, aqbasket )
-                 LEFT JOIN items ON (aqorders.biblionumber= items.biblionumber)
-                 LEFT JOIN biblioitems ON (aqorders.biblionumber= biblioitems.biblionumber)
-                 LEFT JOIN aqbudgets  ON (aqorders.budget_id = aqbudgets.budget_id )
-
-                 LEFT JOIN aqbooksellers ON (aqbasket.booksellerid=aqbooksellers.id) 
-                 WHERE (aqorders.basketno=aqbasket.basketno) ";
-    
-       @$filters[0] =~ s/\*/%/g if ( @$filters[0] );
+    given ($process) {
+        when (1) { $strcalc .= "COUNT(*) " }
+        when (2) { $strcalc .= "COUNT(DISTINCT(aqorders.biblionumber)) " }
+        when ([3,4,5]) { $strcalc .= "SUM(aqorders.listprice) " }
+        default { $strcalc .= "NULL " }
+    }
+    $strcalc .= "
+        FROM aqorders
+          LEFT JOIN aqbasket ON (aqorders.basketno = aqbasket.basketno)
+          LEFT JOIN aqorders_items ON (aqorders.ordernumber = aqorders_items.ordernumber)
+          LEFT JOIN items ON (aqorders_items.itemnumber = items.itemnumber)
+          LEFT JOIN biblioitems ON (aqorders.biblionumber = biblioitems.biblionumber)
+          LEFT JOIN aqbudgets ON (aqorders.budget_id = aqbudgets.budget_id )
+          LEFT JOIN aqbooksellers ON (aqbasket.booksellerid = aqbooksellers.id)
+        WHERE aqorders.datecancellationprinted IS NULL ";
+    $strcalc .= " AND (aqorders.datereceived IS NULL OR aqorders.datereceived = '') "
+        if ( $process == 4 );
+    $strcalc .= " AND aqorders.datereceived IS NOT NULL AND aqorders.datereceived <> '' "
+        if ( $process == 5 );
+    @$filters[0] =~ s/\*/%/g if ( @$filters[0] );
     $strcalc .= " AND aqbasket.closedate >= '" . @$filters[0] . "'"
       if ( @$filters[0] );
     @$filters[1] =~ s/\*/%/g if ( @$filters[1] );
@@ -554,20 +517,23 @@ sub calculate {
     @$filters[4] =~ s/\*/%/g if ( @$filters[4] );
     $strcalc .= " AND aqbooksellers.name LIKE '" . @$filters[4] . "'"
       if ( @$filters[4] );
-    @$filters[5] =~ s/\*/%/g if ( @$filters[5] );
-    $strcalc .= " AND biblioitems.itemtype LIKE '" . @$filters[5] . "'"
+    $strcalc .= " AND items.homebranch = '" . @$filters[5] . "'"
       if ( @$filters[5] );
     @$filters[6] =~ s/\*/%/g if ( @$filters[6] );
-    $strcalc .= " AND aqbudgets.budget_code LIKE '" . @$filters[6] . "'"
+    $strcalc .= " AND items.ccode = '" . @$filters[6] . "'"
       if ( @$filters[6] );
     @$filters[7] =~ s/\*/%/g if ( @$filters[7] );
-    $strcalc .= " AND aqorders.sort1 LIKE '" . @$filters[7] . "'"
+    $strcalc .= " AND biblioitems.itemtype LIKE '" . @$filters[7] . "'"
       if ( @$filters[7] );
     @$filters[8] =~ s/\*/%/g if ( @$filters[8] );
-    $strcalc .= " AND aqorders.sort2 LIKE '" . @$filters[8] . "'"
+    $strcalc .= " AND aqbudgets.budget_code LIKE '" . @$filters[8] . "'"
       if ( @$filters[8] );
-
-    $strcalc .= " AND aqorders.datecancellationprinted is NULL ";
+    @$filters[9] =~ s/\*/%/g if ( @$filters[9] );
+    $strcalc .= " AND aqorders.sort1 LIKE '" . @$filters[9] . "'"
+      if ( @$filters[9] );
+    @$filters[10] =~ s/\*/%/g if ( @$filters[10] );
+    $strcalc .= " AND aqorders.sort2 LIKE '" . @$filters[10] . "'"
+      if ( @$filters[10] );
 
     $strcalc .= " GROUP BY $linefield, $colfield ORDER BY $linefield,$colfield";
     my $dbcalc = $dbh->prepare($strcalc);
@@ -575,8 +541,6 @@ sub calculate {
 
     my $emptycol;
     while ( my ( $row, $col, $value ) = $dbcalc->fetchrow ) {
-               next if ($row eq undef || $col eq undef);
-
         $emptycol = 1         if ( !defined($col) );
         $col      = "zzEMPTY" if ( !defined($col) );
         $row      = "zzEMPTY" if ( !defined($row) );
@@ -594,15 +558,17 @@ sub calculate {
         # and the number matches the number of columns
         foreach my $col (@loopcol) {
             my $value = $table{$row}->{ ( $col->{coltitle} eq "NULL" ) ? "zzEMPTY" : $col->{coltitle} };
+            $value = sprintf("%.2f", $value) if($value and grep /$process/, (3,4,5));
             push @loopcell, { value => $value };
         }
-        push @looprow,
-          {
-            'rowtitle' => ( $row eq "zzEMPTY" ) ? "NULL" : $row,
-            'loopcell'  => \@loopcell,
-            'hilighted' => ( $hilighted > 0 ),
-            'totalrow'  => $table{$row}->{totalrow}
-          };
+        my $r = {
+            rowtitle => ( $row eq "zzEMPTY" ) ? "NULL" : $row,
+            loopcell  => \@loopcell,
+            hilighted => ( $hilighted > 0 ),
+            totalrow  => $table{$row}->{totalrow}
+        };
+        $r->{totalrow} = sprintf("%.2f", $r->{totalrow}) if($r->{totalrow} and grep /$process/, (3,4,5));
+        push @looprow, $r;
         $hilighted = -$hilighted;
     }
 
@@ -617,17 +583,19 @@ sub calculate {
                 : $col->{coltitle}
               };
         }
+        $total = sprintf("%.2f", $total) if($total and grep /$process/, (3,4,5));
 
         push @loopfooter, { 'totalcol' => $total };
     }
 
     # the header of the table
-       $globalline{loopfilter}=\@loopfilter;
+    $globalline{loopfilter} = \@loopfilter;
     # the core of the table
     $globalline{looprow} = \@looprow;
     $globalline{loopcol} = \@loopcol;
 
     #       # the foot (totals by borrower type)
+    $grantotal = sprintf("%.2f", $grantotal) if ($grantotal and grep /$process/, (3,4,5));
     $globalline{loopfooter} = \@loopfooter;
     $globalline{total}      = $grantotal;
     $globalline{line}       = $line;
index aae96c9..f27ce10 100755 (executable)
@@ -108,7 +108,7 @@ elsif ( $phase eq 'New Term step 4' ) {
         if ( $type eq 'DATE' || $type eq 'DATETIME' ) {
             $tmp_hash{'date'} = 1;
         }
-        if ( $type eq 'TEXT' ) {
+        if ($type eq 'TEXT' || $type eq 'MEDIUMTEXT'){
             $tmp_hash{'text'} = 1;
         }
 
index 9aff54b..36f7cc5 100755 (executable)
@@ -96,9 +96,19 @@ if($do_it){
     while(my $row = $sth->fetchrow_hashref){
         $row->{'enddate'} = format_date(GetExpirationDate($row->{'subscriptionid'}));
         $row->{'startdate'} = format_date($row->{'startdate'});
-        push @datas, $row if ($expired || (not $expired && not HasSubscriptionExpired($row->{subscriptionid})) );
+        $row->{expired} = HasSubscriptionExpired($row->{subscriptionid});
+        push @datas, $row if (
+            $expired
+            or (
+                not $expired
+                and (
+                    not $row->{expired}
+                    and not $row->{closed}
+                )
+            )
+        );
     }
-    
+
     if($output eq 'screen'){
         $template->param(datas => \@datas,
                          do_it => 1);
index c34a614..705f4f6 100755 (executable)
@@ -244,9 +244,16 @@ foreach my $biblionumber (@biblionumbers) {
     my $dat          = GetBiblioData($biblionumber);
 
     unless ( CanBookBeReserved($borrowerinfo->{borrowernumber}, $biblionumber) ) {
-               $warnings = 1;
+               $warnings = 1;
         $maxreserves = 1;
     }
+
+    my $alreadypossession;
+    if (not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowerinfo->{borrowernumber},$biblionumber)) {
+        $warnings = 1;
+        $alreadypossession = 1;
+    }
+
     # get existing reserves .....
     my ( $count, $reserves ) = GetReservesFromBiblionumber($biblionumber,1);
     my $totalcount = $count;
@@ -268,7 +275,8 @@ foreach my $biblionumber (@biblionumbers) {
     $template->param( alreadyreserved => $alreadyreserved,
                       messages => $messages,
                       warnings => $warnings,
-                                         maxreserves=>$maxreserves
+                 maxreserves=>$maxreserves,
+                     alreadypossession => $alreadypossession,
                                          );
 
 
index bf4b6e9..e831854 100755 (executable)
@@ -79,6 +79,7 @@ if ($date) {
 
         $subscription->{expirationdate} = $expirationdate;
         next if $expirationdate !~ /\d{4}-\d{2}-\d{2}/; # next if not in ISO format.
+        next if $subscription->{closed};
         if ( Date_to_Days(split "-",$expirationdate) < Date_to_Days(split "-",$date) &&
                         Date_to_Days(split "-",$expirationdate) > Date_to_Days(&Today) ) {
             $subscription->{expirationdate}=format_date($subscription->{expirationdate});
index 4393546..ad57e07 100755 (executable)
@@ -101,8 +101,10 @@ my $subscriptioncount;
 my ($location, $callnumber);
 if (@subscriptionid){
    my @subscriptioninformation=();
+   my $closed = 0;
    foreach my $subscriptionid (@subscriptionid){
     my $subs= GetSubscription($subscriptionid);
+    $closed = 1 if $subs->{closed};
     $subs->{opacnote}     =~ s/\n/\<br\/\>/g;
     $subs->{missinglist}  =~ s/\n/\<br\/\>/g;
     $subs->{recievedlist} =~ s/\n/\<br\/\>/g;
@@ -127,6 +129,7 @@ if (@subscriptionid){
     my $tmpsubscription= GetFullSubscription($subscriptionid);
     @subscriptioninformation=(@$tmpsubscription,@subscriptioninformation);
   }
+  $template->param(closed => $closed);
   $subscriptions=PrepareSerialsData(\@subscriptioninformation);
   $subscriptioncount = CountSubscriptionFromBiblionumber($subscriptiondescs->[0]{'biblionumber'});
 } else {
@@ -169,6 +172,7 @@ $template->param(
           callnumber          => $callnumber,
           uc(C4::Context->preference("marcflavour")) => 1,
           serialsadditems   => $subscriptiondescs->[0]{'serialsadditems'},
+          dateformatmetric   => C4::Context->preference("dateformat") eq "metric" ? 1 : 0,
           );
 
 output_html_with_http_headers $query, $cookie, $template->output;
index bb87c5f..66d3a4e 100755 (executable)
@@ -151,6 +151,7 @@ foreach my $serialid (@serialids) {
             )
             || $serinfo->{'cannotedit'}
         );
+        $serinfo->{editdisable} ||= ($serinfo->{status8} and $serinfo->{closed});
         push @serialdatalist, $serinfo;
         $processedserialid{$serialid} = 1;
     }
index ac5d0d3..aaf64e6 100755 (executable)
@@ -46,6 +46,8 @@ my $biblionumber  = $query->param('biblionumber') || '';
 my $branch        = $query->param('branch_filter') || '';
 my $routing       = $query->param('routing') || C4::Context->preference("RoutingSerials");
 my $searched      = $query->param('searched') || 0;
+my @subscriptionids = $query ->param('subscriptionid');
+my $op            = $query->param('op');
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
@@ -58,6 +60,16 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
+if ( $op and $op eq "close" ) {
+    for my $subscriptionid ( @subscriptionids ) {
+        C4::Serials::CloseSubscription( $subscriptionid );
+    }
+} elsif ( $op and $op eq "reopen" ) {
+    for my $subscriptionid ( @subscriptionids ) {
+        C4::Serials::ReopenSubscription( $subscriptionid );
+    }
+}
+
 my @subscriptions;
 if ($searched){
     @subscriptions = SearchSubscriptions(
@@ -81,6 +93,15 @@ if ($routing) {
     }
 }
 
+my (@openedsubscriptions, @closedsubscriptions);
+for my $sub ( @subscriptions ) {
+    unless ( $sub->{closed} ) {
+        push @openedsubscriptions, $sub;
+    } else {
+        push @closedsubscriptions, $sub;
+    }
+}
+
 my $branches = GetBranches();
 my @branches_loop;
 foreach (sort keys %$branches){
@@ -94,7 +115,9 @@ foreach (sort keys %$branches){
 }
 
 $template->param(
-    subscriptions => \@subscriptions,
+    openedsubscriptions => \@openedsubscriptions,
+    closedsubscriptions => \@closedsubscriptions,
+    total         => @openedsubscriptions + @closedsubscriptions,
     title_filter  => $title,
     ISSN_filter   => $ISSN,
     EAN_filter    => $EAN,
index f3a50ac..009360b 100755 (executable)
@@ -34,6 +34,13 @@ my $issueconfirmed = $query->param('issueconfirmed');
 my $dbh = C4::Context->dbh;
 my ($template, $loggedinuser, $cookie, $hemisphere);
 my $subscriptionid = $query->param('subscriptionid');
+
+if ( $op and $op eq "close" ) {
+    C4::Serials::CloseSubscription( $subscriptionid );
+} elsif ( $op and $op eq "reopen" ) {
+    C4::Serials::ReopenSubscription( $subscriptionid );
+}
+
 my $subs = GetSubscription($subscriptionid);
 
 $subs->{enddate} = GetExpirationDate($subscriptionid);
index 3a3df52..8bb3661 100644 (file)
@@ -38,7 +38,12 @@ foreach my $file (@files){
        $line++;
        if (/XXX/i) {
            #two lines are an exception for updatedatabase (routine SetVersion and TransferToNum)
-           next if $file=~ /updatedatabase/ && ( /s\/XXX\$\/999\/;/ || /\$_\[0\]=~ \/XXX\$\/;/ );
+           next
+               if $file =~ /updatedatabase/
+                  && (   /s\/XXX\$\/999\/;/
+                      || /\$_\[0\]=~ \/XXX\$\/;/
+                      || /version contains XXX/
+                      || /\$proposed_version =~ m\/XXX\// );
            $xxx_found = 1;
           last;
        }
index dc69f96..6a5a223 100644 (file)
@@ -16,7 +16,6 @@ find({
         $m =~ s{^.*/C4/}{C4/};
         $m =~ s{/}{::}g;
         return if $m =~ /Auth_with_ldap/; # Dont test this, it will fail on use
-        return if $m =~ /Cache/; # Cache modules are a WIP, add the tests back when we are using them more
         return if $m =~ /SIP/; # SIP modules will not load clean
         return if $m =~ /C4::VirtualShelves$/; # Requires a DB
         return if $m =~ /C4::Auth$/; # DB
@@ -25,9 +24,7 @@ find({
         return if $m =~ /C4::Auth_with_cas/; # DB
         return if $m =~ /C4::BackgroundJob/; # DB
         return if $m =~ /C4::UploadedFile/; # DB
-        return if $m =~ /C4::Record/; # DB
         return if $m =~ /C4::Reports::Guided/; # DB
-        return if $m =~ /C4::Serials/; # DB
         return if $m =~ /C4::VirtualShelves::Page/; # DB
         return if $m =~ /C4::Members::Statistics/; # DB
         use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
index 2b719b8..8648968 100755 (executable)
@@ -3,7 +3,10 @@
 use strict;
 use warnings;
 use DateTime;
-use Test::More tests => 23;
+use DateTime::Duration;
+use Test::More tests => 35;
+use Test::MockModule;
+use DBD::Mock;
 use Koha::DateUtils;
 
 BEGIN {
@@ -14,120 +17,312 @@ BEGIN {
     use_ok('C4::Calendar');
 }
 
-my $cal = Koha::Calendar->new( TEST_MODE => 1 );
+my $module_context = new Test::MockModule('C4::Context');
+$module_context->mock(
+    '_new_dbh',
+    sub {
+        my $dbh = DBI->connect( 'DBI:Mock:', '', '' )
+          || die "Cannot create handle: $DBI::errstr\n";
+        return $dbh;
+    }
+);
+
+# We need to mock the C4::Context->preference method for
+# simplicity and re-usability of the session definition. Any
+# syspref fits for syspref-agnostic tests.
+$module_context->mock(
+    'preference',
+    sub {
+        return 'Calendar';
+    }
+);
+
+SKIP: {
+
+skip "DBD::Mock is too old", 33
+  unless $DBD::Mock::VERSION >= 1.45;
+
+my $holidays_session = DBD::Mock::Session->new('holidays_session' => (
+    { # weekly holidays
+        statement => "SELECT weekday FROM repeatable_holidays WHERE branchcode = ? AND weekday IS NOT NULL",
+        results   => [
+                        ['weekday'],
+                        [0],    # sundays
+                        [6]     # saturdays
+                     ]
+    },
+    { # day and month repeatable holidays
+        statement => "SELECT day, month FROM repeatable_holidays WHERE branchcode = ? AND weekday IS NULL",
+        results   => [
+                        [ 'month', 'day' ],
+                        [ 1, 1 ],   # new year's day
+                        [12,25]     # christmas
+                     ]
+    },
+    { # exception holidays
+        statement => "SELECT day, month, year FROM special_holidays WHERE branchcode = ? AND isexception = 1",
+        results   => [
+                        [ 'day', 'month', 'year' ],
+                        [ 11, 11, 2012 ] # sunday exception
+                     ]
+    },
+    { # single holidays
+        statement => "SELECT day, month, year FROM special_holidays WHERE branchcode = ? AND isexception = 0",
+        results   => [
+                        [ 'day', 'month', 'year' ],
+                        [ 1, 6, 2011 ],  # single holiday
+                        [ 4, 7, 2012 ]
+                     ]
+    }
+));
+
+# Initialize the global $dbh variable
+my $dbh = C4::Context->dbh();
+# Apply the mock session
+$dbh->{ mock_session } = $holidays_session;
+# 'MPL' branch is arbitrary, is not used at all but is needed for initialization
+my $cal = Koha::Calendar->new( branchcode => 'MPL' );
 
 isa_ok( $cal, 'Koha::Calendar', 'Calendar class returned' );
 
+
 my $saturday = DateTime->new(
-    year      => 2011,
-    month     => 6,
-    day       => 25,
-    time_zone => 'Europe/London',
+    year      => 2012,
+    month     => 11,
+    day       => 24,
 );
+
 my $sunday = DateTime->new(
-    year      => 2011,
-    month     => 6,
-    day       => 26,
-    time_zone => 'Europe/London',
+    year      => 2012,
+    month     => 11,
+    day       => 25,
 );
+
 my $monday = DateTime->new(
-    year      => 2011,
-    month     => 6,
-    day       => 27,
-    time_zone => 'Europe/London',
+    year      => 2012,
+    month     => 11,
+    day       => 26,
 );
-my $bloomsday = DateTime->new(
-    year      => 2011,
-    month     => 6,
-    day       => 16,
-    time_zone => 'Europe/London',
-);    # should be a holiday
-my $special = DateTime->new(
+
+my $new_year = DateTime->new(
+    year        => 2013,
+    month       => 1,
+    day         => 1,
+);
+
+my $single_holiday = DateTime->new(
     year      => 2011,
     month     => 6,
     day       => 1,
-    time_zone => 'Europe/London',
 );    # should be a holiday
+
 my $notspecial = DateTime->new(
     year      => 2011,
     month     => 6,
-    day       => 2,
-    time_zone => 'Europe/London',
+    day       => 2
 );    # should NOT be a holiday
 
-is( $cal->is_holiday($sunday), 1, 'Sunday is a closed day' );   # wee free test;
-is( $cal->is_holiday($monday),     0, 'Monday is not a closed day' );    # alas
-is( $cal->is_holiday($bloomsday),  1, 'month/day closed day test' );
-is( $cal->is_holiday($special),    1, 'special closed day test' );
-is( $cal->is_holiday($notspecial), 0, 'open day test' );
+my $sunday_exception = DateTime->new(
+    year      => 2012,
+    month     => 11,
+    day       => 11
+);
 
-my $dt = $cal->addDate( $saturday, 1, 'days' );
-is( $dt->day_of_week, 1, 'addDate skips closed Sunday' );
+my $day_after_christmas = DateTime->new(
+    year    => 2012,
+    month   => 12,
+    day     => 26
+);  # for testing negative addDate
 
-$dt = $cal->addDate( $bloomsday, -1 );
-is( $dt->ymd(), '2011-06-15', 'Negative call to addDate' );
 
-my $test_dt = DateTime->new(    # Monday
-    year      => 2012,
-    month     => 7,
-    day       => 23,
-    hour      => 11,
-    minute    => 53,
-    time_zone => 'Europe/London',
-);
+{   # Syspref-agnostic tests
+    is ( $saturday->day_of_week, 6, '\'$saturday\' is actually a saturday (6th day of week)');
+    is ( $sunday->day_of_week, 7, '\'$sunday\' is actually a sunday (7th day of week)');
+    is ( $monday->day_of_week, 1, '\'$monday\' is actually a monday (1st day of week)');
+    is ( $cal->is_holiday($saturday), 1, 'Saturday is a closed day' );
+    is ( $cal->is_holiday($sunday), 1, 'Sunday is a closed day' );
+    is ( $cal->is_holiday($monday), 0, 'Monday is not a closed day' );
+    is ( $cal->is_holiday($new_year), 1, 'Month/Day closed day test (New year\'s day)' );
+    is ( $cal->is_holiday($single_holiday), 1, 'Single holiday closed day test' );
+    is ( $cal->is_holiday($notspecial), 0, 'Fixed single date that is not a holiday test' );
+    is ( $cal->is_holiday($sunday_exception), 0, 'Exception holiday is not a closed day test' );
+}
 
-my $later_dt = DateTime->new(    # Monday
-    year      => 2012,
-    month     => 9,
-    day       => 17,
-    hour      => 17,
-    minute    => 30,
-    time_zone => 'Europe/London',
-);
 
-my $daycount = $cal->days_between( $test_dt, $later_dt );
-cmp_ok( $daycount->in_units('days'),
-    '==', 48, 'days_between calculates correctly' );
-
-my $ret = $cal->addDate( $test_dt, 1, 'days' );
-
-cmp_ok( $ret->ymd(), 'eq', '2012-07-24', 'Simple Single Day Add (Calendar)' );
-
-$ret = $cal->addDate( $test_dt, 7, 'days' );
-cmp_ok( $ret->ymd(), 'eq', '2012-07-31', 'Add 7 days Calendar mode' );
-$cal->set_daysmode('Datedue');
-$ret = $cal->addDate( $test_dt, 7, 'days' );
-cmp_ok( $ret->ymd(), 'eq', '2012-07-30', 'Add 7 days Datedue mode' );
-$cal->set_daysmode('Days');
-$ret = $cal->addDate( $test_dt, 7, 'days' );
-cmp_ok( $ret->ymd(), 'eq', '2012-07-30', 'Add 7 days Days mode' );
-$cal->set_daysmode('Calendar');
-
-# see bugzilla #8966
-is( $cal->is_holiday($later_dt), 0, 'is holiday for the next test' );
-cmp_ok( $later_dt, 'eq', '2012-09-17T17:30:00', 'Date should be the same after is_holiday' );
-
-# example tests for bug report
-$cal->clear_weekly_closed_days();
-
-$daycount = $cal->days_between( dt_from_string('2012-01-10','iso'),
-    dt_from_string("2012-05-05",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 116, 'test larger intervals' );
-$daycount = $cal->days_between( dt_from_string("2012-01-01",'iso'),
-    dt_from_string("2012-05-05",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 125, 'test positive intervals' );
-my $daycount2 = $cal->days_between( dt_from_string("2012-05-05",'iso'),
-    dt_from_string("2012-01-01",'iso') )->in_units('days');
-cmp_ok( $daycount2, '==', $daycount, 'test parameter order not relevant' );
-$daycount = $cal->days_between( dt_from_string("2012-07-01",'iso'),
-    dt_from_string("2012-07-15",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 14, 'days_between calculates correctly' );
-$cal->add_holiday( dt_from_string('2012-07-06','iso') );
-$daycount = $cal->days_between( dt_from_string("2012-07-01",'iso'),
-    dt_from_string("2012-07-15",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 13, 'holiday correctly recognized' );
-
-$cal->add_holiday( dt_from_string('2012-07-07','iso') );
-$daycount = $cal->days_between( dt_from_string("2012-07-01",'iso'),
-    dt_from_string("2012-07-15",'iso') )->in_units('days');
-cmp_ok( $daycount, '==', 12, 'multiple holidays correctly recognized' );
+{   # Bugzilla #8966 - is_holiday truncates referenced date
+    my $later_dt = DateTime->new(    # Monday
+        year      => 2012,
+        month     => 9,
+        day       => 17,
+        hour      => 17,
+        minute    => 30,
+        time_zone => 'Europe/London',
+    );
+
+
+    is( $cal->is_holiday($later_dt), 0, 'bz-8966 (1/2) Apply is_holiday for the next test' );
+    cmp_ok( $later_dt, 'eq', '2012-09-17T17:30:00', 'bz-8966 (2/2) Date should be the same after is_holiday' );
+}
+
+
+{   # Bugzilla #8800 - is_holiday should use truncated date for 'contains' call
+    my $single_holiday_time = DateTime->new(
+        year  => 2011,
+        month => 6,
+        day   => 1,
+        hour  => 11,
+        minute  => 2
+    );
+
+    is( $cal->is_holiday($single_holiday_time),
+        $cal->is_holiday($single_holiday) ,
+        'bz-8800 is_holiday should truncate the date for holiday validation' );
+}
+
+
+    my $one_day_dur = DateTime::Duration->new( days => 1 );
+    my $two_day_dur = DateTime::Duration->new( days => 2 );
+    my $seven_day_dur = DateTime::Duration->new( days => 7 );
+
+    my $dt = dt_from_string( '2012-07-03','iso' );
+    my $test_dt = DateTime->new(    # Monday
+        year      => 2012,
+        month     => 7,
+        day       => 23,
+        hour      => 11,
+        minute    => 53,
+    );
+
+    my $later_dt = DateTime->new(    # Monday
+        year      => 2012,
+        month     => 9,
+        day       => 17,
+        hour      => 17,
+        minute    => 30,
+        time_zone => 'Europe/London',
+    );
+
+
+{    ## 'Datedue' tests
+
+    $module_context->unmock('preference');
+    $module_context->mock(
+        'preference',
+        sub {
+            return 'Datedue';
+        }
+    );
+    # rewind dbh session
+    $holidays_session->reset;
+
+
+    $cal = Koha::Calendar->new( branchcode => 'MPL' );
+
+    is($cal->addDate( $dt, $one_day_dur, 'days' ),
+        dt_from_string('2012-07-05','iso'),
+        'Single day add (Datedue, matches holiday, shift)' );
+
+    is($cal->addDate( $dt, $two_day_dur, 'days' ),
+        dt_from_string('2012-07-05','iso'),
+        'Two days add, skips holiday (Datedue)' );
+
+    cmp_ok($cal->addDate( $test_dt, $seven_day_dur, 'days' ), 'eq',
+        '2012-07-30T11:53:00',
+        'Add 7 days (Datedue)' );
+
+    is( $cal->addDate( $saturday, $one_day_dur, 'days' )->day_of_week, 1,
+        'addDate skips closed Sunday (Datedue)' );
+
+    is( $cal->addDate($day_after_christmas, -1, 'days')->ymd(), '2012-12-24',
+        'Negative call to addDate (Datedue)' );
+
+    ## Note that the days_between API says closed days are not considered.
+    ## This tests are here as an API test.
+    cmp_ok( $cal->days_between( $test_dt, $later_dt )->in_units('days'),
+                '==', 40, 'days_between calculates correctly (Days)' );
+
+    cmp_ok( $cal->days_between( $later_dt, $test_dt )->in_units('days'),
+                '==', 40, 'Test parameter order not relevant (Days)' );
+
+
+}
+
+
+{   ## 'Calendar' tests'
+
+    $module_context->unmock('preference');
+    $module_context->mock(
+        'preference',
+        sub {
+            return 'Calendar';
+        }
+    );
+    # rewind dbh session
+    $holidays_session->reset;
+
+    $cal = Koha::Calendar->new( branchcode => 'MPL' );
+
+    $dt = dt_from_string('2012-07-03','iso');
+
+    is($cal->addDate( $dt, $one_day_dur, 'days' ),
+        dt_from_string('2012-07-05','iso'),
+        'Single day add (Calendar)' );
+
+    cmp_ok($cal->addDate( $test_dt, $seven_day_dur, 'days' ), 'eq',
+       '2012-08-01T11:53:00',
+       'Add 7 days (Calendar)' );
+
+    is( $cal->addDate( $saturday, $one_day_dur, 'days' )->day_of_week, 1,
+            'addDate skips closed Sunday (Calendar)' );
+
+    is( $cal->addDate($day_after_christmas, -1, 'days')->ymd(), '2012-12-24',
+            'Negative call to addDate (Calendar)' );
+
+    cmp_ok( $cal->days_between( $test_dt, $later_dt )->in_units('days'),
+                '==', 40, 'days_between calculates correctly (Calendar)' );
+
+    cmp_ok( $cal->days_between( $later_dt, $test_dt )->in_units('days'),
+                '==', 40, 'Test parameter order not relevant (Calendar)' );
+}
+
+
+{   ## 'Days' tests
+    $module_context->unmock('preference');
+    $module_context->mock(
+        'preference',
+        sub {
+            return 'Days';
+        }
+    );
+    # rewind dbh session
+    $holidays_session->reset;
+
+    $cal = Koha::Calendar->new( branchcode => 'MPL' );
+
+    $dt = dt_from_string('2012-07-03','iso');
+
+    is($cal->addDate( $dt, $one_day_dur, 'days' ),
+        dt_from_string('2012-07-04','iso'),
+        'Single day add (Days)' );
+
+    cmp_ok($cal->addDate( $test_dt, $seven_day_dur, 'days' ),'eq',
+        '2012-07-30T11:53:00',
+        'Add 7 days (Days)' );
+
+    is( $cal->addDate( $saturday, $one_day_dur, 'days' )->day_of_week, 7,
+        'addDate doesn\'t skip closed Sunday (Days)' );
+
+    is( $cal->addDate($day_after_christmas, -1, 'days')->ymd(), '2012-12-25',
+        'Negative call to addDate (Days)' );
+
+    ## Note that the days_between API says closed days are not considered.
+    ## This tests are here as an API test.
+    cmp_ok( $cal->days_between( $test_dt, $later_dt )->in_units('days'),
+                '==', 40, 'days_between calculates correctly (Days)' );
+
+    cmp_ok( $cal->days_between( $later_dt, $test_dt )->in_units('days'),
+                '==', 40, 'Test parameter order not relevant (Days)' );
+
+}
+
+} # End SKIP block
index 80058bb..5a4a5b1 100644 (file)
@@ -29,7 +29,7 @@ REAL_REWRITE_SCRIPT = ../rewrite-config.PL
 ZEBRA_CONF_DIR = run/etc/zebradb
 ZEBRA_CONF_FILES = $(ZEBRA_CONF_DIR)/etc/passwd $(ZEBRA_CONF_DIR)/zebra-biblios.cfg $(ZEBRA_CONF_DIR)/zebra-authorities.cfg $(ZEBRA_CONF_DIR)/zebra-authorities-dom.cfg $(ZEBRA_CONF_DIR)/explain-authorities.xml $(ZEBRA_CONF_DIR)/explain-biblios.xml $(ZEBRA_CONF_DIR)/retrieval-info-auth-grs1.xml $(ZEBRA_CONF_DIR)/retrieval-info-auth-dom.xml $(ZEBRA_CONF_DIR)/ccl.properties $(ZEBRA_CONF_DIR)/cql.properties $(ZEBRA_CONF_DIR)/pqf.properties
 
-SCRIPTS = koha-zebra-ctl.sh koha-pazpar2-ctl.sh
+SCRIPTS = koha-zebra-ctl.sh koha-pazpar2-ctl.sh koha-index-daemon-ctl.sh
 SRC_SCRIPT_DIR = ../misc/bin
 TEST_SCRIPT_DIR = run/bin
 
index 5aba165..152fc53 100755 (executable)
@@ -37,7 +37,7 @@ my $dbh = C4::Context->dbh();
 
 $dbh->{mock_add_resultset} = $members_attributetypes;
 
-my @members_attributetypes = C4::Members::AttributeTypes::GetAttributeTypes();
+my @members_attributetypes = C4::Members::AttributeTypes::GetAttributeTypes(undef, 1);
 
 is( $members_attributetypes[0]->{'code'}, 'one', 'First code value is one' );
 
index 5105e84..32ea441 100755 (executable)
@@ -23,6 +23,11 @@ ok($koha = C4::Context->new,  'C4::Context->new');
 ok($dbh = C4::Context->dbh(), 'Getting dbh from C4::Context');
 ok($ret = C4::Context->KOHAVERSION, '  (function)  KOHAVERSION = ' . ($ret||''));
 ok($ret =       $koha->KOHAVERSION, '       $koha->KOHAVERSION = ' . ($ret||''));
+ok(
+    TransformVersionToNum( C4::Context->final_linear_version ) <=
+      TransformVersionToNum( C4::Context->KOHAVERSION ),
+    'Final linear version is less than or equal to kohaversion.pl'
+);
 my @keys = keys %$koha;
 diag("Number of keys in \%\$koha: " . scalar @keys); 
 our $width = 0;
@@ -104,4 +109,16 @@ is(scalar(@{$history}), 0, 'Did not retrieve syspref from database');
 
 done_testing();
 
+sub TransformVersionToNum {
+    my $version = shift;
+
+    # remove the 3 last . to have a Perl number
+    $version =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/;
+
+    # three X's at the end indicate that you are testing patch with dbrev
+    # change it into 999
+    # prevents error on a < comparison between strings (should be: lt)
+    $version =~ s/XXX$/999/;
+    return $version;
+}
 1;
diff --git a/t/db_dependent/Koha_borrower_modifications.t b/t/db_dependent/Koha_borrower_modifications.t
new file mode 100755 (executable)
index 0000000..9849502
--- /dev/null
@@ -0,0 +1,125 @@
+#!/usr/bin/perl
+
+use Modern::Perl;
+use Test::More tests => 14;
+
+use C4::Context;
+use C4::Members;
+
+use Koha::Borrower::Modifications;
+
+C4::Context->dbh->do("TRUNCATE TABLE borrower_modifications");
+
+## Create new pending modification
+Koha::Borrower::Modifications->new( verification_token => '1234567890' )
+  ->AddModifications( { surname => 'Hall', firstname => 'Kyle' } );
+
+## Get the new pending modification
+my $borrower = Koha::Borrower::Modifications->GetModifications(
+    { verification_token => '1234567890' } );
+
+## Verify we get the same data
+ok( $borrower->{'surname'} = 'Hall',
+    'Test AddModifications() and GetModifications()' );
+
+## Check the Verify method
+ok(
+    Koha::Borrower::Modifications->Verify('1234567890'),
+    'Test that Verify() succeeds with a valid token'
+);
+
+## Delete the pending modification
+$borrower = Koha::Borrower::Modifications->DelModifications(
+    { verification_token => '1234567890' } );
+
+## Verify it's no longer in the database
+$borrower = Koha::Borrower::Modifications->GetModifications(
+    { verification_token => '1234567890' } );
+ok( !defined( $borrower->{'surname'} ), 'Test DelModifications()' );
+
+## Check the Verify method
+ok(
+    !Koha::Borrower::Modifications->Verify('1234567890'),
+    'Test that Verify() method fails for a bad token'
+);
+
+## Create new pending modification, but for an existing borrower
+Koha::Borrower::Modifications->new( borrowernumber => '2' )
+  ->AddModifications( { surname => 'Hall', firstname => 'Kyle' } );
+
+## Test the counter
+ok( Koha::Borrower::Modifications->GetPendingModificationsCount() == 1,
+    'Test GetPendingModificationsCount()' );
+
+## Create new pending modification for another existing borrower
+Koha::Borrower::Modifications->new( borrowernumber => '3' )
+  ->AddModifications( { surname => 'Smith', firstname => 'Sandy' } );
+
+## Test the counter
+ok(
+    Koha::Borrower::Modifications->GetPendingModificationsCount() == 2,
+'Add a new pending modification and test GetPendingModificationsCount() again'
+);
+
+## Check GetPendingModifications
+my $pending = Koha::Borrower::Modifications->GetPendingModifications();
+ok(
+    $pending->[0]->{'firstname'} eq 'Sandy',
+    'Test GetPendingModifications() again'
+);
+ok( $pending->[1]->{'firstname'} eq 'Kyle', 'Test GetPendingModifications()' );
+
+## This should delete the row from the table
+Koha::Borrower::Modifications->DenyModifications('3');
+
+## Test the counter
+ok( Koha::Borrower::Modifications->GetPendingModificationsCount() == 1,
+    'Test DenyModifications()' );
+
+## Save a copy of the borrowers original data
+my $old_borrower = GetMember( borrowernumber => '2' );
+
+## Apply the modifications
+Koha::Borrower::Modifications->ApproveModifications('2');
+
+## Test the counter
+ok(
+    Koha::Borrower::Modifications->GetPendingModificationsCount() == 0,
+    'Test ApproveModifications() removes pending modification from db'
+);
+
+## Get a copy of the borrowers current data
+my $new_borrower = GetMember( borrowernumber => '2' );
+
+## Check to see that the approved modifications were saved
+ok( $new_borrower->{'surname'} eq 'Hall',
+    'Test ApproveModifications() applys modification to borrower' );
+
+## Now let's put it back the way it was
+Koha::Borrower::Modifications->new( borrowernumber => '2' )->AddModifications(
+    {
+        surname   => $old_borrower->{'surname'},
+        firstname => $old_borrower->{'firstname'}
+    }
+);
+
+## Test the counter
+ok( Koha::Borrower::Modifications->GetPendingModificationsCount() == 1,
+    'Test GetPendingModificationsCount()' );
+
+## Apply the modifications
+Koha::Borrower::Modifications->ApproveModifications('2');
+
+## Test the counter
+ok(
+    Koha::Borrower::Modifications->GetPendingModificationsCount() == 0,
+    'Test ApproveModifications() removes pending modification from db, again'
+);
+
+$new_borrower = GetMember( borrowernumber => '2' );
+
+## Test to verify the borrower has been updated with the original values
+ok(
+    $new_borrower->{'surname'} eq $old_borrower->{'surname'},
+    'Test ApproveModifications() applys modification to borrower, again'
+);
index 601c48f..f69e1cb 100644 (file)
@@ -818,7 +818,7 @@ sub stop_zebrasrv {
 
 sub start_zebraqueue_daemon {
 
-    my $command = q(echo "zebraqueue_daemon is deprecated");
+    my $command = q(run/bin/koha-index-daemon-ctl.sh start);
     diag $command;
     my $started = system( $command );
     diag "started: $started";
@@ -832,7 +832,7 @@ sub start_zebraqueue_daemon {
 
 sub stop_zebraqueue_daemon {
 
-    my $command = q(echo "zebraqueue_daemon is deprecated");
+    my $command = q(run/bin/koha-index-daemon-ctl.sh stop);
     diag $command;
     my $started = system( $command );
     diag "started: $started";
index dfde7da..ea12cb7 100644 (file)
@@ -48,7 +48,7 @@ sub methods : Test( 1 ) {
                       GetPatronImage 
                       PutPatronImage 
                       RmPatronImage 
-                      GetBorrowersWhoHaveNotBorrowedSince 
+                      GetBorrowersToExpunge
                       GetBorrowersWhoHaveNeverBorrowed 
                       GetBorrowersWithIssuesHistoryOlderThan 
                       GetBorrowersNamesAndLatestIssue 
index 2c68bd3..2a87b88 100755 (executable)
@@ -266,7 +266,13 @@ if ($op eq "show"){
 # now, build the item form for entering a new item
 my @loop_data =();
 my $i=0;
-my $authorised_values_sth = $dbh->prepare("SELECT authorised_value,lib FROM authorised_values WHERE category=? ORDER BY lib");
+my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
+my $query = qq{SELECT authorised_value, lib FROM authorised_values};
+$query  .= qq{ LEFT JOIN authorised_values_branches ON ( id = av_id ) } if $branch_limit;
+$query  .= qq{ WHERE category = ?};
+$query  .= qq{ AND ( branchcode = ? OR branchcode IS NULL ) } if $branch_limit;
+$query  .= qq{ GROUP BY lib ORDER BY lib, lib_opac};
+my $authorised_values_sth = $dbh->prepare( $query );
 
 my $branches = GetBranchesLoop();  # build once ahead of time, instead of multiple times later.
 
@@ -359,7 +365,7 @@ foreach my $tag (sort keys %{$tagslib}) {
       }
       else {
           push @authorised_values, ""; # unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
-          $authorised_values_sth->execute( $tagslib->{$tag}->{$subfield}->{authorised_value} );
+          $authorised_values_sth->execute( $tagslib->{$tag}->{$subfield}->{authorised_value}, $branch_limit ? $branch_limit : () );
           while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
               push @authorised_values, $value;
               $authorised_lib{$value} = $lib;
@@ -427,6 +433,8 @@ foreach my $tag (sort keys %{$tagslib}) {
     $i++
   }
 } # -- End foreach tag
+$authorised_values_sth->finish;
+
 
 
     # what's the next op ? it's what we are not in : an add if we're editing, otherwise, and edit.
index 0b37c20..e350b9d 100755 (executable)
@@ -17,7 +17,6 @@
 #
 #   Written by Antoine Farnault antoine@koha-fr.org on Nov. 2006.
 
-
 =head1 cleanborrowers.pl
 
 This script allows to do 2 things.
@@ -33,6 +32,7 @@ This script allows to do 2 things.
 =cut
 
 use strict;
+
 #use warnings; FIXME - Bug 2505
 use CGI;
 use C4::Auth;
@@ -40,7 +40,7 @@ use C4::Output;
 use C4::Dates qw/format_date format_date_in_iso/;
 use C4::Members;        # GetBorrowersWhoHavexxxBorrowed.
 use C4::Circulation;    # AnonymiseIssueHistory.
-use C4::VirtualShelves (); #no import
+use C4::VirtualShelves ();    #no import
 use Date::Calc qw/Today Add_Delta_YM/;
 
 my $cgi = new CGI;
@@ -51,13 +51,14 @@ my $cgi = new CGI;
 #  * multivalued CGI paramaters are returned as a packaged string separated by "\0" (null)
 my $params = $cgi->Vars;
 
-my $filterdate1;               # the date which filter on issue history.
-my $filterdate2;               # the date which filter on borrowers last issue.
+my $filterdate1;              # the date which filter on issue history.
+my $filterdate2;              # the date which filter on borrowers last issue.
+my $borrower_dateexpiry;
+my $borrower_categorycode;
 
 # getting the template
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => "tools/cleanborrowers.tmpl",
+    {   template_name   => "tools/cleanborrowers.tmpl",
         query           => $cgi,
         type            => "intranet",
         authnotrequired => 0,
@@ -66,67 +67,74 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 );
 
 if ( $params->{'step2'} ) {
-    $filterdate1 = format_date_in_iso($params->{'filterdate1'});
-    $filterdate2 = format_date_in_iso($params->{'filterdate2'});
+    $filterdate1           = format_date_in_iso( $params->{'filterdate1'} );
+    $filterdate2           = format_date_in_iso( $params->{'filterdate2'} );
+    $borrower_dateexpiry   = format_date_in_iso( $params->{'borrower_dateexpiry'} );
+    $borrower_categorycode = $params->{'borrower_categorycode'};
+
     my %checkboxes = map { $_ => 1 } split /\0/, $params->{'checkbox'};
 
     my $totalDel;
     my $membersToDelete;
-    if ($checkboxes{borrower}) {
-        $membersToDelete = GetBorrowersWhoHaveNotBorrowedSince($filterdate1, 1);
+    if ( $checkboxes{borrower} ) {
+        $membersToDelete =
+          GetBorrowersToExpunge( { not_borrowered_since => $filterdate1, expired_before => $borrower_dateexpiry, category_code => $borrower_categorycode } );
         $totalDel = scalar @$membersToDelete;
-            
+
     }
     my $totalAno;
     my $membersToAnonymize;
-    if ($checkboxes{issue}) {
-        $membersToAnonymize =
-          GetBorrowersWithIssuesHistoryOlderThan($filterdate2);
-        $totalAno = scalar @$membersToAnonymize;
+    if ( $checkboxes{issue} ) {
+        $membersToAnonymize = GetBorrowersWithIssuesHistoryOlderThan($filterdate2);
+        $totalAno           = scalar @$membersToAnonymize;
     }
 
     $template->param(
-        step2            => 1,
-        totalToDelete    => $totalDel,
-        totalToAnonymize => $totalAno,
-        memberstodelete_list => $membersToDelete,    
-        memberstoanonymize_list => $membersToAnonymize,    
-        filterdate1      => format_date($filterdate1),
-        filterdate2      => format_date($filterdate2),
+        step2                   => 1,
+        totalToDelete           => $totalDel,
+        totalToAnonymize        => $totalAno,
+        memberstodelete_list    => $membersToDelete,
+        memberstoanonymize_list => $membersToAnonymize,
+        filterdate1             => format_date($filterdate1),
+        filterdate2             => format_date($filterdate2),
+        borrower_dateexpiry     => $borrower_dateexpiry,
+        borrower_categorycode   => $borrower_categorycode,
     );
-### TODO : Use GetBorrowersNamesAndLatestIssue function in order to get the borrowers to delete or anonymize.
-### Now, we are only using total, which is not enough imlo
-    #writing the template
+
+    ### TODO : Use GetBorrowersNamesAndLatestIssue function in order to get the borrowers to delete or anonymize.
     output_html_with_http_headers $cgi, $cookie, $template->output;
     exit;
 }
 
 if ( $params->{'step3'} ) {
-    $filterdate1 = format_date_in_iso($params->{'filterdate1'});
-    $filterdate2 = format_date_in_iso($params->{'filterdate2'});
+    $filterdate1           = format_date_in_iso( $params->{'filterdate1'} );
+    $filterdate2           = format_date_in_iso( $params->{'filterdate2'} );
+    $borrower_dateexpiry   = format_date_in_iso( $params->{'borrower_dateexpiry'} );
+    $borrower_categorycode = $params->{'borrower_categorycode'};
+
     my $do_delete = $params->{'do_delete'};
     my $do_anonym = $params->{'do_anonym'};
 
     my ( $totalDel, $totalAno, $radio ) = ( 0, 0, 0 );
-    
+
     # delete members
     if ($do_delete) {
-        my $membersToDelete = GetBorrowersWhoHaveNotBorrowedSince($filterdate1, 1);
+        my $membersToDelete =
+          GetBorrowersToExpunge( { not_borrowered_since => $filterdate1, expired_before => $borrower_dateexpiry, category_code => $borrower_categorycode } );
         $totalDel = scalar(@$membersToDelete);
         $radio    = $params->{'radio'};
         if ( $radio eq 'trash' ) {
             my $i;
             for ( $i = 0 ; $i < $totalDel ; $i++ ) {
                 MoveMemberToDeleted( $membersToDelete->[$i]->{'borrowernumber'} );
-                C4::VirtualShelves::HandleDelBorrower($membersToDelete->[$i]->{'borrowernumber'});
+                C4::VirtualShelves::HandleDelBorrower( $membersToDelete->[$i]->{'borrowernumber'} );
                 DelMember( $membersToDelete->[$i]->{'borrowernumber'} );
             }
-        }
-        else {    # delete completly.
+        } else {    # delete completly.
             my $i;
             for ( $i = 0 ; $i < $totalDel ; $i++ ) {
-                C4::VirtualShelves::HandleDelBorrower($membersToDelete->[$i]->{'borrowernumber'});
-                DelMember($membersToDelete->[$i]->{'borrowernumber'});
+                C4::VirtualShelves::HandleDelBorrower( $membersToDelete->[$i]->{'borrowernumber'} );
+                DelMember( $membersToDelete->[$i]->{'borrowernumber'} );
             }
         }
         $template->param(
@@ -134,7 +142,7 @@ if ( $params->{'step3'} ) {
             TotalDel  => $totalDel
         );
     }
-    
+
     # Anonymising all members
     if ($do_anonym) {
         $totalAno = AnonymiseIssueHistory($filterdate2);
@@ -143,7 +151,7 @@ if ( $params->{'step3'} ) {
             do_anonym   => '1',
         );
     }
-    
+
     $template->param(
         step3 => '1',
         trash => ( $radio eq "trash" ) ? (1) : (0),
@@ -154,16 +162,12 @@ if ( $params->{'step3'} ) {
     exit;
 }
 
-#default value set to the template are the 'CNIL' value.
-my ( $year, $month, $day ) = &Today();
-$filterdate1 = format_date(sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YM($year, $month, $day, -1, 0)));
-$filterdate2 = format_date(sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YM($year, $month, $day, 0, -3)));
-
 $template->param(
-    step1       => '1',
-    filterdate1 => $filterdate1,
-    filterdate2 => $filterdate2,
+    step1                    => '1',
+    filterdate1              => $filterdate1,
+    filterdate2              => $filterdate2,
     DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+    borrower_categorycodes   => GetBorrowercategoryList(),
 );
 
 #writing the template
index c7a8fd8..0415a3a 100755 (executable)
@@ -22,7 +22,7 @@ use Getopt::Long;
 use CGI;
 use C4::Auth;
 use C4::AuthoritiesMarc;    # GetAuthority
-use C4::Biblio;             # GetMarcBiblio GetXmlBiblio
+use C4::Biblio;             # GetMarcBiblio
 use C4::Branch;             # GetBranches
 use C4::Csv;
 use C4::Koha;               # GetItemTypes
index 83db522..78353c9 100755 (executable)
@@ -304,7 +304,7 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) {
 } else {
     if ($extended) {
         my @matchpoints = ();
-        my @attr_types = C4::Members::AttributeTypes::GetAttributeTypes();
+        my @attr_types = C4::Members::AttributeTypes::GetAttributeTypes(undef, 1);
         foreach my $type (@attr_types) {
             my $attr_type = C4::Members::AttributeTypes->fetch($type->{code});
             if ($attr_type->unique_id()) {