Merge remote-tracking branch 'origin/new/bug_6328'
authorPaul Poulain <paul.poulain@biblibre.com>
Thu, 19 Jan 2012 15:50:49 +0000 (16:50 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 19 Jan 2012 15:50:49 +0000 (16:50 +0100)
345 files changed:
C4/Accounts.pm
C4/Acquisition.pm
C4/Auth.pm
C4/Auth_with_ldap.pm
C4/AuthoritiesMarc.pm
C4/Biblio.pm
C4/Circulation.pm
C4/Context.pm
C4/Creators/Layout.pm
C4/Dates.pm
C4/ILSDI/Services.pm
C4/ILSDI/Utility.pm
C4/ImportExportFramework.pm
C4/Installer.pm
C4/Items.pm
C4/Koha.pm
C4/Labels/Label.pm
C4/Letters.pm
C4/Members.pm
C4/Output.pm
C4/Overdues.pm
C4/Print.pm
C4/Record.pm
C4/Reserves.pm
C4/Review.pm
C4/SIP/ILS/Patron.pm
C4/SIP/t/SIPtest.pm
C4/SQLHelper.pm
C4/Search.pm
C4/Serials.pm
C4/Suggestions.pm
C4/Tags.pm
C4/Templates.pm
C4/VirtualShelves/Page.pm
C4/XSLT.pm
INSTALL.opensuse
Koha/Template/Plugin/KohaDates.pm [new file with mode: 0644]
about.pl
acqui/addorder.pl
acqui/basket.pl
acqui/ordered.pl [new file with mode: 0755]
acqui/orderreceive.pl
acqui/spent.pl [new file with mode: 0755]
admin/preferences.pl
admin/systempreferences.pl
authorities/authorities.pl
catalogue/ISBDdetail.pl
catalogue/MARCdetail.pl
catalogue/detail.pl
catalogue/export.pl
catalogue/issuehistory.pl
catalogue/moredetail.pl
catalogue/search.pl
catalogue/showmarc.pl
catalogue/updateitem.pl
cataloguing/addbiblio.pl
cataloguing/addbooks.pl
cataloguing/additem.pl
cataloguing/merge.pl
cataloguing/plugin_launcher.pl
cataloguing/value_builder/stocknumber.pl
cataloguing/value_builder/unimarc_field_210c.pl
cataloguing/value_builder/unimarc_field_4XX.pl
cataloguing/ysearch.pl
circ/branchtransfers.pl
circ/circulation.pl
circ/overdue.pl
circ/returns.pl
debian/docs/LEEME.Debian [new file with mode: 0644]
debian/koha-common.docs [new file with mode: 0644]
debian/scripts/koha-create-dirs
debian/scripts/koha-remove
debian/scripts/koha-restore
debian/templates/koha-conf-site.xml.in
docs/history.txt
etc/koha-httpd.conf
etc/zebradb/ccl.properties
etc/zebradb/etc/word-phrase-utf.chr
etc/zebradb/lang_defs/fr/sort-string-utf.chr
etc/zebradb/marc_defs/marc21/biblios/record.abs
etc/zebradb/zebra-biblios.cfg
help.pl
installer/InstallAuth.pm
installer/data/mysql/de-DE/mandatory/sample_notices_message_attributes.sql
installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
installer/data/mysql/es-ES/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
installer/data/mysql/fr-FR/1-Obligatoire/sample_notices_message_attributes.sql
installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql
installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_simple_bib_frameworks.sql
installer/data/mysql/it-IT/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
installer/data/mysql/it-IT/marcflavour/unimarc/necessari/unimarc_framework.sql
installer/data/mysql/it-IT/necessari/sample_itemtypes.sql
installer/data/mysql/kohastructure.sql
installer/data/mysql/nb-NO/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql [new file with mode: 0644]
installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.txt [new file with mode: 0644]
installer/data/mysql/pl-PL/mandatory/sample_notices_message_attributes.sql
installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
installer/data/mysql/ru-RU/mandatory/sample_notices_message_attributes.sql
installer/data/mysql/sysprefs.sql
installer/data/mysql/uk-UA/mandatory/sample_notices_message_attributes.sql
installer/data/mysql/updatedatabase.pl
installer/install.pl
koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.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-menu.inc
koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt
koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/date-format.inc
koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc
koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc
koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.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/additem.js
koha-tmpl/intranet-tmpl/prog/en/js/tinymce/changelog
koha-tmpl/intranet-tmpl/prog/en/js/tinymce/jscripts/tiny_mce/themes/advanced/css/editor_content.css
koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/lib/yui/calendar/calendar-debug.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/calendar/calendar.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/dragdrop/dragdrop-debug.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/dragdrop/dragdrop.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/editor/editor-debug.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/editor/editor.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/editor/simpleeditor-debug.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/editor/simpleeditor.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/get/get-debug.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/get/get.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu/menu-debug.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu/menu.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/yahoo/yahoo-debug.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/yahoo/yahoo.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/yuiloader/yuiloader-debug.js
koha-tmpl/intranet-tmpl/prog/en/lib/yui/yuiloader/yuiloader.js
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt [new file with mode: 0644]
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/spent.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.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/patron-attr-types.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/members/memberentry.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/manage-marc-import.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/overduerules.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/picture-upload.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/scheduler.tt
koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2ATOM.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2DC.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS32.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2OAIDC.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2RDFDC.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2RDFDC.xsl.1
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2RSS2.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2SRWDC.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim9522852.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils-MODS31.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils2.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2OAIDC.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/identity.xsl
koha-tmpl/intranet-tmpl/prog/en/xslt/oilsMARC21slim2HTML.xsl
koha-tmpl/intranet-tmpl/prog/img/alert-bg.gif [deleted file]
koha-tmpl/intranet-tmpl/prog/img/bg-tab.png [deleted file]
koha-tmpl/intranet-tmpl/prog/img/button-bg.gif [deleted file]
koha-tmpl/intranet-tmpl/prog/img/dialog-bg.gif [deleted file]
koha-tmpl/intranet-tmpl/prog/img/fade-butt.png [deleted file]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival lDVD.gif [deleted file]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/7Day_book.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/juvenile_book.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/noncirc_book.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/noncirc_dvd.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/reserve_book.gif [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/img/message-bg.gif [deleted file]
koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient-hover.gif [deleted file]
koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient.gif [deleted file]
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/css/print.css
koha-tmpl/opac-tmpl/prog/en/includes/calendar.inc
koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc
koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc
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-messaging.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-opensearch.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.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-showreviews.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACMARCdetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACResults.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslimUtils.xsl
koha-tmpl/opac-tmpl/prog/en/xslt/compact.xsl
koha-tmpl/opac-tmpl/prog/images/alert-bg.gif [deleted file]
koha-tmpl/opac-tmpl/prog/images/listmenu-container-bg.gif [deleted file]
koha-tmpl/opac-tmpl/prog/images/menu-background.gif [deleted file]
koha-tmpl/opac-tmpl/prog/images/message-bg.gif [deleted file]
koha-tmpl/opac-tmpl/prog/images/side-tab-gradient-hover.gif [deleted file]
koha-tmpl/opac-tmpl/prog/images/side-tab-gradient.gif [deleted file]
koha-tmpl/opac-tmpl/prog/images/submit-bg.gif [deleted file]
koha-tmpl/opac-tmpl/prog/itemtypeimg/Seshat/archival lDVD.gif [deleted file]
koha-tmpl/opac-tmpl/prog/itemtypeimg/Seshat/archivalDVD.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/7Day_book.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/juvenile_book.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/noncirc_book.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/noncirc_dvd.gif [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/reserve_book.gif [new file with mode: 0644]
koha_perl_deps.pl
kohaversion.pl
labels/label-create-csv.pl
mainpage.pl
members/memberentry.pl
misc/cronjobs/cleanup_database.pl
misc/cronjobs/longoverdue.pl
misc/cronjobs/notifyMailsOp.pl [deleted file]
misc/cronjobs/overdue_notices.pl
misc/load_testing/benchmark_staff.pl [new file with mode: 0644]
misc/migration_tools/build6xx.pl
misc/migration_tools/rebuild_zebra.pl
misc/release_notes/release_notes_200RC2.txt
misc/release_notes/release_notes_200RC3.txt
misc/release_notes/release_notes_210.txt
misc/release_notes/release_notes_211.txt
misc/release_notes/release_notes_220.txt
misc/release_notes/release_notes_221.txt
misc/release_notes/release_notes_222.txt
misc/release_notes/release_notes_223.txt
misc/release_notes/release_notes_22RC1.txt
misc/release_notes/release_notes_22RC2.txt
misc/release_notes/release_notes_22RC3.txt
misc/release_notes/release_notes_22RC4.txt
misc/release_notes/release_notes_22RC5.txt
misc/release_notes/release_notes_3_6_0.txt
misc/stage_biblios_file.pl
misc/translator/translate
opac/opac-detail.pl
opac/opac-search.pl
opac/opac-sendbasket.pl
opac/opac-sendshelf.pl
opac/opac-showreviews.pl
opac/opac-topissues.pl
opac/opac-user.pl
opac/opac-userupdate.pl
reports/acquisitions_stats.pl
reports/issues_by_borrower_category.plugin
reports/itemtypes.plugin
reviews/reviewswaiting.pl
serials/serials-collection.pl
suggestion/suggestion.pl
t/00-checkdatabase-version.t [new file with mode: 0644]
t/00-load.t
t/00-merge-conflict-markers.t
t/00-testcritic.t
t/AuthoritiesMarc_UNIMARC.t
t/Boolean.t
t/ClassSortRoutine_Dewey.t
t/ClassSortRoutine_Generic.t
t/Koha_template_plugin_KohaDates.t [new file with mode: 0644]
t/Reports.t
t/SIP_ILS.t [deleted file]
t/SIP_Sip.t
t/Scrubber.t
t/TmplToken.t [new file with mode: 0755]
t/db_dependent/BackgroundJob.t
t/db_dependent/External_BakerTaylor.t
t/db_dependent/Labels/t_Layout.t
t/db_dependent/Members.t
t/db_dependent/Reserves.t
t/db_dependent/SIP_ILS.t [new file with mode: 0755]
t/db_dependent/SQLHelper.t
t/db_dependent/Search.t
t/db_dependent/UploadedFile.t
t/db_dependent/lib/KohaTest/Biblio.pm
t/db_dependent/lib/KohaTest/Overdues.pm
t/db_dependent/lib/KohaTest/Reserves.pm
t/db_dependent/sysprefs.t [new file with mode: 0755]
t/perlcriticrc
tools/batchMod.pl
tools/holidays.pl
tools/newHolidays.pl
tools/tools-home.pl
xt/author/translatable-templates.t
xt/author/valid-templates.t

index 860e187..e822b6a 100644 (file)
@@ -217,7 +217,7 @@ sub makepayment {
 
     #check to see what accounttype
     if ( $data->{'accounttype'} eq 'Rep' || $data->{'accounttype'} eq 'L' ) {
-        ReturnLostItem( $borrowernumber, $data->{'itemnumber'} );
+        C4::Circulation::ReturnLostItem( $borrowernumber, $data->{'itemnumber'} );
     }
 }
 
index 7127f24..2814977 100644 (file)
@@ -54,6 +54,7 @@ BEGIN {
         &GetOrderNumber &GetLateOrders &GetOrderFromItemnumber
         &SearchOrder &GetHistory &GetRecentAcqui
         &ModReceiveOrder &ModOrderBiblioitemNumber
+        &GetCancelledOrders
 
         &NewOrderItem &ModOrderItem
 
@@ -1041,6 +1042,42 @@ sub ModOrderBiblioitemNumber {
     $sth->execute( $biblioitemnumber, $ordernumber, $biblionumber );
 }
 
+=head3 GetCancelledOrders
+
+  my @orders = GetCancelledOrders($basketno, $orderby);
+
+Returns cancelled orders for a basket
+
+=cut
+
+sub GetCancelledOrders {
+    my ( $basketno, $orderby ) = @_;
+
+    return () unless $basketno;
+
+    my $dbh   = C4::Context->dbh;
+    my $query = "
+        SELECT biblio.*, biblioitems.*, aqorders.*, aqbudgets.*
+        FROM aqorders
+          LEFT JOIN aqbudgets   ON aqbudgets.budget_id = aqorders.budget_id
+          LEFT JOIN biblio      ON biblio.biblionumber = aqorders.biblionumber
+          LEFT JOIN biblioitems ON biblioitems.biblionumber = biblio.biblionumber
+        WHERE basketno = ?
+          AND (datecancellationprinted IS NOT NULL
+               AND datecancellationprinted <> '0000-00-00')
+    ";
+
+    $orderby = "aqorders.datecancellationprinted desc, aqorders.timestamp desc"
+        unless $orderby;
+    $query .= " ORDER BY $orderby";
+    my $sth = $dbh->prepare($query);
+    $sth->execute($basketno);
+    my $results = $sth->fetchall_arrayref( {} );
+
+    return @$results;
+}
+
+
 #------------------------------------------------------------#
 
 =head3 ModReceiveOrder
index e360e10..bbe472b 100755 (executable)
@@ -703,7 +703,7 @@ sub checkauth {
             $session->flush;
             $session->delete();
             C4::Context->_unset_userenv($sessionID);
-            _session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,(strftime "%c",localtime));
+            #_session_log(sprintf "%20s from %16s logged out at %30s (manually).\n", $userid,$ip,(strftime "%c",localtime));
             $sessionID = undef;
             $userid    = undef;
 
@@ -716,7 +716,7 @@ sub checkauth {
             $info{'timed_out'} = 1;
             $session->delete();
             C4::Context->_unset_userenv($sessionID);
-            _session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,(strftime "%c",localtime));
+            #_session_log(sprintf "%20s from %16s logged out at %30s (inactivity).\n", $userid,$ip,(strftime "%c",localtime));
             $userid    = undef;
             $sessionID = undef;
         }
@@ -727,7 +727,7 @@ sub checkauth {
             $info{'different_ip'} = 1;
             $session->delete();
             C4::Context->_unset_userenv($sessionID);
-            _session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,(strftime "%c",localtime), $info{'newip'});
+            #_session_log(sprintf "%20s from %16s logged out at %30s (ip changed to %16s).\n", $userid,$ip,(strftime "%c",localtime), $info{'newip'});
             $sessionID = undef;
             $userid    = undef;
         }
@@ -765,7 +765,7 @@ sub checkauth {
                    $userid = $retuserid if ($retuserid ne '');
                }
                if ($return) {
-               _session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime));
+               #_session_log(sprintf "%20s from %16s logged in  at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime));
                if ( $flags = haspermission(  $userid, $flagsrequired ) ) {
                                        $loggedin = 1;
                }
index 4749d72..fc1d63b 100644 (file)
@@ -228,6 +228,17 @@ sub ldap_entry_2_hash ($$) {
                ( substr($borrower{'firstname'},0,1)
                . substr($borrower{ 'surname' },0,1)
                . " ");
+
+       # check if categorycode exists, if not, fallback to default from koha-conf.xml
+       my $dbh = C4::Context->dbh;
+       my $sth = $dbh->prepare("SELECT categorycode FROM categories WHERE categorycode = ?");
+       $sth->execute( uc($borrower{'categorycode'}) );
+       unless ( my $row = $sth->fetchrow_hashref ) {
+               my $default = $mapping{'categorycode'}->{content};
+               $debug && warn "Can't find ", $borrower{'categorycode'}, " default to: $default for ", $borrower{userid};
+               $borrower{'categorycode'} = $default
+       }
+
        return %borrower;
 }
 
index d58798d..b3c5070 100644 (file)
@@ -639,9 +639,16 @@ sub AddAuthority {
                }
                my $date=POSIX::strftime("%y%m%d",localtime);
                if (!$record->field('008')) {
-                       $record->insert_fields_ordered(
-                               MARC::Field->new('008',$date."|||a||||||           | |||     d")
-                       );
+            # Get a valid default value for field 008
+            my $default_008 = C4::Context->preference('MARCAuthorityControlField008');
+            if(!$default_008 or length($default_008)<34) {
+                $default_008 = '|| aca||aabn           | a|a     d';
+            }
+            else {
+                $default_008 = substr($default_008,0,34);
+            }
+
+            $record->insert_fields_ordered( MARC::Field->new('008',$date.$default_008) );
                }
                if (!$record->field('040')) {
                 $record->insert_fields_ordered(
index 52119ea..ad559fa 100644 (file)
@@ -1612,7 +1612,8 @@ sub GetMarcAuthors {
                 $separator = C4::Context->preference('authoritysep');
             }
             push @subfields_loop,
-              { code      => $subfieldcode,
+              { tag       => $field->tag(),
+                code      => $subfieldcode,
                 value     => $value,
                 link_loop => \@this_link_loop,
                 separator => $separator
@@ -1827,17 +1828,30 @@ sub GetFrameworkCode {
 This function builds partial MARC::Record from a hash
 Hash entries can be from biblio or biblioitems.
 
-This function is called in acquisition module, to create a basic catalogue entry from user entry
+This function is called in acquisition module, to create a basic catalogue
+entry from user entry
 
 =cut
 
+
 sub TransformKohaToMarc {
-    my ($hash) = @_;
-    my $sth    = C4::Context->dbh->prepare( "SELECT tagfield,tagsubfield FROM marc_subfield_structure WHERE frameworkcode=? AND kohafield=?" );
+    my $hash = shift;
     my $record = MARC::Record->new();
     SetMarcUnicodeFlag( $record, C4::Context->preference("marcflavour") );
-    foreach ( keys %{$hash} ) {
-        &TransformKohaToMarcOneField( $sth, $record, $_, $hash->{$_}, '' );
+    my $db_to_marc = C4::Context->marcfromkohafield;
+    while ( my ($name, $value) = each %$hash ) {
+        next unless my $dtm = $db_to_marc->{''}->{$name};
+        my ($tag, $letter) = @$dtm;
+        foreach my $value ( split(/\s?\|\s?/, $value, -1) ) {
+            if ( my $field = $record->field($tag) ) {
+                $field->add_subfields( $letter => $value );
+            }
+            else {
+                $record->insert_fields_ordered( MARC::Field->new(
+                    $tag, " ", " ", $letter => $value ) );
+            }
+        }
+
     }
     return $record;
 }
@@ -1921,42 +1935,6 @@ sub PrepHostMarcField {
     return $hostmarcfield;
 }
 
-
-=head2 TransformKohaToMarcOneField
-
-    $record = TransformKohaToMarcOneField( $sth, $record, $kohafieldname, $value, $frameworkcode );
-
-=cut
-
-sub TransformKohaToMarcOneField {
-    my ( $sth, $record, $kohafieldname, $value, $frameworkcode ) = @_;
-    $frameworkcode = '' unless $frameworkcode;
-    my $tagfield;
-    my $tagsubfield;
-
-    if ( !defined $sth ) {
-        my $dbh = C4::Context->dbh;
-        $sth = $dbh->prepare( "SELECT tagfield,tagsubfield FROM marc_subfield_structure WHERE frameworkcode=? AND kohafield=?" );
-    }
-    $sth->execute( $frameworkcode, $kohafieldname );
-    if ( ( $tagfield, $tagsubfield ) = $sth->fetchrow ) {
-        my @values = split(/\s?\|\s?/, $value, -1);
-        
-        foreach my $itemvalue (@values){
-        my $tag = $record->field($tagfield);
-        if ($tag) {
-                $tag->add_subfields( $tagsubfield => $itemvalue );
-            $record->delete_field($tag);
-            $record->insert_fields_ordered($tag);
-            }
-            else {
-                $record->add_fields( $tagfield, " ", " ", $tagsubfield => $itemvalue );
-            }
-        }
-    }
-    return $record;
-}
-
 =head2 TransformHtmlToXml
 
   $xml = TransformHtmlToXml( $tags, $subfields, $values, $indicator, 
@@ -2077,7 +2055,7 @@ sub TransformHtmlToXml {
         }
         $prevtag = @$tags[$i];
     }
-    $xml .= "</datafield>\n" if @$tags > 0;
+    $xml .= "</datafield>\n" if $xml =~ m/<datafield/;
     if ( C4::Context->preference('marcflavour') eq 'UNIMARC' and !$unimarc_and_100_exist ) {
 
         #     warn "SETTING 100 for $auth_type";
index 8d6f456..0b5068c 100644 (file)
@@ -320,7 +320,7 @@ sub transferbook {
 
     # find reserves.....
     # That'll save a database query.
-    my ( $resfound, $resrec ) =
+    my ( $resfound, $resrec, undef ) =
       CheckReserves( $itemnumber );
     if ( $resfound and not $ignoreRs ) {
         $resrec->{'ResFound'} = $resfound;
@@ -870,7 +870,7 @@ sub CanBookBeIssued {
     }
 
     # See if the item is on reserve.
-    my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
+    my ( $restype, $res, undef ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
     if ($restype) {
                my $resbor = $res->{'borrowernumber'};
                my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor );
@@ -984,39 +984,7 @@ sub AddIssue {
                                );
                        }
 
-                       # See if the item is on reserve.
-                       my ( $restype, $res ) =
-                         C4::Reserves::CheckReserves( $item->{'itemnumber'} );
-                       if ($restype) {
-                               my $resbor = $res->{'borrowernumber'};
-                               if ( $resbor eq $borrower->{'borrowernumber'} ) {
-                                       # The item is reserved by the current patron
-                                       ModReserveFill($res);
-                               }
-                               elsif ( $restype eq "Waiting" ) {
-                                       # warn "Waiting";
-                                       # The item is on reserve and waiting, but has been
-                                       # reserved by some other patron.
-                               }
-                               elsif ( $restype eq "Reserved" ) {
-                                       # warn "Reserved";
-                                       # The item is reserved by someone else.
-                                       if ($cancelreserve) { # cancel reserves on this item
-                                               CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
-                                       }
-                               }
-                               if ($cancelreserve) {
-                                       CancelReserve($res->{'biblionumber'}, 0, $res->{'borrowernumber'});
-                               }
-                               else {
-                                       # set waiting reserve to first in reserve queue as book isn't waiting now
-                                       ModReserve(1,
-                                               $res->{'biblionumber'},
-                                               $res->{'borrowernumber'},
-                                               $res->{'branchcode'}
-                                       );
-                               }
-                       }
+            MoveReserve( $item->{'itemnumber'}, $borrower->{'borrowernumber'}, $cancelreserve );
 
                        # Starting process for transfer job (checking transfert and validate it if we have one)
             my ($datesent) = GetTransfers($item->{'itemnumber'});
@@ -1641,7 +1609,7 @@ sub AddReturn {
 
     # find reserves.....
     # if we don't have a reserve with the status W, we launch the Checkreserves routine
-    my ($resfound, $resrec) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
+    my ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
     if ($resfound) {
           $resrec->{'ResFound'} = $resfound;
         $messages->{'ResFound'} = $resrec;
@@ -2259,7 +2227,7 @@ sub CanBookBeRenewed {
                        $error="too_many";
                }
                
-        my ( $resfound, $resrec ) = C4::Reserves::CheckReserves($itemnumber);
+        my ( $resfound, $resrec, undef ) = C4::Reserves::CheckReserves($itemnumber);
         if ($resfound) {
             $renewokay = 0;
                        $error="on_reserve"
@@ -3022,7 +2990,7 @@ sub ReturnLostItem{
 
 
 sub LostItem{
-    my ($itemnumber, $mark_returned) = @_;
+    my ($itemnumber, $mark_returned, $charge_fee) = @_;
 
     my $dbh = C4::Context->dbh();
     my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title 
@@ -3037,7 +3005,8 @@ sub LostItem{
     # if a borrower lost the item, add a replacement cost to the their record
     if ( my $borrowernumber = $issues->{borrowernumber} ){
 
-        C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}");
+        C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}")
+          if $charge_fee;
         #FIXME : Should probably have a way to distinguish this from an item that really was returned.
         #warn " $issues->{'borrowernumber'}  /  $itemnumber ";
         MarkIssueReturned($borrowernumber,$itemnumber) if $mark_returned;
index 07b2b13..770973f 100644 (file)
@@ -18,7 +18,7 @@ package C4::Context;
 
 use strict;
 use warnings;
-use vars qw($VERSION $AUTOLOAD $context @context_stack);
+use vars qw($VERSION $AUTOLOAD $context @context_stack $servers $memcached $ismemcached);
 
 BEGIN {
        if ($ENV{'HTTP_USER_AGENT'})    {
@@ -78,6 +78,22 @@ BEGIN {
                        $main::SIG{__DIE__} = \&CGI::Carp::confess;
                }
     }          # else there is no browser to send fatals to!
+
+    # Check if there are memcached servers set
+    $servers = $ENV{'MEMCACHED_SERVERS'};
+    if ($servers) {
+        # Load required libraries and create the memcached object
+       require Cache::Memcached;
+       $memcached = Cache::Memcached->new({
+                     servers => [ $servers ],
+                     debug   => 0,
+                     compress_threshold => 10_000,
+                     namespace => $ENV{'MEMCACHED_NAMESPACE'} || 'koha'
+                 });
+        # Verify memcached available (set a variable and test the output)
+       $ismemcached = $memcached->set('ismemcached','1');
+    }
+
        $VERSION = '3.00.00.036';
 }
 
@@ -229,6 +245,11 @@ Returns undef in case of error.
 
 sub read_config_file {         # Pass argument naming config file to read
     my $koha = XMLin(shift, keyattr => ['id'], forcearray => ['listen', 'server', 'serverinfo'], suppressempty => '');
+
+    if ($ismemcached) {
+      $memcached->set('kohaconf',$koha);
+    }
+
     return $koha;                      # Return value: ref-to-hash holding the configuration
 }
 
@@ -275,6 +296,10 @@ Allocates a new context. Initializes the context from the specified
 file, which defaults to either the file given by the C<$KOHA_CONF>
 environment variable, or F</etc/koha/koha-conf.xml>.
 
+It saves the koha-conf.xml values in the declared memcached server(s)
+if currently available and uses those values until them expire and
+re-reads them.
+
 C<&new> does not set this context as the new default context; for
 that, use C<&set_context>.
 
@@ -309,10 +334,20 @@ sub new {
             return undef;
         }
     }
-        # Load the desired config file.
-    $self = read_config_file($conf_fname);
-    $self->{"config_file"} = $conf_fname;
     
+    if ($ismemcached) {
+      # retreive from memcached
+      $self = $memcached->get('kohaconf');
+      if (not defined $self) {
+       # not in memcached yet
+       $self = read_config_file($conf_fname);
+      }
+    } else {
+      # non-memcached env, read from file
+      $self = read_config_file($conf_fname);
+    }
+
+    $self->{"config_file"} = $conf_fname;
     warn "read_config_file($conf_fname) returned undef" if !defined($self->{"config"});
     return undef if !defined($self->{"config"});
 
@@ -463,7 +498,7 @@ my %sysprefs;
 
 sub preference {
     my $self = shift;
-    my $var  = shift;                          # The system preference to return
+    my $var  = lc(shift);                          # The system preference to return
 
     if (exists $sysprefs{$var}) {
         return $sysprefs{$var};
@@ -514,7 +549,7 @@ the sysprefs cache.
 
 sub set_preference {
     my $self = shift;
-    my $var = shift;
+    my $var = lc(shift);
     my $value = shift;
 
     my $dbh = C4::Context->dbh or return 0;
@@ -530,7 +565,9 @@ sub set_preference {
         ON DUPLICATE KEY UPDATE value = VALUES(value)
     " );
 
-    $sth->execute( $var, $value );
+    if($sth->execute( $var, $value )) {
+        $sysprefs{$var} = $value;
+    }
     $sth->finish;
 }
 
index 9de8ece..73a19fa 100644 (file)
@@ -61,7 +61,7 @@ sub _check_params {
     return $exit_code;
 }
 
-use constant PRESET_FIELDS => [qw(title author isbn issn itemtype barcode callnumber)];
+use constant PRESET_FIELDS => [qw(title author isbn issn itemtype barcode itemcallnumber)];
 sub new {
     my $invocant = shift;
     my $self = '';
index 335de1c..50db12e 100644 (file)
@@ -41,6 +41,12 @@ sub _prefformat {
     return $prefformat;
 }
 
+sub reset_prefformat {  # subroutine to clear the prefformat, called when we change it
+    if (defined $prefformat){
+       $prefformat = C4::Context->preference('dateformat');
+    }
+}
+
 our %format_map = (
     iso    => 'yyyy-mm-dd',           # plus " HH:MM:SS"
     metric => 'dd/mm/yyyy',           # plus " HH:MM:SS"
@@ -167,7 +173,7 @@ sub init ($;$$) {
     $self->{'dateformat'} = $dformat = ( scalar(@_) >= 2 ) ? $_[1] : _prefformat();
     ( $format_map{$dformat} ) or croak "Invalid date format '$dformat' from " . ( ( scalar(@_) >= 2 ) ? 'argument' : 'system preferences' );
     $self->{'dmy_arrayref'} = [ ( (@_) ? $self->dmy_map(shift) : localtime ) ];
-    $debug and warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n";
+    if ($debug && $debug > 1) { warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; }
     return $self;
 }
 
index 90f741a..067afd7 100644 (file)
@@ -315,7 +315,7 @@ sub AuthenticatePatron {
     my ($cgi) = @_;
 
     # Check if borrower exists, using a C4::Auth function...
-    unless( checkpw( C4::Context->dbh, $cgi->param('username'), $cgi->param('password') ) ) {
+    unless( C4::Auth::checkpw( C4::Context->dbh, $cgi->param('username'), $cgi->param('password') ) ) {
         return { code => 'PatronNotFound' };
     }
 
index bacabac..37220c6 100644 (file)
@@ -1,6 +1,7 @@
 package C4::ILSDI::Utility;
 
 # Copyright 2009 SARL Biblibre
+# Copyright 2011 software.coop and MJ Ray
 #
 # This file is part of Koha.
 #
@@ -24,7 +25,7 @@ use C4::Members;
 use C4::Items;
 use C4::Circulation;
 use C4::Biblio;
-use C4::Reserves qw(GetReservesFromBorrowernumber);
+use C4::Reserves qw(GetReservesFromBorrowernumber CanBookBeReserved);
 use C4::Context;
 use C4::Branch qw/GetBranchName/;
 use Digest::MD5 qw(md5_base64);
@@ -38,7 +39,7 @@ BEGIN {
     require Exporter;
     @ISA    = qw(Exporter);
     @EXPORT = qw(
-      &BorrowerExists &CanBookBeReserved &Availability
+      &BorrowerExists &Availability
     );
 }
 
@@ -67,55 +68,6 @@ sub BorrowerExists {
     return $sth->fetchrow;
 }
 
-=head2 CanBookBeReserved
-
-Checks if a book (at bibliographic level) can be reserved by a borrower.
-
-       if ( CanBookBeReserved($borrower, $biblionumber) ) {
-               # Do stuff
-       }
-
-=cut
-
-sub CanBookBeReserved {
-    my ( $borrower, $biblionumber ) = @_;
-
-    my $MAXIMUM_NUMBER_OF_RESERVES = C4::Context->preference("maxreserves");
-    my $MAXOUTSTANDING             = C4::Context->preference("maxoutstanding");
-
-    my $out = 1;
-
-    if ( $borrower->{'amountoutstanding'} > $MAXOUTSTANDING ) {
-        $out = undef;
-    }
-    if ( $borrower->{gonenoaddress} eq 1 ) {
-        $out = undef;
-    }
-    if ( $borrower->{lost} eq 1 ) {
-        $out = undef;
-    }
-    if ( $borrower->{debarred} ) {
-        $out = undef;
-    }
-    my @reserves = GetReservesFromBorrowernumber( $borrower->{'borrowernumber'} );
-    if ( $MAXIMUM_NUMBER_OF_RESERVES && scalar(@reserves) >= $MAXIMUM_NUMBER_OF_RESERVES ) {
-        $out = undef;
-    }
-    foreach my $res (@reserves) {
-        if ( $res->{'biblionumber'} == $biblionumber ) {
-            $out = undef;
-        }
-    }
-    my $issues = GetPendingIssues( $borrower->{'borrowernumber'} );
-    foreach my $issue (@$issues) {
-        if ( $issue->{'biblionumber'} == $biblionumber ) {
-            $out = undef;
-        }
-    }
-
-    return $out;
-}
-
 =head2 Availability
 
 Returns, for an itemnumber, an array containing availability information.
index a2b650b..d85e64f 100755 (executable)
@@ -776,7 +776,7 @@ sub _parseSQLLine
                     my $stmt = SQL::Statement->new($line, $parser);
                     my $where = $stmt->where();
                     if ($where && $where->op() eq '=' && $line =~ /^\s*DELETE/) {
-                        $line =~ s/frameworkcode='.+?'/frameworkcode='$frameworkcode';/ unless ($_ =~ /frameworkcode='$frameworkcode'/);
+                        $line =~ s/frameworkcode='.*?'/frameworkcode='$frameworkcode';/ unless ($_ =~ /frameworkcode='$frameworkcode'/);
                     } else {
                         my @arrFields;
                         my @arrValues;
@@ -817,7 +817,7 @@ sub _parseSQLLine
             if ($error) {
                 $line .= ';' unless ($line =~ /;$/);
                 if ($line =~ /^\s*DELETE/) {
-                    $line =~ s/frameworkcode='.+?'/frameworkcode='$frameworkcode'/ unless ($_ =~ /frameworkcode='$frameworkcode'/);
+                    $line =~ s/frameworkcode='.*?'/frameworkcode='$frameworkcode'/ unless ($_ =~ /frameworkcode='$frameworkcode'/);
                 } elsif ($line =~ /^\s*INSERT\s+INTO\s+(.*?)\s+\((.*?frameworkcode.*?)\)\s+VALUES\s+\((.+)\)\s*;\s*$/) {
                     my $table = $1;
                     my $fields = $2;
index 1c177b9..a7eb1f6 100644 (file)
@@ -529,8 +529,10 @@ sub load_sql {
         # report the import a failure although it really succeded -fbcit
     }
 #   errors thrown while loading installer data should be logged
-    warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
-    warn $error;
+    if($error) {
+      warn "C4::Installer::load_sql returned the following errors while attempting to load $filename:\n";
+      warn "$error";
+    }
     return $error;
 }
 
index 0b91b65..cf716ab 100644 (file)
@@ -1214,6 +1214,7 @@ sub GetItemsInfo {
             $data->{cardnumber}     = $idata->{cardnumber};
             $data->{surname}     = $idata->{surname};
             $data->{firstname}     = $idata->{firstname};
+            $data->{lastreneweddate} = $idata->{lastreneweddate};
             $datedue                = $idata->{'date_due'};
         if (C4::Context->preference("IndependantBranches")){
         my $userenv = C4::Context->userenv;
@@ -1228,7 +1229,7 @@ sub GetItemsInfo {
                        $serial = 1;
         }
                if ( $datedue eq '' ) {
-            my ( $restype, $reserves ) =
+            my ( $restype, $reserves, undef ) =
               C4::Reserves::CheckReserves( $data->{'itemnumber'} );
 # Previous conditional check with if ($restype) is not needed because a true
 # result for one item will result in subsequent items defaulting to this true
@@ -2210,7 +2211,7 @@ sub DelItemCheck {
     if ($onloan){
         $error = "book_on_loan" 
     }
-    elsif ( C4::Context->userenv->{flags} & 1 and
+    elsif ( !(C4::Context->userenv->{flags} & 1) and
             C4::Context->preference("IndependantBranches") and
            (C4::Context->userenv->{branch} ne
              $item->{C4::Context->preference("HomeOrHoldingBranch")||'homebranch'}) )
index 06b2ec5..789f674 100644 (file)
@@ -573,9 +573,8 @@ sub getImageSets {
 
     my @imagesets = (); # list of hasrefs of image set data to pass to template
     my @subdirectories = _getSubdirectoryNames( $paths->{'staff'}{'filesystem'} );
-warn $paths->{'staff'}{'filesystem'};
     foreach my $imagesubdir ( @subdirectories ) {
-       warn $imagesubdir;
+    warn $imagesubdir if $DEBUG;
         my @imagelist     = (); # hashrefs of image info
         my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) );
         my $imagesetactive = 0;
index 930e0f6..0aec0a6 100644 (file)
@@ -273,7 +273,7 @@ sub _BIB {
 
 sub _BAR {
     my $self = shift;
-    my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'};     # this places the bottom left of the barcode the left text margin distance to right of the the left edge of the label ($llx)
+    my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'};     # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($llx)
     my $barcode_lly = $self->{'lly'} + $self->{'top_text_margin'};      # this places the bottom left of the barcode the top text margin distance above the bottom of the label ($lly)
     my $barcode_width = 0.8 * $self->{'width'};                         # this scales the barcode width to 80% of the label width
     my $barcode_y_scale_factor = 0.01 * $self->{'height'};              # this scales the barcode height to 10% of the label height
@@ -282,7 +282,7 @@ sub _BAR {
 
 sub _BIBBAR {
     my $self = shift;
-    my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'};     # this places the bottom left of the barcode the left text margin distance to right of the the left edge of the label ($self->{'llx'})
+    my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'};     # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($self->{'llx'})
     my $barcode_lly = $self->{'lly'} + $self->{'top_text_margin'};      # this places the bottom left of the barcode the top text margin distance above the bottom of the label ($lly)
     my $barcode_width = 0.8 * $self->{'width'};                         # this scales the barcode width to 80% of the label width
     my $barcode_y_scale_factor = 0.01 * $self->{'height'};              # this scales the barcode height to 10% of the label height
@@ -294,7 +294,7 @@ sub _BIBBAR {
 
 sub _BARBIB {
     my $self = shift;
-    my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'};                             # this places the bottom left of the barcode the left text margin distance to right of the the left edge of the label ($self->{'llx'})
+    my $barcode_llx = $self->{'llx'} + $self->{'left_text_margin'};                             # this places the bottom left of the barcode the left text margin distance to right of the left edge of the label ($self->{'llx'})
     my $barcode_lly = ($self->{'lly'} + $self->{'height'}) - $self->{'top_text_margin'};        # this places the bottom left of the barcode the top text margin distance below the top of the label ($self->{'lly'})
     my $barcode_width = 0.8 * $self->{'width'};                                                 # this scales the barcode width to 80% of the label width
     my $barcode_y_scale_factor = 0.01 * $self->{'height'};                                      # this scales the barcode height to 10% of the label height
index 6846a00..2420e4a 100644 (file)
@@ -490,7 +490,6 @@ sub parseletter_sth {
     ($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 'suggestions'  ) ? "SELECT * FROM $table WHERE borrowernumber = ? and biblionumber = ?" :
     ($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 = ?"                      :
@@ -837,8 +836,8 @@ sub _send_message_by_email ($;$$$) {
     if ( my $bcc = C4::Context->preference('OverdueNoticeBcc') ) {
        $sendmail_params{ Bcc } = $bcc;
     }
-    
 
+    _update_message_to_address($message->{'message_id'},$to_address) unless $message->{to_address}; #if initial message address was empty, coming here means that a to address was found and queue should be updated
     if ( sendmail( %sendmail_params ) ) {
         _set_message_status( { message_id => $message->{'message_id'},
                 status     => 'sent' } );
@@ -864,6 +863,12 @@ sub _send_message_by_sms ($) {
     return $success;
 }
 
+sub _update_message_to_address {
+    my ($id, $to)= @_;
+    my $dbh = C4::Context->dbh();
+    $dbh->do('UPDATE message_queue SET to_address=? WHERE message_id=?',undef,($to,$id));
+}
+
 sub _set_message_status ($) {
     my $params = shift or return undef;
 
index 8bd7b47..1d7bc42 100644 (file)
@@ -2126,7 +2126,7 @@ sub AddMessage {
     my $query = "INSERT INTO messages ( borrowernumber, branchcode, message_type, message ) VALUES ( ?, ?, ?, ? )";
     my $sth = $dbh->prepare($query);
     $sth->execute( $borrowernumber, $branchcode, $message_type, $message );
-
+    logaction("MEMBERS", "ADDCIRCMESSAGE", $borrowernumber, $message) if C4::Context->preference("BorrowersLog");
     return 1;
 }
 
@@ -2216,11 +2216,15 @@ sub DeleteMessage {
     my ( $message_id ) = @_;
 
     my $dbh = C4::Context->dbh;
-
-    my $query = "DELETE FROM messages WHERE message_id = ?";
+    my $query = "SELECT * FROM messages WHERE message_id = ?";
     my $sth = $dbh->prepare($query);
     $sth->execute( $message_id );
+    my $message = $sth->fetchrow_hashref();
 
+    $query = "DELETE FROM messages WHERE message_id = ?";
+    $sth = $dbh->prepare($query);
+    $sth->execute( $message_id );
+    logaction("MEMBERS", "DELCIRCMESSAGE", $message->{'borrowernumber'}, $message->{'message'}) if C4::Context->preference("BorrowersLog");
 }
 
 END { }    # module clean-up code here (global destructor)
index 41a0a28..75ced46 100644 (file)
@@ -33,7 +33,6 @@ use C4::Dates qw(format_date);
 use C4::Budgets qw(GetCurrency);
 use C4::Templates;
 
-#use HTML::Template::Pro;
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 BEGIN {
@@ -292,10 +291,7 @@ sub output_with_http_headers($$$$;$) {
         $options->{'Content-Style-Type' } = 'text/css';
         $options->{'Content-Script-Type'} = 'text/javascript';
     }
-    # remove SUDOC specific NSB NSE
-    $data =~ s/\x{C2}\x{98}|\x{C2}\x{9C}/ /g;
-    $data =~ s/\x{C2}\x{88}|\x{C2}\x{89}/ /g;
-      
+
 # We can't encode here, that will double encode our templates, and xslt
 # We need to fix the encoding as it comes out of the database, or when we pass the variables to templates
  
index 7e9b9c9..660e10b 100644 (file)
@@ -79,7 +79,6 @@ BEGIN {
        # subs to move to Members.pm
        push @EXPORT, qw(
         &CheckBorrowerDebarred
-        &UpdateBorrowerDebarred
        );
        # subs to move to Biblio.pm
        push @EXPORT, qw(
@@ -644,13 +643,16 @@ C<$borrowernumber> is the borrowernumber
 sub GetFine {
     my ( $itemnum, $borrowernumber ) = @_;
     my $dbh   = C4::Context->dbh();
-    my $query = "SELECT sum(amountoutstanding) FROM accountlines
-    where accounttype like 'F%'  
-  AND amountoutstanding > 0 AND itemnumber = ? AND borrowernumber=?";
+    my $query = q|SELECT sum(amountoutstanding) as fineamount FROM accountlines
+    where accounttype like 'F%'
+  AND amountoutstanding > 0 AND itemnumber = ? AND borrowernumber=?|;
     my $sth = $dbh->prepare($query);
     $sth->execute( $itemnum, $borrowernumber );
-    my $data = $sth->fetchrow_hashref();
-    return ( $data->{'sum(amountoutstanding)'} );
+    my $fine = $sth->fetchrow_hashref();
+    if ($fine->{fineamount}) {
+        return $fine->{fineamount};
+    }
+    return 0;
 }
 
 
@@ -1085,28 +1087,6 @@ sub CheckBorrowerDebarred {
     return $debarredstatus;
 }
 
-=head2 UpdateBorrowerDebarred
-
-($borrowerstatut) = &UpdateBorrowerDebarred($borrowernumber, $todate);
-
-update status of borrowers in borrowers table (field debarred)
-
-C<$borrowernumber> borrower number
-
-=cut
-
-sub UpdateBorrowerDebarred{
-    my ( $borrowernumber, $todate ) = @_;
-    my $dbh   = C4::Context->dbh;
-    my $query = qq|UPDATE borrowers
-             SET debarred=?
-                     WHERE borrowernumber=?
-            |;
-    my $sth = $dbh->prepare($query);
-    $sth->execute( $todate, $borrowernumber );
-    $sth->finish;
-    return 1;
-}
 
 =head2 CheckExistantNotifyid
 
index 2ba7584..f810816 100644 (file)
@@ -79,7 +79,8 @@ sub remoteprint ($$) {
     # to have spaces in them). Or perhaps if $queue eq "" and
     # $env->{file} ne "", then that should mean "print to $env->{file}".
     if ( $queue eq "" || $queue eq 'nulllp' ) {
-        open( PRINTER, ">/tmp/kohaiss" );
+        return;
+       #open( PRINTER, ">/tmp/kohaiss" );
     }
     else {
 
@@ -125,6 +126,10 @@ sub remoteprint ($$) {
 }
 
 sub printreserve {
+
+    # FIXME - make useful
+    return;
+
     my ( $branchname, $bordata, $itemdata ) = @_;
     my $printer = '';
     (return) unless ( C4::Context->boolean_preference('printreserveslips') );
@@ -175,6 +180,9 @@ print a slip for the given $borrowernumber
 
 #'
 sub printslip ($) {
+
+    #FIXME - make useful
+
     my $borrowernumber = shift;
     my $borrower   = GetMemberDetails($borrowernumber);
        my $issueslist = GetPendingIssues($borrowernumber); 
index cecb6ed..e906850 100644 (file)
@@ -398,7 +398,7 @@ sub marcrecord2csv {
     # Getting the marcfields as an array
     my @marcfieldsarray = split('\|', $marcfieldslist);
 
-   # Separating the marcfields from the the user-supplied headers
+   # Separating the marcfields from the user-supplied headers
     my @marcfields;
     foreach (@marcfieldsarray) {
         my @result = split('=', $_);
index 4af8a85..359bbad 100644 (file)
@@ -109,6 +109,7 @@ BEGIN {
         &ModReserveStatus
         &ModReserveCancelAll
         &ModReserveMinusPriority
+        &MoveReserve
         
         &CheckReserves
         &CanBookBeReserved
@@ -523,7 +524,7 @@ sub GetOtherReserves {
     my ($itemnumber) = @_;
     my $messages;
     my $nextreservinfo;
-    my ( $restype, $checkreserves ) = CheckReserves($itemnumber);
+    my ( undef, $checkreserves, undef ) = CheckReserves($itemnumber);
     if ($checkreserves) {
         my $iteminfo = GetItem($itemnumber);
         if ( $iteminfo->{'holdingbranch'} ne $checkreserves->{'branchcode'} ) {
@@ -738,8 +739,8 @@ sub GetReserveStatus {
 
 =head2 CheckReserves
 
-  ($status, $reserve) = &CheckReserves($itemnumber);
-  ($status, $reserve) = &CheckReserves(undef, $barcode);
+  ($status, $reserve, $all_reserves) = &CheckReserves($itemnumber);
+  ($status, $reserve, $all_reserves) = &CheckReserves(undef, $barcode);
 
 Find a book in the reserves.
 
@@ -804,11 +805,11 @@ sub CheckReserves {
     # note: we get the itemnumber because we might have started w/ just the barcode.  Now we know for sure we have it.
     my ( $biblio, $bibitem, $notforloan_per_itemtype, $notforloan_per_item, $itemnumber ) = $sth->fetchrow_array;
 
-    return ( 0, 0 ) unless $itemnumber; # bail if we got nothing.
+    return ( '' ) unless $itemnumber; # bail if we got nothing.
 
     # if item is not for loan it cannot be reserved either.....
     #    execpt where items.notforloan < 0 :  This indicates the item is holdable. 
-    return ( 0, 0 ) if  ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype;
+    return ( '' ) if  ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype;
 
     # Find this item in the reserves
     my @reserves = _Findgroupreserve( $bibitem, $biblio, $itemnumber );
@@ -822,7 +823,7 @@ sub CheckReserves {
         my $priority = 10000000;
         foreach my $res (@reserves) {
             if ( $res->{'itemnumber'} == $itemnumber && $res->{'priority'} == 0) {
-                return ( "Waiting", $res ); # Found it
+                return ( "Waiting", $res, \@reserves ); # Found it
             } else {
                 # See if this item is more important than what we've got so far
                 if ( $res->{'priority'} && $res->{'priority'} < $priority ) {
@@ -843,11 +844,10 @@ sub CheckReserves {
     # We return the most important (i.e. next) reservation.
     if ($highest) {
         $highest->{'itemnumber'} = $item;
-        return ( "Reserved", $highest );
-    }
-    else {
-        return ( 0, 0 );
+        return ( "Reserved", $highest, \@reserves );
     }
+
+    return ( '' );
 }
 
 =head2 CancelExpiredReserves
@@ -1816,6 +1816,53 @@ sub _ShiftPriorityByDateAndPriority {
     return $new_priority;  # so the caller knows what priority they wind up receiving
 }
 
+=head2 MoveReserve
+
+  MoveReserve( $itemnumber, $borrowernumber, $cancelreserve )
+
+Use when checking out an item to handle reserves
+If $cancelreserve boolean is set to true, it will remove existing reserve
+
+=cut
+
+sub MoveReserve {
+    my ( $itemnumber, $borrowernumber, $cancelreserve ) = @_;
+
+    my ( $restype, $res, $all_reserves ) = CheckReserves( $itemnumber );
+    return unless $res;
+
+    my $biblionumber     =  $res->{biblionumber};
+    my $biblioitemnumber = $res->{biblioitemnumber};
+
+    if ($res->{borrowernumber} == $borrowernumber) {
+        ModReserveFill($res);
+    }
+    else {
+        # warn "Reserved";
+        # The item is reserved by someone else.
+        # Find this item in the reserves
+
+        my $borr_res;
+        foreach (@$all_reserves) {
+            $_->{'borrowernumber'} == $borrowernumber or next;
+            $_->{'biblionumber'}   == $biblionumber   or next;
+
+            $borr_res = $_;
+            last;
+        }
+
+        if ( $borr_res ) {
+            # The item is reserved by the current patron
+            ModReserveFill($borr_res);
+        }
+
+        if ($cancelreserve) { # cancel reserves on this item
+            CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
+            CancelReserve($res->{'biblionumber'}, 0, $res->{'borrowernumber'});
+        }
+    }
+}
+
 =head2 MergeHolds
 
   MergeHolds($dbh,$to_biblio, $from_biblio);
index f94dbc8..a113d4e 100644 (file)
@@ -30,7 +30,7 @@ BEGIN {
        require Exporter;
        @ISA    = qw(Exporter);
        @EXPORT = qw(getreview savereview updatereview numberofreviews numberofreviewsbybiblionumber
-               getreviews getallreviews approvereview deletereview);
+               getreviews getallreviews approvereview unapprovereview deletereview);
 }
 
 =head1 NAME
@@ -44,7 +44,8 @@ C4::Review - Perl Module containing routines for dealing with reviews of items
   my $review=getreview($biblionumber,$borrowernumber);
   savereview($biblionumber,$borrowernumber,$review);
   updatereview($biblionumber,$borrowernumber,$review);
-  my $count=numberofreviews($biblionumber);
+  my $count=numberofreviews($status);
+  my $count=numberofreviewsbybiblionumber($biblionumber);
   my $reviews=getreviews($biblionumber);
   my $reviews=getallreviews($status);
 
@@ -91,11 +92,13 @@ sub updatereview {
 }
 
 sub numberofreviews {
+    my ($param) = @_;
+    my $status = (defined($param) ? $param : 1);
     my $dbh            = C4::Context->dbh;
     my $query          =
       "SELECT count(*) FROM reviews WHERE approved=?";
     my $sth = $dbh->prepare($query);
-    $sth->execute( 1 );
+    $sth->execute( $status );
   return $sth->fetchrow;
 }
 
@@ -148,6 +151,24 @@ sub approvereview {
     $sth->execute( 1, $reviewid );
 }
 
+=head2 unapprovereview
+
+  unapprovereview($reviewid);
+
+Takes a reviewid and marks that review as not approved
+
+=cut
+
+sub unapprovereview {
+    my ($reviewid) = @_;
+    my $dbh        = C4::Context->dbh();
+    my $query      = "UPDATE reviews
+               SET approved=?
+               WHERE reviewid=?";
+    my $sth = $dbh->prepare($query);
+    $sth->execute( 0, $reviewid );
+}
+
 =head2 deletereview
 
   deletereview($reviewid);
index 2b0b443..95981fb 100644 (file)
@@ -110,7 +110,7 @@ sub new {
     );
     }
     $debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}";
-       for (qw(EXPIRED CHARGES CREDITS GNA LOST DEBARRED NOTES)) {
+       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
index 62d5646..0504d23 100644 (file)
@@ -185,10 +185,14 @@ sub one_msg {
 
     # If reading or writing fails, then the server's dead,
     # so there's no point in continuing.
-    if (!write_msg({seqno => $seqno}, $test->{msg}, $sock)) {
-               BAIL_OUT("Write failure in $test->{id}");
-    } elsif (!($resp = <$sock>)) {
-               BAIL_OUT("Read failure in $test->{id}");
+    if ( !write_msg( { seqno => $seqno }, $test->{msg}, $sock ) ) {
+        BAIL_OUT("Write failure in $test->{id}");
+    }
+
+    my $rv = sysread( $sock, $resp, 10000000 ); # 10000000 is a big number
+
+    if ( !$rv ) {
+        BAIL_OUT("Read failure in $test->{id}");
     }
 
        chomp($resp);
index cf425fd..41c5a9f 100644 (file)
@@ -27,6 +27,22 @@ use C4::Debug;
 require Exporter;
 use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
 
+eval {
+    my $servers = C4::Context->config('memcached_servers');
+    if ($servers) {
+        require Memoize::Memcached;
+        import Memoize::Memcached qw(memoize_memcached);
+
+        my $memcached = {
+            servers    => [$servers],
+            key_prefix => C4::Context->config('memcached_namespace') || 'koha',
+        };
+
+        memoize_memcached( '_get_columns',   memcached => $memcached, expire_time => 600000 );    #cache for 10 minutes
+        memoize_memcached( 'GetPrimaryKeys', memcached => $memcached, expire_time => 600000 );    #cache for 10 minutes
+    }
+};
+
 BEGIN {
        # set the version for version checking
        $VERSION = 0.5;
@@ -38,11 +54,15 @@ BEGIN {
        SearchInTable
        UpdateInTable
        GetPrimaryKeys
+        clear_columns_cache
 );
        %EXPORT_TAGS = ( all =>[qw( InsertInTable DeleteInTable SearchInTable UpdateInTable GetPrimaryKeys)]
                                );
 }
 
+my $tablename;
+my $hashref;
+
 =head1 NAME
 
 C4::SQLHelper - Perl Module containing convenience functions for SQL Handling
@@ -233,6 +253,23 @@ sub GetPrimaryKeys($) {
        return  grep { $hash_columns->{$_}->{'Key'} =~/PRI/i}  keys %$hash_columns;
 }
 
+
+=head2 clear_columns_cache
+
+  C4::SQLHelper->clear_columns_cache();
+
+cleans the internal cache of sysprefs. Please call this method if
+you update a tables structure. Otherwise, your new changes
+will not be seen by this process.
+
+=cut
+
+sub clear_columns_cache {
+    %$hashref = ();
+}
+
+
+
 =head2 _get_columns
 
     _get_columns($tablename)
@@ -247,16 +284,24 @@ With
 =cut
 
 sub _get_columns($) {
-       my ($tablename)=@_;
-       my $dbh=C4::Context->dbh;
-       my $sth=$dbh->prepare_cached(qq{SHOW COLUMNS FROM $tablename });
-       $sth->execute;
-    my $columns= $sth->fetchall_hashref(qw(Field));
+    my ($tablename) = @_;
+    unless ( exists( $hashref->{$tablename} ) ) {
+        my $dbh = C4::Context->dbh;
+        my $sth = $dbh->prepare_cached(qq{SHOW COLUMNS FROM $tablename });
+        $sth->execute;
+        my $columns = $sth->fetchall_hashref(qw(Field));
+        $hashref->{$tablename} = $columns;
+    }
+    return $hashref->{$tablename};
 }
 
 =head2 _filter_columns
 
-    _filter_columns($tablename,$research, $filtercolumns)
+=over 4
+
+_filter_columns($tablename,$research, $filtercolumns)
+
+=back
 
 Given 
        - a tablename 
index 98db887..4a8de5c 100644 (file)
@@ -1075,7 +1075,7 @@ sub buildQuery {
     my $cclq       = 0;
     my $cclindexes = getIndexes();
     if ( $query !~ /\s*ccl=/ ) {
-        while ( !$cclq && $query =~ /(?:^|\W)(\w+)(,\w+)*[:=]/g ) {
+        while ( !$cclq && $query =~ /(?:^|\W)([\w-]+)(,[\w-]+)*[:=]/g ) {
             my $dx = lc($1);
             $cclq = grep { lc($_) eq $dx } @$cclindexes;
         }
@@ -1673,7 +1673,7 @@ sub searchResults {
                 my ($transfertfrom, $transfertto);
 
                 # is item on the reserve shelf?
-               my $reservestatus = 0;
+               my $reservestatus = '';
                my $reserveitem;
 
                 unless ($item->{wthdrawn}
@@ -1695,7 +1695,7 @@ sub searchResults {
                     #        should map transit status to record indexed in Zebra.
                     #
                     ($transfertwhen, $transfertfrom, $transfertto) = C4::Circulation::GetTransfers($item->{itemnumber});
-                   ($reservestatus, $reserveitem) = C4::Reserves::CheckReserves($item->{itemnumber});
+                   ($reservestatus, $reserveitem, undef) = C4::Reserves::CheckReserves($item->{itemnumber});
                 }
 
                 # item is withdrawn, lost, damaged, not for loan, reserved or in transit
index 18e0ce4..9ec4630 100644 (file)
@@ -588,7 +588,7 @@ sub GetSubscriptions {
             $tmpstring =~ s/^AND //;
             push @sqlstrings, $tmpstring;
         }
-        $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")";
+        $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
     }
     if ($issn) {
         my @sqlstrings;
@@ -601,7 +601,7 @@ sub GetSubscriptions {
             $tmpstring =~ s/^OR //;
             push @sqlstrings, $tmpstring;
         }
-        $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "(" . join( ") OR (", @sqlstrings ) . ")";
+        $sqlwhere .= ( $sqlwhere ? " AND " : " WHERE " ) . "((" . join( ") OR (", @sqlstrings ) . "))";
     }
     $sql .= "$sqlwhere ORDER BY title";
     $debug and warn "GetSubscriptions query: $sql params : ", join( " ", @bind_params );
@@ -612,14 +612,6 @@ sub GetSubscriptions {
     my $odd           = 1;
 
     while ( my $line = $sth->fetchrow_hashref ) {
-        if ( $previousbiblio eq $line->{biblionumber} ) {
-            $line->{title} = "";
-            $line->{issn}  = "";
-        } else {
-            $previousbiblio = $line->{biblionumber};
-            $odd           = -$odd;
-        }
-        $line->{toggle} = 1 if $odd == 1;
         $line->{'cannotedit'} =
           (      C4::Context->preference('IndependantBranches')
               && C4::Context->userenv
index 1a93f2e..ccc0c8e 100644 (file)
@@ -113,7 +113,7 @@ sub SearchSuggestion  {
     LEFT JOIN borrowers AS U2 ON managedby=U2.borrowernumber
     LEFT JOIN branches AS B2 ON B2.branchcode=U2.branchcode
     LEFT JOIN categories AS C2 ON C2.categorycode = U2.categorycode
-    WHERE STATUS NOT IN ('CLAIMED')
+    WHERE 1=1
     } , map {
         if ( my $s = $suggestion->{$_} ) {
         push @sql_params,'%'.$s.'%'; 
index a260383..06c1e1d 100644 (file)
@@ -40,6 +40,7 @@ BEGIN {
                &whitelist
                &is_approved
                &approval_counts
+               &get_count_by_tag_status
                &get_filters
        );
        # %EXPORT_TAGS = ();
@@ -92,6 +93,24 @@ sub approval_counts () {
        return $result;
 }
 
+=head2 get_count_by_tag_status
+
+  get_count_by_tag_status($status);
+
+Takes a status and gets a count of tags with that status
+
+=cut
+
+sub get_count_by_tag_status  {
+    my ($status) = @_;
+    my $dbh            = C4::Context->dbh;
+    my $query          =
+      "SELECT count(*) FROM tags_approval WHERE approved=?";
+    my $sth = $dbh->prepare($query);
+    $sth->execute( $status );
+  return $sth->fetchrow;
+}
+
 sub remove_tag ($;$) {
        my $tag_id  = shift or return undef;
        my $user_id = (@_) ? shift : undef;
index 73d94c2..d150a16 100644 (file)
@@ -58,6 +58,7 @@ sub new {
     my $template = Template->new(
         {   EVAL_PERL    => 1,
             ABSOLUTE     => 1,
+           PLUGIN_BASE => 'Koha::Template::Plugin',
             INCLUDE_PATH => [
                 "$htdocs/$theme/$lang/includes",
                 "$htdocs/$theme/en/includes"
@@ -273,21 +274,10 @@ sub themelanguage {
     ($query) or warn "no query in themelanguage";
 
     # Select a language based on cookie, syspref available languages & browser
-    my $is_intranet = $interface eq 'intranet';
-    my @languages = split(",", C4::Context->preference(
-        $is_intranet ? 'language' : 'opaclanguages'));
-    my $lang;
-    $lang = getlanguagecookie($query);
-    unless ($lang) {
-        my $http_accept_language = $ENV{ HTTP_ACCEPT_LANGUAGE };
-        $lang = accept_language( $http_accept_language, 
-            getTranslatedLanguages($interface,'prog') );
-    }
-    # Ignore a lang not selected in sysprefs
-    $lang = undef  unless first { $_ eq $lang } @languages;
-    # Fall back to English if necessary
-    $lang = 'en' unless $lang;
+    my $lang = getlanguage($query, $interface);
 
+    # Select theme
+    my $is_intranet = $interface eq 'intranet';
     my @themes = split(" ", C4::Context->preference(
         $is_intranet ? "template" : "opacthemes" ));
     push @themes, 'prog';
@@ -317,16 +307,36 @@ sub setlanguagecookie {
     );
 }
 
-sub getlanguagecookie {
-    my ($query) = @_;
+
+sub getlanguage {
+    my ($query, $interface) = @_;
+
+    # Select a language based on cookie, syspref available languages & browser
+    my $is_intranet = $interface eq 'intranet';
+    my @languages = split(",", C4::Context->preference(
+        $is_intranet ? 'language' : 'opaclanguages'));
+
     my $lang;
-    if ($query->cookie('KohaOpacLanguage')){
-        $lang = $query->cookie('KohaOpacLanguage') ;
-    }else{
-        $lang = $ENV{HTTP_ACCEPT_LANGUAGE};
-        
+
+    # cookie
+    if ( $query->cookie('KohaOpacLanguage') ) {
+        $lang = $query->cookie('KohaOpacLanguage');
+        $lang =~ s/[^a-zA-Z_-]*//; # sanitize cookie
     }
-    $lang =~ s/[^a-zA-Z_-]*//; #sanitzie
+
+    # HTTP_ACCEPT_LANGUAGE
+    unless ($lang) {
+        my $http_accept_language = $ENV{ HTTP_ACCEPT_LANGUAGE };
+        $lang = accept_language( $http_accept_language,
+            getTranslatedLanguages($interface,'prog') );
+    }
+
+    # Ignore a lang not selected in sysprefs
+    $lang = undef  unless first { $_ eq $lang } @languages;
+
+    # Fall back to English if necessary
+    $lang = 'en' unless $lang;
+
     return $lang;
 }
 
index 18535a5..cfa4f60 100644 (file)
@@ -340,11 +340,12 @@ sub shelfpage ($$$$$) {
         my $owner     = $shelflist->{$element}->{'owner'};
         my $canmanage = ShelfPossibleAction( $loggedinuser, $element, 'manage' );
         my $sortfield = $shelflist->{$element}->{'sortfield'};
-        if ( $sortfield eq 'author' ) {
-            $shelflist->{$element}->{"authorsort"} = 'author';
-        }
-        if ( $sortfield eq 'year' ) {
-            $shelflist->{$element}->{"yearsort"} = 'year';
+        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;
@@ -367,9 +368,9 @@ sub shelfpage ($$$$$) {
         $qhash{$_} = $query->param($_) if $query->param($_);
     }
     ( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash;
-    if ( $shelfnumber ) {
+    if ( $shelfnumber && $totitems ) {
         $template->param(  pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" )  );
-    } else {
+    } elsif ( $totshelves ) {
         $template->param(
              pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" )  );
     }
index 8bc4000..d22a3ac 100755 (executable)
@@ -58,7 +58,7 @@ Replaces codes with authorized values in a MARC::Record object
 
 sub transformMARCXML4XSLT {
     my ($biblionumber, $record) = @_;
-    my $frameworkcode = GetFrameworkCode($biblionumber);
+    my $frameworkcode = GetFrameworkCode($biblionumber) || '';
     my $tagslib = &GetMarcStructure(1,$frameworkcode);
     my @fields;
     # FIXME: wish there was a better way to handle exceptions
@@ -190,7 +190,7 @@ sub buildKohaItemsNamespace {
 
         my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber});
 
-       my ( $reservestatus, $reserveitem ) = C4::Reserves::CheckReserves($item->{itemnumber});
+       my ( $reservestatus, $reserveitem, undef ) = C4::Reserves::CheckReserves($item->{itemnumber});
 
         if ( $itemtypes->{ $item->{itype} }->{notforloan} || $item->{notforloan} || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} || 
              (defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} || (defined $reservestatus && $reservestatus eq "Waiting") ){ 
index f80fe4b..b028fd3 100644 (file)
@@ -802,7 +802,7 @@ XML::LibXML::SAX::Parser=HASH(0x8356e0c)
 == Install the Zebra package ==
 
 Zebra is already in the standard repository of openSUSE 11.3, so it seems better to install it.
-In the next chapter a question will be asked wether it is installed, so you better install it; no harm done.
+In the next chapter a question will be asked whether it is installed, so you better install it; no harm done.
 Because you may need the documentation, that will also be installed.
 Note that the package name is idzebra.
 
diff --git a/Koha/Template/Plugin/KohaDates.pm b/Koha/Template/Plugin/KohaDates.pm
new file mode 100644 (file)
index 0000000..749f6e2
--- /dev/null
@@ -0,0 +1,31 @@
+package Koha::Template::Plugin::KohaDates;
+
+# Copyright Catalyst IT 2011
+
+# 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 Template::Plugin::Filter;
+use base qw( Template::Plugin::Filter );
+
+use C4::Dates;
+
+sub filter {
+    my ($self,$text) = @_;
+    my $date = C4::Dates->new( $text, 'iso' );
+    return $date->output("syspref");
+}
+
+1;
\ No newline at end of file
index 596637d..7189a22 100755 (executable)
--- a/about.pl
+++ b/about.pl
@@ -33,6 +33,8 @@ use C4::Auth;
 use C4::Context;
 use C4::Installer;
 
+#use Smart::Comments '####';
+
 my $query = new CGI;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
@@ -106,7 +108,46 @@ foreach (@components) {
         $row = [];
     }
 }
+## ## $table
 
 $template->param( table => $table );
 
+
+## ------------------------------------------
+## Koha time line code
+
+#get file location
+my $dir = C4::Context->config('intranetdir');
+open( my $file, "<", "$dir" . "/docs/history.txt" );
+my $i = 0;
+
+my @rows2 = ();
+my $row2  = [];
+
+my @lines = <$file>;
+close($file);
+
+shift @lines; #remove header row
+
+foreach (@lines) {
+    my ( $date, $desc, $tag ) = split(/\t/);
+    push(
+        @rows2,
+        {
+            date => $date,
+            desc => $desc,
+        }
+    );
+}
+
+my $table2 = [];
+#foreach my $row2 (@rows2) {
+foreach  (@rows2) {
+    push (@$row2, $_);
+    push( @$table2, { row2 => $row2 } );
+    $row2 = [];
+}
+
+$template->param( table2 => $table2 );
+
 output_html_with_http_headers $query, $cookie, $template->output;
index d7f7e96..121d20d 100755 (executable)
@@ -212,7 +212,7 @@ if ( $orderinfo->{quantity} ne '0' ) {
         my ($biblionumber,$bibitemnum) = AddBiblio($record,'');
         # change suggestion status if applicable
         if ($$orderinfo{suggestionid}) {
-            ModSuggestion( {suggestionid=>$$orderinfo{suggestionid}, status=>'ORDERED', biblionumber=>$biblionumber} );
+            ModSuggestion( {suggestionid=>$$orderinfo{suggestionid}, STATUS=>'ORDERED', biblionumber=>$biblionumber} );
         }
                $orderinfo->{biblioitemnumber}=$bibitemnum;
                $orderinfo->{biblionumber}=$biblionumber;
index b836280..c528156 100755 (executable)
@@ -343,6 +343,11 @@ my $total_est_gste;
         last;
     }
 
+    my @cancelledorders = GetCancelledOrders($basketno);
+    foreach (@cancelledorders) {
+        $_->{'line_total'} = sprintf("%.2f", $_->{'ecost'} * $_->{'quantity'});
+    }
+
     $template->param(
         basketno             => $basketno,
         basketname           => $basket->{'basketname'},
@@ -359,6 +364,7 @@ my $total_est_gste;
         name                 => $bookseller->{'name'},
         entrydate            => C4::Dates->new($results[0]->{'entrydate'},'iso')->output,
         books_loop           => \@books_loop,
+        cancelledorders_loop => \@cancelledorders,
         gist_rate            => sprintf( "%.2f", $gist * 100 ) . '%',
         total_rrp_gste       => sprintf( "%.2f", $total_rrp_gste ),
         total_est_gste       => sprintf( "%.2f", $total_est_gste ),
diff --git a/acqui/ordered.pl b/acqui/ordered.pl
new file mode 100755 (executable)
index 0000000..92f44a0
--- /dev/null
@@ -0,0 +1,109 @@
+#!/usr/bin/perl
+
+# Copyright 2008 - 2009 BibLibre SARL
+# Copyright 2010,2011 Catalyst IT Limited
+# 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
+
+ordered.pl
+
+=head1 DESCRIPTION
+
+this script is to show orders ordered but not yet received
+
+=cut
+
+use C4::Context;
+use strict;
+use warnings;
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Dates;
+
+my $dbh     = C4::Context->dbh;
+my $input   = new CGI;
+my $fund_id = $input->param('fund');
+my $fund_code = $input->param('fund_code');
+
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "acqui/ordered.tt",
+        query           => $input,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { acquisition => 1 },
+        debug           => 1,
+    }
+);
+
+my $query = <<EOQ;
+SELECT
+    aqorders.basketno, aqorders.ordernumber,
+    quantity-quantityreceived AS tleft,
+    ecost, budgetdate, entrydate,
+    aqbasket.booksellerid,
+    itype,
+    title
+FROM (aqorders, aqbasket)
+LEFT JOIN biblio ON
+    biblio.biblionumber=aqorders.biblionumber
+LEFT JOIN aqorders_items ON
+    aqorders.ordernumber=aqorders_items.ordernumber
+LEFT JOIN items ON
+    items.itemnumber=aqorders_items.itemnumber
+WHERE
+    aqorders.basketno=aqbasket.basketno AND
+    budget_id=? AND
+    (datecancellationprinted IS NULL OR
+        datecancellationprinted='0000-00-00') AND
+    (quantity > quantityreceived OR quantityreceived IS NULL)
+    GROUP BY aqorders.ordernumber
+EOQ
+
+my $sth = $dbh->prepare($query);
+
+$sth->execute($fund_id);
+if ( $sth->err ) {
+    die "Error occurred fetching records: " . $sth->errstr;
+}
+my @ordered;
+
+my $total = 0;
+while ( my $data = $sth->fetchrow_hashref ) {
+    my $left = $data->{'tleft'};
+    if ( !$left || $left eq '' ) {
+        $left = $data->{'quantity'};
+    }
+    if ( $left && $left > 0 ) {
+        my $subtotal = $left * $data->{'ecost'};
+        $data->{subtotal} = sprintf( "%.2f", $subtotal );
+        $data->{'left'} = $left;
+        push @ordered, $data;
+        $total += $subtotal;
+    }
+}
+$total = sprintf( "%.2f", $total );
+
+$template->{VARS}->{'fund'}    = $fund_id;
+$template->{VARS}->{'ordered'} = \@ordered;
+$template->{VARS}->{'total'}   = $total;
+$template->{VARS}->{'fund_code'} = $fund_code;
+
+$sth->finish;
+
+output_html_with_http_headers $input, $cookie, $template->output;
index 98ba544..753071d 100755 (executable)
@@ -70,6 +70,7 @@ use C4::Auth;
 use C4::Output;
 use C4::Dates qw/format_date/;
 use C4::Bookseller qw/ GetBookSellerFromId /;
+use C4::Budgets qw/ GetBudget /;
 use C4::Members;
 use C4::Branch;    # GetBranches
 use C4::Items;
@@ -133,6 +134,12 @@ if ( $count == 1 ) {
     if ( @$results[0]->{'unitprice'} == 0 ) {
         @$results[0]->{'unitprice'} = '';
     }
+
+    my $authorisedby = @$results[0]->{'authorisedby'};
+    my $member = GetMember( borrowernumber => $authorisedby );
+
+    my $budget = GetBudget( @$results[0]->{'budget_id'} );
+
     $template->param(
         count                 => 1,
         biblionumber          => @$results[0]->{'biblionumber'},
@@ -148,17 +155,19 @@ if ( $count == 1 ) {
         copyrightdate         => @$results[0]->{'copyrightdate'},
         isbn                  => @$results[0]->{'isbn'},
         seriestitle           => @$results[0]->{'seriestitle'},
-        bookfund              => @$results[0]->{'bookfundid'},
+        bookfund              => $budget->{budget_name},
         quantity              => @$results[0]->{'quantity'},
         quantityreceivedplus1 => @$results[0]->{'quantityreceived'} + 1,
         quantityreceived      => @$results[0]->{'quantityreceived'},
         rrp                   => @$results[0]->{'rrp'},
         ecost                 => @$results[0]->{'ecost'},
         unitprice             => @$results[0]->{'unitprice'},
+        memberfirstname       => $member->{firstname} || "",
+        membersurname         => $member->{surname} || "",
         invoice               => $invoice,
         datereceived          => $datereceived->output(),
-        datereceived_iso          => $datereceived->output('iso'),
-        notes                       =>              $order->{notes}
+        datereceived_iso      => $datereceived->output('iso'),
+        notes                 => $order->{notes}
     );
 }
 else {
diff --git a/acqui/spent.pl b/acqui/spent.pl
new file mode 100755 (executable)
index 0000000..12260c0
--- /dev/null
@@ -0,0 +1,112 @@
+#!/usr/bin/perl
+
+# script to show a breakdown of committed and spent budgets
+
+# Copyright 2002-2009 Katipo Communications Limited
+# Copyright 2010,2011 Catalyst IT Limited
+# 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
+
+ spent.pl
+
+=head1 DESCRIPTION
+
+this script is designed to show the spent amount in budges
+
+=cut
+
+use C4::Context;
+use C4::Auth;
+use C4::Output;
+use C4::Dates;
+use strict;
+use warnings;
+use CGI;
+
+my $dbh      = C4::Context->dbh;
+my $input    = new CGI;
+my $bookfund = $input->param('fund');
+my $fund_code = $input->param('fund_code');
+
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "acqui/spent.tt",
+        query           => $input,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { acquisition => 1 },
+        debug           => 1,
+    }
+);
+
+my $query = <<EOQ;
+SELECT
+    aqorders.basketno, aqorders.ordernumber,
+    quantity-quantityreceived AS tleft,
+    ecost, budgetdate, entrydate,
+    aqbasket.booksellerid,
+    itype,
+    title,
+    aqorders.booksellerinvoicenumber,
+    quantityreceived,
+    unitprice,
+    freight,
+    datereceived,
+    aqorders.biblionumber
+FROM (aqorders, aqbasket)
+LEFT JOIN items ON
+    items.biblioitemnumber=aqorders.biblioitemnumber
+LEFT JOIN biblio ON
+    biblio.biblionumber=aqorders.biblionumber
+LEFT JOIN aqorders_items ON
+    aqorders.ordernumber=aqorders_items.ordernumber
+WHERE
+    aqorders.basketno=aqbasket.basketno AND
+    budget_id=? AND
+    (datecancellationprinted IS NULL OR
+        datecancellationprinted='0000-00-00')
+    GROUP BY aqorders.ordernumber
+EOQ
+my $sth = $dbh->prepare($query);
+$sth->execute($bookfund);
+if ( $sth->err ) {
+    die "An error occurred fetching records: " . $sth->errstr;
+}
+my $total = 0;
+my $toggle;
+my @spent;
+while ( my $data = $sth->fetchrow_hashref ) {
+    my $recv = $data->{'quantityreceived'};
+    if ( $recv > 0 ) {
+        my $subtotal = $recv * ( $data->{'unitprice'} + $data->{'freight'} );
+        $data->{'subtotal'}  = sprintf( "%.2f", $subtotal );
+        $data->{'freight'}   = sprintf( "%.2f", $data->{'freight'} );
+        $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice'} );
+        $total += $subtotal;
+        push @spent, $data;
+    }
+
+}
+$total = sprintf( "%.2f", $total );
+
+$template->{VARS}->{'fund'}  = $bookfund;
+$template->{VARS}->{'spent'} = \@spent;
+$template->{VARS}->{'total'} = $total;
+$template->{VARS}->{'fund_code'} = $fund_code;
+$sth->finish;
+
+output_html_with_http_headers $input, $cookie, $template->output;
index 055f69d..0dcec19 100755 (executable)
@@ -216,6 +216,7 @@ sub SearchPrefs {
 
                 foreach my $piece ( @$line ) {
                     if ( ref( $piece ) eq 'HASH' ) {
+                        if ( !$piece->{'pref'} ){ next; }
                         if ( $piece->{'pref'} =~ /^$searchfield$/i ) {
                             my ( undef, $LINES ) = TransformPrefsToHTML( $data, $searchfield );
 
@@ -249,7 +250,7 @@ sub SearchPrefs {
 
 sub matches {
     my ( $text, $terms ) = @_;
-    return !grep( { $text !~ /$_/i } @$terms );
+    if ( $text ) { return !grep( { $text !~ /$_/i } @$terms ); }
 }
 
 my $dbh = C4::Context->dbh;
index 78d0768..f4069ae 100755 (executable)
@@ -224,6 +224,7 @@ $tabsysprefs{intranetreadinghistory}       = "Patrons";
 $tabsysprefs{NotifyBorrowerDeparture}      = "Patrons";
 $tabsysprefs{memberofinstitution}          = "Patrons";
 $tabsysprefs{BorrowerMandatoryField}       = "Patrons";
+$tabsysprefs{BorrowerUnwantedField}        = "Patrons";
 $tabsysprefs{borrowerRelationship}         = "Patrons";
 $tabsysprefs{BorrowersTitles}              = "Patrons";
 $tabsysprefs{patronimages}                 = "Patrons";
index 2f82f5a..23653f6 100755 (executable)
@@ -204,7 +204,7 @@ sub create_input {
     }
     elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) {
 
-        # opening plugin. Just check wether we are on a developper computer on a production one
+        # opening plugin. Just check whether we are on a developer computer on a production one
         # (the cgidir differs)
         my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder";
         unless (-r $cgidir and -d $cgidir) {
index 58a8d90..de24490 100755 (executable)
@@ -100,13 +100,15 @@ if ($subscriptionsnumber) {
         subscriptiontitle   => $subscriptiontitle,
     );
 }
+my $record = GetMarcBiblio($biblionumber);
 
 $template->param (
     ISBD                => $res,
     biblionumber        => $biblionumber,
     isbdview            => 1,
     z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
-    C4::Search::enabled_staff_search_views
+    ocoins => GetCOinSBiblio($record),
+    C4::Search::enabled_staff_search_views,
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;
index 0a2974b..0490076 100755 (executable)
@@ -83,6 +83,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 );
 
 my $record = GetMarcBiblio($biblionumber);
+$template->param( ocoins => GetCOinSBiblio($record) );
 
 if ( not defined $record ) {
     # biblionumber invalid -> report and exit
index 580949d..3c95ba2 100755 (executable)
@@ -86,6 +86,7 @@ if (C4::Context->preference("XSLTDetailsDisplay") ) {
 }
 
 $template->param( 'SpineLabelShowPrintOnBibDetails' => C4::Context->preference("SpineLabelShowPrintOnBibDetails") );
+$template->param( ocoins => GetCOinSBiblio($record) );
 
 # some useful variables for enhanced content;
 # in each case, we're grabbing the first value we find in
@@ -174,6 +175,7 @@ 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
 foreach my $item (@items) {
 
     $item->{homebranch}        = GetBranchName($item->{homebranch});
@@ -251,7 +253,9 @@ foreach my $item (@items) {
                $analytics_flag=1;
                $item->{countanalytics} = $countanalytics;
        }
-
+    if ($item->{'materials'} ne ''){
+       $materials_flag = 1;
+    }
     push @itemloop, $item;
 }
 
@@ -276,6 +280,7 @@ $template->param(
         hostrecords         => $hostrecords,
        analytics_flag  => $analytics_flag,
        C4::Search::enabled_staff_search_views,
+        materials       => $materials_flag,
 );
 
 if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) {
index 3efdb21..2b55d9f 100755 (executable)
@@ -1,5 +1,4 @@
 #!/usr/bin/perl
-use HTML::Template::Pro;
 use strict;
 #use warnings; FIXME - Bug 2505
 
index 0d774ea..3fb936e 100755 (executable)
@@ -45,6 +45,10 @@ my $params = $query->Vars;
 my $biblionumber = $params->{'biblionumber'};
 my $itemnumber   = $params->{'itemnumber'};
 
+if (C4::Context->preference("HidePatronName")) {
+   $template->param(HidePatronName => 1);
+}
+
 my ($issues,$biblio,$barcode);
 if ($itemnumber){
        $issues=GetItemIssues($itemnumber);
index 47e1adf..f5bb904 100755 (executable)
@@ -68,7 +68,7 @@ my $title=$query->param('title');
 my $bi=$query->param('bi');
 $bi = $biblionumber unless $bi;
 my $itemnumber = $query->param('itemnumber');
-my $data=GetBiblioData($biblionumber);
+my $data = &GetBiblioData($biblionumber);
 my $dewey = $data->{'dewey'};
 my $showallitems = $query->param('showallitems');
 
@@ -86,7 +86,6 @@ my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
 # $dewey=~ s/\.$//;
 # $data->{'dewey'}=$dewey;
 
-my @results;
 my $fw = GetFrameworkCode($biblionumber);
 my @all_items= GetItemsInfo($biblionumber);
 my @items;
@@ -107,7 +106,7 @@ if (@hostitems){
         push (@items,@hostitems);
 }
 
-
+my $subtitle = GetRecordValue('subtitle', $record, $fw);
 
 my $totalcount=@all_items;
 my $showncount=@items;
@@ -120,7 +119,11 @@ my $ccodes= GetKohaAuthorisedValues('items.ccode',$fw);
 my $itemtypes = GetItemTypes;
 
 $data->{'itemtypename'} = $itemtypes->{$data->{'itemtype'}}->{'description'};
-$results[0]=$data;
+
+foreach ( keys %{$data} ) {
+    $template->param( "$_" => defined $data->{$_} ? $data->{$_} : '' );
+}
+
 ($itemnumber) and @items = (grep {$_->{'itemnumber'} == $itemnumber} @items);
 foreach my $item (@items){
     $item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw),$item->{itemlost}) if GetAuthValCode('items.itemlost',$fw);
@@ -128,9 +131,7 @@ foreach my $item (@items){
     $item->{'collection'}              = $ccodes->{ $item->{ccode} } if ($ccodes);
     $item->{'itype'}                   = $itemtypes->{ $item->{'itype'} }->{'description'};
     $item->{'replacementprice'}        = sprintf( "%.2f", $item->{'replacementprice'} );
-    $item->{'datelastborrowed'}        = format_date( $item->{'datelastborrowed'} );
-    $item->{'dateaccessioned'}         = format_date( $item->{'dateaccessioned'} );
-    $item->{'datelastseen'}            = format_date( $item->{'datelastseen'} );
+    $item->{$_}                        = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/;
     $item->{'copyvol'}                 = $item->{'copynumber'};
 
 
@@ -173,15 +174,18 @@ $template->param(count => $data->{'count'},
     subscriptiontitle   => $data->{title},
        C4::Search::enabled_staff_search_views,
 );
-$template->param(BIBITEM_DATA => \@results);
-$template->param(ITEM_DATA => \@items);
-$template->param(moredetailview => 1);
-$template->param(loggedinuser => $loggedinuser);
-$template->param(biblionumber => $biblionumber);
-$template->param(biblioitemnumber => $bi);
-$template->param(itemnumber => $itemnumber);
+
+$template->param(
+    ITEM_DATA           => \@items,
+    moredetailview      => 1,
+    loggedinuser        => $loggedinuser,
+    biblionumber        => $biblionumber,
+    biblioitemnumber    => $bi,
+    itemnumber          => $itemnumber,
+    z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)),
+    subtitle            => $subtitle,
+);
 $template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items );
-$template->param(z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)));
 
 output_html_with_http_headers $query, $cookie, $template->output;
 
index 907efdb..96163d6 100755 (executable)
@@ -331,13 +331,13 @@ if ( $template_type eq 'advsearch' ) {
     my $languages_limit_loop = getAllLanguages();
     $template->param(search_languages_loop => $languages_limit_loop,);
 
-    # use the global setting by default
-    if ( C4::Context->preference("expandedSearchOption") == 1) {
-        $template->param( expanded_options => C4::Context->preference("expandedSearchOption") );
-    }
-    # but let the user override it
-    if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) {
-        $template->param( expanded_options => $cgi->param('expanded_options'));
+    # Expanded search options in advanced search:
+    # use the global setting by default, but let the user override it
+    {
+        my $expanded = $cgi->param('expanded_options');
+        $expanded = C4::Context->preference("expandedSearchOption") || 0
+            if !defined($expanded) || $expanded !~ /^0|1$/;
+        $template->param( expanded_options => $expanded );
     }
 
     $template->param(virtualshelves => C4::Context->preference("virtualshelves"));
@@ -440,18 +440,18 @@ if ($params->{'limit-yr'}) {
 # $ %z3950p will be a hash ref if the indexes are present (advacned search), otherwise undef
 my $z3950par;
 my $indexes2z3950 = {
-       kw=>'title', au=>'author', 'au,phr'=>'author', nb=>'isbn', ns=>'issn',
-       'lcn,phr'=>'dewey', su=>'subject', 'su,phr'=>'subject', 
-       ti=>'title', 'ti,phr'=>'title', se=>'title'
+    kw=>'title', au=>'author', 'au,phr'=>'author', nb=>'isbn', ns=>'issn',
+    'lcn,phr'=>'dewey', su=>'subject', 'su,phr'=>'subject',
+    ti=>'title', 'ti,phr'=>'title', se=>'title'
 };
 for (my $ii = 0; $ii < @operands; ++$ii)
 {
-       my $name = $indexes2z3950->{$indexes[$ii]};
-       if (defined $name && defined $operands[$ii])
-       {
-               $z3950par ||= {};
-               $z3950par->{$name} = $operands[$ii] if !exists $z3950par->{$name};
-       }
+    my $name = $indexes2z3950->{$indexes[$ii]};
+    if (defined $name && defined $operands[$ii])
+    {
+        $z3950par ||= {};
+        $z3950par->{$name} = $operands[$ii] if !exists $z3950par->{$name};
+    }
 }
 
 
@@ -471,7 +471,7 @@ my ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit
 my @results;
 
 ## I. BUILD THE QUERY
-my $lang = C4::Templates::getlanguagecookie($cgi);
+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
@@ -484,9 +484,9 @@ for my $this_cgi ( split('&',$query_cgi) ) {
     my $input_name = $1;
     my $input_value = $2;
     push @query_inputs, { input_name => $input_name, input_value => $input_value };
-       if ($input_name eq 'idx') {
-       $scan_index_to_use = $input_value; # unless $scan_index_to_use;
-       }
+    if ($input_name eq 'idx') {
+        $scan_index_to_use = $input_value; # unless $scan_index_to_use;
+    }
 }
 $template->param ( QUERY_INPUTS => \@query_inputs,
                    scan_index_to_use => $scan_index_to_use );
@@ -552,8 +552,8 @@ for (my $i=0;$i<@servers;$i++) {
         ## If there's just one result, redirect to the detail page
         if ($total == 1) {         
             my $biblionumber = $newresults[0]->{biblionumber};
-                       my $defaultview = C4::Context->preference('IntranetBiblioDefaultView');
-                       my $views = { C4::Search::enabled_staff_search_views }; 
+            my $defaultview = C4::Context->preference('IntranetBiblioDefaultView');
+            my $views = { C4::Search::enabled_staff_search_views };
             if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) {
                 print $cgi->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber");
             } elsif  ($defaultview eq 'marc' && $views->{can_view_MARC}) {
@@ -578,14 +578,18 @@ for (my $i=0;$i<@servers;$i++) {
             $template->param(limit_desc => $limit_desc);
             $template->param(offset     => $offset);
             $template->param(DisplayMultiPlaceHold => $DisplayMultiPlaceHold);
-                       $template->param (z3950_search_params => C4::Search::z3950_search_args($query_desc));
+            $template->param (z3950_search_params => C4::Search::z3950_search_args($query_desc));
             if ($query_desc || $limit_desc) {
                 $template->param(searchdesc => 1);
             }
             $template->param(stopwords_removed => "@$stopwords_removed") if $stopwords_removed;
             $template->param(results_per_page =>  $results_per_page);
+            # must define a value for size if not present in DB
+            # in order to avoid problems generated by the default size value in TT
+            foreach my $line (@newresults) {
+                if ( not exists $line->{'size'} ) { $line->{'size'} = "" }
+            }
             $template->param(SEARCH_RESULTS => \@newresults);
-
             ## FIXME: add a global function for this, it's better than the current global one
             ## Build the page numbers on the bottom of the page
             my @page_numbers;
@@ -649,7 +653,7 @@ for (my $i=0;$i<@servers;$i++) {
         # no hits
         else {
             $template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc);
-                       $template->param (z3950_search_params => C4::Search::z3950_search_args($z3950par || $query_desc));
+            $template->param (z3950_search_params => C4::Search::z3950_search_args($z3950par || $query_desc));
         }
 
     } # end of the if local
@@ -679,7 +683,7 @@ $template->param(
             total => $total,
             opacfacets => 1,
             facets_loop => $facets,
-           displayFacetCount=> C4::Context->preference('displayFacetCount')||0,
+            displayFacetCount=> C4::Context->preference('displayFacetCount')||0,
             scan => $scan,
             search_error => $error,
 );
index a54894b..32ea2f6 100755 (executable)
@@ -23,7 +23,7 @@
 use strict;
 #use warnings; FIXME - Bug 2505
 
-use open OUT=>':utf8', ':std';
+use open OUT=>":encoding(UTF-8)", ':std';
 
 # standard or CPAN modules used
 use CGI qw(:standard);
index 379c12c..7f93ee1 100755 (executable)
@@ -74,6 +74,6 @@ if (defined $itemnotes) { # i.e., itemnotes parameter passed from form
 
 ModItem($item_changes, $biblionumber, $itemnumber);
 
-LostItem($itemnumber, 'MARK RETURNED') if $itemlost;
+LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $itemlost;
 
 print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber");
index 1a82989..568007e 100755 (executable)
@@ -159,7 +159,7 @@ sub MARCfindbreeding {
 
 =cut
 
-sub build_authorized_values_list ($$$$$$$) {
+sub build_authorized_values_list {
     my ( $tag, $subfield, $value, $dbh, $authorised_values_sth,$index_tag,$index_subfield ) = @_;
 
     my @authorised_values;
@@ -252,7 +252,7 @@ sub build_authorized_values_list ($$$$$$$) {
 
 =cut
 
-sub CreateKey(){
+sub CreateKey {
     return int(rand(1000000));
 }
 
@@ -263,7 +263,7 @@ sub CreateKey(){
 
 =cut
 
-sub GetMandatoryFieldZ3950($){
+sub GetMandatoryFieldZ3950 {
     my $frameworkcode = shift;
     my @isbn   = GetMarcFromKohaField('biblioitems.isbn',$frameworkcode);
     my @title  = GetMarcFromKohaField('biblio.title',$frameworkcode);
@@ -414,7 +414,7 @@ sub create_input {
     }
     elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) {
 
-        # opening plugin. Just check wether we are on a developper computer on a production one
+        # opening plugin. Just check whether we are on a developer computer on a production one
         # (the cgidir differs)
         my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder";
         unless ( opendir( DIR, "$cgidir" ) ) {
@@ -536,7 +536,7 @@ sub format_indicator {
     return $ind_value;
 }
 
-sub build_tabs ($$$$$) {
+sub build_tabs {
     my ( $template, $record, $dbh, $encoding,$input ) = @_;
 
     # fill arrays
index 5e89ef8..270b16d 100755 (executable)
@@ -87,6 +87,9 @@ if ($query) {
     # SimpleSearch() give the results per page we want, so 0 offet here
     my $total = @{$marcresults};
     my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, @{$marcresults} );
+    foreach my $line (@newresults) {
+        if ( not exists $line->{'size'} ) { $line->{'size'} = "" }
+    }
     $template->param(
         total          => $total_hits,
         query          => $query,
index 4442ed3..248c0de 100755 (executable)
@@ -381,7 +381,8 @@ if ($op eq "additem") {
         my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
 
        # If there is a barcode and we can't find him new values, we can't add multiple copies
-        my $testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj;
+       my $testbarcode;
+        $testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj;
        if ($oldbarcode && !$testbarcode) {
 
            push @errors, "no_next_barcode";
@@ -480,7 +481,17 @@ if ($op eq "additem") {
             $nextop="additem";
         } 
         else {
-            print $input->redirect("/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=$biblionumber");
+            my $defaultview = C4::Context->preference('IntranetBiblioDefaultView');
+            my $views = { C4::Search::enabled_staff_search_views };
+            if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) {
+                print $input->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber");
+            } elsif  ($defaultview eq 'marc' && $views->{can_view_MARC}) {
+                print $input->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber");
+            } elsif  ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) {
+                print $input->redirect("/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber");
+            } else {
+                print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber");
+            }
             exit;
         }
        }
@@ -545,27 +556,28 @@ my @fields = $temp->fields();
 
 
 my @hostitemnumbers;
-my $analyticfield = '773';
-if ($marcflavour  eq 'MARC21' || $marcflavour eq 'NORMARC') {
-    $analyticfield = '773';
-} elsif ($marcflavour eq 'UNIMARC') {
-    $analyticfield = '461';
-}
-foreach my $hostfield ($temp->field($analyticfield)){
-    if ($hostfield->subfield('0')){
-        my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1);
-        my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostfield->subfield('0')) );
-        foreach my $hostitem ($hostrecord->field($itemfield)){
-            if ($hostitem->subfield('9') eq $hostfield->subfield('9')){
-                push (@fields, $hostitem);
-                push (@hostitemnumbers, $hostfield->subfield('9'));
+if ( C4::Context->preference('EasyAnalyticalRecords') ) {
+    my $analyticfield = '773';
+    if ($marcflavour  eq 'MARC21' || $marcflavour eq 'NORMARC') {
+        $analyticfield = '773';
+    } elsif ($marcflavour eq 'UNIMARC') {
+        $analyticfield = '461';
+    }
+    foreach my $hostfield ($temp->field($analyticfield)){
+       if ($hostfield->subfield('0')){
+            my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1);
+           my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostfield->subfield('0')) );
+           foreach my $hostitem ($hostrecord->field($itemfield)){
+               if ($hostitem->subfield('9') eq $hostfield->subfield('9')){
+                   push (@fields, $hostitem);
+                    push (@hostitemnumbers, $hostfield->subfield('9'));
+                }
             }
         }
     }
 }
 
 
-
 foreach my $field (@fields) {
     next if ( $field->tag() < 10 );
 
@@ -596,18 +608,21 @@ foreach my $field (@fields) {
             }
         }
         $this_row{itemnumber} = $subfieldvalue if ($field->tag() eq $itemtagfield && $subfieldcode eq $itemtagsubfield);
-       foreach my $hostitemnumber (@hostitemnumbers){
+
+       if ( C4::Context->preference('EasyAnalyticalRecords') ) {
+           foreach my $hostitemnumber (@hostitemnumbers){
                if ($this_row{itemnumber} eq $hostitemnumber){
                        $this_row{hostitemflag} = 1;
                        $this_row{hostbiblionumber}= GetBiblionumberFromItemnumber($hostitemnumber);
                        last;
                }
-       }
+           }
 
-#      my $countanalytics=GetAnalyticsCount($this_row{itemnumber});
-#        if ($countanalytics > 0){
+#          my $countanalytics=GetAnalyticsCount($this_row{itemnumber});
+#           if ($countanalytics > 0){
 #                $this_row{countanalytics} = $countanalytics;
-#        }
+#           }
+       }
 
     }
     if (%this_row) {
@@ -650,10 +665,7 @@ my $onlymine = C4::Context->preference('IndependantBranches') &&
                C4::Context->userenv                           && 
                C4::Context->userenv->{flags}!=1               && 
                C4::Context->userenv->{branch};
-my $branch = C4::Context->userenv->{branch};
-if ($frameworkcode eq 'FA'){
-    $branch = $input->param('branch');
-}    
+my $branch = $input->param('branch') || C4::Context->userenv->{branch};
 my $branches = GetBranchesLoop($branch,$onlymine);  # build once ahead of time, instead of multiple times later.
 
 # We generate form, from actuel record
@@ -670,8 +682,6 @@ if($itemrecord){
             next if subfield_is_koha_internal_p($subfieldtag);
             next if ($tagslib->{$tag}->{$subfieldtag}->{'tab'} ne "10");
 
-            $subfieldlib->{hidden} = 1
-              if $tagslib->{$tag}->{$subfieldtag}->{authorised_value} eq 'LOST';
             my $subfield_data = generate_subfield_form($tag, $subfieldtag, $value, $tagslib, $subfieldlib, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i);        
 
             push @fields, "$tag$subfieldtag";
index e3ee725..0b881f1 100755 (executable)
@@ -250,7 +250,7 @@ Create a random value to set it into the input name
 
 =cut
 
-sub createKey(){
+sub createKey {
     return int(rand(1000000));
 }
 
index 9a264ab..f3ef3e8 100755 (executable)
@@ -27,7 +27,7 @@ use C4::Output;
 my $input = new CGI;
 my $plugin_name="cataloguing/value_builder/".$input->param("plugin_name");
 
-# opening plugin. Just check wether we are on a developper computer on a production one
+# opening plugin. Just check whether we are on a developer computer on a production one
 # (the cgidir differs)
 my $cgidir = C4::Context->intranetdir ."/cgi-bin";
 my $vbdir = "$cgidir/cataloguing/value_builder";
index 4c9b267..711904f 100755 (executable)
@@ -17,8 +17,8 @@
 # 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 strict;
+use warnings;
 use C4::Context;
 
 =head1 plugin_parameters
@@ -53,12 +53,12 @@ sub plugin_javascript {
 
        my $branchcode = C4::Context->userenv->{'branch'};
 
-       $query = "SELECT MAX(CAST(SUBSTRING_INDEX(stocknumber,'_',-1) AS SIGNED))+1 FROM items WHERE homebranch = ? AND stocknumber LIKE ?";
+       my $query = "SELECT MAX(CAST(SUBSTRING_INDEX(stocknumber,'_',-1) AS SIGNED))+1 FROM items WHERE homebranch = ? AND stocknumber LIKE ?";
        my $sth=$dbh->prepare($query);
 
        $sth->execute($branchcode,$branchcode."_%");
        my ($nextnum) = $sth->fetchrow;
-       my $nextnum = $branchcode.'_'.$nextnum;
+       $nextnum = $branchcode.'_'.$nextnum;
 
     my $scr = <<END_OF_JS;
 if (\$('#' + id).val() == '' || force) {
index 8ecaeab..e3717ed 100755 (executable)
@@ -18,8 +18,8 @@
 # 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 strict;
+use warnings;
 
 use C4::AuthoritiesMarc;
 use C4::Auth;
@@ -110,7 +110,10 @@ my ($input) = @_;
     my $authtypes = getauthtypes;
     my @authtypesloop;
     foreach my $thisauthtype (keys %$authtypes) {
-        my $selected = 1 if $thisauthtype eq $authtypecode;
+        my $selected;
+        if ($thisauthtype eq $authtypecode) {
+            $selected=1;
+        }
         my %row =(value => $thisauthtype,
                     selected => $selected,
                     authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
@@ -183,7 +186,7 @@ my ($input) = @_;
         } else {
             $to = (($startfrom+1)*$resultsperpage);
         }
-        my $link="../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&amp;authtypecode=EDITORS&and_or=$and_or&amp;marclist=$marclist&amp;operator=$operator&amp;orderby=$orderby&amp;excluding=$excluding&amp;".join("&amp;",map {"value=".$_} @value)."&amp;op=do_search&amp;type=intranet&amp;index=$index";
+        my $link="../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&amp;authtypecode=EDITORS&amp;".join("&amp;",map {"value=".$_} @value)."&amp;op=do_search&amp;type=intranet&amp;index=$index";
 
         $template->param(result => $results) if $results;
         $template->param('index' => $query->param('index'));
index d3038ef..acc0854 100755 (executable)
@@ -269,8 +269,10 @@ sub plugin {
             $subfield_value_t = $marcrecord->field('500')->subfield("a");
         }
 
-        my $subfield_value_u = $marcrecord->field('856')->subfield("u")
-          if ( $marcrecord->field('856') );
+        my $subfield_value_u;
+        if ( $marcrecord->field('856') ) {
+            $subfield_value_u = $marcrecord->field('856')->subfield("u");
+        }
 
         my $subfield_value_v;
         if (   ( $marcrecord->field('225') )
@@ -283,14 +285,17 @@ sub plugin {
         {
             $subfield_value_v = $marcrecord->field('200')->subfield("h");
         }
-        my $subfield_value_x = $marcrecord->field('011')->subfield("a")
-          if (
+        my $subfield_value_x;
+        if (
             $marcrecord->field('011')
             and not( ( $marcrecord->field('011')->subfield("y") )
-                or ( $marcrecord->field('011')->subfield("z") ) )
-          );
-        my $subfield_value_y = $marcrecord->field('013')->subfield("a")
-          if ( $marcrecord->field('013') );
+                or ( $marcrecord->field('011')->subfield("z") ) ) ) {
+             $subfield_value_x = $marcrecord->field('011')->subfield("a");
+        }
+        my $subfield_value_y;
+          if ( $marcrecord->field('013') ) {
+             $subfield_value_y = $marcrecord->field('013')->subfield("a");
+        }
         if   ( $marcrecord->field('010') ) {
             $subfield_value_y = $marcrecord->field('010')->subfield("a");
         }
@@ -374,7 +379,10 @@ sub plugin {
             my $record = MARC::Record::new_from_usmarc( $results->[$i] );
             my $rechash = TransformMarcToKoha( $dbh, $record );
             my $pos;
-            my $countitems = 1 if ( $rechash->{itemnumber} );
+            my $countitems;
+            if ( $rechash->{itemnumber} ) {
+                $countitems=1;
+            }
             while ( index( $rechash->{itemnumber}, '|', $pos ) > 0 ) {
                 $countitems += 1;
                 $pos = index( $rechash->{itemnumber}, '|', $pos ) + 1;
index 5cd0205..a697ddb 100755 (executable)
@@ -39,7 +39,7 @@ my $field = $input->param('field');
 # Prevent from disclosing data
 die() unless ($table eq "biblioitems"); 
 
-binmode STDOUT, ":utf8";
+binmode STDOUT, ":encoding(UTF-8)";
 print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
 
 my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), { cataloguing => '*' } );
index 7e0cb75..ad7aa9a 100755 (executable)
@@ -118,13 +118,16 @@ if ($barcode) {
         my %item;
         my $frbranchcd =  C4::Context->userenv->{'branch'};
 #         if ( not($found) ) {
-        $item{'biblionumber'} = $iteminformation->{'biblionumber'};
-        $item{'title'}        = $iteminformation->{'title'};
-        $item{'author'}       = $iteminformation->{'author'};
-        $item{'itemtype'}     = $iteminformation->{'itemtype'};
-        $item{'ccode'}        = $iteminformation->{'ccode'};
-        $item{'frbrname'}     = $branches->{$frbranchcd}->{'branchname'};
-        $item{'tobrname'}     = $branches->{$tobranchcd}->{'branchname'};
+        $item{'biblionumber'}          = $iteminformation->{'biblionumber'};
+        $item{'itemnumber'}            = $iteminformation->{'itemnumber'};
+        $item{'title'}                 = $iteminformation->{'title'};
+        $item{'author'}                = $iteminformation->{'author'};
+        $item{'itemtype'}              = $iteminformation->{'itemtype'};
+        $item{'ccode'}                 = $iteminformation->{'ccode'};
+        $item{'itemcallnumber'}        = $iteminformation->{'itemcallnumber'};
+        $item{'location'}              = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'});
+        $item{'frbrname'}              = $branches->{$frbranchcd}->{'branchname'};
+        $item{'tobrname'}              = $branches->{$tobranchcd}->{'branchname'};
 #         }
         $item{counter}  = 0;
         $item{barcode}  = $barcode;
@@ -148,13 +151,16 @@ foreach ( $query->param ) {
     $item{frombrcd} = $frbcd;
     $item{tobrcd}   = $tobcd;
     my ($iteminformation) = GetBiblioFromItemNumber( GetItemnumberFromBarcode($bc) );
-    $item{'biblionumber'} = $iteminformation->{'biblionumber'};
-    $item{'title'}        = $iteminformation->{'title'};
-    $item{'author'}       = $iteminformation->{'author'};
-    $item{'itemtype'}     = $iteminformation->{'itemtype'};
-    $item{'ccode'}        = $iteminformation->{'ccode'};
-    $item{'frbrname'}     = $branches->{$frbcd}->{'branchname'};
-    $item{'tobrname'}     = $branches->{$tobcd}->{'branchname'};
+    $item{'biblionumber'}          = $iteminformation->{'biblionumber'};
+    $item{'itemnumber'}            = $iteminformation->{'itemnumber'};
+    $item{'title'}                 = $iteminformation->{'title'};
+    $item{'author'}                = $iteminformation->{'author'};
+    $item{'itemtype'}              = $iteminformation->{'itemtype'};
+    $item{'ccode'}                 = $iteminformation->{'ccode'};
+    $item{'itemcallnumber'}        = $iteminformation->{'itemcallnumber'};
+    $item{'location'}              = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'});
+    $item{'frbrname'}              = $branches->{$frbcd}->{'branchname'};
+    $item{'tobrname'}              = $branches->{$tobcd}->{'branchname'};
     push( @trsfitemloop, \%item );
 }
 
@@ -187,35 +193,37 @@ if ( $codeType eq 'itemtype' ) {
 
 my @errmsgloop;
 foreach my $code ( keys %$messages ) {
-    my %err;
-    if ( $code eq 'BadBarcode' ) {
-        $err{msg}        = $messages->{'BadBarcode'};
-        $err{errbadcode} = 1;
+    if ( $code ne 'WasTransfered' ) {
+        my %err;
+        if ( $code eq 'BadBarcode' ) {
+            $err{msg}        = $messages->{'BadBarcode'};
+            $err{errbadcode} = 1;
+        }
+        elsif ( $code eq "NotAllowed" ) {
+            warn "NotAllowed: $messages->{'NotAllowed'} to  " . $branches->{ $messages->{'NotAllowed'} }->{'branchname'};
+            # Do we really want a error log message here? --atz
+            $err{errnotallowed} =  1;
+            my ( $tbr, $typecode ) = split( /::/,  $messages->{'NotAllowed'} );
+            $err{tbr}      = $branches->{ $tbr }->{'branchname'};
+            $err{code}     = $typecode;
+            $err{codeType} = $codeTypeDescription;
+        }
+        elsif ( $code eq 'IsPermanent' ) {
+            $err{errispermanent} = 1;
+            $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
+        }
+        elsif ( $code eq 'WasReturned' ) {
+            $err{errwasreturned} = 1;
+            $err{borrowernumber} = $messages->{'WasReturned'};
+            my $borrower = GetMember('borrowernumber'=>$messages->{'WasReturned'});
+            $err{title}      = $borrower->{'title'};
+            $err{firstname}  = $borrower->{'firstname'};
+            $err{surname}    = $borrower->{'surname'};
+            $err{cardnumber} = $borrower->{'cardnumber'};
+        }
+        $err{errdesteqholding} = ( $code eq 'DestinationEqualsHolding' );
+        push( @errmsgloop, \%err );
     }
-    elsif ( $code eq "NotAllowed" ) {
-        warn "NotAllowed: $messages->{'NotAllowed'} to  " . $branches->{ $messages->{'NotAllowed'} }->{'branchname'};
-        # Do we really want a error log message here? --atz
-        $err{errnotallowed} =  1;
-        my ( $tbr, $typecode ) = split( /::/,  $messages->{'NotAllowed'} );
-        $err{tbr}      = $branches->{ $tbr }->{'branchname'};
-        $err{code}     = $typecode;
-        $err{codeType} = $codeTypeDescription; 
-    }
-    elsif ( $code eq 'IsPermanent' ) {
-        $err{errispermanent} = 1;
-        $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
-    }
-    elsif ( $code eq 'WasReturned' ) {
-        $err{errwasreturned} = 1;
-               $err{borrowernumber} = $messages->{'WasReturned'};
-               my $borrower = GetMember('borrowernumber'=>$messages->{'WasReturned'});
-               $err{title}      = $borrower->{'title'};
-               $err{firstname}  = $borrower->{'firstname'};
-               $err{surname}    = $borrower->{'surname'};
-               $err{cardnumber} = $borrower->{'cardnumber'};
-    }
-    $err{errdesteqholding} = ( $code eq 'DestinationEqualsHolding' );
-    push( @errmsgloop, \%err );
 }
 
 # use Data::Dumper;
index fa043dd..1b6c619 100755 (executable)
@@ -296,6 +296,7 @@ if ($barcode) {
         unless($issueconfirmed){
             #  Get the item title for more information
             my $getmessageiteminfo  = GetBiblioFromItemNumber(undef,$barcode);
+           $template->{VARS}->{'additional_materials'} = $getmessageiteminfo->{'materials'};
             $template->param( itemhomebranch => $getmessageiteminfo->{'homebranch'} );
 
             # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
@@ -441,7 +442,7 @@ sub build_issue_data {
             $it->{'borrowernumber'},$it->{'itemnumber'}
         );
         $it->{"renew_error_${can_renew_error}"} = 1 if defined $can_renew_error;
-        my ( $restype, $reserves ) = CheckReserves( $it->{'itemnumber'} );
+        my ( $restype, $reserves, undef ) = CheckReserves( $it->{'itemnumber'} );
         $it->{'can_renew'} = $can_renew;
         $it->{'can_confirm'} = !$can_renew && !$restype;
         $it->{'renew_error'} = $restype;
@@ -510,7 +511,7 @@ if ($borrowerslist) {
     {
         push @values, $_->{'borrowernumber'};
         $labels{ $_->{'borrowernumber'} } =
-"$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ...  $_->{'address'} ";
+"$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'} - $_->{'branchcode'}) ...  $_->{'address'} ";
     }
     $CGIselectborrower = CGI::scrolling_list(
         -name     => 'borrowernumber',
@@ -703,6 +704,7 @@ $template->param(
     circview => 1,
     soundon           => C4::Context->preference("SoundOn"),
     fast_cataloging   => $fast_cataloging,
+    CircAutoPrintQuickSlip   => C4::Context->preference("CircAutoPrintQuickSlip"),
 );
 
 # save stickyduedate to session
index dc15e8b..a7207b7 100755 (executable)
@@ -236,7 +236,8 @@ if ($noreport) {
 
     my $strsth="SELECT date_due,
         borrowers.title as borrowertitle,
-        concat(surname,' ', firstname) as borrower, 
+        borrowers.surname,
+        borrowers.firstname,
         borrowers.streetnumber,
         borrowers.streettype, 
         borrowers.address,
@@ -247,6 +248,7 @@ if ($noreport) {
         borrowers.phone,
         borrowers.email,
         issues.itemnumber,
+        issues.issuedate,
         items.barcode,
         biblio.title,
         biblio.author,
@@ -272,7 +274,15 @@ if ($noreport) {
             $strsth.=" AND biblioitems.itemtype   = '" . $itemtypefilter . "' ";
         }
     }
-    $strsth.=" AND borrowers.flags        = '" . $borflagsfilter . "' " if $borflagsfilter;
+    if ( $borflagsfilter eq 'gonenoaddress' ) {
+        $strsth .= " AND borrowers.gonenoaddress <> 0";
+    }
+    elsif ( $borflagsfilter eq 'debarred' ) {
+        $strsth .= " AND borrowers.debarred >=  CURDATE()" ;
+    }
+    elsif ( $borflagsfilter eq 'lost') {
+        $strsth .= " AND borrowers.lost <> 0";
+    }
     $strsth.=" AND borrowers.branchcode   = '" . $branchfilter   . "' " if $branchfilter;
     $strsth.=" AND date_due < '" . $datedueto . "' "  if $datedueto;
     $strsth.=" AND date_due > '" . $dateduefrom . "' " if $dateduefrom;
@@ -281,11 +291,12 @@ if ($noreport) {
     $strsth =~ s/WHERE 1=1/WHERE 1=1 AND borrowers.borrowernumber IN ($bnlist)/ if $bnlist;
     $strsth =~ s/WHERE 1=1/WHERE 0=1/ if $have_pattr_filter_data  && !$bnlist;  # no match if no borrowers matched patron attrs
     $strsth.=" ORDER BY " . (
-        ($order eq "borrower" or $order eq "borrower desc") ? "$order, date_due"                 : 
-        ($order eq "title"    or $order eq    "title desc") ? "$order, date_due, borrower"       :
-        ($order eq "barcode"  or $order eq  "barcode desc") ? "items.$order, date_due, borrower" :
-                                ($order eq "date_due desc") ? "date_due DESC, borrower"          :
-                                                            "date_due, borrower"  # default sort order
+        ($order eq "borrower")                              ? "surname, firstname, date_due"               : 
+        ($order eq "borrower desc")                         ? "surname desc, firstname desc, date_due"     : 
+        ($order eq "title"    or $order eq    "title desc") ? "$order, date_due, surname, firstname"       :
+        ($order eq "barcode"  or $order eq  "barcode desc") ? "items.$order, date_due, surname, firstname" :
+                                ($order eq "date_due desc") ? "date_due DESC, surname, firstname"          :
+                                                            "date_due, surname, firstname"  # default sort order
     );
     $template->param(sql=>$strsth);
     my $sth=$dbh->prepare($strsth);
@@ -312,8 +323,10 @@ if ($noreport) {
             borrowernumber         => $data->{borrowernumber},
             barcode                => $data->{barcode},
             itemnum                => $data->{itemnumber},
+            issuedate              => format_date($data->{issuedate}),
             borrowertitle          => $data->{borrowertitle},
-            name                   => $data->{borrower},
+            surname                => $data->{surname},
+            firstname              => $data->{firstname},
             streetnumber           => $data->{streetnumber},                   
             streettype             => $data->{streettype},                     
             address                => $data->{address},                        
@@ -399,7 +412,7 @@ sub build_csv {
 
     # build header ...
     my @keys = qw /duedate title author borrowertitle name phone barcode email address address2 zipcode city country
-                branchcode itemcallnumber biblionumber borrowernumber itemnum replacementprice streetnumber streettype/;
+                branchcode itemcallnumber biblionumber borrowernumber itemnum issuedate replacementprice streetnumber streettype/;
     my $csv = Text::CSV_XS->new();
     $csv->combine(@keys);
     push @lines, $csv->string();
index 98d310e..167bc5f 100755 (executable)
@@ -238,6 +238,7 @@ if ($barcode) {
         itemtype         => $biblio->{'itemtype'},
         ccode            => $biblio->{'ccode'},
         itembiblionumber => $biblio->{'biblionumber'},    
+       additional_materials => $biblio->{'materials'}
     );
 
     my %input = (
diff --git a/debian/docs/LEEME.Debian b/debian/docs/LEEME.Debian
new file mode 100644 (file)
index 0000000..5242774
--- /dev/null
@@ -0,0 +1,60 @@
+Configuracion de Post Instalacion 
+==================================
+
+Usted deberia considerar hacer lo siguiente despues de instalar este paquete:
+
+* Instalar mysql-server, para una base de datos local.
+
+* Alternativamente, puede configurar una conexion remota a un servidor MySQL:
+  - rm /etc/mysql/koha-common.cnf
+  - $SUEDITOR /etc/mysql/koha-common.cnf
+
+        [client]
+        host = algun.otro.host
+        user = mysqlusername
+        password = mysqlpassword
+        
+* Habilitar la re-escritura del modulo: a2enmod rewrite
+
+* Escuchar en el puerto 8080: $SUEDITOR /etc/apache2/ports.conf
+
+* Alternativamente, puede configurar koha-create, usando /etc/koha/koha-sites.conf
+  (ver /usr/sbin/koha-create para establecer las variables ).
+  
+* Despues de esto, usted puede crear una nueva instancia de Koha:
+  - koha-create --create-db name
+
+
+Diseño del sistema de archivo de Koha en Debian 
+================================================
+
+El paquete Debian de Koha pone archivos en los siguientes lugares:
+
+* /etc/koha -- archivos de configuración del sistema 
+* /etc/cron.hourly/koha-common -- cron job
+* /etc/cron.daily/koha-common -- cron job
+* /etc/cron.d/koha-common -- cron job
+* /usr/share/koha -- archivos compartidos (plantillas HTML, codigo Perl, etc)
+
+Cada instancia de Koha tiene archivos en los siguientes lugares:
+
+* /etc/koha/sites/$name -- archivos de configuración 
+* /etc/apache2/sites-available/$name -- Archivo configuración Apache 
+* /var/lib/koha/$name -- Bases de datos Zebra 
+* /var/log/koha/$name -- archivos log (Apache, Zebra)
+* /var/lock/koha/$name -- run-time lock files
+* /var/run/koha/$name -- run-time sockets etc
+* /var/spool/koha/$name -- dumps bases de datos
+
+
+Koha y MySQL
+==============
+
+El script de post instalacion de Koha-common crea el archivo /etc/mysql/koha-common.cnf,
+y todos los scripts usan esté para acceder a las bases de datos MySQL. Por defecto,
+es un enlace simbólico que apunta a debian.cnf, y sólo trabaja en el servidor local.
+Si usted lo desea, puede crear un archivo /etc/mysql/koha-common.cnf en lugar
+del enlace simbólico, y que apunte a un servidor remoto. En la actualidad no existe
+ninguna herramienta para ayudarle a hacer eso, pero debería ser bastante sencillo.
+
+
diff --git a/debian/koha-common.docs b/debian/koha-common.docs
new file mode 100644 (file)
index 0000000..06575bd
--- /dev/null
@@ -0,0 +1 @@
+debian/docs/LEEME.Debian
index 7daf57a..06b7bff 100755 (executable)
@@ -42,10 +42,15 @@ do
     userdir "$name" "/etc/koha/sites/$name"
     userdir "$name" "/var/lib/koha/$name"
     userdir "$name" "/var/lib/koha/$name/authorities"
+    userdir "$name" "/var/lib/koha/$name/authorities/key"
+    userdir "$name" "/var/lib/koha/$name/authorities/register"
+    userdir "$name" "/var/lib/koha/$name/authorities/shadow"
+    userdir "$name" "/var/lib/koha/$name/authorities/tmp"
     userdir "$name" "/var/lib/koha/$name/biblios"
     userdir "$name" "/var/lib/koha/$name/biblios/key"
     userdir "$name" "/var/lib/koha/$name/biblios/register"
     userdir "$name" "/var/lib/koha/$name/biblios/shadow"
+    userdir "$name" "/var/lib/koha/$name/biblios/tmp"
     userdir "$name" "/var/lock/koha/$name"
     userdir "$name" "/var/lock/koha/$name/authorities"
     userdir "$name" "/var/lock/koha/$name/biblios"
index 10a8b78..b9e5c2a 100755 (executable)
@@ -31,17 +31,27 @@ FLUSH PRIVILEGES;
 eof
     
     koha-stop-zebra $name
-    rm "/etc/apache2/sites-available/$name"
-    rm "/etc/koha/sites/$name/koha-conf.xml"
-    rm "/etc/koha/sites/$name/zebra-biblios.cfg"
-    rm "/etc/koha/sites/$name/zebra-authorities.cfg"
-    rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
-    rm "/etc/koha/sites/$name/zebra.passwd"
-    rmdir "/etc/koha/sites/$name"
-    rm -r "/var/lock/koha/$name"
-    rm -r "/var/log/koha/$name"
-    rm -r "/var/run/koha/$name"
-    deluser --quiet "$name-koha"
+    [ -f "/etc/apache2/sites-available/$name" ]  && \
+        rm "/etc/apache2/sites-available/$name"
+    [ -f "/etc/koha/sites/$name/koha-conf.xml" ] && \
+        rm "/etc/koha/sites/$name/koha-conf.xml"
+    [ -f "/etc/koha/sites/$name/zebra-biblios.cfg" ] && \
+        rm "/etc/koha/sites/$name/zebra-biblios.cfg"
+    [ -f "/etc/koha/sites/$name/zebra-authorities.cfg" ] && \
+        rm "/etc/koha/sites/$name/zebra-authorities.cfg"
+    [ -f "/etc/koha/sites/$name/zebra-authorities-dom.cfg" ] && \
+        rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
+    [ -f "/etc/koha/sites/$name/zebra.passwd" ] && \
+        rm "/etc/koha/sites/$name/zebra.passwd"
+    [ -d "/etc/koha/sites/$name" ] && \
+        rmdir "/etc/koha/sites/$name"
+    [ -d "/var/lock/koha/$name" ] && \
+        rm -r "/var/lock/koha/$name"
+    [ -d "/var/log/koha/$name" ] && \
+        rm -r "/var/log/koha/$name"
+    [ -d "/var/run/koha/$name" ] && \
+        rm -r "/var/run/koha/$name"
+    getent passwd "$name-koha" > /dev/null && deluser --quiet "$name-koha"
     a2dissite "$name"
 done
 
index 4999088..caf4c7d 100755 (executable)
@@ -54,7 +54,7 @@ name=$(tar tf "$configdump" |
        sed -n '/^etc\/koha\/sites\/\([^/]*\)\/$/s//\1/p')
 username="$name-koha"
 adduser --no-create-home --disabled-login --gecos "Koha instance $username" \
-    --quiet "$username"
+    --home "/var/lib/koha/$name" --quiet "$username"
 
 
 # Create dirs. Some of them will be in the tarball, but not all, e.g.,
index d5ca838..a440c96 100644 (file)
@@ -3,8 +3,28 @@
 <listen id="biblioserver" >unix:/var/run/koha/__KOHASITE__/bibliosocket</listen>
 <listen id="authorityserver" >unix:/var/run/koha/__KOHASITE__/authoritysocket</listen>
 
+<!-- Uncomment the following entry if you want to run the public Z39.50 server.
+    Also uncomment the <server> and <serverinfo> sections for id 'publicserver'
+    under PUBLICSERVER'S BIBLIOGRAPHIC RECORDS title-->
+<!--
+<listen id="publicserver" >tcp:@:__ZEBRA_SRU_BIBLIOS_PORT__</listen>
+-->
+
+<!-- Settings for special biblio server instance for PazPar2.
+     Because PazPar2 only connects to a Z39.50 server using TCP/IP,
+     it cannot use the Unix-domain socket that biblioserver uses.
+     Therefore, a custom server is defined. -->
+<!--
+<listen id="mergeserver">tcp:@:__MERGE_SERVER_PORT__</listen>
+<server id="mergeserver"  listenref="mergeserver">
+    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
+    <config>/var/lib/koha/__KOHASITE__/zebra-biblios.cfg</config>
+    <cql2rpn>/var/lib/koha/__KOHASITE__/pqf.properties</cql2rpn>
+</server>
+-->
+
 <!-- BIBLIOGRAPHIC RECORDS -->
-<server id="biblioserver"  listenref="biblioserver"> 
+<server id="biblioserver"  listenref="biblioserver">
     <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
     <config>/etc/koha/sites/__KOHASITE__/zebra-biblios.cfg</config>
     <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
          </backend>
        </retrieval>
      </retrievalinfo>
+    <!-- The stuff below is used to enable SRU. It's currently disabled
+         until we come up with a good way to make it get magically set up by
+         the packaging system. If you need it, uncomment and set it up
+         manually.
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude">
+      <xi:fallback>
+      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
+          <serverInfo>
+            <host>__ZEBRA_SRU_HOST__</host>
+            <port>__ZEBRA_SRU_BIBLIOS_PORT__</port>
+            <database>biblios</database>
+          </serverInfo>
+        </explain>
+      </xi:fallback>
+    </xi:include> -->
 </server>
 <serverinfo id="biblioserver">
         <ccl2rpn>/etc/koha/zebradb/ccl.properties</ccl2rpn>
-        <user>kohauser</user>    
+        <user>kohauser</user>
         <password>__ZEBRA_PASS__</password>
 </serverinfo>
 
      </retrievalinfo>
       </xi:fallback>
     </xi:include>
+    <!-- The stuff below is used to enable SRU. It's currently disabled
+         until we come up with a good way to make it get magically set up by
+         the packaging system. If you need it, uncomment and set it up
+         manually.
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-authorities.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude">
+    <xi:fallback>
+      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
+          <serverInfo>
+            <host>__ZEBRA_SRU_HOST__</host>
+            <port>__ZEBRA_SRU_AUTHORITIES_PORT__</port>
+            <database>authorities</database>
+          </serverInfo>
+        </explain>
+      </xi:fallback>
+  </xi:include> -->
 </server>
 <serverinfo id="authorityserver">
     <ccl2rpn>/etc/koha/zebradb/ccl.properties</ccl2rpn>
     <password>__ZEBRA_PASS__</password>
 </serverinfo>
 
+<!-- PUBLICSERVER'S BIBLIOGRAPHIC RECORDS -->
+<!-- This can be used to set up a public Z39.50/SRU server.
+
+<server id="publicserver"  listenref="publicserver">
+    <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
+    <config>/etc/koha/sites/__KOHASITE__/zebra-biblios.cfg</config>
+    <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
+     <retrievalinfo>
+       <retrieval syntax="usmarc" name="F"/>
+       <retrieval syntax="usmarc" name="B"/>
+       <retrieval syntax="xml" name="F"/>
+       <retrieval syntax="xml" name="B"/>
+       <retrieval syntax="xml" name="marcxml"
+                  identifier="info:srw/schema/1/marcxml-v1.1">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="dc">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2DC.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="mods">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="rdfdc">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="rss2">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2RSS2.xsl"/>
+         </backend>
+       </retrieval>
+       <retrieval syntax="xml" name="utils">
+         <backend syntax="usmarc" name="F">
+           <marc inputformat="marc" outputformat="marcxml"
+                 inputcharset="utf-8"/>
+           <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl"/>
+         </backend>
+       </retrieval>
+     </retrievalinfo>
+    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
+                xmlns:xi="http://www.w3.org/2001/XInclude">
+      <xi:fallback>
+      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
+          <serverInfo>
+            <host>__ZEBRA_SRU_HOST__</host>
+            <port>__ZEBRA_SRU_BIBLIOS_PORT__</port>
+            <database>biblios</database>
+          </serverInfo>
+        </explain>
+      </xi:fallback>
+    </xi:include>
+</server>
+<serverinfo id="publicserver">
+        <ccl2rpn>/etc/koha/zebradb/ccl.properties</ccl2rpn>
+        <user>kohauser</user>
+        <password>__ZEBRA_PASS__</password>
+</serverinfo>
+-->
+
 <config>
  <db_scheme>mysql</db_scheme>
  <database>__DB_NAME__</database>
  <intrahtdocs>/usr/share/koha/intranet/htdocs/intranet-tmpl</intrahtdocs>
  <includes>/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/includes/</includes>
  <logdir>/var/log/koha/__KOHASITE__</logdir>
+ <!-- <pazpar2url>http://__PAZPAR2_HOST__:__PAZPAR2_PORT__/search.pz2</pazpar2url> -->
  <install_log>/usr/share/koha/misc/koha-install-log</install_log>
  <useldapserver>0</useldapserver><!-- see C4::Auth_with_ldap for extra configs you must add if you want to turn this on -->
  <memcached_servers></memcached_servers>
index c6a34cd..48ab538 100644 (file)
@@ -499,87 +499,97 @@ July 7 2010       General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_
 June 25 2010   Koha 3.2 Beta released http://koha-community.org/koha-3-2-beta-released/
 July 13 2010   License meeting http://wiki.koha-community.org/wiki/License_Upgrade_Vote_IRC_Meeting,_13_July_2010
 August 11 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_August_2010
+August 31 2010 Stéphane Delaune becomes the 116th committer to have a patch accepted
 September 1 2010       General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_1_September_2010
-September 29 2010      Eric Olsen becomes the 116th committer to have a patch accepted
+September 29 2010      Eric Olsen becomes the 117th committer to have a patch accepted
 October 6 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_6_October_2010
 October 22 2010        Koha 3.2.0 released
 October 25-31 2010     Kohacon10 in Wellington
-October 30 2010        Brian Engard becomes the 117th committer to have a patch accepted
-October 30 2010         Daniel Grobani becomes the 118th committer to have a patch accepted
-October 31 2010        Nate Curulla becomes the 119th committer to have a patch accepted
+October 30 2010        Brian Engard becomes the 118th committer to have a patch accepted
+October 30 2010         Daniel Grobani becomes the 119th committer to have a patch accepted
+October 31 2010        Nate Curulla becomes the 120th committer to have a patch accepted
 November 10 2010       General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_10_November_2010
-November 17 2010       Tomás Cohen Arazi becomes the 120th committer to have a patch accepted
+November 17 2010       Tomás Cohen Arazi becomes the 121th committer to have a patch accepted
 November 20 2010       Koha 3.2.1 released
 December 8 2010        General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_8_December_2010
-December 15 2010       Serhij Dubyk becomes the 121st developer to have a patch pushed
-December 16 2010       Christophe Croullebois becomes the 122nd developer to have a patch pushed
-December 19 2010       Edward Allen becomes the 123rd developer to have a patch pushed
-December 20 2010       Dobrica Pavlinusic becomes the 124th developer to have a patch pushed
+December 15 2010       Serhij Dubyk becomes the 122st developer to have a patch pushed
+December 16 2010       Christophe Croullebois becomes the 123nd developer to have a patch pushed
+December 19 2010       Edward Allen becomes the 124rd developer to have a patch pushed
+December 20 2010       Dobrica Pavlinusic becomes the 125th developer to have a patch pushed
 December 22 2010       Koha 3.2.2 released
 January 5 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_5_January_2011
-January 12 2011        Brice Sanchez becomes the 125th developer to have a patch pushed
-January 17 2011        Zach Sim becomes the 126th developer to have a patch pushed
-January 17 2011        Claudia Forsman becomes the 127th developer to have a patch pushed
-January 17 2011        John Copeland becomes the 128th developer to have a patch pushed
-January 17 2011        Stephanie Hogan becomes the 129th developer to have a patch pushed
+January 12 2011        Brice Sanchez becomes the 126th developer to have a patch pushed
+January 17 2011        Zach Sim becomes the 127th developer to have a patch pushed
+January 17 2011        Claudia Forsman becomes the 128th developer to have a patch pushed
+January 17 2011        John Copeland becomes the 129th developer to have a patch pushed
+January 17 2011        Stephanie Hogan becomes the 130th developer to have a patch pushed
 January 22 2011        Koha 3.2.3 released
-January 26 2011        Jerome Charaoui becomes the 130th developer to have a patch pushed
-January 31 2011        Reed Wade becomes the 131sth developer to have a patch pushed
+January 26 2011        Jerome Charaoui becomes the 131th developer to have a patch pushed
+January 31 2011        Reed Wade becomes the 132sth developer to have a patch pushed
 February 1 2011        #koha moves from irc.katipo.co.nz to irc.oftc.net
 February 2 2011        General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_February_2011
-February 3 2011        Frédérick Capovilla becomes the 132nd developer to have a patch pushed
-February 4 2011        Christopher Hall becomes the 133rd developer to have a patch pushed
+February 3 2011        Frédérick Capovilla becomes the 133nd developer to have a patch pushed
+February 4 2011        Christopher Hall becomes the 134rd developer to have a patch pushed
 February 22 2011       Koha 3.2.4 released
 February 24 2011       Koha 3.2.5 released
 March 2 2011   General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_March_2011
-March 13 2011  Janusz Kaczmarek becomes the 134th developer to have a patch pushed
-March 13 2011  Salvador Zaragoza Rubio becomes the 135th developer to have a patch pushed
-March 17 2011  Julian Maurice becomes the 136th developer to have a patch pushed
-March 17 2011  Sophie Meynieux becomes the 137th developer to have a patch pushed
+March 13 2011  Janusz Kaczmarek becomes the 135th developer to have a patch pushed
+March 13 2011  Salvador Zaragoza Rubio becomes the 136th developer to have a patch pushed
+March 17 2011  Julian Maurice becomes the 137th developer to have a patch pushed
+March 17 2011  Sophie Meynieux becomes the 138th developer to have a patch pushed
 March 22 2011  Koha 3.2.6 released
-March 31 2011  Doug Dearden becomes the 138th developer to have a patch pushed
+March 31 2011  Doug Dearden becomes the 139th developer to have a patch pushed
 April 6 2011   General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_6_April_2011
-April 8 2011   Mark Gavillet becomes the  139th developer to have a patch pushed
-April 9 2011   Frederic Durand becomes the 140th developer to have a patch pushed
-April 9 2011   Jonathan Druart becomes the 141st developer to have a patch pushed
+April 8 2011   Mark Gavillet becomes the  140th developer to have a patch pushed
+April 9 2011   Frederic Durand becomes the 141th developer to have a patch pushed
+April 9 2011   Jonathan Druart becomes the 142st developer to have a patch pushed
 April 16 2011  Koha 3.2.7 released     releases
-April 20 2011     Fernando Canizo becomes the 142nd developer to have a patch pushed
+April 20 2011  Fernando Canizo becomes the 143nd developer to have a patch pushed
 April 22 2011  Koha 3.4.0 released     releases
 May 11 2011    General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_May_2011
 May 15 2011    Koha 3.2.8 released     releases
 May 15 2011    Koha 3.2.9 released     releases
 May 22 2011    Koha 3.4.1 released     releases
-June 1 2011    Fridolyn Somers becomes the 143rd developer to have a patch pushed
-June 3 2011    Elliott Davis becomes the 144th developer to have a patch pushed
+June 1 2011    Fridolyn Somers becomes the 144rd developer to have a patch pushed
+June 3 2011    Elliott Davis becomes the 145th developer to have a patch pushed
 June 14 2011   General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_14_June_2011
 June 15 2011   First ever global sign off day
-June 17 2011   Jeremy Crabtree becomes the 145th developer to have a patch pushed
+June 17 2011   Jeremy Crabtree becomes the 146th developer to have a patch pushed
 June 19 2011   Koha 3.2.10 released    releases
 June 28 2011   Koha 3.4.2 released     releases
 June 28 2011   Spanish speaking community meeting http://wiki.koha-community.org/wiki/Spanish_speaking_community_creation_IRC_Meeting,_28_June_2011
 June 29 2011   Kohacon11 volunteers meeting http://wiki.koha-community.org/wiki/KohaCon11_Volunteers#Next_Meeting_:_Wednesday_June_29_6.00_UTC
-July 5 2011    Francois Marier becomes the 146th developer to have a patch pushed
+July 5 2011    Francois Marier becomes the 147th developer to have a patch pushed
 July 6 2011    General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_6_July_2011
 July 25 2011   Koha 3.4.3 released     releases
-July 28 2011   John Seymour becomes the 147th developer to have a patch pushed
+July 28 2011   John Seymour becomes the 148th developer to have a patch pushed
 August 2 2011  General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_August_2011
 August 3 2011  Spanish speaking community meeting http://wiki.koha-community.org/wiki/Spanish_speaking_community_Mail_List_IRC_Meeting,_3_August_2011
-August 11 2011 Juan Romay Sieira becomes the 148th developer to have a patch pushed
-August 11 2011 Nuño López Ansótegui becomes the 149th developer to have a patch pushed
-August 22 2011 Koha 3.4.4 released
-August 26 2011 Ward van Wanrooij becomes the 150th developer to have a patch pushed
-August 27 2011 Ulrich Kleiber becomes the 151st developer to have a patch pushed
-September 1 2011       Maxime Pelletier becomes the 152nd developer to have a patch pushed
-September 2 2011       Steven Callender becomes the 153rd developer to have a patch pushed
-September 6 2011       Brett Wilkins becomes the 154th developer to have a patch pushed
-September 11 2011      Meenakshi.R becomes the 155th developer to have a patch pushed
-September 23 2011      Joy Nelson becomes the 156th developer to have a patch pushed
-September 24 2011      Larry Baerveldt becomes the 157th developer to have a patch pushed
-September 27 2011      Koha 3.4.5 released
-September 28 2011      Thatcher Rea becomes the 158th developer to have a patch pushed
+August 11 2011 Juan Romay Sieira becomes the 149th developer to have a patch pushed
+August 11 2011 Nuño López Ansótegui becomes the 150th developer to have a patch pushed
+August 22 2011 Koha 3.4.4 released     releases
+August 26 2011 Ward van Wanrooij becomes the 151th developer to have a patch pushed
+August 27 2011 Ulrich Kleiber becomes the 152st developer to have a patch pushed
+September 1 2011       Maxime Pelletier becomes the 153nd developer to have a patch pushed
+September 2 2011       Steven Callender becomes the 154rd developer to have a patch pushed
+September 6 2011       Brett Wilkins becomes the 155th developer to have a patch pushed
+September 11 2011      Meenakshi.R becomes the 156th developer to have a patch pushed
+September 23 2011      Joy Nelson becomes the 157th developer to have a patch pushed
+September 24 2011      Larry Baerveldt becomes the 158th developer to have a patch pushed
+September 27 2011      Koha 3.4.5 released     releases
+September 28 2011      Thatcher Rea becomes the 159th developer to have a patch pushed
 October 5 2011 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_5_October_2011
-October 15 2011        Greg Barniskis becomes the 159th developer to have a patch pushed
-October 22 2011 Koha 3.6.0 released
-October 31 2011 4th KohaCon in Mumbaï, India
-November 9 2011 Koha 3.4.6 released
+October 15 2011        Greg Barniskis becomes the 160th developer to have a patch pushed
+October 22 2011        Koha 3.6.0 released     releases
+October 31 2011        4th KohaCon in Mumbaï, India
+November 9 2011        Koha 3.4.6 released     releases
+November 21 2011       Plea for help from Horowhenua Library Trust (Koha TM in NZ)
+November 29 2011       Koha 3.6.1 released     releases
+December 6 2011        Martin Renvoize becomes the 161th developer to have a patch pushed
+December 6 2011        Adrien Saurat becomes the 162th developer to have a patch pushed
+December 6 2011        Albert Oller becomes the 163th developer to have a patch pushed
+December 7 2011        Jon Aker becomes the 164th developer to have a patch pushed
+December 13 2011       Fabio Tiana becomes the 165th developer to have a patch pushed
+December 15 2011       Duncan Tyler becomes the 166th developer to have a patch pushed
+December 15 2011       Marc Balmer becomes the 167th developer to have a patch pushed
 
index bf8cdc7..2b986ac 100644 (file)
@@ -17,6 +17,8 @@
 #  TransferLog __LOG_DIR__/koha-opac-access_log
    SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
    SetEnv PERL5LIB "__PERL_MODULE_DIR__"
+   SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__"
+   SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__"
 
    <IfModule mod_gzip.c>
      mod_gzip_on yes
 #  TransferLog __LOG_DIR__/koha-access_log
    SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml"
    SetEnv PERL5LIB "__PERL_MODULE_DIR__"
+   SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__"
+   SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__"
    Options +FollowSymLinks
 
    ErrorDocument 400 /cgi-bin/koha/errors/400.pl
index e427d5c..f93de96 100644 (file)
@@ -831,7 +831,7 @@ Title-uniform-heading 1=Title-uniform-heading
 Title-uniform-see 1=Title-uniform-see
 Title-uniform-seealso 1=Title-uniform-seealso
 
-#Authority-number           Koha-Auth-Number  The identifier of the the authority
+#Authority-number           Koha-Auth-Number  The identifier of the authority
 #                           record, stored in 001 in the authority record, and $9/$0 in the
 #                           field that record is linked to in the bib record
 Authority-Number 1=Koha-Auth-Number
index 6fbab70..b773db8 100644 (file)
@@ -9,7 +9,7 @@ lowercase {0-9}{a-z}
 uppercase {0-9}{A-Z}
 
 # Breaking characters
-space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~’
+space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~’{\x88-\x89}{\x98-\x9C}
 
 # Characters to be considered equivalent for sorting purposes
 equivalent aáàãåâăąȧǎȁȃ
@@ -260,6 +260,10 @@ map č                     c
 map Č                 c
 map ȼ                 c
 map Ȼ                 c
+map Ċ                   c
+map ċ                   c
+map Ĉ                   c
+map ĉ                   c
 # G 
 map ǥ                 g
 map Ǥ                 g
@@ -272,6 +276,8 @@ map Ğ                      g
 # K 
 map ḵ                        k
 map Ḵ                        k
+map Ḱ                        k
+map ḱ                        k
 # Y  
 map ý                 y
 map Ý                 y
@@ -308,4 +314,3 @@ map (^\[S\.d\.\])   @
 map (^\[SD\])       @
 map (^\[S\.D\.\])   @
 map (\x88.*\x89))   @
-
index 28c5c19..6a842e3 100644 (file)
@@ -10,7 +10,7 @@ uppercase {0-9}AÆBCDEFGHIJKLMNOPQRSTUVWXYZØ
 
 # Breaking characters
 
-space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~{\x88-\x89}
+space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~’{\x88-\x89}{\x98-\x9C}
 
 # Characters to be considered equivalent for searching purposes.
 equivalent æä(ae)
index 92467ab..6983230 100755 (executable)
@@ -241,27 +241,27 @@ melm 785$w      Record-control-number
 melm 785        Title,Title:p,Title-later,Related-periodical
 melm 787$w      Record-control-number
 
-melm 800$a      Name-and-title
+melm 800$a      Name-and-title,Title-series:w,Title-series:p
 #melm 800$t     author,Author-title,Name-and-title,Title,Title-series
-melm 800$t      Author-title,Name-and-title,Title,Title-series
+melm 800$t      Author-title,Name-and-title,Title,Title-series:w,Title-series:p
 melm 800$9      Koha-Auth-Number
 melm 800$w      Record-control-number
 melm 800        Author,Author-name-personal,Name,Personal-name
-melm 810$a      Name-and-title
-melm 810$t      Author-title,Name-and-title,Title,Title-series
+melm 810$a      Name-and-title,Title-series:w,Title-series:p
+melm 810$t      Author-title,Name-and-title,Title,Title-series:w,Title-series:p
 melm 810$w      Record-control-number
 melm 810$9      Koha-Auth-Number
 melm 810        Author,Corporate-name,Author-name-corporate,Name
-melm 811$a      Name-and-title
+melm 811$a      Name-and-title,Title-series:w,Title-series:p
 melm 811$9      Koha-Auth-Number
 #melm 811$t     author,Author-title,Name-and-title,Title,Title-series
-melm 811$t      Author-title,Name-and-title,Title,Title-series
+melm 811$t      Author-title,Name-and-title,Title,Title-series:w,Title-series:p
 melm 811$w      Record-control-number
 melm 811        Author,Author-name-corporate,Name,Conference-name
 melm 830$w      Record-control-number
 melm 830$9      Koha-Auth-Number
-melm 830        Title,Title-series
-melm 840        Title,Title-series
+melm 830        Title,Title-series:w,Title-series:p
+melm 840        Title,Title-series:w,Title-series:p
 
 ###############################
 # Koha Local-Use Biblio Indexes
index 6de43bf..b461a64 100644 (file)
@@ -57,3 +57,8 @@ keyTmpDir: __ZEBRA_DATA_DIR__/biblios/key
 memMax: 50M
 rank:rank-1
 truncmax: 1000000000
+
+# Specifies the maximum number of records that will be sorted in a result set.
+# If the result set contains more than that limit, the records after the limit
+# will not be sorted. If omitted, the default value is 1,000.
+sortmax: 1000
diff --git a/help.pl b/help.pl
index 18d27dd..97f3462 100755 (executable)
--- a/help.pl
+++ b/help.pl
@@ -32,7 +32,9 @@ our $refer = $query->param('url');
 $refer = $query->referer()  if !$refer || $refer eq 'undefined';
 
 $refer =~ /koha\/(.*)\.pl/;
-my $from = "help/$1.tt";
+my $file = $1;
+$file =~ s/[^a-zA-Z0-9_\-\/]*//g;
+my $from = "help/$file.tt";
 
 my $template = C4::Templates::gettemplate($from, 'intranet', $query);
 $template->param( referer => $refer );
index 2c07bbe..5b99c1f 100644 (file)
@@ -117,7 +117,7 @@ sub get_template_and_user {
     $tmplbase=~ s/\.tmpl$/.tt/;
     my $filename = "$path/modules/" . $tmplbase;
     my $interface = 'intranet';
-    my $template = C4::Templates->new( $interface, $filename, $tmplbase);
+    my $template = C4::Templates->new( $interface, $filename, $tmplbase, $query);
     
     my ( $user, $cookie, $sessionID, $flags ) = checkauth(
         $in->{'query'},
@@ -158,12 +158,14 @@ sub get_template_and_user {
 }
 
 sub _get_template_language {
-  #verify if opac language exists in staff (bug 5660)
-  #conditions are 1) dir exists and 2) enabled in prefs
-  my ($opaclang)= @_;
-  return 'en' unless $opaclang;
-  my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang";
-  -d $path ? $opaclang : 'en';
+
+    #verify if opac language exists in staff (bug 5660)
+    #conditions are 1) dir exists and 2) enabled in prefs
+    my ($opaclang) = @_;
+    return 'en' unless $opaclang;
+    $opaclang =~ s/[^a-zA-Z_-]*//g;
+    my $path = C4::Context->config('intrahtdocs') . "/prog/$opaclang";
+    -d $path ? $opaclang : 'en';
 }
 
 =item checkauth
@@ -272,11 +274,12 @@ sub checkauth {
             C4::Context->_unset_userenv($sessionID);
             $sessionID = undef;
             $userid    = undef;
-            open L, ">>/tmp/sessionlog";
-            my $time = localtime( time() );
-            printf L "%20s from %16s logged out at %30s (manually).\n", $userid,
-              $ip, $time;
-            close L;
+          # Commented out due to its lack of usefulness
+           # open L, ">>/tmp/sessionlog";
+           # my $time = localtime( time() );
+           # printf L "%20s from %16s logged out at %30s (manually).\n", $userid,
+           #   $ip, $time;
+           # close L;
         }
     }
     unless ($userid) {
@@ -290,11 +293,11 @@ sub checkauth {
         my ( $return, $cardnumber ) = checkpw( $userid, $password );
         if ($return) {
             $loggedin = 1;
-            open L, ">>/tmp/sessionlog";
-            my $time = localtime( time() );
-            printf L "%20s from %16s logged in  at %30s.\n", $userid,
-              $ENV{'REMOTE_ADDR'}, $time;
-            close L;
+            open L, ">>/tmp/sessionlog";
+            my $time = localtime( time() );
+            printf L "%20s from %16s logged in  at %30s.\n", $userid,
+            #  $ENV{'REMOTE_ADDR'}, $time;
+            close L;
             $cookie = $query->cookie( CGISESSID => $sessionID );
             if ( $return == 2 ) {
 
@@ -365,7 +368,7 @@ sub checkauth {
     my $filename = "$path/modules/$template_name";
     $filename =~ s/\.tmpl$/.tt/;
     my $interface = 'intranet';
-    my $template = C4::Templates->new( $interface, $filename);
+    my $template = C4::Templates->new( $interface, $filename, '', $query);
     $template->param(
         INPUTS => \@inputs,
 
index b505486..b078106 100644 (file)
@@ -1,7 +1,7 @@
 insert into `message_attributes`
 (`message_attribute_id`, message_name, `takes_days`)
 values
-(1, 'Item_DUE', 0),
+(1, 'Item_Due', 0),
 (2, 'Advance_Notice', 1),
 (4, 'Hold_Filled', 0),
 (5, 'Item_Check_in', 0),
index aa5390f..cbd9f03 100644 (file)
@@ -347,6 +347,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, ''),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
                ('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, ''),
+        ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, ''),
                ('546', 'Fußnote zur Sprache', 'Fußnote zur Sprache', 1, 0, NULL, ''),
                ('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, ''),
                ('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, ''),
index ffefd75..c49784a 100644 (file)
@@ -373,6 +373,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'BKS'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
                ('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'BKS'),
+               ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'BKS'),
                ('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'BKS'),
                ('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'BKS'),
                ('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'BKS'),
@@ -4299,6 +4300,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'CF'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
                ('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'CF'),
+               ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'CF'),
                ('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'CF'),
                ('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'CF'),
                ('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'CF'),
@@ -8224,6 +8226,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'SR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
                ('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'SR'),
+               ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'SR'),
                ('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'SR'),
                ('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'SR'),
                ('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'SR'),
@@ -12149,6 +12152,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'VR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
                ('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'VR'),
+               ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'VR'),
                ('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'VR'),
                ('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'VR'),
                ('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'VR'),
@@ -16072,6 +16076,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'AR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
                ('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'AR'),
+               ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'AR'),
                ('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'AR'),
                ('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'AR'),
                ('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'AR'),
@@ -19995,6 +20000,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'KT'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
                ('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'KT'),
+               ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'KT'),
                ('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'KT'),
                ('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'KT'),
                ('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'KT'),
@@ -23920,6 +23926,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'IR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
                ('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'IR'),
+               ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'IR'),
                ('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'IR'),
                ('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'IR'),
                ('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'IR'),
@@ -27840,6 +27847,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, 'SER'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
                ('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, 'SER'),
+               ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, 'SER'),
                ('546', 'Fußnote zur Sprache', 'Sprache', 1, 0, NULL, 'SER'),
                ('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, 'SER'),
                ('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, 'SER'),
index 8e817ff..b81bd2b 100644 (file)
@@ -104,7 +104,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
 
 INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
                ('952', '0', 'Withdrawn status', 'Withdrawn status', 0, 0, 'items.wthdrawn', 10, 'WITHDRAWN', '', '', 0, 0, '', '', '', NULL),
-               ('952', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL),
+               ('952', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, -5, '', '', '', NULL),
                ('952', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'items.cn_source', 10, 'cn_source', '', '', NULL, 0, '', '', '', NULL),
                ('952', '3', 'Materials specified (bound volume or other part)', 'Materials specified (bound volume or other part)', 0, 0, 'items.materials', 10, '', '', '', NULL, -1, '', '', '', NULL),
                ('952', '4', 'Damaged status', 'Damaged status', 0, 0, 'items.damaged', 10, 'DAMAGED', '', '', NULL, 0, '', '', '', NULL),
@@ -347,6 +347,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+        ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
                ('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
index 3ecd4fd..7cee9c8 100644 (file)
@@ -373,6 +373,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
@@ -4301,6 +4302,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
@@ -8228,6 +8230,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
@@ -12155,6 +12158,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
@@ -16080,6 +16084,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
@@ -20005,6 +20010,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
@@ -23932,6 +23938,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
@@ -27854,6 +27861,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
index 383a9d9..b976ea6 100644 (file)
@@ -347,6 +347,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+        ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
                ('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
index 2a023d5..8db6fe9 100644 (file)
@@ -374,6 +374,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
@@ -4300,6 +4301,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
@@ -8225,6 +8227,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
@@ -12150,6 +12153,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
@@ -16073,6 +16077,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
@@ -19996,6 +20001,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
@@ -23921,6 +23927,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
@@ -27841,6 +27848,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
index 8e919e9..a7a6032 100644 (file)
@@ -1,7 +1,7 @@
 insert into `message_attributes`
 (`message_attribute_id`, message_name, `takes_days`)
 values
-(1, 'Item_DUE', 0),
+(1, 'Item_Due', 0),
 (2, 'Advance_Notice', 1),
 (4, 'Hold_Filled', 0),
 (5, 'Item_Check_in', 0),
index bda6735..a5212ab 100644 (file)
@@ -347,6 +347,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+        ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
                ('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
index a70abc6..3c96826 100644 (file)
@@ -373,6 +373,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
@@ -4299,6 +4300,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
@@ -8224,6 +8226,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
@@ -12149,6 +12152,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
@@ -16072,6 +16076,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
@@ -19995,6 +20000,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
@@ -23920,6 +23926,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
@@ -27840,6 +27847,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
index aeba01b..ff3f7e5 100644 (file)
@@ -347,6 +347,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
                ('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
index 6916217..cc0e64e 100644 (file)
@@ -373,6 +373,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
@@ -4295,6 +4296,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
@@ -8216,6 +8218,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
@@ -12137,6 +12140,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
@@ -16056,6 +16060,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
@@ -19975,6 +19980,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
@@ -23896,6 +23902,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
@@ -27812,6 +27819,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
index 10d5206..7f890a9 100644 (file)
@@ -15,7 +15,7 @@ insert  into `biblio_framework`(`frameworkcode`,`frameworktext`) values ('PR','R
 /*Fields and subfield of standard Unimarc */
 
 /*Data for the table `marc_tag_structure` [Fields] */
---Inizia il framework Default
+-- Inizia il framework Default
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('000','Guida (Record label)','',0,1,'','');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('001','Identificatore del record','Identificatore del record',0,0,'','');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('005','Identificatore di versione','',0,0,'','');
@@ -181,8 +181,8 @@ insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatabl
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('802','Centro ISSN','',1,0,'','');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('830','Nota generale del catalogatore','',1,0,'','');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('856','Localizzazione e accessi elettronici','',1,0,'','');
----
---- Inizia il framework 'MN'
+--
+-- Inizia il framework 'MN'
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('000','Guida (Record label)','',0,1,'','MN');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('001','Identificatore del record','',0,1,'','MN');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('005','Identificatore di versione','',0,0,'','MN');
@@ -230,8 +230,8 @@ insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatabl
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('802','Centro ISSN','',1,0,'','MN');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('830','Nota generale del catalogatore','',1,0,'','MN');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('856','Localizzazione e accessi elettronici','',1,0,'','MN');
----
---- Inizia il framework 'PR'
+--
+-- Inizia il framework 'PR'
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('000','Guida (Record label)','',0,1,'','PR');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('001','Identificatore del record','',0,1,'','PR');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values ('005','Identificatore di versione','',0,0,'','PR');
@@ -1389,8 +1389,8 @@ insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('856','x','Nota non pubblica','',1,0,'',8,'','','',0,-5,'','','',NULL);
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('856','y','Metodo di accesso','',0,0,'',8,'','','',0,-5,'','','',NULL);
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('856','z','Nota pubblica','',1,0,'',8,'','','',0,-5,'','','',NULL);
----
---- Iizia la struttura di 'MN'
+--
+-- Iizia la struttura di 'MN'
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('000','@','Guida (Record label)','',0,1,'',0,'','','unimarc_leader.pl',NULL,0,'MN','',NULL,NULL);
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('001','@','Identificatore del record','',0,0,'biblio.biblionumber',-1,'','','',0,0,'MN',NULL,'','');
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('005','@','Identificatore di versione','',0,0,'',0,'','','marc21_field_005.pl',NULL,0,'MN','',NULL,NULL);
@@ -1720,7 +1720,7 @@ insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('856','x','Nota non pubblica','',1,0,'',8,'','','',NULL,-5,'MN','',NULL,NULL);
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('856','y','Metodo di accesso','',0,0,'',8,'','','',NULL,-5,'MN','',NULL,NULL);
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('856','z','Nota pubblica','',1,0,'',8,'','','',NULL,-5,'MN','',NULL,NULL);
----
+--
 -- Inizia il framework 'PR'
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('000','@','Guida (Record label)','',0,1,'',0,'','','unimarc_leader.pl',NULL,0,'PR','',NULL,NULL);
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('001','@','Identificatore del record','',0,0,'biblio.biblionumber',-1,'','','',0,0,'PR',NULL,'','');
@@ -2480,7 +2480,7 @@ insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatabl
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values
 ('995','Collocazione e informazioni sulla copia (Koha)','',1,0,'','');
 
---- MN
+-- MN
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values
 ('090','id koha','',0,0,'','MN');
 insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values
@@ -2499,7 +2499,7 @@ insert  into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatabl
 ('995','Collocazione e informazioni sulla copia (Koha)','',1,0,'','PR');
 
 
---- Sottcampi di Default
+-- Sottcampi di Default
 -- 090
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('090','a','valore id','valore id',0,0,'biblioitems.biblioitemnumber',9,'','','',0,-5,'',NULL,'','');
 -- 099
@@ -2519,7 +2519,7 @@ insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('942','n','Suppress in OPAC','Suppress in OPAC',0,0,'',9,'','','',0,-5,'',NULL,'','');
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('942','s','Serial record flag','Serial record',0,0,'biblio.serial',9,'','','',0,0,'',NULL,'','');
 
---995
+-- 995
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('995','0','Ritiro della copia','Ritiro della copia',0,0,'items.wthdrawn',10,'WITHDRAWN','','',0,0,'',NULL,'','0');
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('995','1','Codice di sistema (classificazione specifica o altro schema e edizione)','Codice di sistema (classificazione specifica o altro schema e edizione)',0,0,'',10,'','','',0,-5,'',NULL,'','');
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('995','2','Copia smarrita','Copia smarrita',0,0,'items.itemlost',10,'LOST','','',0,0,'',NULL,'','0');
@@ -2557,7 +2557,7 @@ insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('995','y','Codice dell\'ente destinatario superiore','',0,0,'',10,'','','',0,-5,'',NULL,'','');
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('995','z','Ente destinatario superiore, testo libero','',0,0,'',10,'','','',0,-5,'',NULL,'','');
 
---- Sottocampi di MN
+-- Sottocampi di MN
 -- 090
 insert  into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values ('090','a','valore id','valore id',0,0,'biblioitems.biblioitemnumber',9,'','','',0,-5,'MN',NULL,'','');
 -- 099
index 2ab0746..93fea97 100644 (file)
@@ -1,12 +1,12 @@
 SET FOREIGN_KEY_CHECKS=0;
 
-INSERT INTO `itemtypes` VALUES ('BK', 'Libro',5,0,0,'bridge/book.gif','');
-INSERT INTO `itemtypes` VALUES ('MX', 'Materiale misto',5,0,0,'bridge/kit.gif','');
-INSERT INTO `itemtypes` VALUES ('CF', 'Computer Files',5,0,0,'bridge/computer_file.gif','');
-INSERT INTO `itemtypes` VALUES ('MP', 'Mappe',5,0,0,'bridge/map.gif','');
-INSERT INTO `itemtypes` VALUES ('VM', 'Audiovisivi',5,0,1,'bridge/dvd.gif','');
-INSERT INTO `itemtypes` VALUES ('MU', 'Musica',5,0,0,'bridge/sound.gif','');
-INSERT INTO `itemtypes` VALUES ('CR', 'Periodici',5,0,0,'bridge/periodical.gif','');
-INSERT INTO `itemtypes` VALUES ('REF', 'Reference',0,0,1,'','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('BK', 'Libro',5,0,'bridge/book.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('MX', 'Materiale misto',5,0,'bridge/kit.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('CF', 'Computer Files',5,0,'bridge/computer_file.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('MP', 'Mappe',5,0,'bridge/map.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('VM', 'Audiovisivi',5,1,'bridge/dvd.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('MU', 'Musica',5,0,'bridge/sound.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('CR', 'Periodici',5,0,'bridge/periodical.gif','');
+INSERT INTO `itemtypes` (`itemtype`,`description`,`rentalcharge`,`notforloan`,`imageurl`,`summary`) VALUES ('REF', 'Reference',0,1,'','');
 
-SET FOREIGN_KEY_CHECKS=1;
\ No newline at end of file
+SET FOREIGN_KEY_CHECKS=1;
index 452173d..4fd4106 100644 (file)
@@ -116,16 +116,16 @@ DROP TABLE IF EXISTS `biblio`;
 CREATE TABLE `biblio` ( -- table that stores bibliographic information
   `biblionumber` int(11) NOT NULL auto_increment, -- unique identifier assigned to each bibliographic record
   `frameworkcode` varchar(4) NOT NULL default '', -- foriegn key from the biblio_framework table to identify which framework was used in cataloging this record
-  `author` mediumtext, -- statement of responsibility from MARC record (100 in MARC21)
-  `title` mediumtext, -- title (without the subtitle) from the MARC record (245 in MARC21)
-  `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240 in MARC21)
-  `notes` mediumtext, -- values from the general notes field in the MARC record (500 in MARC21) split by bar (|)
+  `author` mediumtext, -- statement of responsibility from MARC record (100$a in MARC21)
+  `title` mediumtext, -- title (without the subtitle) from the MARC record (245$a in MARC21)
+  `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240$a in MARC21)
+  `notes` mediumtext, -- values from the general notes field in the MARC record (500$a in MARC21) split by bar (|)
   `serial` tinyint(1) default NULL, -- foreign key, linking to the subscriptionid in the serial table
   `seriestitle` mediumtext,
   `copyrightdate` smallint(6) default NULL, -- publication or copyright date from the MARC record
   `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched
   `datecreated` DATE NOT NULL, -- the date this record was added to Koha
-  `abstract` mediumtext, -- summary from the MARC record (520 in MARC21)
+  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
   PRIMARY KEY  (`biblionumber`),
   KEY `blbnoidx` (`biblionumber`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -146,39 +146,39 @@ CREATE TABLE `biblio_framework` (
 --
 
 DROP TABLE IF EXISTS `biblioitems`;
-CREATE TABLE `biblioitems` (
-  `biblioitemnumber` int(11) NOT NULL auto_increment,
-  `biblionumber` int(11) NOT NULL default 0,
+CREATE TABLE `biblioitems` ( -- information related to bibliographic records in Koha
+  `biblioitemnumber` int(11) NOT NULL auto_increment, -- primary key, unique identifier assigned by Koha
+  `biblionumber` int(11) NOT NULL default 0, -- foreign key linking this table to the biblio table
   `volume` mediumtext,
   `number` mediumtext,
-  `itemtype` varchar(10) default NULL,
-  `isbn` varchar(30) default NULL,
-  `issn` varchar(9) default NULL,
+  `itemtype` varchar(10) default NULL, -- biblio level item type (MARC21 942$c)
+  `isbn` varchar(30) default NULL, -- ISBN (MARC21 020$a)
+  `issn` varchar(9) default NULL, -- ISSN (MARC21 022$a)
   `publicationyear` text,
-  `publishercode` varchar(255) default NULL,
+  `publishercode` varchar(255) default NULL, -- publisher (MARC21 260$b)
   `volumedate` date default NULL,
-  `volumedesc` text,
+  `volumedesc` text, -- volume information (MARC21 362$a)
   `collectiontitle` mediumtext default NULL,
   `collectionissn` text default NULL,
   `collectionvolume` mediumtext default NULL,
   `editionstatement` text default NULL,
   `editionresponsibility` text default NULL,
   `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
-  `illus` varchar(255) default NULL,
-  `pages` varchar(255) default NULL,
+  `illus` varchar(255) default NULL, -- illustrations (MARC21 300$b)
+  `pages` varchar(255) default NULL, -- number of pages (MARC21 300$c)
   `notes` mediumtext,
-  `size` varchar(255) default NULL,
-  `place` varchar(255) default NULL,
-  `lccn` varchar(25) default NULL,
-  `marc` longblob,
-  `url` varchar(255) default NULL,
-  `cn_source` varchar(10) default NULL,
+  `size` varchar(255) default NULL, -- material size (MARC21 300$c)
+  `place` varchar(255) default NULL, -- publication place (MARC21 260$a)
+  `lccn` varchar(25) default NULL, -- library of congress control number (MARC21 010$a)
+  `marc` longblob, -- full bibliographic MARC record
+  `url` varchar(255) default NULL, -- url (MARC21 856$u)
+  `cn_source` varchar(10) default NULL, -- classification source (MARC21 942$2)
   `cn_class` varchar(30) default NULL,
   `cn_item` varchar(10) default NULL,
   `cn_suffix` varchar(10) default NULL,
   `cn_sort` varchar(30) default NULL,
   `totalissues` int(10),
-  `marcxml` longtext NOT NULL,
+  `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
   PRIMARY KEY  (`biblioitemnumber`),
   KEY `bibinoidx` (`biblioitemnumber`),
   KEY `bibnoidx` (`biblionumber`),
@@ -417,21 +417,21 @@ CREATE TABLE `browser` (
 --
 
 DROP TABLE IF EXISTS `categories`;
-CREATE TABLE `categories` (
-  `categorycode` varchar(10) NOT NULL default '',
-  `description` mediumtext,
-  `enrolmentperiod` smallint(6) default NULL,
-  `enrolmentperioddate` DATE NULL DEFAULT NULL,
-  `upperagelimit` smallint(6) default NULL,
+CREATE TABLE `categories` ( -- this table shows information related to Koha patron categories
+  `categorycode` varchar(10) NOT NULL default '', -- unique primary key used to idenfity the patron category
+  `description` mediumtext, -- description of the patron category
+  `enrolmentperiod` smallint(6) default NULL, -- number of months the patron is enrolled for (will be NULL if enrolmentperioddate is set)
+  `enrolmentperioddate` DATE NULL DEFAULT NULL, -- date the patron is enrolled until (will be NULL if enrolmentperiod is set)
+  `upperagelimit` smallint(6) default NULL, -- age limit for the patron
   `dateofbirthrequired` tinyint(1) default NULL,
-  `finetype` varchar(30) default NULL,
+  `finetype` varchar(30) default NULL, -- unused in Koha
   `bulk` tinyint(1) default NULL,
-  `enrolmentfee` decimal(28,6) default NULL,
-  `overduenoticerequired` tinyint(1) default NULL,
-  `issuelimit` smallint(6) default NULL,
-  `reservefee` decimal(28,6) default NULL,
-  `hidelostitems` tinyint(1) NOT NULL default '0',
-  `category_type` varchar(1) NOT NULL default 'A',
+  `enrolmentfee` decimal(28,6) default NULL, -- enrollment fee for the patron
+  `overduenoticerequired` tinyint(1) default NULL, -- are overdue notices sent to this patron category (1 for yes, 0 for no)
+  `issuelimit` smallint(6) default NULL, -- unused in Koha
+  `reservefee` decimal(28,6) default NULL, -- cost to place holds
+  `hidelostitems` tinyint(1) NOT NULL default '0', -- are lost items shown to this category (1 for yes, 0 for no)
+  `category_type` varchar(1) NOT NULL default 'A', -- type of Koha patron (Adult, Child, Professional, Organizational, Statistical, Staff)
   PRIMARY KEY  (`categorycode`),
   UNIQUE KEY `categorycode` (`categorycode`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -591,16 +591,16 @@ DROP TABLE IF EXISTS `deletedbiblio`;
 CREATE TABLE `deletedbiblio` ( -- stores information about bibliographic records that have been deleted
   `biblionumber` int(11) NOT NULL auto_increment, -- unique identifier assigned to each bibliographic record
   `frameworkcode` varchar(4) NOT NULL default '', -- foriegn key from the biblio_framework table to identify which framework was used in cataloging this record
-  `author` mediumtext, -- statement of responsibility from MARC record (100 in MARC21)
-  `title` mediumtext, -- title (without the subtitle) from the MARC record (245 in MARC21)
-  `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240 in MARC21)
-  `notes` mediumtext, -- values from the general notes field in the MARC record (500 in MARC21) split by bar (|)
+  `author` mediumtext, -- statement of responsibility from MARC record (100$a in MARC21)
+  `title` mediumtext, -- title (without the subtitle) from the MARC record (245$a in MARC21)
+  `unititle` mediumtext, -- uniform title (without the subtitle) from the MARC record (240$a in MARC21)
+  `notes` mediumtext, -- values from the general notes field in the MARC record (500$a in MARC21) split by bar (|)
   `serial` tinyint(1) default NULL, -- foreign key, linking to the subscriptionid in the serial table
   `seriestitle` mediumtext,
   `copyrightdate` smallint(6) default NULL, -- publication or copyright date from the MARC record
   `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched
   `datecreated` DATE NOT NULL, -- the date this record was added to Koha
-  `abstract` mediumtext, -- summary from the MARC record (520 in MARC21)
+  `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
   PRIMARY KEY  (`biblionumber`),
   KEY `blbnoidx` (`biblionumber`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -610,39 +610,39 @@ CREATE TABLE `deletedbiblio` ( -- stores information about bibliographic records
 --
 
 DROP TABLE IF EXISTS `deletedbiblioitems`;
-CREATE TABLE `deletedbiblioitems` (
-  `biblioitemnumber` int(11) NOT NULL default 0,
-  `biblionumber` int(11) NOT NULL default 0,
+CREATE TABLE `deletedbiblioitems` ( -- information about bibliographic records that have been deleted
+  `biblioitemnumber` int(11) NOT NULL default 0, -- primary key, unique identifier assigned by Koha
+  `biblionumber` int(11) NOT NULL default 0, -- foreign key linking this table to the biblio table
   `volume` mediumtext,
   `number` mediumtext,
-  `itemtype` varchar(10) default NULL,
-  `isbn` varchar(30) default NULL,
-  `issn` varchar(9) default NULL,
+  `itemtype` varchar(10) default NULL, -- biblio level item type (MARC21 942$c)
+  `isbn` varchar(30) default NULL, -- ISBN (MARC21 020$a)
+  `issn` varchar(9) default NULL, -- ISSN (MARC21 022$a)
   `publicationyear` text,
-  `publishercode` varchar(255) default NULL,
+  `publishercode` varchar(255) default NULL, -- publisher (MARC21 260$b)
   `volumedate` date default NULL,
-  `volumedesc` text,
+  `volumedesc` text, -- volume information (MARC21 362$a)
   `collectiontitle` mediumtext default NULL,
   `collectionissn` text default NULL,
   `collectionvolume` mediumtext default NULL,
   `editionstatement` text default NULL,
   `editionresponsibility` text default NULL,
   `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
-  `illus` varchar(255) default NULL,
-  `pages` varchar(255) default NULL,
+  `illus` varchar(255) default NULL, -- illustrations (MARC21 300$b)
+  `pages` varchar(255) default NULL, -- number of pages (MARC21 300$c)
   `notes` mediumtext,
-  `size` varchar(255) default NULL,
-  `place` varchar(255) default NULL,
-  `lccn` varchar(25) default NULL,
-  `marc` longblob,
-  `url` varchar(255) default NULL,
-  `cn_source` varchar(10) default NULL,
+  `size` varchar(255) default NULL, -- material size (MARC21 300$c)
+  `place` varchar(255) default NULL, -- publication place (MARC21 260$a)
+  `lccn` varchar(25) default NULL, -- library of congress control number (MARC21 010$a)
+  `marc` longblob, -- full bibliographic MARC record
+  `url` varchar(255) default NULL, -- url (MARC21 856$u)
+  `cn_source` varchar(10) default NULL, -- classification source (MARC21 942$2)
   `cn_class` varchar(30) default NULL,
   `cn_item` varchar(10) default NULL,
   `cn_suffix` varchar(10) default NULL,
   `cn_sort` varchar(30) default NULL,
   `totalissues` int(10),
-  `marcxml` longtext NOT NULL,
+  `marcxml` longtext NOT NULL, -- full bibliographic MARC record in MARCXML
   PRIMARY KEY  (`biblioitemnumber`),
   KEY `bibinoidx` (`biblioitemnumber`),
   KEY `bibnoidx` (`biblionumber`),
@@ -733,46 +733,46 @@ CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrower
 
 DROP TABLE IF EXISTS `deleteditems`;
 CREATE TABLE `deleteditems` (
-  `itemnumber` int(11) NOT NULL default 0,
-  `biblionumber` int(11) NOT NULL default 0,
-  `biblioitemnumber` int(11) NOT NULL default 0,
-  `barcode` varchar(20) default NULL,
-  `dateaccessioned` date default NULL,
-  `booksellerid` mediumtext default NULL,
-  `homebranch` varchar(10) default NULL,
-  `price` decimal(8,2) default NULL,
-  `replacementprice` decimal(8,2) default NULL,
-  `replacementpricedate` date default NULL,
-  `datelastborrowed` date default NULL,
-  `datelastseen` date default NULL,
+  `itemnumber` int(11) NOT NULL default 0, -- primary key and unique identifier added by Koha
+  `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record
+  `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information
+  `barcode` varchar(20) default NULL, -- item barcode (MARC21 952$p)
+  `dateaccessioned` date default NULL, -- date the item was acquired or added to Koha (MARC21 952$d)
+  `booksellerid` mediumtext default NULL, -- where the item was purchased (MARC21 952$e)
+  `homebranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this item (MARC21 952$a)
+  `price` decimal(8,2) default NULL, -- purchase price (MARC21 952$g)
+  `replacementprice` decimal(8,2) default NULL, -- cost the library charges to replace the item if it has been marked lost (MARC21 952$v)
+  `replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w)
+  `datelastborrowed` date default NULL, -- the date the item was last checked out
+  `datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done)
   `stack` tinyint(1) default NULL,
-  `notforloan` tinyint(1) NOT NULL default 0,
-  `damaged` tinyint(1) NOT NULL default 0,
-  `itemlost` tinyint(1) NOT NULL default 0,
-  `wthdrawn` tinyint(1) NOT NULL default 0,
-  `itemcallnumber` varchar(255) default NULL,
-  `issues` smallint(6) default NULL,
-  `renewals` smallint(6) default NULL,
-  `reserves` smallint(6) default NULL,
-  `restricted` tinyint(1) default NULL,
-  `itemnotes` mediumtext,
-  `holdingbranch` varchar(10) default NULL,
+  `notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7)
+  `damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4)
+  `itemlost` tinyint(1) NOT NULL default 0, -- authorized value defining this item as lost (MARC21 952$1)
+  `wthdrawn` tinyint(1) NOT NULL default 0, -- authorized value defining this item as withdrawn (MARC21 952$0)
+  `itemcallnumber` varchar(255) default NULL, -- call number for this item (MARC21 952$o)
+  `issues` smallint(6) default NULL, -- number of times this item has been checked out
+  `renewals` smallint(6) default NULL, -- number of times this item has been renewed
+  `reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved
+  `restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5)
+  `itemnotes` mediumtext, -- public notes on this item (MARC21 952$x)
+  `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)
   `paidfor` mediumtext,
-  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
-  `location` varchar(80) default NULL,
-  `permanent_location` varchar(80) default NULL,
-  `onloan` date default NULL,
-  `cn_source` varchar(10) default NULL,
-  `cn_sort` varchar(30) default NULL,
-  `ccode` varchar(10) default NULL,
-  `materials` varchar(10) default NULL,
-  `uri` varchar(255) default NULL,
-  `itype` varchar(10) default NULL,
-  `more_subfields_xml` longtext default NULL,
-  `enumchron` text default NULL,
-  `copynumber` varchar(32) default NULL,
-  `stocknumber` varchar(32) default NULL,
-  `marc` longblob,
+  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered
+  `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (MARC21 952$c)
+  `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
+  `onloan` date default NULL, -- defines if this item is currently checked out (1 for yes, 0 for no)
+  `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2)
+  `cn_sort` varchar(30) default NULL, -- normalized form of the call number (MARC21 952$o) used for sorting
+  `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
+  `materials` varchar(10) default NULL, -- materials specified (MARC21 952$3)
+  `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
+  `itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y)
+  `more_subfields_xml` longtext default NULL, -- additional 952 subfields in XML format
+  `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)
+  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
+  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
+  `marc` longblob, -- unused in Koha
   PRIMARY KEY  (`itemnumber`),
   KEY `delitembarcodeidx` (`barcode`),
   KEY `delitemstocknumberidx` (`stocknumber`),
@@ -998,46 +998,46 @@ CREATE TABLE `issuingrules` (
 --
 
 DROP TABLE IF EXISTS `items`;
-CREATE TABLE `items` (
-  `itemnumber` int(11) NOT NULL auto_increment,
-  `biblionumber` int(11) NOT NULL default 0,
-  `biblioitemnumber` int(11) NOT NULL default 0,
-  `barcode` varchar(20) default NULL,
-  `dateaccessioned` date default NULL,
-  `booksellerid` mediumtext default NULL,
-  `homebranch` varchar(10) default NULL,
-  `price` decimal(8,2) default NULL,
-  `replacementprice` decimal(8,2) default NULL,
-  `replacementpricedate` date default NULL,
-  `datelastborrowed` date default NULL,
-  `datelastseen` date default NULL,
+CREATE TABLE `items` ( -- holdings/item information 
+  `itemnumber` int(11) NOT NULL auto_increment, -- primary key and unique identifier added by Koha
+  `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record
+  `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information
+  `barcode` varchar(20) default NULL, -- item barcode (MARC21 952$p)
+  `dateaccessioned` date default NULL, -- date the item was acquired or added to Koha (MARC21 952$d)
+  `booksellerid` mediumtext default NULL, -- where the item was purchased (MARC21 952$e)
+  `homebranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this item (MARC21 952$a)
+  `price` decimal(8,2) default NULL, -- purchase price (MARC21 952$g)
+  `replacementprice` decimal(8,2) default NULL, -- cost the library charges to replace the item if it has been marked lost (MARC21 952$v)
+  `replacementpricedate` date default NULL, -- the date the price is effective from (MARC21 952$w)
+  `datelastborrowed` date default NULL, -- the date the item was last checked out/issued
+  `datelastseen` date default NULL, -- the date the item was last see (usually the last time the barcode was scanned or inventory was done)
   `stack` tinyint(1) default NULL,
-  `notforloan` tinyint(1) NOT NULL default 0,
-  `damaged` tinyint(1) NOT NULL default 0,
-  `itemlost` tinyint(1) NOT NULL default 0,
-  `wthdrawn` tinyint(1) NOT NULL default 0,
-  `itemcallnumber` varchar(255) default NULL,
-  `issues` smallint(6) default NULL,
-  `renewals` smallint(6) default NULL,
-  `reserves` smallint(6) default NULL,
-  `restricted` tinyint(1) default NULL,
-  `itemnotes` mediumtext,
-  `holdingbranch` varchar(10) default NULL,
+  `notforloan` tinyint(1) NOT NULL default 0, -- authorized value defining why this item is not for loan (MARC21 952$7)
+  `damaged` tinyint(1) NOT NULL default 0, -- authorized value defining this item as damaged (MARC21 952$4)
+  `itemlost` tinyint(1) NOT NULL default 0, -- authorized value defining this item as lost (MARC21 952$1)
+  `wthdrawn` tinyint(1) NOT NULL default 0, -- authorized value defining this item as withdrawn (MARC21 952$0)
+  `itemcallnumber` varchar(255) default NULL, -- call number for this item (MARC21 952$o)
+  `issues` smallint(6) default NULL, -- number of times this item has been checked out/issued
+  `renewals` smallint(6) default NULL, -- number of times this item has been renewed
+  `reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved
+  `restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5)
+  `itemnotes` mediumtext, -- public notes on this item (MARC21 952$x)
+  `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)
   `paidfor` mediumtext,
-  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
-  `location` varchar(80) default NULL,
-  `permanent_location` varchar(80) default NULL,
-  `onloan` date default NULL,
-  `cn_source` varchar(10) default NULL,
-  `cn_sort` varchar(30) default NULL,
-  `ccode` varchar(10) default NULL,
-  `materials` varchar(10) default NULL,
-  `uri` varchar(255) default NULL,
-  `itype` varchar(10) default NULL,
-  `more_subfields_xml` longtext default NULL,
-  `enumchron` text default NULL,
-  `copynumber` varchar(32) default NULL,
-  `stocknumber` varchar(32) default NULL,
+  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered
+  `location` varchar(80) default NULL, -- authorized value for the shelving location for this item (MARC21 952$c)
+  `permanent_location` varchar(80) default NULL, -- linked to the CART and PROC temporary locations feature, stores the permanent shelving location
+  `onloan` date default NULL, -- defines if this item is currently checked out (1 for yes, 0 for no)
+  `cn_source` varchar(10) default NULL, -- classification source used on this item (MARC21 952$2)
+  `cn_sort` varchar(30) default NULL,  -- normalized form of the call number (MARC21 952$o) used for sorting
+  `ccode` varchar(10) default NULL, -- authorized value for the collection code associated with this item (MARC21 952$8)
+  `materials` text default NULL, -- materials specified (MARC21 952$3)
+  `uri` varchar(255) default NULL, -- URL for the item (MARC21 952$u)
+  `itype` varchar(10) default NULL, -- foreign key from the itemtypes table defining the type for this item (MARC21 952$y)
+  `more_subfields_xml` longtext default NULL, -- additional 952 subfields in XML format
+  `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)
+  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
+  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
   PRIMARY KEY  (`itemnumber`),
   UNIQUE KEY `itembarcodeidx` (`barcode`),
   KEY `itemstocknumberidx` (`stocknumber`),
@@ -1317,10 +1317,10 @@ CREATE TABLE `matchchecks` (
 --
 
 DROP TABLE IF EXISTS `need_merge_authorities`;
-CREATE TABLE `need_merge_authorities` (
-  `id` int NOT NULL auto_increment PRIMARY KEY,
-  `authid` bigint NOT NULL,
-  `done` tinyint DEFAULT 0
+CREATE TABLE `need_merge_authorities` ( -- keeping track of authority records still to be merged by merge_authority cron job (used only if pref dontmerge is ON)
+  `id` int NOT NULL auto_increment PRIMARY KEY, -- unique id
+  `authid` bigint NOT NULL, -- reference to authority record
+  `done` tinyint DEFAULT 0  -- indication whether merge has been executed (0=not done, 1= done, 2= in progress)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
@@ -1382,22 +1382,22 @@ CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r
 -- Table structure for table `old_reserves`
 --
 DROP TABLE IF EXISTS `old_reserves`;
-CREATE TABLE `old_reserves` (
-  `borrowernumber` int(11) default NULL,
-  `reservedate` date default NULL,
-  `biblionumber` int(11) default NULL,
+CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have been completed (either filled or cancelled)
+  `borrowernumber` int(11) default NULL, -- foreign key from the borrowers table defining which patron this hold is for
+  `reservedate` date default NULL, -- the date the hold was places
+  `biblionumber` int(11) default NULL, -- foreign key from the biblio table defining which bib record this hold is on
   `constrainttype` varchar(1) default NULL,
-  `branchcode` varchar(10) default NULL,
-  `notificationdate` date default NULL,
-  `reminderdate` date default NULL,
-  `cancellationdate` date default NULL,
-  `reservenotes` mediumtext,
-  `priority` smallint(6) default NULL,
-  `found` varchar(1) default NULL,
-  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
-  `itemnumber` int(11) default NULL,
-  `waitingdate` date default NULL,
-  `expirationdate` DATE DEFAULT NULL,
+  `branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick this hold up at
+  `notificationdate` date default NULL, -- currently unused
+  `reminderdate` date default NULL, -- currently unused
+  `cancellationdate` date default NULL, -- the date this hold was cancelled
+  `reservenotes` mediumtext, -- notes related to this hold
+  `priority` smallint(6) default NULL, -- where in the queue the patron sits
+  `found` varchar(1) default NULL, -- a one letter code defining what the status is of the hold is after it has been confirmed
+  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this hold was last updated
+  `itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with
+  `waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library
+  `expirationdate` DATE DEFAULT NULL, -- the date the hold expires (usually the date entered by the patron to say they don't need the hold after a certain date)
   `lowestPriority` tinyint(1) NOT NULL,
   KEY `old_reserves_borrowernumber` (`borrowernumber`),
   KEY `old_reserves_biblionumber` (`biblionumber`),
@@ -1557,22 +1557,22 @@ CREATE TABLE `reserveconstraints` (
 --
 
 DROP TABLE IF EXISTS `reserves`;
-CREATE TABLE `reserves` (
-  `borrowernumber` int(11) NOT NULL default 0,
-  `reservedate` date default NULL,
-  `biblionumber` int(11) NOT NULL default 0,
+CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha
+  `borrowernumber` int(11) NOT NULL default 0, -- foreign key from the borrowers table defining which patron this hold is for
+  `reservedate` date default NULL, -- the date the hold was places
+  `biblionumber` int(11) NOT NULL default 0, -- foreign key from the biblio table defining which bib record this hold is on
   `constrainttype` varchar(1) default NULL,
-  `branchcode` varchar(10) default NULL,
-  `notificationdate` date default NULL,
-  `reminderdate` date default NULL,
-  `cancellationdate` date default NULL,
-  `reservenotes` mediumtext,
-  `priority` smallint(6) default NULL,
-  `found` varchar(1) default NULL,
-  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
-  `itemnumber` int(11) default NULL,
-  `waitingdate` date default NULL,
-  `expirationdate` DATE DEFAULT NULL,
+  `branchcode` varchar(10) default NULL, -- foreign key from the branches table defining which branch the patron wishes to pick this hold up at
+  `notificationdate` date default NULL, -- currently unused
+  `reminderdate` date default NULL, -- currently unused
+  `cancellationdate` date default NULL, -- the date this hold was cancelled
+  `reservenotes` mediumtext, -- notes related to this hold
+  `priority` smallint(6) default NULL, -- where in the queue the patron sits
+  `found` varchar(1) default NULL, -- a one letter code defining what the status is of the hold is after it has been confirmed
+  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this hold was last updated
+  `itemnumber` int(11) default NULL, -- foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with
+  `waitingdate` date default NULL, -- the date the item was marked as waiting for the patron at the library
+  `expirationdate` DATE DEFAULT NULL, -- the date the hold expires (usually the date entered by the patron to say they don't need the hold after a certain date)
   `lowestPriority` tinyint(1) NOT NULL,
   KEY priorityfoundidx (priority,found),
   KEY `borrowernumber` (`borrowernumber`),
@@ -1863,7 +1863,8 @@ CREATE TABLE `suggestions` ( -- purchase suggestions
   `isbn` varchar(30) default NULL, -- isbn of the suggested item
   `mailoverseeing` smallint(1) default 0,
   `biblionumber` int(11) default NULL, -- foreign key linking the suggestion to the biblio table after the suggestion has been ordered
-  `reason` text, -- reason for making the suggestion
+  `reason` text, -- reason for accepting or rejecting the suggestion
+  `patronreason` text, -- reason for making the suggestion
    budgetid INT(11), -- foreign key linking the suggested budget to the aqbudgets table
    branchcode VARCHAR(10) default NULL, -- foreign key linking the suggested branch to the branches table
    collectiontitle text default NULL, -- collection name for the suggested item
@@ -2461,39 +2462,39 @@ CREATE TABLE `aqbasket` (
 --
 
 DROP TABLE IF EXISTS `aqbooksellers`;
-CREATE TABLE `aqbooksellers` (
-  `id` int(11) NOT NULL auto_increment,
-  `name` mediumtext NOT NULL,
-  `address1` mediumtext,
-  `address2` mediumtext,
-  `address3` mediumtext,
-  `address4` mediumtext,
-  `phone` varchar(30) default NULL,
-  `accountnumber` mediumtext,
-  `othersupplier` mediumtext,
-  `currency` varchar(3) NOT NULL default '',
-  `booksellerfax` mediumtext,
-  `notes` mediumtext,
-  `bookselleremail` mediumtext,
-  `booksellerurl` mediumtext,
-  `contact` varchar(100) default NULL,
-  `postal` mediumtext,
-  `url` varchar(255) default NULL,
-  `contpos` varchar(100) default NULL,
-  `contphone` varchar(100) default NULL,
-  `contfax` varchar(100) default NULL,
-  `contaltphone` varchar(100) default NULL,
-  `contemail` varchar(100) default NULL,
-  `contnotes` mediumtext,
-  `active` tinyint(4) default NULL,
-  `listprice` varchar(10) default NULL,
-  `invoiceprice` varchar(10) default NULL,
-  `gstreg` tinyint(4) default NULL,
-  `listincgst` tinyint(4) default NULL,
-  `invoiceincgst` tinyint(4) default NULL,
-  `gstrate` decimal(6,4) default NULL,
-  `discount` float(6,4) default NULL,
-  `fax` varchar(50) default NULL,
+CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquisitions
+  `id` int(11) NOT NULL auto_increment, -- primary key and unique identifier assigned by Koha
+  `name` mediumtext NOT NULL, -- vendor name
+  `address1` mediumtext, -- first line of vendor physical address
+  `address2` mediumtext, -- second line of vendor physical address
+  `address3` mediumtext, -- third line of vendor physical address
+  `address4` mediumtext, -- fourth line of vendor physical address
+  `phone` varchar(30) default NULL, -- vendor phone number
+  `accountnumber` mediumtext, -- unused in Koha
+  `othersupplier` mediumtext,  -- unused in Koha
+  `currency` varchar(3) NOT NULL default '', -- unused in Koha
+  `booksellerfax` mediumtext, -- vendor fax number
+  `notes` mediumtext, -- order notes
+  `bookselleremail` mediumtext, -- vendor email
+  `booksellerurl` mediumtext, -- unused in Koha
+  `contact` varchar(100) default NULL, -- name of contact at vendor
+  `postal` mediumtext, -- vendor postal address (all lines)
+  `url` varchar(255) default NULL, -- vendor web address
+  `contpos` varchar(100) default NULL, -- contact person's position
+  `contphone` varchar(100) default NULL, -- contact's phone number
+  `contfax` varchar(100) default NULL,  -- contact's fax number
+  `contaltphone` varchar(100) default NULL, -- contact's alternate phone number
+  `contemail` varchar(100) default NULL, -- contact's email address
+  `contnotes` mediumtext, -- notes related to the contact
+  `active` tinyint(4) default NULL, -- is this vendor active (1 for yes, 0 for no)
+  `listprice` varchar(10) default NULL, -- currency code for list prices
+  `invoiceprice` varchar(10) default NULL, -- currency code for invoice prices
+  `gstreg` tinyint(4) default NULL, -- is your library charged tax (1 for yes, 0 for no)
+  `listincgst` tinyint(4) default NULL, -- is tax included in list prices (1 for yes, 0 for no)
+  `invoiceincgst` tinyint(4) default NULL, -- is tax included in invoice prices (1 for yes, 0 for no)
+  `gstrate` decimal(6,4) default NULL, -- the tax rate the library is charged
+  `discount` float(6,4) default NULL, -- discount offered on all items ordered from this vendor
+  `fax` varchar(50) default NULL, -- vendor fax number
   PRIMARY KEY  (`id`),
   KEY `listprice` (`listprice`),
   KEY `invoiceprice` (`invoiceprice`),
index 8ab9400..035bf2b 100644 (file)
@@ -347,6 +347,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+        ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
                ('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
index 2586f51..8e9d6e2 100644 (file)
@@ -372,6 +372,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
@@ -4297,6 +4298,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
@@ -8221,6 +8223,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
@@ -12145,6 +12148,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
@@ -16067,6 +16071,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
@@ -19989,6 +19994,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
@@ -23913,6 +23919,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
@@ -27832,6 +27839,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
diff --git a/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql b/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql
new file mode 100644 (file)
index 0000000..279d6db
--- /dev/null
@@ -0,0 +1,127 @@
+-- This file is part of Koha.
+--
+-- Copyright 2011 Magnus Enger Libriotech
+--
+-- 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 this program; if not, write to the Free Software Foundation, Inc.,
+-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+INSERT IGNORE INTO biblio_framework VALUES ( 'FA','Hurtigkatalogisering' );
+
+DELETE FROM marc_tag_structure WHERE frameworkcode='FA';
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('000','Postens hode','Postens hode','0','1','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('001','Identifikasjonsnummer','Identifikasjonsnummer','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('008','Informasjonskoder','Informasjonskoder','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('015','Andre bibliografiske kontrollnummer (R)','Andre bibliografiske kontrollnummer (R)','1','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('020','Internasjonalt standard boknummer (ISBN)','Internasjonalt standard boknummer (ISBN)','1','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('024','Andre standardnumre','Andre standardnumre','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('025','Europeisk artikkelnummer (EAN)','Europeisk artikkelnummer (EAN)','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('100','Hovedordningsord personnavn','Hovedordningsord personnavn','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('245','Tittel og ansvarsopplysninger','Tittel og ansvarsopplysninger','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('250','Utgave','Utgave','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('260','Utgivelse, distribusjon osv','Utgivelse, distribusjon osv','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('300','Fysisk beskrivelse','Fysisk beskrivelse','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('500','Generell note (R)','Generell note (R)','1','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('942','Andre opplysninger (Koha)','Andre opplysninger (Koha)','0','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('952','Eksemplarinformasjon (Koha)','Eksemplarinformasjon (Koha)','1','0','','FA');
+INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('999','Kontrollnummer (Koha)','Kontrollnummer (Koha)','1','0','','FA');
+
+
+DELETE FROM marc_subfield_structure WHERE frameworkcode='FA';
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('000','@','Postens hode','Postens hode','0','1','','0','','','normarc_leader.pl','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('001','@','Identifikasjonsnummer','Identifikasjonsnummer','0','0','','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('008','@','Informasjonskoder','Informasjonskoder','0','0','','0','','','normarc_field_008.pl','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('015','a','Nummer','Nummer','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('015','b','Kilde','Kilde','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','a','ISBN','ISBN','0','0','biblioitems.isbn','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','b','Innbindingsinformasjon','Innbindingsinformasjon','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','c','Leveringsbetingelser','Leveringsbetingelser','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','g','Andre tilf','Andre tilf','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('020','z','Feil ISBN','Feil ISBN','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('024','a','Standardnummer','Standardnummer','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('024','c','Leveringsbetingelser','Leveringsbetingelser','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('024','g','Andre tilføyelser','Andre tilføyelser','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('024','z','Feil standardnummer','Feil standardnummer','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('025','a','Nummer','Nummer','0','0','0','0','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','8','Andre karakteristika forbundet med navn','Andre karakteristika forbundet med navn','0','0','0','1','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','a','Navn','Navn','0','0','biblio.author','1','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','b','Nummer','Nummer','0','0','0','1','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','c','Andre tilføyelser','Andre tilføyelser','0','0','0','1','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','d','Årstall forbundet med navn','Årstall forbundet med navn','0','0','0','1','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','e','Betegnelse for funksjon','Betegnelse for funksjon','0','0','0','1','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','j','Nasjonalitet','Nasjonalitet','0','0','0','1','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','q','Mer fullstendig navneform','Mer fullstendig navneform','0','0','0','1','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('100','w','Sorteringsdelfelt for delfelt $a','Sorteringsdelfelt for delfelt $a','0','0','0','1','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('245','a','Tittel','Tittel','0','0','biblio.title','2','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('245','b','Annen tittelinformasjon','Annen tittelinformasjon','0','0','bibliosubtitle.subtitle','2','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('245','c','Ansvarsangivelse','Ansvarsangivelse','0','0','0','2','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('245','h','Generell materialbetegnelse','Generell materialbetegnelse','0','0','0','2','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('250','a','Utgave, opplag etc','Utgave, opplag etc','0','0','0','2','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('250','b','Ansvarshavende','Ansvarshavende','0','0','0','2','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','a','Sted (R)','Sted (R)','1','0','biblioitems.place','2','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','b','Navn p','Navn p','0','0','biblioitems.publishercode','2','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','c','År','År','0','0','biblio.copyrightdate','2','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','e','Trykkested eller produksjonssted','Trykkested eller produksjonssted','0','0','0','2','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','f','Trykkeriets eller produsentens navn','Trykkeriets eller produsentens navn','0','0','0','2','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('260','g','Trykkeår eller produksjonsår','Trykkeår eller produksjonsår','0','0','0','2','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('300','a','Omfang','Omfang','0','0','biblioitems.pages','3','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('300','b','Illustrasjonsmateriale og andre fysiske detaljer','Illustrasjonsmateriale og andre fysiske detaljer','0','0','biblioitems.illus','3','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('300','c','Format','Format','0','0','biblioitems.size','3','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('300','e','Bilag','Bilag','0','0','0','3','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('500','a','Notens tekst','Notens tekst','0','0','biblio.notes','5','','','','0','0','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','0','Antall utlån','Antall utlån','0','0','biblioitems.totalissues','9','','','','0','-5','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','2','Kilde for klassifikasjon','Kilde for klassifikasjon','0','0','biblioitems.cn_source','9','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','6','Koha normalisert klassifikasjon for sortering','Koha normalisert klassifikasjon for sortering','0','0','biblioitems.cn_sort','-1','','','','0','7','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','c','Koha [standard] dokumenttype','Koha dokumenttype','0','1','biblioitems.itemtype','9','itemtypes','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','e','Utgave','Utgave','0','0','','9','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','h','Klassifikasjon del','Klassifikasjon del','0','0','biblioitems.cn_class','9','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','i','Eksemplar del','Eksemplar del','1','0','biblioitems.cn_item','9','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','k','Hyllesignatur prefiks','Hyllesignatur prefiks','0','0','','9','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','m','Hyllesignatur postfiks','Hyllesignatur postfiks','0','0','biblioitems.cn_suffix','9','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','n','Skjul i OPAC','Skjul i OPAC','0','0','','9','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('942','s','Periodikamark','Periodikamark','0','0','biblio.serial','9','','','','0','-5','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','0','Trukket tilbake','Trukket tilbake','0','0','items.wthdrawn','10','WITHDRAWN','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','1','Tapt','Tapt','0','0','items.itemlost','10','LOST','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','2','Kilde for klassifikasjon','Kilde for klassifikasjon','0','0','items.cn_source','10','cn_source','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','3','Materialespesifikasjon (innbundet ','Materialespesifikasjon (innbundet ','0','0','items.materials','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','4','Skadet','Skadet','0','0','items.damaged','10','DAMAGED','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','5','Begrensninger p','Begrensninger p','0','0','items.restricted','10','RESTRICTED','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','6','Koha normalisert klassifikasjon for sortering','Koha normalisert klassifikasjon for sortering','0','0','items.cn_sort','-1','','','','0','7','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','7','Ikke til utlån','Ikke til utlån','0','0','items.notforloan','10','NOT_LOAN','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','8','Koha samling','Koha samling','0','0','items.ccode','10','CCODE','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','9','Koha eksemplarnummer (autogenerert)','Koha eksemplarnummer','0','0','items.itemnumber','-1','','','','0','7','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','a','Plassering (eiende filial)','Plassering (eiende filial)','0','0','items.homebranch','10','branches','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','b','Annen plassering (midlertidig filial)','Annen plassering (midlertidig filial)','0','0','items.holdingbranch','10','branches','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','c','Hylleplassering','Hylleplassering','0','0','items.location','10','LOC','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','d','Anskaffelsesdato','Anskaffelsesdato','0','0','items.dateaccessioned','10','','','dateaccessioned.pl','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','e','Kilde for anskaffelse','Kilde for anskaffelse','0','0','items.booksellerid','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','f','Kodet plasseringskvalifikator','Kodet plasseringskvalifikator','0','0','items.coded_location_qualifier','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','g','Pris (normal innkjøpspris)','Pris (normal innkjøpspris)','0','0','items.price','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','h','Serienummerering / kronologi','Serienummerering / kronologi','0','0','items.enumchron','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','j','Samling','Samling','0','0','items.stack','10','STACK','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','l','Koha utlån','Koha utlån','0','0','items.issues','10','','','','0','-5','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','m','Koha fornyinger','Koha fornyinger','0','0','items.renewals','10','','','','0','-5','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','n','Koha reserveringer','Koha reserveringer','0','0','items.reserves','10','','','','0','-5','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','o','Koha hyllesignatur','Koha hyllesignatur','0','0','items.itemcallnumber','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','p','Strekkode','Strekkode','0','0','items.barcode','10','','','barcode.pl','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','q','Koha utlånt','Koha utlånt','0','0','items.onloan','10','','','','0','-5','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','r','Koha dato sist sett','Koha dato sist sett','0','0','items.datelastseen','10','','','','0','-5','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','s','Koha dato sist utlånt','Koha dato sist utlånt','0','0','items.datelastborrowed','10','','','','0','-5','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','t','Eksemplarnummer','Eksemplarnummer','0','0','items.copynumber','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','u','Uniform Resource Identifier (URI)','Uniform Resource Identifier (URI)','0','0','items.uri','10','','','','1','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','v','Pris (erstatningspris)','Pris (erstatningspris)','0','0','items.replacementprice','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','w','Pris gjelder fra','Pris gjelder fra','0','0','items.replacementpricedate','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','x','Intern note','Intern note','1','0','items.paidfor','10','','','','0','7','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','y','Koha dokumenttype','Koha dokumenttype','0','0','items.itype','10','itemtypes','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('952','z','Synlig note','Synlig note','0','0','items.itemnotes','10','','','','0','-1','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('999','c','Koha biblionummer','Koha biblionummer','0','0','biblio.biblionumber','-1','','','','0','-5','FA','','','');
+INSERT INTO marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,authtypecode,value_builder,isurl,hidden,frameworkcode,seealso,link,defaultvalue) VALUES ('999','d','Koha biblioitemnummer','Koha biblioitemnummer','0','0','biblioitems.biblioitemnumber','-1','','','','0','-5','FA','','','');
diff --git a/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.txt b/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.txt
new file mode 100644 (file)
index 0000000..e7a0dcb
--- /dev/null
@@ -0,0 +1 @@
+Rammeverk for hurtigkatalogisering i NORMARC. Inneholder et begrenset utvalg felter.
index 8e919e9..a7a6032 100644 (file)
@@ -1,7 +1,7 @@
 insert into `message_attributes`
 (`message_attribute_id`, message_name, `takes_days`)
 values
-(1, 'Item_DUE', 0),
+(1, 'Item_Due', 0),
 (2, 'Advance_Notice', 1),
 (4, 'Hold_Filled', 0),
 (5, 'Item_Check_in', 0),
index e79cb33..1721533 100644 (file)
@@ -346,6 +346,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541','ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE','IMMEDIATE SOURCE OF ACQUISITION NOTE',1,0,NULL,''),
                ('543','SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]','SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]',1,0,NULL,''),
                ('544','LOCATION OF OTHER ARCHIVAL MATERIALS NOTE','LOCATION OF OTHER ARCHIVAL MATERIALS NOTE',1,0,NULL,''),
+        ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
                ('546','UWAGA O JĘZYKU','LANGUAGE NOTE',1,0,NULL,''),
                ('547','ZŁOŻONA UWAGA O POPRZEDNIM TYTULE','FORMER TITLE COMPLEXITY NOTE',1,0,NULL,''),
                ('550','UWAGA DOTYCZĄCA INSTYTUCJI SPRAWCZEJ','ISSUING BODY NOTE',1,0,NULL,''),
index 1f5d38e..a42d3ea 100644 (file)
@@ -373,6 +373,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'BKS'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'BKS'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'BKS'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'BKS'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'BKS'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'BKS'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'BKS'),
@@ -4299,6 +4300,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'CF'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'CF'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'CF'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'CF'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'CF'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'CF'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'CF'),
@@ -8224,6 +8226,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SR'),
@@ -12149,6 +12152,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'VR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'VR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'VR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'VR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'VR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'VR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'VR'),
@@ -16072,6 +16076,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'AR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'AR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'AR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'AR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'AR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'AR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'AR'),
@@ -19995,6 +20000,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'KT'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'KT'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'KT'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'KT'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'KT'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'KT'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'KT'),
@@ -23920,6 +23926,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'IR'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'IR'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'IR'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'IR'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'IR'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'IR'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'IR'),
@@ -27840,6 +27847,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
                ('541', 'ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, 'SER'),
                ('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, 'SER'),
                ('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, 'SER'),
+               ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, 'SER'),
                ('546', 'LANGUAGE/TRANSLATION INFO', 'LANGUAGE NOTE', 1, 0, NULL, 'SER'),
                ('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, 'SER'),
                ('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, 'SER'),
index c9d9bd1..94c7897 100644 (file)
@@ -3,7 +3,7 @@ truncate message_attributes;
 insert into `message_attributes`
 (`message_attribute_id`, message_name, `takes_days`)
 values
-(1, 'Item_DUE',                    0),
+(1, 'Item_Due',                    0),
 (2, 'Advance_Notice',              1),
 (4, 'Hold_Filled',                 0),
 (5, 'Item_Check_in',               0),
index ae2c1cb..918df5c 100755 (executable)
@@ -135,11 +135,11 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFRBRizeEditions',0,'If ON, the OPAC will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('XISBN',0,'Use with FRBRizeEditions. If ON, Koha will use the OCLC xISBN web service in the Editions tab on the detail pages. See: http://www.worldcat.org/affiliate/webservices/xisbn/app.jsp','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OCLCAffiliateID','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','','free');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('XISBNDailyLimit',499,'The xISBN Web service is free for non-commercial use when usage does not exceed 500 requests per day','','Integer');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('XISBNDailyLimit',999,'The xISBN Web service is free for non-commercial use when usage does not exceed 1000 requests per day','','Integer');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ThingISBN',0,'Use with FRBRizeEditions. If ON, Koha will use the ThingISBN web service in the Editions tab on the detail pages.','','YesNo');
 
 -- I18N/L10N
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('dateformat','us','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy/mm/dd)','metric|us|iso','Choice');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('dateformat','us','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd)','metric|us|iso','Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opaclanguages','en','Set the default language in the OPAC.',NULL,'Languages');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opaclanguagesdisplay',0,'If ON, enables display of Change Language feature on OPAC','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowersTitles','Mr|Mrs|Miss|Ms','Define appropriate Titles for patrons',NULL,'free');
@@ -325,7 +325,8 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES (
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn           | a|a     d', NULL, NULL, 'Textarea');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerUnwantedField','','Name the fields you don\'t need to store for a patron\'s account',NULL,'free');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
-
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo');
index 75e2793..53eeeac 100644 (file)
@@ -3,7 +3,7 @@ truncate message_attributes;
 insert into `message_attributes`
 (`message_attribute_id`, `message_name`, `takes_days`)
 values
-(1, 'Item_DUE'              , 0),
+(1, 'Item_Due'              , 0),
 (2, 'Advance_Notice'        , 1),
 (4, 'Hold_Filled'           , 0),
 (5, 'Item_Check_in'         , 0),
index e901a58..0a3603d 100755 (executable)
@@ -4560,17 +4560,65 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     $dbh->do("ALTER TABLE deletedborrowers MODIFY debarred DATE DEFAULT NULL;");
     $dbh->do("ALTER TABLE deletedborrowers ADD COLUMN debarredcomment VARCHAR(255) DEFAULT NULL AFTER debarred;");
     print "Upgrade done (Change borrowers.debarred into Date )\n";
-
     SetVersion($DBversion);
 }
 
 $DBversion = "3.07.00.002";
 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     $dbh->do("UPDATE borrowers SET debarred=NULL WHERE debarred='0000-00-00';");
-    print "Setting NULL to debarred where 0000-00-00 is stored (bug 7272)";
+    print "Setting NULL to debarred where 0000-00-00 is stored (bug 7272)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.07.00.003";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do(" UPDATE `message_attributes` SET message_name='Item_Due' WHERE message_name='Item_DUE'");
+    print "Updating message_name in message_attributes\n";
     SetVersion($DBversion);
 }
 
+$DBversion = "3.07.00.004";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("ALTER TABLE  `suggestions` ADD  `patronreason` TEXT NULL AFTER  `reason`");
+    print "Upgrade to $DBversion done (Add column to suggestions table to store patrons' reasons for submitting a suggestion. )\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.07.00.005";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BorrowerUnwantedField','','Name the fields you don''t need to store for a patron''s account',NULL,'free')");
+    print "Upgrade to $DBversion done (BorrowerUnwantedField syspref)\n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.07.00.006";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo');");
+    print "Upgrade to $DBversion done (Add syspref CircAutoPrintQuickSlip to control what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window (default value, 3.6 behaviour) or clear the screen (previous 3.6 behaviour). )\n";
+    SetVersion($DBversion);
+}
+
+
+$DBversion = "3.07.00.007";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("ALTER TABLE items MODIFY materials text;");
+    print "Upgrade to $DBversion done alter items.material from varchar(10) to text \n";
+    SetVersion($DBversion);
+}
+
+$DBversion = '3.07.00.008';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    if (C4::Context->preference("marcflavour") eq 'MARC21') {
+        if (C4::Context->preference("opaclanguages") eq "de") {
+            $dbh->do("INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, '');");
+        } else {
+            $dbh->do("INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, '');");
+        }
+    }
+    print "Upgrade to $DBversion done (add MARC21 field 545 to framework)\n";
+    SetVersion ($DBversion);
+}
+
 
 =head1 FUNCTIONS
 
@@ -4614,6 +4662,10 @@ sub TransformToNum {
     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;
 }
 
@@ -4624,7 +4676,9 @@ set the DBversion in the systempreferences
 =cut
 
 sub SetVersion {
-    my $kohaversion = TransformToNum(shift);
+    return if $_[0]=~ /XXX$/;
+      #you are testing a patch with a db revision; do not change version
+    my $kohaversion = TransformToNum($_[0]);
     if (C4::Context->preference('Version')) {
       my $finish=$dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='Version'");
       $finish->execute($kohaversion);
index 5b065e8..419273a 100755 (executable)
@@ -59,7 +59,7 @@ if ( $step && $step == 1 ) {
     $template->param( language => 1 );
     $template->param( 'checkmodule' => 1 ); # we start with the assumption that there are no problems and set this to 0 if there are
 
-    unless ( $] >= 5.008008 ) {    # Bug 4505
+    unless ( $] >= 5.010000 ) {    # Bug 7375
         $template->param( problems => 1, perlversion => 1, checkmodule => 0 );
     }
 
@@ -229,6 +229,7 @@ elsif ( $step && $step == 3 ) {
         # Framework Selection is achieved through checking boxes.
         my $langchoice = $query->param('fwklanguage');
         $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
+       $langchoice =~ s/[^a-zA-Z_-]*//g;
         my $marcflavour = $query->param('marcflavour');
         if ($marcflavour){
             $installer->set_marcflavour_syspref($marcflavour);
@@ -266,6 +267,7 @@ elsif ( $step && $step == 3 ) {
         # Marcflavour Selection is achieved through radiobuttons.
         my $langchoice = $query->param('fwklanguage');
         $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
+       $langchoice =~ s/[^a-zA-Z_-]*//g;
         my $dir =
           C4::Context->config('intranetdir') . "/installer/data/$info{dbms}/$langchoice/marcflavour";
         unless (opendir( MYDIR, $dir )) {
@@ -328,7 +330,7 @@ elsif ( $step && $step == 3 ) {
     }
     else {
         #
-        # check wether it's a 1st install or an update
+        # check whether it's a 1st install or an update
         #
         #Check if there are enough tables.
         # Paul has cleaned up tables so reduced the count
index 3cf2e88..d2489b3 100644 (file)
@@ -144,4 +144,9 @@ a.tagnum {
 
 .yui-gf .yui-u {
        width: 79.2%;
+}
+/* Class to be added to toolbar when it starts being fixed at the top of the screen*/
+.floating {
+       -webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
+       box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
 }
\ No newline at end of file
index d2ad905..955b68b 100644 (file)
@@ -17,7 +17,7 @@ body {
        background-color : #FFF;
        color : #333333;
        font-family : arial, geneva, sans-serif;
-       font-size : 12px;
+       font-size : 14px;
        margin : 0px 0px 0px 0px;
 }
 
@@ -94,8 +94,7 @@ table {
        border-left : 1px solid #CCCCCC;
        margin : 3px 0px 5px 0px;
        padding : 0px;
-       width : 100%;
-       height : 100%;
+       width : 99%;
 }
 
 table.list {
@@ -115,8 +114,6 @@ td {
        border-left : 0;
        font-size : 12px;
        padding : 5px 5px 5px 5px;
-       width : 100%;
-       height : 100%;
 }
 
 td:last-child {
@@ -127,8 +124,6 @@ td:last-child {
        border-left : 0;
        font-size : 12px;
        padding : 5px 5px 5px 5px;
-       width : 100%;
-       height : 100%;
 }
 
 table.list th {
index 7b38062..4c3da8c 100644 (file)
@@ -554,6 +554,8 @@ div.yui-b fieldset.brief li.radio {
        padding : .7em 0;
 }
 div.yui-b fieldset.brief li.radio label,
+div.yui-b fieldset.brief li.dateinsert label,
+div.yui-b fieldset.brief li.dateinsert span.label,
 div.yui-b fieldset.brief li.radio span.label {
        display : inline;
 }
@@ -1113,12 +1115,14 @@ div.first fieldset {
 }
 
 .dialog {
-  border: 1px solid #bcbcbc;
+       -moz-border-radius : 2px;
+       border-radius : 2px;
        padding : .5em;
        margin : 1em auto;
-  width: 65%;
-  }
-  
+       text-align : center;
+       width: 65%;
+}
+
 .dialog table {
        margin : .5em auto;
 }
@@ -1192,20 +1196,27 @@ td input.approve {
        background-color : #ffc;
  }
 
+div.dialog {
+       border: 1px solid #bcbcbc;
+}
+
 div.alert {
-  background : #FFC url(../../img/alert-bg.gif) repeat-x left 0;
-  text-align : center;
+       background: #fef8d3; /* Old browsers */
+       background: -moz-linear-gradient(top, #fef8d3 0%, #ffec91 9%, #ffed87 89%, #f9dc00 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fef8d3), color-stop(9%,#ffec91), color-stop(89%,#ffed87), color-stop(100%,#f9dc00)); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Chrome10+,Safari5.1+ */
+       background: -o-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Opera11.10+ */
+       background: -ms-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* IE10+ */
+       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fef8d3', endColorstr='#f9dc00',GradientType=0 ); /* IE6-9 */
+       background: linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* W3C */
+         text-align : center;
+       border: 1px solid #E0C726;
 }
 
 div.alert strong {
        color : #900;
 }
 
-div.dialog {
-  background : #FFC url(../../img/dialog-bg.gif) repeat-x left 0;
-  text-align : center;
-}
-
 a.document {
        background-position : left middle;
        background-repeat : no-repeat;
@@ -1225,7 +1236,14 @@ a.xml {
 }
 
 div.message {
-       background : white url("../../img/message-bg.gif") repeat-x left 0;
+       background: #ffffff; /* Old browsers */
+       background: -moz-linear-gradient(top, #ffffff 0%, #f4f6fa 2%, #eaeef5 23%, #e8edf6 94%, #cddbf2 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(2%,#f4f6fa), color-stop(23%,#eaeef5), color-stop(94%,#e8edf6), color-stop(100%,#cddbf2)); /* Chrome,Safari4+ */
+       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 */
+       background: linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* W3C */
        border : 1px solid #bcbcbc;
        text-align: center;
        width : 55%;
@@ -1307,7 +1325,18 @@ div#menu {
 div#menu li a {
        text-decoration: none;
        display: block;
-       background : #EEE url(../../img/side-tab-gradient.gif) repeat-y top right;
+       background: #eeeeee; /* Old browsers */
+       background: -moz-linear-gradient(left, #eeeeee 0%, #eeeeee 96%, #e6e6e6 97%, #cccccc 99%, #c1c1c1 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eeeeee), color-stop(96%,#eeeeee), color-stop(97%,#e6e6e6), color-stop(99%,#cccccc), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */
+       background: -o-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Opera11.10+ */
+       background: -ms-linear-gradient(left, #eeeeee 0%,#eeeeee 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, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* W3C */
+       -moz-border-top-left-radius: 5px;
+       border-top-left-radius: 5px;
+       -moz-border-bottom-left-radius: 5px;
+       border-bottom-left-radius: 5px;
        border: 1px solid #000;
        font-size: 111%;
        margin: .5em 0;
@@ -1316,7 +1345,14 @@ div#menu li a {
 }
 
 div#menu li a:hover {
-       background : #E8F0F6 url(../../img/side-tab-gradient-hover.gif) repeat-y top right;
+       background: #e8f0f6; /* Old browsers */
+       background: -moz-linear-gradient(left, #e8f0f6 0%, #e8f0f6 96%, #c1c1c1 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, right top, color-stop(0%,#e8f0f6), color-stop(96%,#e8f0f6), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */
+       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 */
 }
 
 div#menu li.active a:hover {
@@ -1605,8 +1641,16 @@ input[type=submit], input[type=reset], input[type=button], input.submit, button.
        border: 1px outset #999999;
        border-top-color: #666;
        border-left-color: #666;
+       -moz-border-radius : 2px;
        padding: 0.25em;
-       background : #E8E8E8 url(../../img/button-bg.gif) top left repeat-x;
+       background: #ffffff; /* Old browsers */
+       background: -moz-linear-gradient(top, #ffffff 0%, #f7f7f7 35%, #e0e0e0 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(35%,#f7f7f7), color-stop(100%,#e0e0e0)); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* Chrome10+,Safari5.1+ */
+       background: -o-linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* Opera11.10+ */
+       background: -ms-linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* IE10+ */
+       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */
+       background: linear-gradient(top, #ffffff 0%,#f7f7f7 35%,#e0e0e0 100%); /* W3C */
        color: #333333;
 }
 
@@ -1720,6 +1764,10 @@ ul#i18nMenu li.more ul li a {
        background-image : none;
        padding-right : 20px;
 }
+
+div.lang {
+        float:left;
+}
  
  div#changelanguage{
        background-color: #fff;
@@ -1925,7 +1973,15 @@ ul.budget_hierarchy li:first-child:after {
     content: "";
 }
 .holdcount { font-size : 105%; line-height : 200%; }
-.holdcount a { border : 1px solid #a4bedd; background-color : #e4ecf5; font-weight : bold; -moz-border-radius: 4px; padding : .1em .4em; text-decoration : none; }
+.holdcount a {
+       border : 1px solid #a4bedd;
+       background-color : #e4ecf5;
+       font-weight : bold;
+       -moz-border-radius: 4px;
+       border-radius: 4px;
+       padding : .1em .4em;
+       text-decoration : none;
+}
 .holdcount a:hover { background-color : #ebeff7; }
 .container {
        border : 1px solid #EEE;
@@ -2080,4 +2136,4 @@ div.pager input.pagedisplay {
        background-color : transparent;
        font-weight: bold;
        text-align : center;
-}
\ No newline at end of file
+}
index 6c7ffae..413d7f4 100644 (file)
@@ -55,6 +55,9 @@ function confirm_items_deletion() {
             }else{
                 return false;
             }
+               } else {
+                       alert(_("This record has no items."));
+                       return false;
                }
 }
 [% END %]
@@ -102,7 +105,7 @@ function confirm_items_deletion() {
                [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit as New (Duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&amp;frameworkcode=&amp;op=duplicate" },[% END %]
                        [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Replace Record via Z39.50"), onclick: {fn: PopupZ3950 } },[% END %]
                        [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Delete Record"), onclick: {fn: confirm_deletion }[% IF ( count ) %],id:'disabled'[% END %] },[% END %]
-               [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all Items"), onclick: {fn: confirm_items_deletion } }[% END %]
+               [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all Items"), onclick: {fn: confirm_items_deletion }[% UNLESS ( count ) %],id:'disabled'[% END %] }[% END %]
            ];
                if(editmenu.length){
                        new YAHOO.widget.Button({
@@ -158,8 +161,8 @@ function confirm_items_deletion() {
                        location.href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]";
                }
                var HoldForButtonMenu = [
-                       { text: "Place hold", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]" },
-                       { text: "Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]&findborrower=[% holdfor_cardnumber %]" }
+                       { text: _("Place hold"), url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]" },
+                       { text: _("Place hold for")+ " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]&findborrower=[% holdfor_cardnumber %]" }
                ];
 
                //      Instantiate a Split Button using the array of YAHOO.widget.MenuItem 
@@ -169,7 +172,7 @@ function confirm_items_deletion() {
                var HoldForButton = new YAHOO.widget.Button({
                                id: "holdfor",
                                type: "split",
-                               label: "Place hold",
+                               label: _("Place hold"),
                                name: "holdfor",
                                menu: HoldForButtonMenu,
                                container: this,
index 6556562..6ae7cb6 100644 (file)
 <li><img src="/intranet-tmpl/prog/img/patron-blank.png" alt="[% firstname %] [% surname %] ([% cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
 [% END %]
 [% END %]
-    <li>[% IF ( address ) %]
-            [% address %]
+    [% IF ( address or address2 ) %]
+        [% IF ( address ) %]
+            <li>[% address %]</li>
+        [% END %]
+        [% IF ( address2 ) %]
+            <li>[% address2 %]</li>
+        [% END %]
     [% ELSE %]
-            <span class="empty">No address stored.</span>
-    [% END %]</li>
-    [% IF ( address2 ) %]
-        <li>[% address2 %]</li>
-    [% END %]<li> 
+            <li><span class="empty" id="noadressstored">No address stored.</span></li>
+    [% END %]
     [% IF ( city ) %]
             [% city %][% IF ( state ) %], [% state %][% END %]
            [% zipcode %][% IF ( country ) %], [% country %][% END %]
     [% ELSE %]
-        <span class="empty">No city stored.</span>
+        <span class="empty" id="nocitystored">No city stored.</span>
     [% END %]</li>
     <li>[% IF ( phone ) %]
         [% phone %]
@@ -35,7 +37,7 @@
             [% IF ( phonepro ) %]
                 [% phonepro %]
             [% ELSE %]
-                <span class="empty">No phone stored.</span>    
+                <span class="empty" id="nophonestored">No phone stored.</span>
             [% END %]
         [% END %]
     [% END %]</li>
index fe04b63..451cd98 100644 (file)
@@ -14,19 +14,22 @@ in the global namespace %]
 <li><img src="/intranet-tmpl/prog/img/patron-blank.png" alt="[% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
 [% END %]
 [% END %]
-    <li>[% IF borrower.address %]
-            [% borrower.address %]
+    [% IF ( borrower.address or borrower.address2 ) %]
+        [% IF ( borrower.address ) %]
+            <li>[% borrower.address %]</li>
+        [% END %]
+        [% IF ( borrower.address2 ) %]
+            <li>[% borrower.address2 %]</li>
+        [% END %]
     [% ELSE %]
-            <span class="empty">No address stored.</span>
-    [% END %]</li>
-    [% IF borrower.address2 %]
-        <li>[% borrower.address2 %]</li>
-    [% END %]<li>
+            <li><span class="empty" id="noaddressstored">No address stored.</span></li>
+    [% END %]
+    <li>
     [% IF borrower.city %]
             [% borrower.city %][% IF borrower.state %], [% borrower.state %][% END %]
            [% borrower.zipcode %][% IF ( borrower.country ) %], [% borrower.country %][% END %]
     [% ELSE %]
-        <span class="empty">No city stored.</span>
+        <span class="empty" id="nocitystored">No city stored.</span>
     [% END %]</li>
     <li>[% IF borrower.phone %]
         [% borrower.phone %]
@@ -37,7 +40,7 @@ in the global namespace %]
             [% IF borrower.phonepro %]
                 [% borrower.phonepro %]
             [% ELSE %]
-                <span class="empty">No phone stored.</span>
+                <span class="empty" id="nophonestored">No phone stored.</span>
             [% END %]
         [% END %]
     [% END %]</li>
index 2933544..913076f 100644 (file)
@@ -94,6 +94,7 @@ function update_child() {
            new YAHOO.widget.Button("editpatron");
            new YAHOO.widget.Button("addnote");
         [% IF CAN_user_staffaccess %] new YAHOO.widget.Button("changepassword");  [% END %]
+           new YAHOO.widget.Button("duplicate");
            new YAHOO.widget.Button("printslip");
                new YAHOO.widget.Button("printpage");
        }
@@ -117,9 +118,10 @@ function update_child() {
         [% END %]
        [% END %]
        [% IF ( CAN_user_borrowers ) %]
-       [% IF ( adultborrower ) %]<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 %]
-       [% CAN_user_staffaccess %] <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 ) %]<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_staffaccess ) %] <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 Page</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>
index 5ef0d79..8aafb04 100644 (file)
@@ -1 +1 @@
-[% IF ( dateformat_us ) %](MM/DD/YYYY)[% ELSIF ( dateformat_metric ) %](DD/MM/YYYY)[% ELSE %](YYYY/MM/DD)[% END %]
\ No newline at end of file
+[% IF ( dateformat_us ) %](MM/DD/YYYY)[% ELSIF ( dateformat_metric ) %](DD/MM/YYYY)[% ELSE %](YYYY-MM-DD)[% END %]
\ No newline at end of file
index 7647755..a72b586 100644 (file)
@@ -18,7 +18,7 @@
 [% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %]
 <ul>
         [% FOREACH facet IN facets_loo.facets %]<li><a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]&amp;limit=[% facet.type_link_value %]:[% facet.facet_link_value %]" title="[% facet.facet_title_value %]">[% facet.facet_label_value %]</a> [% IF ( displayFacetCount ) %]([% facet.facet_count %])[% END %]</li>[% END %][% IF ( facets_loo.expandable ) %]
-        <li class="showmore"><a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]&amp;expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li>
+        <li class="showmore"><a href="/cgi-bin/koha/catalogue/search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %][% IF ( offset ) %]&amp;offset=[% offset %][% END %]&amp;expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li>
 [% END %]
 </ul></li>
 [% END %]
index 1873ef1..ebe7f37 100644 (file)
@@ -5,6 +5,7 @@
         <div id="changelanguage" class="ft">
         <ul id="i18nMenu" class="footermenu">
         [% FOREACH languages_loo IN languages_loop %]
+           <div class="lang">
             [% IF ( languages_loo.group_enabled ) %]
             [% IF ( languages_loo.plural ) %]
             <li class="more"><a class="sublangs" id="show[% languages_loo.rfc4646_subtag %]" href="#">[% languages_loo.native_description %] ([% languages_loo.rfc4646_subtag %])</a><div id="sub[% languages_loo.rfc4646_subtag %]">
@@ -31,6 +32,7 @@
                [% END %]
             [% END %]
             [% END %]
+            </div>
         [% END %]
         </ul>
         </div>
index 3e22038..231e37e 100644 (file)
@@ -44,7 +44,7 @@ onclick: {fn:function(){popup([% subscriptionid %])}}
                label: _("Edit"),
                name: "editmenubutton",
                menu: editmenu,
-               container: "editmenuc",
+               container: "editmenuc"
                        
            });
                [% END %]
index 3f14e51..7318fb6 100644 (file)
@@ -38,7 +38,7 @@
                { text: _("RIS"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=ris&shelfid=[% shelfnumber %]" },
                { text: _("BibTex"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=bibtex&shelfid=[% shelfnumber %]" },
 [% FOREACH csv_profile IN csv_profiles %]
-               { text: _("CSV - [% csv_profile.profile %]"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&shelfid=[% csv_profile.shelfnumber %]" },
+               { text: _("CSV - [% csv_profile.profile %]"), url: "/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=[% csv_profile.export_format_id %]&shelfid=[% shelfnumber %]" },
 [% END %]
                ];
 
@@ -96,4 +96,3 @@
        [% END %]
 </ul>
 </div>
\ No newline at end of file
index e6d2315..b137f59 100644 (file)
@@ -76,14 +76,14 @@ DDApp = {
         if (uls[i].className == "draglist" || uls[i].className == "draglist_alt") {
             ddtarget = YAHOO.util.DragDropMgr.getDDById(uls[i].id);
 // The yahoo drag and drop is written (broken or not) in such a way, that if an element is subscribed as a target multiple times,
-// it has to be unlinked multiple times, so we need to test wether it is allready a target, otherwise we'll have a problem when closing the group
+// it has to be unlinked multiple times, so we need to test whether it is allready a target, otherwise we'll have a problem when closing the group
             if( ! ddtarget ) {
                 new YAHOO.util.DDTarget(uls[i].id);
             }
             var children = uls[i].getElementsByTagName('li');
             for( j=0; j<children.length; j=j+1) {
 // The yahoo drag and drop is (broken or not) in such a way, that if an element is subscribed as a target multiple times,
-// it has to be unlinked multiple times, so we need to test wether it is allready a target, otherwise we'll have a problem when closing the group
+// it has to be unlinked multiple times, so we need to test whether it is allready a target, otherwise we'll have a problem when closing the group
                 ddtarget = YAHOO.util.DragDropMgr.getDDById(children[j].id);
                 if( ! ddtarget ) {
                     new DDList(children[j].id);
index 8658324..efcb8eb 100644 (file)
@@ -17,9 +17,10 @@ function cloneItemBlock(index) {
     var CloneButtonPlus;
     var CloneButtonMinus;
   //  try{
-        CloneButtonPlus = clone.getElementsByTagName('a')[0];
+        var jclone = $(clone);
+        CloneButtonPlus = $("a.addItem", jclone).get(0);
         CloneButtonPlus.setAttribute('onclick',"cloneItemBlock('" + index + random + "')");
-    CloneButtonMinus = clone.getElementsByTagName('a')[1];
+    CloneButtonMinus = $("a.delItem", jclone).get(0);
     CloneButtonMinus.setAttribute('onclick',"deleteItemBlock('" + index + random + "')");
     CloneButtonMinus.setAttribute('style',"display:inline");
     // change itemids of the clone
index c15fdb4..e03e51f 100644 (file)
@@ -237,19 +237,19 @@ Version 2.0.6.1 (2006-05-04)
 Version 2.0.6 (2006-05-03)\r
        Added new theme_advanced_source_editor_wrap option, this gives the possibility to force word wrapping.\r
        Added new support for using div,blockquote,dt,dd,code,samp as a items in the theme_advanced_blockformats option.\r
-       Added new strict_loading_mode option, this switches the loading method from document.write to DOM.\r
-       Added new hidden_tab_class, display_tab_class options for resolving the MSIE image dimension bug.\r
-       Added new absolute layer support, this was added to a new plugin called layer.\r
-       Added new CSS style properties support, this was as a plugin called style.\r
-       Fixed bug where TinyMCE was reporting a warning when inserting a image while running on HTTPS.\r
-       Fixed bug where pressing the browser back button after submit removed empty paragraphs in MSIE.\r
-       Fixed bug where links the the same page as the editor page was converted into a /.\r
-       Fixed bug where the getSelectedHTML method was returning undefined when selecting controls in MSIE.\r
-       Fixed bug with unterminated string literal errors where reported in some browsers.\r
-       Fixed bug where src and href where converted into xsrc and xhref in text.\r
-       Fixed bug where two characters where removed by backspace sometimes in Gecko.\r
-       Fixed bug where class drop list wasn't visible in some of the table dialogs.\r
-       Fixed bug where br elements where incorrectly removed within paragraphs on backspace.\r
+       Added new strict_loading_mode option, this switches the loading method from document.write to DOM.
+       Added new hidden_tab_class, display_tab_class options for resolving the MSIE image dimension bug.
+       Added new absolute layer support, this was added to a new plugin called layer.
+       Added new CSS style properties support, this was as a plugin called style.
+       Fixed bug where TinyMCE was reporting a warning when inserting a image while running on HTTPS.
+       Fixed bug where pressing the browser back button after submit removed empty paragraphs in MSIE.
+       Fixed bug where links the same page as the editor page was converted into a /.
+       Fixed bug where the getSelectedHTML method was returning undefined when selecting controls in MSIE.
+       Fixed bug with unterminated string literal errors where reported in some browsers.
+       Fixed bug where src and href where converted into xsrc and xhref in text.
+       Fixed bug where two characters where removed by backspace sometimes in Gecko.
+       Fixed bug where class drop list wasn't visible in some of the table dialogs.
+       Fixed bug where br elements where incorrectly removed within paragraphs on backspace.
        Fixed bug where drag/drop operations failed in MSIE when editor height was set to a % value.\r
        Fixed bug where width/height was lost on images if they where placed in hidden tabs in MSIE.\r
        Fixed bugs with CSS auto import parsing, contributed by Scott Eade.\r
@@ -722,19 +722,19 @@ Version 1.45 RC1 (2005-05-27)
        Fixed stange issue where elements sometimes disappeared in MSIE.\r
        Fixed URL convertion problems with onmouseover, onmouseout image urls in advimage plugin.\r
        Fixed URL convertion problems with Flash plugin.\r
-       Fixed the experimental Safari support, some features work some doesn't.\r
-       Fixed bug where multiple a elements where created when updating links on images in FF/Mozilla.\r
-       Fixed bug in importCSS function, was having a meaning less if statement.\r
-       Fixed so the contextmenu plugin uses images from the configurated theme instead of the advanced theme.\r
-       Fixed so the external_link_list_url/external_image_list_url options can use relative or absolute path.\r
-       Fixed so the external_link_list_url/external_image_list_url has a random query parameter to prevent it from cache.\r
-       Added new mceInsertRawHTML command, this inserts raw as it is HTML code in the the selected position.\r
-       Added paste plain text plugin contributed by Ryan Demmer, converted it into a paste plugin.\r
-       Added updated paste plugin contributed by speednet, includes paste directly feature for MSIE.\r
-       Added split/merge table cells support, to table plugin and context menus.\r
-       Added cut/copy/paste table rows functionality to context menu and table plugin.\r
-       Added new mceSetContent command, this does the same as the setContent function.\r
-       Added new clear all/new document icon to advanced theme.\r
+       Fixed the experimental Safari support, some features work some doesn't.
+       Fixed bug where multiple a elements where created when updating links on images in FF/Mozilla.
+       Fixed bug in importCSS function, was having a meaning less if statement.
+       Fixed so the contextmenu plugin uses images from the configurated theme instead of the advanced theme.
+       Fixed so the external_link_list_url/external_image_list_url options can use relative or absolute path.
+       Fixed so the external_link_list_url/external_image_list_url has a random query parameter to prevent it from cache.
+       Added new mceInsertRawHTML command, this inserts raw as it is HTML code in the selected position.
+       Added paste plain text plugin contributed by Ryan Demmer, converted it into a paste plugin.
+       Added updated paste plugin contributed by speednet, includes paste directly feature for MSIE.
+       Added split/merge table cells support, to table plugin and context menus.
+       Added cut/copy/paste table rows functionality to context menu and table plugin.
+       Added new mceSetContent command, this does the same as the setContent function.
+       Added new clear all/new document icon to advanced theme.
        Added new remove formatting and select text color icons.\r
        Added new directionality plugin to better support languages that write from right to left.\r
        Added new fullscreen plugin, enables users to toggle fullscreen editing mode.\r
index 182e791..ec1d693 100644 (file)
@@ -1,11 +1,11 @@
-/* This file contains the CSS data for the editable area(iframe) of TinyMCE */\r
-/* You can extend this CSS by adding your own CSS file with the the content_css option */\r
-\r
-body, td, pre {\r
-       font-family: Verdana, Arial, Helvetica, sans-serif;\r
-       font-size: 10px;\r
-}\r
-\r
+/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
+/* You can extend this CSS by adding your own CSS file with the content_css option */
+
+body, td, pre {
+       font-family: Verdana, Arial, Helvetica, sans-serif;
+       font-size: 10px;
+}
+
 body {\r
        background-color: #FFFFFF;\r
 }\r
diff --git a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js b/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js
new file mode 100644 (file)
index 0000000..0a6fde0
--- /dev/null
@@ -0,0 +1,68 @@
+/* Source: http://www.webspeaks.in/2011/07/new-gmail-like-floating-toolbar-jquery.html
+   Revision: http://jsfiddle.net/pasmalin/AyjeZ/
+*/
+(function($){
+  $.fn.fixFloat = function(options){
+
+    var defaults = {
+      enabled: true
+    };
+    var options = $.extend(defaults, options);
+
+    var offsetTop;    /**Distance of the element from the top of window**/
+    var s;        /**Scrolled distance from the top of window through which we have moved**/
+    var fixMe = true;
+    var repositionMe = true;
+
+    var tbh = $(this);
+    var originalOffset = tbh.position().top;  /**Get the actual distance of the element from the top mychange:change to position better work**/
+
+    if (tbh.css('position')!='absolute') {
+      var tbhBis = $("<div></div>");
+      tbhBis.css({"display":tbh.css("display"),"visibility":"hidden"});
+      tbhBis.width(tbh.outerWidth(true));
+      tbhBis.height(tbh.outerHeight(true));
+      tbh.after(tbhBis);
+      tbh.width(tbh.width());
+      tbh.css({'position':'absolute'});
+    }
+
+    if(options.enabled){
+      $(window).scroll(function(){
+        var offsetTop = tbh.offset().top;  /**Get the current distance of the element from the top **/
+        var s = parseInt($(window).scrollTop(), 10);  /**Get the from the top of wondow through which we have scrolled**/
+        var fixMe = true;
+        if(s > offsetTop){
+          fixMe = true;
+        }else{
+          fixMe = false;
+        }
+
+        if(s < originalOffset){
+          repositionMe = true;
+        }else{
+          repositionMe = false;
+        }
+
+        if(fixMe){
+          var cssObj = {
+            'position' : 'fixed',
+            'top' : '0px',
+            'z-index' : '1000'
+          }
+          tbh.css(cssObj);
+          tbh.addClass("floating");
+        }
+        if(repositionMe){
+          var cssObj = {
+            'position' : 'absolute',
+            'top' : originalOffset,
+            'z-index' : '1'
+          }
+          tbh.css(cssObj);
+          tbh.removeClass("floating");
+        }
+      });
+    }
+  };
+})(jQuery);
\ No newline at end of file
index 8d52753..5015844 100644 (file)
@@ -2446,7 +2446,7 @@ Calendar.prototype = {
         * </p>
         * <p>
         * This property can also be set to an object literal containing configuration properties for the CalendarNavigator UI.
-        * The configuration object expects the the following case-sensitive properties, with the "strings" property being a nested object.
+        * The configuration object expects the following case-sensitive properties, with the "strings" property being a nested object.
         * Any properties which are not provided will use the default values (defined in the CalendarNavigator class).
         * </p>
         * <dl>
index d6e2016..e52f2af 100644 (file)
@@ -2436,7 +2436,7 @@ Calendar.prototype = {
         * </p>
         * <p>
         * This property can also be set to an object literal containing configuration properties for the CalendarNavigator UI.
-        * The configuration object expects the the following case-sensitive properties, with the "strings" property being a nested object.
+        * The configuration object expects the following case-sensitive properties, with the "strings" property being a nested object.
         * Any properties which are not provided will use the default values (defined in the CalendarNavigator class).
         * </p>
         * <dl>
index 9b634a5..2c3ae43 100644 (file)
@@ -245,7 +245,7 @@ YAHOO.util.DragDropMgr = function() {
         locked: false,
 
         /**
-         * Provides additional information about the the current set of
+         * Provides additional information about the current set of
          * interactions.  Can be accessed from the event handlers. It
          * contains the following properties:
          *
index 9004749..af5f0cd 100644 (file)
@@ -241,7 +241,7 @@ YAHOO.util.DragDropMgr = function() {
         locked: false,
 
         /**
-         * Provides additional information about the the current set of
+         * Provides additional information about the current set of
          * interactions.  Can be accessed from the event handlers. It
          * contains the following properties:
          *
index 5df0ce7..d4ba08f 100644 (file)
@@ -953,7 +953,7 @@ var Dom = YAHOO.util.Dom,
 
             /**
             * @attribute collapse
-            * @description Boolean indicating if the the titlebar should have a collapse button.
+            * @description Boolean indicating if the titlebar should have a collapse button.
             * The collapse button will not remove the toolbar, it will minimize it to the titlebar
             * @default false
             * @type Boolean
index 76a4788..f967f7e 100644 (file)
@@ -944,7 +944,7 @@ var Dom = YAHOO.util.Dom,
 
             /**
             * @attribute collapse
-            * @description Boolean indicating if the the titlebar should have a collapse button.
+            * @description Boolean indicating if the titlebar should have a collapse button.
             * The collapse button will not remove the toolbar, it will minimize it to the titlebar
             * @default false
             * @type Boolean
index a78a927..f24d180 100644 (file)
@@ -953,7 +953,7 @@ var Dom = YAHOO.util.Dom,
 
             /**
             * @attribute collapse
-            * @description Boolean indicating if the the titlebar should have a collapse button.
+            * @description Boolean indicating if the titlebar should have a collapse button.
             * The collapse button will not remove the toolbar, it will minimize it to the titlebar
             * @default false
             * @type Boolean
index e7a1b49..f59b1e5 100644 (file)
@@ -944,7 +944,7 @@ var Dom = YAHOO.util.Dom,
 
             /**
             * @attribute collapse
-            * @description Boolean indicating if the the titlebar should have a collapse button.
+            * @description Boolean indicating if the titlebar should have a collapse button.
             * The collapse button will not remove the toolbar, it will minimize it to the titlebar
             * @default false
             * @type Boolean
index ed87982..86f911a 100644 (file)
@@ -562,7 +562,7 @@ YAHOO.util.Get = function() {
         TIMEOUT: 2000,
         
         /**
-         * Called by the the helper for detecting script load in Safari
+         * Called by the helper for detecting script load in Safari
          * @method _finalize
          * @param id {string} the transaction id
          * @private
index 88bb7e1..3693baf 100644 (file)
@@ -549,7 +549,7 @@ YAHOO.util.Get = function() {
         TIMEOUT: 2000,
         
         /**
-         * Called by the the helper for detecting script load in Safari
+         * Called by the helper for detecting script load in Safari
          * @method _finalize
          * @param id {string} the transaction id
          * @private
index 0d06a87..3340a61 100644 (file)
@@ -2385,7 +2385,7 @@ _subscribeToItemEvents: function (p_oItem) {
 
 /**
 * @method _onVisibleChange
-* @description Change event handler for the the menu's "visible" configuration
+* @description Change event handler for the menu's "visible" configuration
 * property.
 * @private
 * @param {String} p_sType String representing the name of the event that 
@@ -4852,7 +4852,7 @@ _setScrollHeight: function (p_nScrollHeight) {
        
 
                        /*
-                               Only clear the the "width" configuration property if it was set the 
+                               Only clear the "width" configuration property if it was set the
                                "_setScrollHeight" method and wasn't changed by some other means after it was set.
                        */      
        
index ffb22c6..93dc88d 100644 (file)
@@ -2350,7 +2350,7 @@ _subscribeToItemEvents: function (p_oItem) {
 
 /**
 * @method _onVisibleChange
-* @description Change event handler for the the menu's "visible" configuration
+* @description Change event handler for the menu's "visible" configuration
 * property.
 * @private
 * @param {String} p_sType String representing the name of the event that 
@@ -4811,7 +4811,7 @@ _setScrollHeight: function (p_nScrollHeight) {
        
 
                        /*
-                               Only clear the the "width" configuration property if it was set the 
+                               Only clear the "width" configuration property if it was set the
                                "_setScrollHeight" method and wasn't changed by some other means after it was set.
                        */      
        
index 949f1f3..5787e2e 100644 (file)
@@ -128,7 +128,7 @@ YAHOO.namespace = function() {
  * @param  {String}  cat  The log category for the message.  Default
  *                        categories are "info", "warn", "error", time".
  *                        Custom categories can be used as well. (opt)
- * @param  {String}  src  The source of the the message (opt)
+ * @param  {String}  src  The source of the message (opt)
  * @return {Boolean}      True if the log operation was successful.
  */
 YAHOO.log = function(msg, cat, src) {
index 949f1f3..5787e2e 100644 (file)
@@ -128,7 +128,7 @@ YAHOO.namespace = function() {
  * @param  {String}  cat  The log category for the message.  Default
  *                        categories are "info", "warn", "error", time".
  *                        Custom categories can be used as well. (opt)
- * @param  {String}  src  The source of the the message (opt)
+ * @param  {String}  src  The source of the message (opt)
  * @return {Boolean}      True if the log operation was successful.
  */
 YAHOO.log = function(msg, cat, src) {
index 8440410..2672c60 100644 (file)
@@ -128,7 +128,7 @@ YAHOO.namespace = function() {
  * @param  {String}  cat  The log category for the message.  Default
  *                        categories are "info", "warn", "error", time".
  *                        Custom categories can be used as well. (opt)
- * @param  {String}  src  The source of the the message (opt)
+ * @param  {String}  src  The source of the message (opt)
  * @return {Boolean}      True if the log operation was successful.
  */
 YAHOO.log = function(msg, cat, src) {
@@ -1618,7 +1618,7 @@ YAHOO.util.Get = function() {
         TIMEOUT: 2000,
         
         /**
-         * Called by the the helper for detecting script load in Safari
+         * Called by the helper for detecting script load in Safari
          * @method _finalize
          * @param id {string} the transaction id
          * @private
@@ -2462,7 +2462,7 @@ YAHOO.register("get", YAHOO.util.Get, {version: "2.8.0r4", build: "2449"});
         this.comboBase = YUI.info.comboBase;
 
         /**
-         * If configured, YUI will use the the combo handler on the
+         * If configured, YUI will use the combo handler on the
          * Yahoo! CDN to pontentially reduce the number of http requests
          * required.
          * @property combine
index 8440410..2672c60 100644 (file)
@@ -128,7 +128,7 @@ YAHOO.namespace = function() {
  * @param  {String}  cat  The log category for the message.  Default
  *                        categories are "info", "warn", "error", time".
  *                        Custom categories can be used as well. (opt)
- * @param  {String}  src  The source of the the message (opt)
+ * @param  {String}  src  The source of the message (opt)
  * @return {Boolean}      True if the log operation was successful.
  */
 YAHOO.log = function(msg, cat, src) {
@@ -1618,7 +1618,7 @@ YAHOO.util.Get = function() {
         TIMEOUT: 2000,
         
         /**
-         * Called by the the helper for detecting script load in Safari
+         * Called by the helper for detecting script load in Safari
          * @method _finalize
          * @param id {string} the transaction id
          * @private
@@ -2462,7 +2462,7 @@ YAHOO.register("get", YAHOO.util.Get, {version: "2.8.0r4", build: "2449"});
         this.comboBase = YUI.info.comboBase;
 
         /**
-         * If configured, YUI will use the the combo handler on the
+         * If configured, YUI will use the combo handler on the
          * Yahoo! CDN to pontentially reduce the number of http requests
          * required.
          * @property combine
index 784f463..5b7a30c 100644 (file)
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; About Koha</div>
 
 <div id="doc3" class="yui-t7">
-   
+
    <div id="bd">
     <div id="yui-main">
     <div class="yui-g">
             <h1>About Koha</h1>
-    
+
     <div id="abouttabs" class="toptabs numbered">
         <ul>
         <li><a href="about.pl#about">Server Information</a></li>
         <li><a href="about.pl#team">Koha Team</a></li>
         <li><a href="about.pl#licenses">Licenses</a></li>
         <li><a href="about.pl#translations">Translations</a></li>
+        <li><a href="about.pl#history">Koha Timeline</a></li>
         </ul>
-        
+
         <div id="about">
-            
+
         <table>
             <caption>Server information</caption>
             <tr><th scope="row">Koha version: </th><td>[% kohaVersion |html %]</td></tr>
                 <li>The <strong><a href="http://library.neu.edu.tr">Near East University</a></strong>, Cyprus</li>
                 <li><strong>OPUS International Consultants</strong>, Wellington, New Zealand (Corporate Serials sponsorship)</li>
                 <li><strong><a href="http://www.famfamfam.com/">famfamfam.com</a></strong> Birmingham (UK) based developer Mark James for the famfamfam Silk iconset.</li>
-            </ul>   
-                
+            </ul>
+
             <h2>Koha Release Team</h2>
             <ul>
-               <li><strong>Colin Campbell</strong>(Koha 3.4 QA Manager)</li>
+               <li><strong>Colin Campbell</strong> (Koha 3.4 QA Manager)</li>
                <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544614260">Galen Charlton</a></strong> (Koha 3.2 Release Manager)</li>
                   <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544609030">Chris Cormack</a></strong> (Koha 1.x, 3.4, 3.6 Release Manager, Koha 3.2 Translation Manager)</li>
                   <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6620692210484">Frédéric Demians</a></strong>(Koha 3.4, 3.6 Translation Manager)</li>
                   <li><strong>Rachel Hamilton-Williams</strong> (Kaitiaki from 2004 to present)</li>
                   <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544614275">Henri-Damien Laurent</a></strong> (Koha 3.0 Release Maintainer)</li>
                   <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544609147">Owen Leonard</a></strong> (Koha 3.x Interface Design)</li>
-               <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544615991">Chris Nighswonger</a></strong> (Koha 3.2, 3.4 Release Maintainer)</li>
-                  <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544612249">Paul Poulain</a></strong> (Koha 2.0 Release Manager, Koha 2.2 Release Manager/Maintainer)</li>
+               <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544615991">Chris Nighswonger</a></strong> (Koha 3.2, 3.4 Release Maintainer, Koha 3.6 Release Maintainer)</li>
+                  <li><strong><a href="https://www.ohloh.net/p/koha/contributors/6618544612249">Paul Poulain</a></strong> (Koha 2.0 Release Manager, Koha 2.2 Release Manager/Maintainer, Koha 3.8 Release Manager)</li>
                   <li><strong><a href="http://www.ohloh.net/p/koha/contributors/6620692116417">MJ Ray</a></strong> (Koha 2.0 Release Maintainer)</li>
-                <li><strong>Ian Walls</strong> Koha 3.6 QA Manager</li>
+                <li><strong>Ian Walls</strong> Koha 3.6 QA Manager, Koha 3.8 QA Manager</li>
                 </ul>
             <h2>Koha Development Team</h2>
                        <ul>
                <li>Mike Mylonas</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>H. Passini</li>
                <li>Dobrica Pavlinusic</li>
                 <li><strong>Katipo Communications</strong>, New Zealand</li>
                 <li><strong>KohaAloha</strong>, New Zealand</li>
                 <li><strong>LibLime</strong>, USA</li>
-                <li><strong>Libriotech</strong>, Norway</li> 
+                <li><strong>Libriotech</strong>, Norway</li>
                <li><strong>Nelsonville Public Library</strong>, Ohio, USA</li>
                <li><strong>PTFS</strong>, Maryland, USA</li>
                <li><strong>PTFS Europe Ltd</strong>, United Kingdom</li>
                <li><strong>Tamil</strong>, France</li>
                <li><strong>Xercode</strong>, Spain</li>
             </ul>
-                       
+
             <h2>Additional Thanks To...</h2>
             <ul>
            <li>Jo Ransom</li>
                 <li>Nicolas Morin (French Translation in 2.0)</li>
             </ul>
         </div>
+
         <div id="licenses">
             <h2>Koha</h2>
             <p>
             <h2>YUI</h2>
             <p>
             <a href="http://developer.yahoo.com/auth/license.txt">BSD License</a>
-            </p> 
+            </p>
             <h2>Famfamfam iconset</h2>
               <ul>
                 <li><a href="http://www.famfamfam.com/lab/icons/silk/">FamFamFam Site</a></li>
                   by the Bridge Consortium of Carleton College and St. Olaf College.</li>
               </ul>
         </div>
+
         <div id="translations">
             <h2>Translation</h2>
             <ul>
 <li><strong>&#1575;&#1585;&#1583;&#1608;(Urdu)</strong> Ata ur Rehman</li>
 <li><strong>&#1059;&#1082;&#1088;&#1072;&#1111;&#1085;&#1089;&#1100;&#1082;&#1072; (Ukrainian)</strong> Victor Titarchuk and Serhij Dubyk</li>
             </ul>
-    
+
+        </div>
+
+        <div id="history">
+        <h2>Koha history timeline</h2>
+        <table style="cursor:pointer">
+        <thead>
+        <tr>
+            <td  style="font-weight:bold;" >Date</td>
+            <td  style="font-weight:bold;" >Description</td>
+        </tr>
+        </thead>
+        [% FOREACH tabl IN table2 %]
+            <tr class="[% loop.parity %]">
+                [% FOREACH ro IN tabl.row2 %]
+                     <td>[% ro.date %]</td>
+                     <td>[% ro.desc|html %]</td>
+                [% END %]
+            </tr>
+        [% END %]
+        </table>
         </div>
+
     </div>
+
 </div></div></div>
 [% INCLUDE 'intranet-bottom.inc' %]
index 86650eb..03cdc2d 100644 (file)
@@ -122,8 +122,8 @@ $(document).ready(function() {
                 <td align="center">[% loop_budge.budget_owner %]</td>
                 <td align="center">[% loop_budge.budget_branchname %]</td>
                 <td align="right" >[% loop_budge.budget_amount %]</td>
-                <td align="right" >[% loop_budge.budget_ordered %]</td>
-                <td align="right" >[% loop_budge.budget_spent %]</td>
+                <td align="right" ><a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered %]</a></td>
+                <td align="right" ><a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent %]</a></td>
                 <td align="right" >[% loop_budge.budget_avail %]</td>
             </tr>
             [% ELSE %]
@@ -136,8 +136,8 @@ $(document).ready(function() {
                 <td align="center">[% loop_budge.budget_owner %]</td>
                 <td align="center">[% loop_budge.budget_branchname %]</td>
                 <td align="right" >[% loop_budge.budget_amount %]</td>
-                <td align="right" >[% loop_budge.budget_ordered %]</td>
-                <td align="right" >[% loop_budge.budget_spent %]</td>
+                <td align="right" ><a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered %]</a></td>
+                <td align="right" ><a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent %]</a></td>
                 <td align="right" >[% loop_budge.budget_avail %]</td>
             [% END %]
         [% END %]
index dd864cf..9723094 100644 (file)
                     [% FOREACH item IN items %]
                     <div id="outeritemblock">
                     <div id="itemblock">
-                        <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li>
-                            <div class="subfield_line" style="[% iteminformatio.hidden %];" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
+                        <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];">
+                            <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
 
                                 <label>[% iteminformatio.subfield %] - [% IF ( iteminformatio.mandatory ) %]<b>[% END %][% iteminformatio.marc_lib %][% IF ( iteminformatio.mandatory ) %] *</b>[% END %]</label>
                                 [% iteminformatio.marc_value %]
index c0b62f2..aaea6c0 100644 (file)
@@ -3,7 +3,7 @@
 [% INCLUDE 'doc-head-close.inc' %]
 [% UNLESS ( closedate ) %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/JavaScript">
+<script type="text/javascript">
 //<![CDATA[
     $(document).ready(function() {
         $("#orders").tablesorter({
@@ -12,6 +12,7 @@
                 10: { sorter: false }
             }
         });
+        $("#cancelledorderst").tablesorter();
     });
             function confirm_close() {
                 var is_confirmed = confirm(_('Are you sure you want to close this basket?'));
@@ -19,7 +20,6 @@
                     window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
                 }
             }
-
             function confirm_deletion() {
                 var is_confirmed = confirm(_('Are you sure you want to delete this basket?'));
                 if (is_confirmed) {
 //]]>
 </script>
 [% ELSE %]
+<script type="text/javascript">
+//<![CDATA[
+    $(document).ready(function(){
+        $("#basketgroupid").change(function(){
+            if($(this).val() == "new"){
+                location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
+            }
+        });
+    });
+//]]>
+</script>
 [% UNLESS ( grouped ) %]
 <script type="text/javascript">
 //<![CDATA[
             </h2>
         [% END %]
         [% IF ( basketno ) %]
-            <div id="acqui_basket_summary"  class="yui-g">
-                <h2>Basket details</h2>
-                [% IF ( basketnote ) %]<p>Internal note: [% basketnote %]</p>[% END %]
-                [% IF ( basketbooksellernote ) %]<p>Vendor note: [% basketbooksellernote %]</p>[% END %]
+            <div id="acqui_basket_summary" class="yui-g">
+                <div class="rows">
+                <div class="yui-u first">
+                <ol>
+                [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
+                [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
                 [% IF ( basketcontractno ) %]
-                    <p>Contract name: <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]&amp;booksellerid=[% booksellerid %]">[% basketcontractname %]</a></p>
+                    <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]&amp;booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
                 [% END %]
-                [% IF ( authorisedbyname ) %]<p>Managed by:  [% authorisedbyname %]</p>[% END %]
-                [% IF ( creationdate ) %]<p>Opened on:  [% creationdate %]</p>[% END %]
+                [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span>  [% authorisedbyname %]</li>[% END %]
+                [% IF ( creationdate ) %]<li><span class="label">Opened on:</span>  [% creationdate %]</li>[% END %]
+                [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate %]</li>[% END %]
+
+                </ol>
+                </div>
                 [% IF ( closedate ) %]
-                <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
-                <p>Closed on:  [% closedate %]</p>
-                [% IF ( basketgroups ) %]
-                    <p> Basket group: <select id="basketgroupid" name="basketgroupid">
-                        [% FOREACH basketgroup IN basketgroups %]
-                            [% IF ( basketgroup.default ) %]
+                <div class="yui-u">
+                    <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
+
+                        <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 %]
+                                                        [% ELSE %]
                             <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
-                            [% END %]
-                        [% END %]
-                        </select>
-                        <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
+                                                        [% 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>
-                </form>
-                [% ELSE %]
-                    <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basketgroups %]&amp;basketgroupid=[% id %]">[% name %]</a>
-                [% END %]
+                        <input type="submit" value="Change basket group" /></p>
+
+                    </form>
+                </div>
                 [% END %]
             </div>
+            </div>
         [% END %]
 
         [% UNLESS ( delete_confirm ) %]
-        <div id="acqui_basket_content">
+        <div id="acqui_basket_content" class="yui-g">
         <h2>Order Details</h2>
         [% IF ( books_loop ) %]
             <table id="orders">
                 <tfoot>
                 [% IF ( GST ) %]
                 <tr>
-                    <th>Total Tax Exc.</th>
-                    <th>[% total_rrp_gste %]</th>
-                    <th>&nbsp;</th>
-                    <th>[% qty_total %]</th>
-                    <th>[% total_est_gste %]</th>
+                    <th scope="row">Total Tax Exc.</th>
+                    <td>[% total_rrp_gste %]</td>
+                    <td>&nbsp;</td>
+                    <td>[% qty_total %]</td>
+                    <td>[% total_est_gste %]</td>
                         [% IF ( active ) %]
                             [% IF ( closedate ) %]
                             <td colspan="1" rowspan="3">&nbsp;</td>
                         [% END %]
                 </tr>
                 <tr>
-                    <th>Tax ([% gist_rate %])</th>
-                    <th>[% gist_rrp %]</th>
-                    <th>&nbsp;</th>
-                    <th>&nbsp;</th>
-                    <th>[% gist_est %]</th>
+                    <th scope="row">Tax ([% gist_rate %])</th>
+                    <td>[% gist_rrp %]</td>
+                    <td>&nbsp;</td>
+                    <td>&nbsp;</td>
+                    <td>[% gist_est %]</td>
                 </tr>
                 <tr>
-                    <th>Total Tax Inc. ([% currency %])</th>
-                    <th>[% total_rrp_gsti %]</th>
-                    <th>&nbsp;</th>
-                    <th>[% qty_total %]</th>
-                    <th>[% total_est_gsti %]</th>
+                    <th scope="row">Total Tax Inc. ([% currency %])</th>
+                    <td>[% total_rrp_gsti %]</td>
+                    <td>&nbsp;</td>
+                    <td>[% qty_total %]</td>
+                    <td>[% total_est_gsti %]</td>
                 </tr>
                 [% ELSE %]
                 <tr>
-                    <th>Total ([% currency %])</th>
-                    <th>[% total_rrp_gsti %]</th>
-                    <th>&nbsp;</th>
-                    <th>[% qty_total %]</th>
-                    <th>[% total_est_gsti %]</th>
+                    <th scope="row">Total ([% currency %])</th>
+                    <td>[% total_rrp_gsti %]</td>
+                    <td>&nbsp;</td>
+                    <td>[% qty_total %]</td>
+                    <td>[% total_est_gsti %]</td>
                 </tr>
                 [% END %]
                 </tfoot>
         [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
         [% END %]
         </div>
+        [% IF (cancelledorders_loop) %]
+          <div id="cancelledorders">
+            <h2>Cancelled orders</h2>
+            <table id="cancelledorderst">
+              <thead>
+                <tr>
+                  <th>Order</th>
+                  <th>RRP</th>
+                  <th>Est.</th>
+                  <th>Qty.</th>
+                  <th>Total</th>
+                  <th>Fund</th>
+                </tr>
+              </thead>
+              <tbody>
+                [% FOREACH order IN cancelledorders_loop %]
+                  <tr style="color:grey">
+                    <td>
+                      <p>
+                        [% IF ( order.order_received ) %] (rcvd)[% END %]
+                        [% IF (order.title) %]
+                          [% order.title |html %] by [% order.author %]<br />
+                        [% ELSE %]
+                          <em>Deleted bibliographic record, can't find title</em><br />
+                        [% END %]
+                        [% IF ( order.notes ) %] [% order.notes %][% END %]
+                        [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
+                        [% IF ( order.issn ) %] - [% order.issn %][% END %]
+                        [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
+                        [% IF ( order.publicationyear ) %], [% order.publicationyear %][% END %]
+                      </p>
+                    </td>
+                    <td><p>[% order.rrp %]</p></td>
+                    <td><p>[% order.ecost %]</p></td>
+                    <td><p>[% order.quantity %]</p></td>
+                    <td><p>[% order.line_total %]</p></td>
+                    <td><p>[% order.budget_name %]</p></td>
+                  </tr>
+                [% END %]
+              </tbody>
+            </table>
+          </div>
+        [% END %]
         <br />
         [% UNLESS ( closedate ) %]
         [% INCLUDE 'acquisitions-add-to-basket.inc' %]
index 98eb90a..2c29865 100644 (file)
@@ -1,16 +1,12 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Basket Grouping for [% booksellername %]</title>
+<title>Koha &rsaquo; Basket Grouping for [% booksellername |html %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-
-<link rel="stylesheet" type="text/css" href="[% yuipath %]/fonts/fonts-min.css" />
+<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
+[% IF ( grouping ) %]
 <script type="text/javascript" src="[% yuipath %]/yahoo-dom-event/yahoo-dom-event.js"></script>
 <script type="text/javascript" src="[% yuipath %]/animation/animation-min.js"></script>
 <script type="text/javascript" src="[% yuipath %]/dragdrop/dragdrop-min.js"></script>
 <script type="text/javascript" src="[% yuipath %]/element/element-min.js"></script>
-<script type="text/javascript" src="[% yuipath %]/tabview/tabview-min.js"></script>
-<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
-<link rel="stylesheet" type="text/css" href="[% yuipath %]/tabview/assets/skins/sam/tabview.css" /> 
 <style type="text/css">
 /*margin and padding on body element
   can introduce errors in determining
@@ -34,23 +30,13 @@ body {
 }
 
 div.workarea_alt { padding: 5px; float:left; width: 95%;}
-div.closed { background-color="pink"; padding:10px; float:left; width: 45%;}
-
-ul.closed {
-    position: relative;
-    background: grey;
-    padding-bottom:10;
-    border: 1px solid gray;
-    list-style: none;
-    margin:0;
-    padding: 5px;
-}
+div.closed { background-color: pink; padding:10px; float:left; width: 45%;}
 
 ul.draglist {
     position: relative;
-    background: #f7f7f7;
+    background: #EEE;
     padding-bottom:10;
-    border: 1px solid gray;
+    border: 1px inset gray;
     list-style: none;
     margin:0;
     padding: 5px;
@@ -93,28 +79,11 @@ fieldset.various li {
     clear: none;
 }
 
-.basketgroup {
-       margin-top: 10px;
-       font-size: 1.2em;
-       font-weight: bold;
-       list-style: none;
-       background-color: #D8D4E2;
-       display: block;
-}
-.basketgroup li{
-       font-size: 0.5em;
-       list-style: none;
-       display: inline;
-}
-
 </style>
-
+ [% END %]
 <script type="text/javascript">
 //<![CDATA[
        YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
-       var tabView = new YAHOO.widget.TabView('bgtabs');
-//]]>
-
 
 function submitForm(form) {
     if (form.close.checked == true) {
@@ -125,70 +94,67 @@ function submitForm(form) {
        form.appendChild(input);
     }
 }
+// prepare DOM for YUI Toolbar
 
+ $(document).ready(function() {
+  //  $("#toolbar").empty();
+    yuiToolbar();
+    $("#basket_groups > ul").tabs();
+ });
+
+// YUI Toolbar Functions
+
+function yuiToolbar() {
+       var booksellermenu = [
+               { text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]" },
+               { text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"},
+       ]
+       var ordersbutton = [
+                { text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=[% booksellerid %]" },
+                { text: _("Edit uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" },
+       ]
+       new YAHOO.widget.Button("newbasketgroup");
+    new YAHOO.widget.Button({
+        type: "menu",
+        label: _("Vendor"),
+        name: "booksellerbutton",
+        menu: booksellermenu,
+        container: "toolbar"
+    });
+
+    new YAHOO.widget.Button({
+        type: "menu",
+        label: _("Orders"),
+        name: "ordersbutton",
+        menu: ordersbutton,
+        container: "toolbar"
+    });
+}
+//]]>
 </script>
 </head>
 <body>
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername %]</a> &rsaquo; Basket Grouping</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername |html %]</a> &rsaquo; Basket Grouping</div>
 
 <div id="doc" class="yui-t7">
             
         <div class="yui-b"> 
                <div id="toolbar">
-                               <script type="text/javascript">
-                                       //<![CDATA[
-                               
-                                       // prepare DOM for YUI Toolbar
-                               
-                                        $(document).ready(function() {
-                                         //  $("#toolbar").empty();
-                                           yuiToolbar();
-                                        });
-                               
-                                       // YUI Toolbar Functions
-                               
-                                       function yuiToolbar() {
-                                               var booksellermenu = [
-                                                       { text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]" },
-                                                       { text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"},
-                                               ]
-                                               var ordersbutton = [
-                                                        { text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=[% booksellerid %]" },
-                                                        { text: _("Edit uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" },
-                                               ]
-                                               new YAHOO.widget.Button("newbasketgroup");
-                                           new YAHOO.widget.Button({
-                                               type: "menu",
-                                               label: _("Vendor"),
-                                               name: "booksellerbutton",
-                                               menu: booksellermenu,
-                                               container: "toolbar"
-                                           });
-                                           
-                                           new YAHOO.widget.Button({
-                                               type: "menu",
-                                               label: _("Orders"),
-                                               name: "ordersbutton",
-                                               menu: ordersbutton,
-                                               container: "toolbar"
-                                           });
-                                       }
-                                       //]]>
-                               </script>
                                <a href="?op=add&amp;booksellerid=[% booksellerid %]" name="newbasketgroup" id="newbasketgroup">New Basket Group</a>
                        </div>
-                       <h1>Basket Grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername %]</a></h1>
+                       <h1>Basket Grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername |html %]</a></h1>
                </div>
 [% IF ( grouping ) %]
        <div id="bd"> 
            <div class="yui-g"> 
-                   <div class="yui-u grouping"> 
+                   <div class="yui-u">
 
                                <form action="[% scriptname %]" method="post" name="basketgroups" id="basketgroups">
                    <div id="groups">
+                   <fieldset class="brief">
                    <div class="workarea_alt" >
                    <h3>Ungrouped Baskets</h3>
                    <ul id="ungrouped" class="draglist_alt">
@@ -209,6 +175,7 @@ function submitForm(form) {
                        [% END %]
                        </ul>
                    </div>
+                   </fieldset>
                    </div>
                    </form>
 
@@ -216,31 +183,32 @@ function submitForm(form) {
                        
                    <div class="yui-u first"> 
                        <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
-                                       <fieldset id="various" class='various' >
-                                               <h3><label for="basketgroupname">Basket Group Name:</label></h3>
-                                               <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" />
-                                               <h3><label for="billingplace">Billing Place:</label></h3>
-                                               <select name="billingplace" id="billingplace">
-                                                       [% FOREACH billingplaceloo IN billingplaceloop %]
-                                [% IF ( billingplaceloo.selected ) %]<option value="[% billingplaceloo.value %]" selected="selected">[% billingplaceloo.branchname %]</option>
-                                [% ELSE %]<option value="[% billingplaceloo.value %]">[% billingplaceloo.branchname %]</option>[% END%]
-                                                       [% END %]
-                                               </select>
-                                               <h3><label for="deliveryplace">Delivery Place:</label></h3>
-                                               <select name="deliveryplace" id="deliveryplace">
-                                                       <option value="">--</option>
-                                                       [% FOREACH deliveryplaceloo IN deliveryplaceloop %]
-                                [% IF ( deliveryplaceloo.selected ) %]<option value="[% deliveryplaceloo.value %]" selected="selected">[% deliveryplaceloo.branchname %]</option>
-                                [% ELSE %]<option value="[% deliveryplaceloo.value %]">[% deliveryplaceloo.branchname %]</option>[% END %]
-                                                       [% END %]
-                                               </select>
-                        <p>or</p>
-                        <h3><label for="freedeliveryplace">Delivery Place:</label></h3>
-                        <textarea cols="26" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea>
-                                               <h3><label for="deliverycomment">Delivery comment:</label></h3>
-                                               <textarea cols="26" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
-                                       <div class="workarea">
-                                                       <h3>Grouping:</h3>
+                                       <fieldset id="various" class="brief">
+                                       <ol>
+                                               <li><label for="basketgroupname">Basket Group Name:</label>
+                                                       <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" /></li>
+                                               <li><label for="billingplace">Billing Place:</label>
+                                                       <select name="billingplace" id="billingplace" style="width:13em;">
+                                                               [% FOREACH billingplaceloo IN billingplaceloop %]
+                                       [% IF ( billingplaceloo.selected ) %]<option value="[% billingplaceloo.value %]" selected="selected">[% billingplaceloo.branchname %]</option>
+                                       [% ELSE %]<option value="[% billingplaceloo.value %]">[% billingplaceloo.branchname %]</option>[% END%]
+                                                               [% END %]
+                                                                                               </select></li>
+                                               <li><label for="deliveryplace">Delivery Place:</label>
+                                                       <select name="deliveryplace" id="deliveryplace" style="width:13em;">
+                                                               <option value="">--</option>
+                                                               [% FOREACH deliveryplaceloo IN deliveryplaceloop %]
+                                       [% IF ( deliveryplaceloo.selected ) %]<option value="[% deliveryplaceloo.value %]" selected="selected">[% deliveryplaceloo.branchname %]</option>
+                                       [% ELSE %]<option value="[% deliveryplaceloo.value %]">[% deliveryplaceloo.branchname %]</option>[% END %]
+                                                               [% END %]
+                                                                                               </select></li>
+                        <li><p>or</p></li>
+                        <li><label for="freedeliveryplace">Delivery Place:</label>
+                            <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea></li>
+                                               <li><label for="deliverycomment">Delivery comment:</label>
+                                                       <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
+                                               </li>
+                                               <li><span class="label">Baskets in this group:</span>
                                                        <ul class="draglist" id="bg">
                                                                [% FOREACH selectedbasket IN selectedbaskets %]
                                                    <li class="grouped" id="b-[% selectedbasket.basketno %]" >
@@ -255,105 +223,96 @@ function submitForm(form) {
                                                        <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" />
                                                    </li>
                                            [% END %]
-
                                                        </ul>
-                                               </div>
-                                               <div><input type="checkbox" name="close"> Close</input></div>
-                               <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
+                                               </li>
+                                               <li><label><input type="checkbox" id="close" name="close" /> Close basket group</label></li>
+                                               </ol>
+                                       </fieldset>
+
+                       <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid %]" />
                                [% IF ( basketgroupid ) %]
                                        <input type="hidden" name="basketgroupid" value="[% basketgroupid %]" />
                                [% END %]
                                <input type="hidden" name="op" value="attachbasket" />
                                <input type="submit" value="Save" />
-                                       </fieldset>
+                       </fieldset>
                                </form>
                        </div> 
                </div>   
     </div> 
 [% ELSE %]
-       <div class="yui-g"> 
-               <div id="bgtabs" class="yui-navset">
-                   <ul class="yui-nav">
-                [% UNLESS ( closed ) %]<li class="selected"><a href="#opened"><em>Opened</em></a></li>
-                [% ELSE%]<li><a href="#opened"><em>Opened</em></a></li>[% END %]
-                [% IF ( closed ) %]<li class="selected"><a href="#closed"><em>Closed</em></a></li>
-                [% ELSE %]<li><a href="#closed"><em>Closed</em></a></li>[% END %]
-                   </ul>            
-                   <div class="yui-content">
-                       <div id="opened">
-                               <ul>
-                                       [% FOREACH basketgroup IN basketgroups %]
-                                               [% UNLESS ( basketgroup.closed ) %]
-                                       <li class="basketgroup">
-                                               [% IF ( basketgroup.name ) %]
-                                                       [% basketgroup.name %]
-                                               [% ELSE %]
-                                                       Basket Group n°[% basketgroup.id %]
-                                               [% END %]
-                                               <ul>
-                                                       <li>
-                                                               <span class="yui-button yui-link-button">
-                                                                       <span class="first-child">
-                                                                               <a href="javascript:closeandprint([% basketgroup.id %])" class="yui-button yui-link-button">Close & Print</a>
-                                                                       </span>
-                                                               </span>
-                                                       </li>
-                                                       <li>
-                                                               <span class="yui-button yui-link-button">
-                                                                       <span class="first-child">
-                                                                               <a href="?op=add&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button" >Edit</a>
-                                                                       </span>
-                                                               </span>
-                                                               </li>
-                                                               <li>
-                                                               <span class="yui-button yui-link-button">
-                                                                       <span class="first-child">
-                                                                               <a href="?op=delete&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button" >Delete</a>
-                                                                       </span>
-                                                               </span>
-                                                               </li>
-                                                               
-                                               </ul>
-                                       </li>
-                                               [% END %]
-                                       [% END %]
-                               </ul>
-                       </div>
-                       <div id="closed">
-                               <ul>
-                                       [% FOREACH basketgroup IN basketgroups %]
-                                               [% IF ( basketgroup.closed ) %]
-                                               <li class="basketgroup">
-                                                       [% IF ( basketgroup.name ) %]
-                                                               [% basketgroup.name %]
-                                                       [% ELSE %]
-                                                               Basket Group n°[% basketgroup.id %]
-                                                       [% END %]
-                                                       <ul>
-                                                               <li>
-                                                                               <span class="yui-button yui-link-button">
-                                                                               <span class="first-child">
-                                                                                       <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=reopen&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button">Reopen</a>
-                                                                               </span>
-                                                                       </span>
-                                                               </li>
-                                                               <li>
-                                                                               <span class="yui-button yui-link-button">
-                                                                               <span class="first-child">
-                                                                                       <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=print&amp;basketgroupid=[% basketgroup.id %]" class="yui-button yui-link-button">Print</a>
-                                                                               </span>
-                                                                       </span>
-                                                               </li>
-                                                       </ul>
-                                               </li>
-                                               [% END %]
-                                       [% END %]
-                               </ul>
+       <div class="yui-g">
+       <div id="basket_groups" class="toptabs">
+       <ul class="ui-tabs-nav">
+        [% UNLESS ( closed ) %]<li class="ui-tabs-selected"><a href="#opened">Open</a></li>
+        [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
+        [% IF ( closed ) %]<li class="ui-tabs-selected"><a href="#closed">Closed</a></li>
+        [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
+    </ul>
+    <div id="opened">
+               <table>
+                       <thead>
+                               <tr>
+                                       <th>Basket Group</th><th colspan="3">Action</th>
+                               </tr>
+                       </thead>
+                       <tbody>
+                       [% FOREACH basketgroup IN basketgroups %]
+                               [% UNLESS ( basketgroup.closed ) %]
+                                       <tr>
+                                               <td><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
+                                                                                                       [% basketgroup.name %]
+                                                                                               [% ELSE %]
+                                                                                                       Basket group no. [% basketgroup.id %]
+                                                                                               [% END %]</a>
+                                               </td>
+                                                       <td>
+                                                               <input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and Print" />
+                                                       </td>
+                                                       <td>
+                                                               <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form>
+                                                       </td>
+                                                       <td>
+                                                               <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="delete" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Delete" /></form>
+                                                       </td>
+                                       </tr>
+                               [% END %]
+                       [% END %]
+                       </tbody>
+               </table>
+    </div>
+    <div id="closed">
+               <table>
+                       <thead>
+                               <tr>
+                                       <th>Basket Group</th><th colspan="3">Action</th>
+                               </tr>
+                       </thead>
+                       <tbody>
+                               [% FOREACH basketgroup IN basketgroups %]
+                               [% IF ( basketgroup.closed ) %]
+                               <tr>
+                               <td>
+                                       <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=reopen&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
+                                                                                       [% basketgroup.name %]
+                                                                               [% ELSE %]
+                                                                                       Basket group no. [% basketgroup.id %]
+                                                                               [% END %]</a>
+                                       </td>
+                                       <td>
+                                                       <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form>
+                                               </td>
+                                               <td>
+                                                       <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Print" /></form>
+                                               </td>
+                               </tr>
+                               [% END %]
+                               [% END %]
+                               </tbody>
+                       </table>
                        </div>
                    </div>
-               </div>
-               
-       </div> 
+                   </div>
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
index 68c290a..a6f26c4 100644 (file)
@@ -337,8 +337,8 @@ $(document).ready(function()
                 </div></li>
             [% END %]
             </ol>
-            <a style="cursor: pointer; color: grey; font-size: 180%;" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">+</a>
-            <a style="display:none; cursor: pointer; color: grey; font-size: 180%;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">-</a>
+            <a class="addItem" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">Add</a>
+            <a class="delItem" style="display:none;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">Delete</a>
         </div><!-- /iteminformation -->
         </div>
 
@@ -365,11 +365,12 @@ $(document).ready(function()
             </li>
             <li>
                 [% IF ( close ) %]
-            <span class="label">Fund: </span>
+            <span class="label required">Fund: </span>
                     <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
                 [% ELSE %]
-                <label for="budget_id">Fund: </label>
+                <label class="required" for="budget_id">Fund: </label>
                 <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
+                        <option value="">Select a budget</option>
                 [% FOREACH budget_loo IN budget_loop %]
                     [% IF ( budget_loo.b_sel ) %]
                         <option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt
new file mode 100644 (file)
index 0000000..93540c9
--- /dev/null
@@ -0,0 +1,91 @@
+[% USE KohaDates %]
+[% INCLUDE 'doc-head-open.inc' %]
+<title>Koha &rsaquo; Acquisitions &rsaquo; Ordered</title>
+[% INCLUDE 'doc-head-close.inc' %]
+</head>
+<body>
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'acquisitions-search.inc' %]
+
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; Ordered - [% fund_code %]</div>
+
+<div id="doc3" class="yui-t2">
+
+<div id="bd">
+    <div id="yui-main">
+        <div class="yui-b">
+
+<h1>Fund: [% fund_code %]</h1>
+<h2>Ordered</h2>
+
+<table cellspacing="0" cellpadding="0" border="0" id="spent" class="collapse">
+    <thead>
+    <tr>
+        <th> Title </th>
+       <th> Order </th>
+       <th> Vendor </th>
+       <th> Itemtype </th>
+       <th> Left on Order </th>
+       <th> Estimated cost per unit </th>
+       <th> Date Ordered </th>
+       <th> Subtotal </th>
+    </tr>
+    </thead>
+
+[% FOREACH order IN ordered %]
+    [% IF loop.odd %]
+        <tr class="highlight">
+    [% ELSE %]
+        <tr>
+    [% END %]
+       <td class="cell">
+           [% order.title %]
+       </td>
+       <td class="cell">
+           <a href="/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% order.booksellerid %]&basketno=[% order.basketno %]">[% order.ordernumber %]</a>
+       </td>
+       <td class="cell">
+           <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% order.booksellerid %]">[% order.booksellerid %]</a>
+       </td>
+       <td class="cell">
+           [% order.itype %]
+       </td>
+       <td class="cell">
+           [% order.left %]
+       </td>
+       <td class="cell" align="right">
+           [% order.ecost %]
+       </td>
+       <td class="cell" align="right">
+           [% order.entrydate | $KohaDates %]
+       </td>
+       <td class="cell" align="right">
+           [% order.subtotal %]
+       </td>
+    </tr>
+[% END %]
+
+    <tfoot>
+    <tr>
+        <td> Total </td>
+        <td> </td>
+        <td> </td>
+        <td> </td>
+        <td> </td>
+        <td> </td>
+       <td> </td>
+        <td align="right">
+            [% total %]
+        </td>
+    </tr>
+    </tfoot>
+
+</table>
+
+</div>
+</div>
+<div class="yui-b">
+[% INCLUDE 'acquisitions-menu.inc' %]
+</div>
+</div>
+[% INCLUDE 'intranet-bottom.inc' %]
index 7147b19..ea422c8 100644 (file)
@@ -62,8 +62,8 @@
                 </div></li>
             [% END %]
             </ol>
-            <a style="cursor: pointer; color: grey; font-size: 180%;" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">+</a>
-            <a style="display:none; cursor: pointer; color: grey; font-size: 180%;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">-</a>
+            <a class="addItem" onclick="cloneItemBlock('itemblock[% item.itemBlockIndex %]')">Add</a>
+            <a class="delItem" style="display:none;" onclick="deleteItemBlock('itemblock[% item.itemBlockIndex %]')">Delete</a>
         </div><!-- /iteminformation -->
         </div>
         
@@ -89,7 +89,9 @@
     <fieldset class="rows">
     <legend>Accounting details</legend>
        <ol>
-       <li><label for="datereceived">Date received: </label><span class="label"> [% datereceived %] </span></li>
+       <li><label for="datereceived">Date received: </label><span> [% datereceived %] </span></li>
+       <li><label for="bookfund">Budget: </label><span> [% bookfund %] </span></li>
+       <li><label for="creator">Created by: </label><span> [% IF ( memberfirstname and membersurname ) %][% IF ( memberfirstname ) %][% memberfirstname %][% END %] [% membersurname %][% ELSE %]No name[% END %]</span></li>
        <li><label for="quantityto">Quantity to receive: </label><span class="label">
            [% IF ( edit ) %]
                <input type="text" name="quantity" value="[% quantity %]" />
index 45eb591..eb5492e 100644 (file)
 </script>
 <script type="text/javascript">
 //<![CDATA[
-            function confirm_delete_item(ordernumber, biblionumber) {
+            function confirm_delete_item(ordernumber, basketno, biblionumber) {
                 var is_confirmed = confirm(_('Are you sure you want to delete this order ?'));
                 if (is_confirmed) {
-                    window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber;
+                    window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber;
                 }
             }
             
             function confirm_delete_biblio(ordernumber, biblionumber) {
                 var is_confirmed = confirm(_('Are you sure you want to delete this catalog record and order ?'));
                 if (is_confirmed) {
-                    window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1";
+                    window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&delbiblio=1";
                     }
             }
 
                                    [% IF ( loop_order.left_holds_on_order ) %]
                     <span class="button" title="Can't delete order, ([% loop_order.holds_on_order %]) holds are linked with this order cancel holds first">Can't delete order</span><br>
                     [% ELSE %]
-                    <a href="javascript:confirm_delete_item([% loop_order.ordernumber %],[% loop_order.biblionumber %])" class="button">Delete order</a><br>
+                    <a href="javascript:confirm_delete_item([% loop_order.ordernumber %],[% loop_order.basketno %],[% loop_order.biblionumber %])" class="button">Delete order</a><br>
                     [% END %]
                     [% IF ( loop_order.can_del_bib ) %]
-                    <a href="javascript:confirm_delete_biblio([% loop_order.ordernumber %],[% loop_order.biblionumber %])" class="button">Delete order and catalog record</a><br>
+                    <a href="javascript:confirm_delete_biblio([% loop_order.ordernumber %],[% loop_order.basketno %],[% loop_order.biblionumber %])" class="button">Delete order and catalog record</a><br>
                     [% ELSE %]
                     <span class="button" title="Can't delete catalog record, see constraints below">Can't delete order and catalog record</span><br>
                     [% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt
new file mode 100644 (file)
index 0000000..c6825c8
--- /dev/null
@@ -0,0 +1,107 @@
+[% USE KohaDates %]
+[% INCLUDE 'doc-head-open.inc' %]
+<title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
+[% INCLUDE 'doc-head-close.inc' %]
+</head>
+<body>
+[% INCLUDE 'header.inc' %]
+[% INCLUDE 'acquisitions-search.inc' %]
+
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; Spent - [% fund_code %]</div>
+
+<div id="doc3" class="yui-t2">
+
+<div id="bd">
+    <div id="yui-main">
+        <div class="yui-b">
+
+<h1>Fund: [% fund_code %]</h1>
+<h2>Spent</h2>
+
+
+<table cellspacing="0" cellpadding="0" border="0" id="spent" class="collapse">
+    <thead>
+    <tr>
+        <th> Title </th>
+       <th> Order </th>
+       <th> Vendor </th>
+       <th> Invoice </th>
+       <th> Itemtype </th>
+       <th> Received </th>
+       <th> Unit Price </th>
+       <th> Freight per Item </th>
+       <th> Date Ordered </th>
+       <th> Date Received </th>
+       <th> Subtotal </th>
+    </tr>
+    </thead>
+
+[% FOREACH order IN spent %]
+    [% IF loop.odd %]
+    <tr class="highlight">
+    [% ELSE %]
+    <tr>
+    [% END %]
+
+       <td class="cell">
+           [% order.title %]
+       </td>
+       <td class="cell">
+            <a href="/cgi-bin/koha/acqui/orderreceive.pl?ordernumber=[% order.ordernumber %]&biblio=[% order.biblionumber %]&invoice=[% order.booksellerinvoicenumber %]&supplierid=[% order.booksellerid %]&catview=yes">[% order.ordernumber %]</a>
+       </td>
+       <td class="cell">
+           <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% order.booksellerid %]">[% order.booksellerid %]</a>
+       </td>
+       <td class="cell">
+           <a href="/cgi-bin/koha/acqui/parcel.pl?invoice=[% order.booksellerinvoicenumber %]&supplierid=[% order.booksellerid %]&datereceived=[% order.datereceived %]">[% order.booksellerinvoicenumber %]</a>
+       </td>
+       <td class="cell">
+           [% order.itype %]
+       </td>
+       <td class="cell">
+           [% order.quantityreceived %]
+       </td>
+       <td class="cell" align="right">
+           [% order.unitprice %]
+       </td>
+       <td class="cell" align="right">
+           [% order.freight %]
+       </td>
+       <td class="cell" align="right">
+           [% order.entrydate | $KohaDates %]
+       </td>
+       <td class="cell" align="right">
+           [% order.datereceived | $KohaDates %]
+       </td>
+       <td class="cell" align="right">
+           [% order.subtotal %]
+       </td>
+    </tr>
+[% END %]
+    <tfoot>
+        <tr valign="top">
+        <td> Total </td>
+        <td> </td>
+        <td> </td>
+        <td> </td>
+        <td> </td>
+        <td> </td>
+        <td> </td>
+        <td> </td>
+       <td> </td>
+       <td> </td>
+        <td align="right">
+               [% total %]
+       </td>
+        </tr>
+    </tfoot>
+
+</table>
+
+</div>
+</div>
+<div class="yui-b">
+[% INCLUDE 'acquisitions-menu.inc' %]
+</div>
+</div>
+[% INCLUDE 'intranet-bottom.inc' %]
index bbcb973..66dbc6e 100644 (file)
@@ -1,5 +1,5 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Acquisitions &rsaquo; Z39.50 Search Results</title>
+<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]Order from external source &rsaquo; Search results[% END %]</title>
 [% INCLUDE 'greybox.inc' %]
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
@@ -63,11 +63,11 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo; Order from Z39.50 search</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo; [% IF ( opsearch ) %]Order from external source[% ELSE %]<a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Order from external source</a> &rsaquo; Search results[% END %]</div>
 <div id="doc3" class="yui-t7">
       <div id="bd">
          [% IF ( opsearch ) %]
-<h2>Z39.50 Search Points</h2>
+<h2>Order from external source</h2>
     <form method="post" action="z3950_search.pl" name="f" class="checkboxed">
     <input type="hidden" name="op" id="op" value="do_search" />
        <div class="yui-g">
@@ -126,7 +126,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
 
 
 [% ELSE %]
-    <h2>Results</h2>
+    <h2>Search results</h2>
     [% IF ( breeding_loop ) %]
     <table id="resultst">
 <thead>    <tr>
index c27a880..12a70bc 100644 (file)
         </li>
         <li class="radio">
 
-        <label for="show_mine">Show my<br /> funds only</label>
+        <label for="show_mine">Show my funds only</label>
             [% IF ( show_mine ) %]
                 <input type="checkbox" id="show_mine"  name="show_mine" value="1" checked="checked" />
             [% ELSE %]
index 6d49ca7..d762be7 100644 (file)
             [% IF ( loop.last ) %]</tbody></table>[% END %]
             [% END %]
         [% END %]
-        <fieldset class="action"><button class="save-all submit" type="submit">Save all [% TAB.tab_title %] preferences</button> <a href="/cgi-bin/koha/admin/preferences.pl?tab=[% TAB.tab %]" class="cancel">Cancel</a></fieldset>
+        <fieldset class="action"><button class="save-all submit" type="submit">Save all [% TAB.tab_title %] preferences</button> <a href="#" onclick="window.location.reload(true);" class="cancel">Cancel</a></fieldset>
     </form>
     </div>
     [% END %]
index 2b05faa..e61f622 100644 (file)
@@ -13,7 +13,7 @@ Authorities:
           choices:
               yes: "Don't"
               no: Do
-        - automatically update attached biblios when changing an authority record. If this is off, please ask your administrator to enable the merge_authorities.pl cronjob.
+        - automatically update attached biblios when changing an authority record. If this is off, please ask your administrator to enable the merge_authority.pl cronjob.
     -
         - Use the following text for the contents of MARC authority control field 008 position 06-39 (fixed length data elements). Do NOT include the date (position 00-05).
         - pref: MARCAuthorityControlField008
index f4946b5..817ce57 100644 (file)
@@ -91,6 +91,13 @@ Circulation:
                   yes: Record
                   no: "Don't record"
             - local use when an unissued item is checked in.
+        -
+            - When an empty an empty barcode field is submitted in circulation
+            - pref: CircAutoPrintQuickSlip
+              choices:
+                  yes: "open a print quick slip window"
+                  no: "clear the screen"
+            - .
     Checkout Policy:
         -
             - pref: AllowNotForLoanOverride
index 591e6ca..9d409ba 100644 (file)
@@ -6,7 +6,7 @@ I18N/L10N:
           choices:
               us: mm/dd/yyyy
               metric: dd/mm/yyyy
-              iso: yyyy/mm/dd
+              iso: yyyy-mm-dd
         - .
     -
         - "Enable the following languages on the staff interface:"
index ac3e1d2..0e2f73b 100644 (file)
@@ -11,7 +11,9 @@ Patrons:
            choices:
                yes: Send
                no: "Don't send"
-         - an email to newly created patrons with their account details at their
+         - an email to newly created patrons with their account details.
+     -
+         - "Use"
          - pref: AutoEmailPrimaryAddress
            default: "OFF"
            choices:
@@ -19,7 +21,7 @@ Patrons:
                emailpro: work
                B_email: alternate
                "OFF": first valid
-         - email address.
+         - "patron email address for sending out emails."
      -
          - pref: autoMemberNum
            choices:
@@ -27,11 +29,16 @@ Patrons:
                no: "Don't"
          - default the card number field on the patron addition screen to the next available card number (for example, if the largest currently used card number is 26345000012941, then this field will default to 26345000012942).
      -
-         - "The following database columns must be filled in on the patron entry screen:"
+         - "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: BorrowerMandatoryField
            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: BorrowerUnwantedField
+           class: multi
+         - (separate columns with |)
+     -
          - "Guarantors can be the following of those they guarantee:"
          - pref: borrowerRelationship
            class: multi
index b08f360..1d924ec 100644 (file)
       <div id="yui-main">
        <div class="yui-b">
        [% INCLUDE 'cat-toolbar.inc' %]
-
+    [% IF ( ocoins ) %]
+    <!-- COinS / OpenURL -->
+    <span class="Z3988" title="[% ocoins %]"></span>
+    [% END %]
          <div id="catalogue_ISBDdetail">
                  [% ISBD %]
          </div>
index 3fac577..ae86ee0 100644 (file)
@@ -57,6 +57,10 @@ function Changefwk(FwkList) {
                             [% IF ( frameworkcodeloo.selected ) %]<option value="[% frameworkcodeloo.value %]" selected="selected">[% frameworkcodeloo.frameworktext %]</option>[% ELSE %]<option value="[% frameworkcodeloo.value %]">[% frameworkcodeloo.frameworktext %]</option>[% END %]
                             [% END %]
             </select> </b></p>
+[% IF ( ocoins ) %]
+<!-- COinS / OpenURL -->
+<span class="Z3988" title="[% ocoins %]"></span>
+[% END %]
 
 <div id="bibliotabs" class="toptabs numbered">
        <ul>
index b1e225f..6046768 100644 (file)
@@ -68,6 +68,11 @@ function verify_images() {
     <div class="yui-b">
 
 [% INCLUDE 'cat-toolbar.inc' %]
+    [% IF ( ocoins ) %]
+        <!-- COinS / OpenURL -->
+        <span class="Z3988" title="[% ocoins %]"></span>
+    [% END %]
+
     [% IF ( AmazonEnabled ) %]
         [% IF ( XSLTDetailsDisplay ) %]
             <div class="yui-gc">
@@ -114,7 +119,7 @@ function verify_images() {
         [% IF ( MARCAUTHORS ) %]
             <li><strong>Additional Authors:</strong><ul>
             [% FOREACH MARCAUTHOR IN MARCAUTHORS %]
-                <li>[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="&#8225;[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value |url %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %]</li>
+                <li>[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value |url %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %]</li>
                 [% END %]
 
         </ul>
@@ -183,7 +188,7 @@ function verify_images() {
             <li><strong>Subjects:</strong> 
             <ul>
                 [% FOREACH MARCSUBJCT IN MARCSUBJCTS %]
-                <li>[% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] [% MARCSUBJECT_SUBFIELDS_LOO.separator %] <a title="&#8225;[% MARCSUBJECT_SUBFIELDS_LOO.code %] [% MARCSUBJECT_SUBFIELDS_LOO.value %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCSUBJECT_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCSUBJECT_SUBFIELDS_LOO.value |html %]</a>[% END %]</li>
+                <li>[% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] [% MARCSUBJECT_SUBFIELDS_LOO.separator %] <a title="[% MARCSUBJECT_SUBFIELDS_LOO.code %] [% MARCSUBJECT_SUBFIELDS_LOO.value %]" href="/cgi-bin/koha/catalogue/search.pl?q=[% FOREACH link_loo IN MARCSUBJECT_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit %]:[% link_loo.link |url %][% END %]">[% MARCSUBJECT_SUBFIELDS_LOO.value |html %]</a>[% END %]</li>
                 [% END %]
                 </ul>
             </li>
@@ -246,11 +251,11 @@ function verify_images() {
                 [% IF ( volinfo ) %]<th>Publication Details</th>[% END %]
                 [% IF ( itemdata_uri ) %]<th>url</th>[% END %]
                 [% 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>[% END %]
-               [% IF ( analyze ) %]<th></th>[% END %]
+               [% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
             </tr>
             [% FOREACH itemloo IN itemloop %]
                 <tr>
@@ -334,7 +339,7 @@ function verify_images() {
                         Item-level hold
                     [% END %]
                     [% IF ( canreservefromotherbranches ) %]for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedForBorrowernumber %]">
-                       [% IF ( hidepatronname ) %]
+                       [% IF ( itemloo.hidepatronname ) %]
                            [% itemloo.Reservedcardnumber %]
                        [% ELSE %]
                            [% itemloo.ReservedForFirstname %] [% itemloo.ReservedForSurname %]
@@ -372,6 +377,9 @@ function verify_images() {
                                [% 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>
index bc2490f..de5db0e 100644 (file)
@@ -34,7 +34,7 @@
             <tbody>
         [% FOREACH issue IN issues %]
         [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
-                <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issue.borrowernumber %]">[% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %]</a></td>
+                <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issue.borrowernumber %]">[% IF HidePatronName %][% issue.cardnumber %][% ELSE %][% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %][% END %]</a></td>
                 <td>[% IF ( issue.barcode ) %]
                         <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% issue.biblionumber %]&amp;itemnumber=[% issue.itemnumber %]">[% issue.barcode %]</a>
                     [% ELSE %]
index 36e7149..57dac9a 100644 (file)
@@ -1,5 +1,5 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Catalog &rsaquo; Item details for [% FOREACH BIBITEM_DAT IN BIBITEM_DATA %][% BIBITEM_DAT.title %][% END %]</title>
+<title>Koha &rsaquo; Catalog &rsaquo; Item details for [% title %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <style type="text/css">h3{padding-top: 1em; border-top: 2px solid #CCCCCC;}</style>
 </head>
@@ -8,7 +8,7 @@
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Item Details for <i>[% FOREACH BIBITEM_DAT IN BIBITEM_DATA %][% BIBITEM_DAT.title |html %][% END %]</i></div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Item Details for <i>[% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield|html %][% END %]</i></div>
 
 <div id="doc3" class="yui-t2">
 
 [% INCLUDE 'cat-toolbar.inc' %]
 
 <div id="catalogue_detail_biblio">
-    [% FOREACH BIBITEM_DAT IN BIBITEM_DATA %]
-    <h2>[% BIBITEM_DAT.title |html %] [% IF ( BIBITEM_DAT.author ) %], by [% BIBITEM_DAT.author %][% END %]</h2>
+
+    <h2>[% title |html %]</h2>
+    [% IF ( subtitle ) %]<h4>[% FOREACH subtitl IN subtitle %] [% subtitl.subfield|html %][% END %]</h4>[% END %]
+    [% IF ( author ) %]<h4>by [% author %]</h4>[% END %]
     <ol class="bibliodetails">
-        <li><span class="label">Biblionumber:</span> [% BIBITEM_DAT.biblionumber %]&nbsp;</li>
+        <li><span class="label">Biblionumber:</span> [% biblionumber %]&nbsp;</li>
         [% UNLESS ( item_level_itypes ) %]
-        <li><span class="label">Item type:</span> [% BIBITEM_DAT.itemtypename %]&nbsp;</li>
+        <li><span class="label">Item type:</span> [% itemtypename %]&nbsp;</li>
         [% END %]
-        <!-- deprecated? <li><span class="label">Loan length:</span> [% BIBITEM_DAT.loanlength %]&nbsp;</li> -->
-        <li><span class="label">Rental charge:</span>[% BIBITEM_DAT.rentalcharge %]&nbsp;</li>
-        <li><span class="label">ISBN:</span> [% BIBITEM_DAT.isbn %]&nbsp;</li>
-        <li><span class="label">Publisher:</span>[% BIBITEM_DAT.place %] [% BIBITEM_DAT.publishercode |html %] [% BIBITEM_DAT.publicationyear %]&nbsp;</li>
-        [% IF ( BIBITEM_DAT.volumeddesc ) %]<li><span class="label">Volume:</span> [% BIBITEM_DAT.volumeddesc %]</li>[% END %]
-        <li><span class="label">Physical Details:</span> [% BIBITEM_DAT.pages %] [% BIBITEM_DAT.illus %] [% BIBITEM_DAT.size %]&nbsp;</li>
-        [% IF ( BIBITEM_DAT.bnotes ) %]<li><span class="label">Notes:</span> [% BIBITEM_DAT.bnotes %]</li>[% END %]
-        <li><span class="label">No. of Items:</span> [% BIBITEM_DAT.count %]&nbsp;[% IF ( BIBITEM_DAT.hiddencount ) %]total ([% BIBITEM_DAT.showncount %] shown / [% BIBITEM_DAT.hiddencount %] hidden) 
-<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% BIBITEM_DAT.biblionumber %]&showallitems=1">Show all items</a>[% END %]</li>
+        [% IF ( rentalcharge ) %]<li><span class="label">Rental charge:</span>[% rentalcharge %]&nbsp;</li>[% END %]
+        <li><span class="label">ISBN:</span> [% isbn %]&nbsp;</li>
+        <li><span class="label">Publisher:</span>[% place %] [% publishercode |html %] [% publicationyear %]&nbsp;</li>
+        [% IF ( volumeddesc ) %]<li><span class="label">Volume:</span> [% volumeddesc %]</li>[% END %]
+        <li><span class="label">Physical Details:</span> [% pages %] [% illus %] [% size %]&nbsp;</li>
+        [% IF ( bnotes ) %]<li><span class="label">Notes:</span> [% bnotes %]</li>[% END %]
+        <li><span class="label">No. of Items:</span> [% count %]&nbsp;[% IF ( hiddencount ) %]total ([% showncount %] shown / [% hiddencount %] hidden) 
+<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblionumber %]&amp;showallitems=1">Show all items</a>[% END %]</li>
     </ol>
-    [% END %]
+
     <br clear="all" />
     [% IF ( ONLY_ONE ) %]
         <div class="dialog message">You are only viewing one item.  <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblionumber %]&amp;bi=[% biblioitemnumber %]#item[% itemnumber %]">View All</a></div>
@@ -57,6 +58,7 @@
             <li><span class="label">Item Callnumber:</span> [% ITEM_DAT.itemcallnumber %]&nbsp;</li>
             [% IF ( ITEM_DAT.copyvol ) %]<li><span class="label">Copy / Vol :</span> [% ITEM_DAT.copyvol %]&nbsp;</li> [% END %]
             [% IF ( ITEM_DAT.replacementprice ) %]<li><span class="label">Replacement Price:</span> [% ITEM_DAT.replacementprice %]&nbsp;</li> [% END %]
+           [% IF ITEM_DAT.materials %]<li><span class="label">Materials Specified:</span> [% ITEM_DAT.materials %] </li> [% END %]
             </ol></div>
            <div class="listgroup"><h4>Statuses [% IF ( ITEM_DAT.status_advisory ) %](
                 [% IF ( ITEM_DAT.notforloantext ) %][% ITEM_DAT.notforloantext %] [% END %]
@@ -67,7 +69,7 @@
 
             <ol class="bibliodetails">
             <li><span class="label">Current Location:</span> [% ITEM_DAT.holdingbranchname %]&nbsp;</li>
-            <li><span class="label">Checkout Status:</span> [% IF ( ITEM_DAT.issue ) %]Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>, Due back on [% ITEM_DAT.datedue %][% ELSE %]Not Checked out [% END %]</li>
+            <li><span class="label">Checkout Status:</span> [% IF ( ITEM_DAT.issue ) %]Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>[% IF ( ITEM_DAT.lastreneweddate ) %], Last renewed [% ITEM_DAT.lastreneweddate %][% END %], Due back on [% ITEM_DAT.datedue %][% ELSE %]Not Checked out [% END %]</li>
             <li><span class="label">Current Renewals:</span> [% ITEM_DAT.renewals %]&nbsp;</li>
             [% IF ( ITEM_DAT.itemlostloop ) %]
                 <li><span class="label">Lost Status:</span>
index 2bed51c..18a992d 100644 (file)
@@ -1,5 +1,5 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Catalog &rsaquo; [% IF ( searchdesc ) %]Results of Search [% IF ( query_desc ) %]for '[% query_desc %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc %]'[% END %][% ELSE %]You did not specify any search criteria[% END %]</title>
+<title>Koha &rsaquo; Catalog &rsaquo; [% IF ( searchdesc ) %]Results of Search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.highlight-3.js"></script>
 <script type="text/javascript">
@@ -194,13 +194,13 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
             placeHold();
         }
         var HoldForButtonMenu = [
-            { text: "Place hold", onclick: { fn: holdFor }},
-            { text: "Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: holdForPatron }},
-            { text: "Forget [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: forgetPatron }}];
+            { text: _("Place hold"), onclick: { fn: holdFor }},
+            { text: _("Place hold for") + " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: holdForPatron }},
+            { text: _("Forget") + " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: forgetPatron }}];
 
         var HoldForButton = new YAHOO.widget.Button({
                 type: "split",
-                label: "Place hold",
+                label: _("Place hold"),
                 name: "holdfor",
                 menu: HoldForButtonMenu,
                 container: "placeholdc",
@@ -404,7 +404,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
                         [% END %]
                         [% IF ( facets_loo.expandable ) %]
                             <li class="showmore">
-                                <a href="/cgi-bin/koha/catalogue/search.pl?q=[% facets_loo.searchdesc %]&amp;expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">
+                                <a href="/cgi-bin/koha/catalogue/search.pl?q=[% facets_loo.searchdesc %][% IF ( offset ) %]&amp;offset=[% offset %][% END %]&amp;expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">
                                     Show More
                                 </a>
                             </li>
@@ -459,7 +459,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
                                [% INCLUDE 'biblio-default-view.inc' %]
                                             <b>[% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %]</b>
                                             </a>
-                                        [% FOREACH subtitl IN SEARCH_RESULT.subtitle %] , [% subtitl.subfield %] [% END %]
+                                        [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield %][% END %]
                                                                                [% IF ( SEARCH_RESULT.volume ) %],[% SEARCH_RESULT.volume %][% END %] [% IF ( SEARCH_RESULT.volumeddesc ) %], [% SEARCH_RESULT.volumeddesc %][% END %]
                                 </p>
                                 [% IF ( SEARCH_RESULT.summary ) %]
@@ -493,7 +493,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
                                         [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode %][% END %] [% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %] [% ELSIF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %]</span>
                                                                                [% IF ( SEARCH_RESULT.edition ) %]<span class="results_edition">Edition: [% SEARCH_RESULT.edition %]</span>[% END %]
                                         <span class="results_physicaldesc">[% IF ( SEARCH_RESULT.pages ) %]: [% SEARCH_RESULT.pages %][% END %]
-                                        [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size %][% END %]</span> [% IF ( SEARCH_RESULT.normalized_isbn ) %]<span class="results_isbn">ISBN: [% SEARCH_RESULT.normalized_isbn %]</span>[% END %]
+                                        [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size %][% END %]</span> [% IF ( SEARCH_RESULT.isbn ) %]<span class="results_isbn">ISBN: [% SEARCH_RESULT.isbn | replace('\s\|', ', ')%]</span>[% END %]
                                         <span class="results_itemtype">[% SEARCH_RESULT.description %]</span>
                                         [% IF ( SEARCH_RESULT.timestamp ) %] <i>(modified on [% SEARCH_RESULT.timestamp %])</i>[% END %]
                                         [% IF ( SEARCH_RESULT.cn_class ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=[% SEARCH_RESULT.cn_class |url %]">[% SEARCH_RESULT.cn_class %]</a>][% END %]
@@ -513,7 +513,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
                                   <span class="noholdstext">No holds allowed</span>
                               [% ELSE %]
                                   <a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds</a>
-                                  [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&amp;findborrower=[% holdfor_cardnumber %]">Hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
+                                  [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&amp;findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
                               [% END %]
                           [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
                           | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit record</a>
index 65feefb..62f5d87 100644 (file)
@@ -2,6 +2,7 @@
 <title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title |html %] (Record Number [% biblionumber %])[% ELSE %]Add MARC Record[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/yui/plugins/bubbling-min.js"></script>
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
 <script type="text/javascript">
 //<![CDATA[
 
@@ -709,6 +710,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
        // prepare DOM for YUI Toolbar
 
         $(document).ready(function() {
+        $('#toolbar').fixFloat();
                $("#z3950searchc").empty();
         $("#savebutton").empty();
            yuiToolbar();
index 20150ac..6eb4b50 100644 (file)
@@ -146,7 +146,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
         [% IF ( breeding_loo.breedingid ) %]
 
            <tr id="row[% breeding_loo.breedingid %]">
-               <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview Card</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],0); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td>
+               <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" rel="gb_page_center[600,500]">Preview Card</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],[% breeding_loo.biblionumber %]); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td>
             <td>[% breeding_loo.title |html %]</td>
             <td>[% breeding_loo.author %]</td>
             <td>[% breeding_loo.date %]</td>
index 026a265..097089a 100644 (file)
     </table></div>
 
 [% ELSE %]
-<div class="yui-ge">
-   <div class="yui-u first">     
+                    [% IF ( reqmessage ) %]
+                     <div class="dialog message">
+                        <ul>
+                         [% IF ( cancelled ) %]
+                             <li>Reserve cancelled</li>
+                         [% END %]
+                         [% IF ( setwaiting ) %]
+                             <li>Item should now be waiting at library: [% reqbrchname %]</li>
+                         [% END %]
+                         </ul>
+                    </div>
+                     [% END %]
+
+                     [% IF ( errmsgloop ) %]
+                        <div class="dialog message">
+                            <ul>
+                             [% FOREACH errmsgloo IN errmsgloop %]
+                              [% IF ( errmsgloo.errbadcode ) %]
+                                  <li>No Item with barcode: [% errmsgloo.msg %]</li>
+                              [% END %]
+                              [% IF ( errmsgloo.errispermanent ) %]
+                                  <li>Please return item to home library: [% errmsgloo.msg %]</li>
+                              [% END %]
+                              [% IF ( errmsgloo.errnotallowed ) %]
+                                  <li>You cannot transfer items of [% errmsgloo.codeType %] <b>[% errmsgloo.code %]</b> to <b>[% errmsgloo.tbr %]</b></li>
+                              [% END %]
+                              [% IF ( errmsgloo.errdesteqholding ) %]
+                                  <li>Item is already at destination library.</li>
+                              [% END %]
+                              [% IF ( errmsgloo.errwasreturned ) %]
+                                  <li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.borrowernumber %]">
+                                  [% errmsgloo.firstname %] [% errmsgloo.surname %]
+                                  ([% errmsgloo.cardnumber %])</a> and has been returned.</li>
+                              [% END %]
+                          [% END %]
+                          </ul>
+                            </div>
+                        [% END %]
+
+<div id="branchtransfers">
     <form method="post" name="mainform" id="mainform" action="/cgi-bin/koha/circ/branchtransfers.pl">
         <fieldset class="brief">
             <legend>Transfer</legend>
             <input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
         [% END %]
     </form></div>
-        <div class="yui-u"><h4>Messages</h4>
-               <ul>
-                [% IF ( reqmessage ) %]
-                    [% IF ( cancelled ) %]
-                        <li>Reserve Cancelled</li>
-                    [% END %]
-                    [% IF ( setwaiting ) %]
-                        <li>Item should now be waiting at library: [% reqbrchname %]</li>
-                    [% END %]
-                [% END %]
-                [% FOREACH errmsgloo IN errmsgloop %]
-                    [% IF ( errmsgloo.errbadcode ) %]
-                        <li>No Item with barcode: [% errmsgloo.msg %]</li>
-                    [% END %]
-                    [% IF ( errmsgloo.errispermanent ) %]
-                        <li>Please return item to home library: [% errmsgloo.msg %]</li>
-                    [% END %]
-                    [% IF ( errmsgloo.errnotallowed ) %]
-                        <li>You cannot transfer items of [% errmsgloo.codeType %] <b>[% errmsgloo.code %]</b> to <b>[% errmsgloo.tbr %]</b></li>
-                    [% END %]
-                    [% IF ( errmsgloo.errdesteqholding ) %]
-                        <li>Item is already at destination library.</li>
-                    [% END %]
-                    [% IF ( errmsgloo.errwasreturned ) %]
-                        <li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.borrowernumber %]">
-[% errmsgloo.firstname %] [% errmsgloo.surname %]
-([% errmsgloo.cardnumber %])</a> and has been returned.</li>
-                    [% END %]
-                [% END %]
-        </ul>
-    </div><!-- /yui-u -->
-</div><!-- /yui-ge -->
-        
+</div>
+
     [% IF ( trsfitemloop ) %]
         <div class="yui-g">
                <table>
             <caption>Transferred Items</caption>
             <tr>
-                <th>Bar Code</th>
                 <th>Title</th>
+                <th>Author</th>
+                <th>Barcode</th>
+                <th>Shelving location</th>
+                <th>Call number</th>
+                <th>Type</th>
                 <th>To</th>
             </tr>
             [% FOREACH trsfitemloo IN trsfitemloop %]
                 <tr>
-                    <td>
-                        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber %]">[% trsfitemloo.barcode %]</a>
-                    </td>
-                    <td>
-                        <p>[% trsfitemloo.title |html %] ([% trsfitemloo.author %])</p>
-                        <p>[% trsfitemloo.ccode %]</p>
-                    </td>
+                    <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber %]">[% trsfitemloo.title |html %]</a></td>
+                    <td>[% trsfitemloo.author %]</td>
+                    <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.biblionumber %]&amp;itemnumber=[% trsfitemloo.itemnumber %]#item[% trsfitemloo.itemnumber %]">[% trsfitemloo.barcode %]</a></td>
+                    <td>[% trsfitemloo.location %]</td>
+                    <td>[% trsfitemloo.itemcallnumber %]</td>
+                    <td>[% trsfitemloo.ccode %]</td>
                     <td>[% trsfitemloo.tobrname %]</td>
                 </tr>
             [% END %]
index 5627109..1d0e07a 100644 (file)
                 $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
             }
         } ).attr( 'checked', false );
-        [% END %]
-               // listen submit to trigger qslip on empty checkout
-               $('#mainform').bind('submit',function() {
-                 if ($('#barcode').val() == '') {
-                   return printx_window('qslip'); }
-               });
+        [% END %][% IF ( CircAutoPrintQuickSlip ) %]
+        // listen submit to trigger qslip on empty checkout
+        $('#mainform').bind('submit',function() {
+          if ($('#barcode').val() == '') {
+            return printx_window('qslip'); }
+        });[% END %]
 
 
 var allcheckboxes = $(".checkboxed");
@@ -226,6 +226,13 @@ function refocus(calendar) {
 </div>
 
 [% IF ( dateexpiry ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
+
+[% IF additional_materials %]
+    <div id="materials" class="dialog message">Note about the accompanying materials: <br />
+    [% additional_materials %]
+    </div>
+[% END %]
+
 [% IF ( NEEDSCONFIRMATION ) %]
 <div class="yui-g">
 
@@ -565,12 +572,12 @@ No patron matched <span class="ex">[% message %]</span>
 
             [% IF ( userdebarred ) %]
                <li class="blocker">
-               <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %]
+               <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %] with the comment "[% debarredcomment %]"[% END %]
                <form class="inline compact" action="/cgi-bin/koha/members/setstatus.pl" method="post">
                        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
                        <input type="hidden" name="destination" value="circ" />
                        <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
-                       <input type="submit" value="Lift Debarment" />
+                       <input type="submit" value="Lift restriction" />
                </form>
                        </li>[% END %]
 
index eb0540e..e196399 100644 (file)
 <tbody>[% FOREACH overdueloo IN overdueloop %]
     <tr>
         <td>[% overdueloo.duedate %]</td>
-        <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overdueloo.borrowernumber %]">[% overdueloo.name %]</a>
+        <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overdueloo.borrowernumber %]">[% overdueloo.surname %] [% overdueloo.firstname %]</a>
         [% IF ( overdueloo.email ) %][<a href="mailto:[% overdueloo.email %]?subject=Overdue: [% overdueloo.title |html %]">email</a>][% END %]
         [% IF ( overdueloo.phone ) %]([% overdueloo.phone %])[% ELSIF ( overdueloo.mobile ) %]([% overdueloo.mobile %])[% ELSIF ( overdueloo.phonepro ) %]([% overdueloo.phonepro %])[% END %]</td>
         <td>[% overdueloo.branchcode %]</td>
index 70367ae..525e9b4 100644 (file)
@@ -54,8 +54,14 @@ function Dopop(link) {
 
 <div class="yui-g">
 
+[% IF additional_materials %]
+    <div class="dialog message" id="materials">Note about the accompanying materials: <br />
+    [% additional_materials %]
+    </div>
+[% END %]
+
 [% IF ( collectionItemNeedsTransferred ) %]
-       <div class="dialog message">This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]</div>
+       <div id="rotating-collection" class="dialog message">This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]</div>
 [% END %]
 
 <!-- Patron has fines -->
@@ -68,7 +74,7 @@ function Dopop(link) {
 
 <!-- Patron has waiting holds -->
 [% IF ( waiting_holds ) %]
-    <div class="dialog message">
+    <div id="awaiting-pickup" class="dialog message">
         <h3>[% holdsfirstname %] [% holdssurname %] has [% waiting_holds %] hold(s) waiting for pickup.</h3>
         <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Check out to this patron</a>.</p>
     </div>
@@ -80,7 +86,7 @@ function Dopop(link) {
 </div>
 [% END %]
 <!-- case of a mistake in transfer loop -->
-[% IF ( WrongTransfer ) %]<div class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %] or <a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1">Cancel Transfer</a></h3>
+[% IF ( WrongTransfer ) %]<div id="return2" class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %] or <a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1">Cancel Transfer</a></h3>
 [% IF ( wborcnum ) %]<h5>Hold for:</h5>
         <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
             [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
@@ -111,7 +117,7 @@ function Dopop(link) {
 <audio src="/intranet-tmpl/prog/sound/ending.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
 [% END %]
 
-<div class="dialog message">
+<div id="hold-found1" class="dialog message">
         <h3>Hold Found (item is already waiting):  <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
         <h4>Hold for:</h4>
@@ -153,7 +159,7 @@ function Dopop(link) {
         [% IF ( soundon ) %]
         <audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
         [% END %]
-        <div class="dialog message">
+        <div id="transfer-needed" class="dialog message">
                <h3>Hold needing transfer found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
                 <h4>Hold for: </h4>
                     <ul>
@@ -190,7 +196,7 @@ function Dopop(link) {
 
     [% IF ( transfer ) %]
     <!-- transfer: item with no reservation, must be returned to its homebranch -->
-       <div class="dialog message">
+       <div id="return1" class="dialog message">
             <h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title or "item" |html %]</a> to [% homebranchname %]</h3>
         </div>
         [% IF ( soundon ) %]
@@ -203,7 +209,7 @@ function Dopop(link) {
         [% IF ( soundon ) %]
         <audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
         [% END %]
-       <div class="dialog message"><h3> This item needs to be transferred to [% homebranchname %]</h3>
+       <div id="item-transfer" class="dialog message"><h3> This item needs to be transferred to [% homebranchname %]</h3>
        Transfer Now?<br />
     <form method="post" action="returns.pl" name="mainform" id="mainform">
        <input type="submit" name="dotransfer" value="Yes" class="submit" />
@@ -255,7 +261,7 @@ function Dopop(link) {
         <audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
         [% END %]
 
-       <div class="dialog message">
+       <div id="hold-found2" class="dialog message">
          <h3>Hold Found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
         <h5>Hold for:</h5>
index e54529a..8f0d9cb 100644 (file)
@@ -50,6 +50,7 @@ $(document).ready(function() {
         <th class="hq-patron">Patron</th>
         <th class="hq-sendto">Send To</th>
         <th class="hq-date">Date</th>
+        <th class="hq-notes">Notes</th>
     </tr>
        </thead>
      <tbody>[% FOREACH itemsloo IN itemsloop %]
@@ -75,6 +76,7 @@ $(document).ready(function() {
                        <td class="hq-patron"><p><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% itemsloo.cardnumber %]#reserves">[% itemsloo.surname %], [% itemsloo.firstname %] ([% itemsloo.cardnumber %])</a></p> <p>[% itemsloo.phone %]</p></td>
             <td class="hq-sendto">[% itemsloo.pickbranch %]</td>
             <td class="hq-date">[% itemsloo.reservedate %]</td>
+            <td class="hq-notes">[% itemsloo.notes %]</td>
         </tr>
     [% END %]</tbody>
     </table>
index c068da7..1925e69 100644 (file)
@@ -31,6 +31,7 @@
        <li>Check 'Allow password' to make it possible to associate a password with this attribute.</li>
        <li>Check 'Display in OPAC' to display this attribute on a patron's details page in the OPAC.</li>
        <li>Check 'Searchable' to make this attribute searchable in the staff patron search.</li>
+       <li>Check 'Display in check-out' to make this attribute visible in the patron's short detail display on the left of the checkout screen and other patron pages</li>
        <li>Authorized value category; if one is selected, the patron record input page will only allow values to be chosen from the authorized value list.
 <ul>
        <li>You will first need to add an authorized value list for it to appear in this menu</li>
index f61f5c1..fb91651 100644 (file)
@@ -22,6 +22,7 @@
        <li>Enter the identifying information regarding your patron
 <ul>
        <li>Required fields are defined in the BorrowerMandatoryField system preference</li>
+       <li>Unwanted fields are defined in the BorrowerUnwantedField system preference</li>
        <li>Salutation is populated by the BorrowersTitles system preference</li>
 </ul>
 </li>
index 54bd3f7..c31d1d6 100644 (file)
@@ -40,7 +40,7 @@
 </li>
 </ul>
 
-<p><strong>See the full documentation for the the Managing Staged MARC Records in the <a href="http://manual.koha-community.org/3.6/en/managestaged.html">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for the Managing Staged MARC Records in the <a href="http://manual.koha-community.org/3.6/en/managestaged.html">manual</a> (online).</strong></p>
 
 [% INCLUDE 'help-bottom.inc' %]
 
index 65e5a85..a1cb85b 100644 (file)
@@ -41,7 +41,7 @@
 
 <p>Sincerely, Library Staff</p>
 
-<p><strong>See the full documentation for the the Overdue Notice/Status Triggers in the <a href="http://manual.koha-community.org/3.6/en/noticetriggers.html">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for the Overdue Notice/Status Triggers in the <a href="http://manual.koha-community.org/3.6/en/noticetriggers.html">manual</a> (online).</strong></p>
 
 [% INCLUDE 'help-bottom.inc' %]
 
index a1e70de..e81d72d 100644 (file)
@@ -20,6 +20,6 @@
 
 <p style="color:#990000;">Important: There is a limit of 520K on the size of the picture uploaded and it is recommended that the image be 200x300 pixels, but smaller images will work as well.</p>
 
-<p><strong>See the full documentation for the the Patron Image Uploader in the <a href="http://manual.koha-community.org/3.6/en/uploadpatronimages.html">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for the Patron Image Uploader in the <a href="http://manual.koha-community.org/3.6/en/uploadpatronimages.html">manual</a> (online).</strong></p>
 
-[% INCLUDE 'help-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'help-bottom.inc' %]
index 55537b4..4626c21 100644 (file)
@@ -23,6 +23,6 @@
 
 <p>Task scheduler will not work if the user the web server runs as doesn't have the permission to use it. To find out if the right user has the permissions necessary, check /etc/at.allow to see what users are in it. If you don't have that file, check etc/at.deny. If at.deny exists but is blank, then every user can use it. Talk to your system admin about adding the user to the right place to make the task scheduler work.</p>
 
-<p><strong>See the full documentation for the the Task Scheduler in the <a href="http://manual.koha-community.org/3.6/en/taskscheduler.html">manual</a> (online).</strong></p>
+<p><strong>See the full documentation for the Task Scheduler in the <a href="http://manual.koha-community.org/3.6/en/taskscheduler.html">manual</a> (online).</strong></p>
 
-[% INCLUDE 'help-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'help-bottom.inc' %]
index dbc3736..52c52c6 100644 (file)
@@ -49,8 +49,8 @@ listed, please inform your systems administrator.</p>
   <p>I encountered some problems.</p>
    <ul>
     [% IF ( perlversion ) %]
-    <li>Your perl version seems to be obsolete.
-      Please upgrade to a newer version of Perl (at least Version 5.006001).</li>
+    <li>Your Perl version seems to be obsolete.
+      Please upgrade to a newer version of Perl (at least Version 5.10).</li>
     [% END %]
    </ul>
   [% END %]
index 0a2b20c..12861f6 100644 (file)
@@ -82,6 +82,7 @@
     [% END %]
        [% IF ( CAN_user_acquisition ) %]
        <h3><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></h3>
+    [% IF ( pendingsuggestions ) %]<ul><li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/suggestion/suggestion.pl">[% pendingsuggestions %]</a></span></li></ul>[% END %]
        [% END %]
     [% IF ( CAN_user_reports ) %]
     <h3><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></h3>
     [% END %]
     [% IF ( CAN_user_tools ) %] 
     <h3><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></h3>
+        [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) %]
+            <ul>
+                [% IF ( CAN_user_tools_moderate_comments && pendingcomments ) %]<li><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">[% pendingcomments %]</a></span></li>[% END %]
+                [% IF ( CAN_user_tools_moderate_tags && pendingtags ) %]<li><a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>: <span class="holdcount"><a href="/cgi-bin/koha/tags/review.pl">[% pendingtags %]</a></span></li>[% END %]
+            </ul>
+        [% END %]
     [% END %]
     <h3><a href="/cgi-bin/koha/about.pl">About Koha</a></h3>
        </div>
                </div><!-- /koha-news -->
        </div>
 [% END %]
-       
+
 </div>
+
 [% INCLUDE 'intranet-bottom.inc' %]
index 4bff548..f625220 100644 (file)
 
     </div>
 </div>
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/javascript">//<![CDATA[
-$(document).ready(function() {
-       $("#memberresultst").tablesorter({
-               sortList: [[1,0]],
-               widgets:        ['zebra']
-       });
-});
-//]]>
-</script>
 [% INCLUDE 'intranet-bottom.inc' %]
index b9371b6..02d39f5 100644 (file)
 [% END %]
 
 [% IF ( step_1 ) %]
+[%UNLESS notitle && nosurname && nofirstname && nodateofbirth && noinitials && noothernames &&nosex %]
        <fieldset class="rows" id="memberentry_identity">
                <legend>[% IF ( I ) %]Organization [% ELSE %]Patron [% END %]identity</legend>
                <ol>
                [% UNLESS ( I ) %]
+        [% UNLESS notitle %]
                [% IF ( title_cgipopup ) %]
             <li>
             [% IF ( mandatorytitle ) %]
             </li>
                [% END %]
         [% END %]
+               [% END %]
+        [% UNLESS nosurname %]
                <li>
                [% IF ( mandatorysurname ) %]
                <label for="surname" class="required">
                [% END %]
                [% IF ( mandatorysurname ) %]<span class="required">Required</span>[% END %]
                </li>
+        [% END %]
                [% UNLESS ( I ) %]
+        [% UNLESS nofirstname %]
             <li>
                 [% IF ( mandatoryfirstname ) %]
                 <label for="firstname" class="required">
                 <input type="text" id="firstname" name="firstname" size="20"  value="[% IF ( opduplicate ) %][% ELSE %][% firstname %][% END %]" />
                 [% IF ( mandatoryfirstname ) %]<span class="required">Required</span>[% END %]
             </li>
+        [% END %]
+        [% UNLESS nodateofbirth %]
             <li>
                 [% IF ( mandatorydateofbirth ) %]
                 <label for="dateofbirth" class="required">
         [% IF ( ERROR_dateofbirth ) %]<span class="required">(Error)</span>[% END %]
                <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
             </li>
+        [% END %]
+        [% UNLESS noinitials %]
             <li>
                 [% IF ( mandatoryinitials ) %]
                     <label for="initials" class="required">
                 [% IF ( mandatoryinitials ) %]<span class="required">Required</span>[% END %]
             </li>
         [% END %]
+        [% END %]
+        [% UNLESS noothernames %]
                <li>
                        [% IF ( mandatoryothernames ) %]
                        <label for="othernames" class="required">
 [% IF ( mandatoryothernames ) %]<span class="required">Required</span>[% END %]
                [% IF ( I ) %]<input type="hidden" name="sex" value="N" />[% END %]
                </li>
+        [% END %]
     [% UNLESS ( I ) %]
+        [% UNLESS nosex %]
                <li class="radio">
                
                [% IF ( female ) %]
                                <label for="sex-none">N/A </label><input type="radio" name="sex" id="sex-none" value="" />
 [% END %]
                </li>
+        [% END %]
     [% END %]
                </ol>
        </fieldset>
+[% END # hide fieldset %]
        
 [% IF ( showguarantor ) %]<input type="hidden" id="guarantorid" name="guarantorid"   value="[% guarantorid %]" />
     <fieldset class="rows">
  [% END %]
      <span class="label">Patron #:</span> [% IF ( guarantorid ) %] <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorid %]" target="blank">[% guarantorid %]</a>[% END %]
  </li>
+        [% UNLESS nocontactname %]
  <li>
      <label for="contactname">Surname: </label>
      [% IF ( guarantorid ) %]
                [% END %]
      [% END %]
  </li>
+        [% END %]
+        [% UNLESS nocontactfirstname %]
  <li>
      <label for="contactfirstname">First name: </label>
      [% IF ( guarantorid ) %]
             [% END %]
      [% END %]
  </li>
+        [% END %]
  [% IF ( relshiploop ) %]
  <li>
      <label for="relationship">Relationship: </label>
     </fieldset>
 
 [% END %]
+[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
 <fieldset class="rows">
     <legend>Main address</legend><ol>
+        [% UNLESS nostreetnumber %]
     <li>
       [% IF ( mandatorystreetnumber ) %]
       <label for="streetnumber" class="required">
       [% END %]
 [% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
     </li>
+        [% END %]
+        [% UNLESS nostreettype %]
     [% IF ( road_cgipopup ) %]
       <li>
       [% IF ( mandatorystreettype ) %]
          [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %]
       </li>
     [% END %] 
+        [% END %]
+        [% UNLESS noaddress %]
     <li>
       [% IF ( mandatoryaddress ) %]
       <label for="address" class="required">
       [% END %]
          [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
     </li>
+        [% END %]
+        [% UNLESS noaddress2 %]
     <li>
       [% IF ( mandatoryaddress2 ) %]
       <label for="address2" class="required">
       [% END %]
          [% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %]
     </li>  
+        [% END %]
+        [% UNLESS nocity %]
     <li>
       [% IF ( mandatorycity ) %]
         <label for="city" class="required">
         [% END %]
          [% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %]
     </li>
+        [% END %]
+        [% UNLESS nostate %]
     <li> 
       [% IF ( mandatorystate ) %]
         <label for="state" class="required">
       <input type="text" name="state" id="state" size="20" value="[% state %]" />
          [% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %]
     </li>
+        [% END %]
+        [% UNLESS nozipcode %]
     <li> 
       [% IF ( mandatoryzipcode ) %]
         <label for="zipcode" class="required">
       [% END %]
          [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
     </li>
-    
+        [% END %]
+        [% UNLESS nocountry %]
     <li> 
       [% IF ( mandatorycountry ) %]
         <label for="country" class="required">
       [% END %]
          [% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %]
     </li>    
-  
+        [% END %]
        </ol>
     </fieldset>
+[% END # nostreet && nocity etc group%]
+
+[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
   <fieldset class="rows" id="memberentry_contact">
     <legend>Contact</legend><ol>
+        [% UNLESS nophone %]
       <li>
       [% IF ( mandatoryphone ) %] 
       <label for="phone" class="required">
          [% IF ( mandatoryphone ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
 
     </li>
+        [% END %]
+        [% UNLESS nophonepro %]
     <li>
       [% IF ( mandatoryphonepro ) %]
       <label for="phonepro" class="required">
       [% END %]
          [% IF ( mandatoryphonepro ) %]<span class="required">Required</span>[% END %]
     </li>
+        [% END %]
+        [% UNLESS nomobile %]
     <li>
       [% IF ( mandatorymobile ) %]
       <label for="mobile" class="required">
       [% END %]
          [% IF ( mandatorymobile ) %]<span class="required">Required</span>[% END %]
     </li>
+        [% END %]
+        [% UNLESS noemail %]
     <li>
       [% IF ( mandatoryemail ) %]
       <label for="email" class="required">
          [% IF ( mandatoryemail ) %]<span class="required">Required</span>[% END %]<div class="hint">Shows on transit slips</div>
 
     </li>
+        [% END %]
+        [% UNLESS noemailpro %]
     <li>
       [% IF ( mandatoryemailpro ) %] 
       <label for="emailpro" class="required">
       [% END %]
          [% IF ( mandatoryemailpro ) %]<span class="required">Required</span>[% END %]
     </li>
+        [% END %]
+        [% UNLESS nofax %]
     <li>
       [% IF ( mandatoryfax ) %]
       <label for="fax" class="required">
       [% END %]
          [% IF ( mandatoryfax ) %]<span class="required">Required</span>[% END %]
     </li>
+        [% END %]
        </ol>
   </fieldset>
-
+[%END # hide fieldset %]
 
 <!-- ************************ STEP_1 *********************** -->
 [% END %]
 [% IF ( step_6 ) %]
 
+    [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
                <fieldset class="rows" id="memberentry_address">
                <legend>Alternate address</legend><ol>
+        [% UNLESS noB_address %]
                        <li>
                                [% IF ( mandatoryB_address ) %]
                                        <label for="B_address" class="required">
                                [% END %]
          [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noB_address2 %]
                        <li>
                                [% IF ( mandatoryB_address2 ) %]
                                        <label for="B_address2" class="required">
                                [% END %]
          [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noB_city %]
                        <li>
                                [% IF ( mandatoryB_city ) %]
                                        <label for="B_city" class="required" >
                                <input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" />
          [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noB_state %]
                        <li>
                                [% IF ( mandatoryB_state ) %]
                                        <label for="B_state" class="required" >
                                <input type="text" id="B_state" name="B_state" size="20" value="[% B_state %]" />
          [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noB_zipcode %]
                        <li>
                                [% IF ( mandatoryB_zipcode ) %]
                                        <label for="B_zipcode" class="required">
                                [% END %]
          [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noB_country %]
                        <li>
                                [% IF ( mandatoryB_country ) %]
                                        <label for="B_country" class="required">
                                [% END %]
          [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noB_phone %]
             <li>
                 [% IF ( mandatoryB_phone ) %]
                 <label for="B_phone" class="required">
                 [% END %]
                 [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %]
             </li>
+        [% END %]
+        [% UNLESS noB_email %]
                        <li> 
         [% IF ( mandatoryB_email ) %]
           <label for="B_email" class="required">
                        <input type="text" id="B_email" name="B_email" size="45" value="[% B_email %]" />
                [% END %]
                [% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
+        [% END %]
+        [% UNLESS nocontactnote %]
             <li>
                 [% IF ( mandatorycontactnote ) %]
                 <label for="contactnote" class="required">
                 <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% contactnote %]</textarea>
         [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
             </li>
+        [% END %]
                        </ol>
                </fieldset>
+    [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
 [% END %]              
 [% IF ( step_2 ) %]
+    [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
                <fieldset class="rows" id="memberentry_altaddress">       
                    <legend>Alternate Contact</legend><ol>
+        [% UNLESS noaltcontactsurname %]
                        <li>
                            [% IF ( mandatoryaltcontactsurname ) %]
                                <label for="altcontactsurname" class="required">
                                [% END %]
                                [% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noaltcontactfirstname %]
                        <li>
                            [% IF ( mandatoryaltcontactfirstname ) %]
                                <label for="altcontactfirstname" class="required">
                                [% END %]
                                [% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noaltcontactaddress1 %]
                        <li>
                            [% IF ( mandatoryaltcontactaddress1 ) %]
                                <label for="altcontactaddress1" class="required">
                                [% END %]
                                [% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noaltcontactaddress2 %]
                        <li>
                            [% IF ( mandatoryaltcontactaddress2 ) %]
                                <label for="altcontactaddress2" class="required">
                                [% END %]
                                [% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noaltcontactaddress3 %]
                        <li>
                            [% IF ( mandatoryaltcontactaddress3 ) %]
                                <label for="altcontactaddress3" class="required">
                                <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" />
                                [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noaltcontactstate %]
                        <li>
                            [% IF ( mandatoryaltcontactstate ) %]
                                <label for="altcontactstate" class="required">
                                <input type="text" name="altcontactstate" id="altcontactstate" value="[% altcontactstate %]" size="20" />
                                [% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noaltcontactzipcode %]
                        <li>
                            [% IF ( mandatoryaltcontactzipcode ) %]
                                <label for="altcontactzipcode" class="required">
                                [% END %]
                                [% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
+        [% UNLESS noaltcontactcountry %]
                        <li>
                            [% IF ( mandatoryaltcontactcountry ) %]
                                <label for="altcontactcountry" class="required">
                                [% END %]
                                [% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %]
                        </li>                   
+        [% END %]
+        [% UNLESS noaltcontactphone %]
                        <li>
                            [% IF ( mandatoryaltcontactphone ) %]
                                <label for="altcontactphone" class="required">
                                [% END %]
                                [% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %]
                        </li>
+        [% END %]
             </ol>
         </fieldset>
+    [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
 
 [% END %]
 [% IF ( step_3 ) %]
 
   <fieldset class="rows" id="memberentry_library_management">
     <legend>Library Management</legend><ol>
+        [% UNLESS nocardnumber %]
    <li> [% IF ( mandatorycardnumber ) %]
       <label for="cardnumber" class="required">
     [% ELSE %]
                <input type="text" id="cardnumber" name="cardnumber" size="20" value="[% cardnumber %]" />
     [% END %]
          [% IF ( mandatorycardnumber ) %]<span class="required">Required</span>[% END %]</li>
+        [% END %]
+        [% UNLESS nobranchcode %]
     <li>
       [% IF ( mandatorybranchcode ) %]
         <label for="branchcode" class="required">
       [% CGIbranch %]
          [% IF ( mandatorybranchcode ) %]<span class="required">Required</span>[% END %]
     </li>
+        [% END %]
     <li>
         <label for="categorycode">Category: </label>
         <select id="categorycode" name="categorycode">
        [% END %]
        </select>
     </li>
+        [% UNLESS nosort1 %]
     <li>
       [% IF ( mandatorysort1 ) %]
         <label for="sort1" class="required">
          [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
       [% END %]   
     </li>
+        [% END %]
+        [% UNLESS nosort2 %]
     <li>
     [% IF ( mandatorysort2 ) %]
     <label for="sort2" class="required">
          [% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
     [% END %] 
     </li>
+        [% END %]
        </ol>
   </fieldset>
+    [% UNLESS nodateenrolled && nodateexpiry &&  noopacnote && noborrowernotes %]
        <fieldset class="rows" id="memberentry_subscription">
        <legend>Library set-up</legend><ol>
+        [% UNLESS nodateenrolled %]
                <li>
                        [% IF ( mandatorydateenrolled ) %]
                        <label for="dateenrolled" class="required">
                [% IF ( ERROR_dateenrolled ) %]<span class="required">(Error)</span>[% END %]
                <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
                </li>
+        [% END %]
+        [% UNLESS nodateexpiry %]
                <li>
                        [% IF ( mandatorydateexpiry ) %]
                        <label for="dateexpiry" class="required">
                [% IF ( ERROR_dateexpiry ) %]<span class="required">(Error)</span>[% END %]
                <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
                </li>
+        [% END %]
+        [% UNLESS noopacnote %]
                <li>
                        [% IF ( mandatoryopacnote ) %]
                                <label for="opacnote" class="required">
                        <div class="hint">This message appears on this patron's user page in the OPAC</div>
          [% IF ( mandatoryopacnote ) %]<span class="required">Required</span>[% END %]
                </li>
+        [% END %]
+        [% UNLESS noborrowernotes %]
                <li>
                        [% IF ( mandatoryborrowernotes ) %]     
                                <label for="borrowernotes" class="required">
                        <div class="hint">This message displays when checking out to this patron</div>
          [% IF ( mandatoryborrowernotes ) %]<span class="required">Required</span>[% END %]
                </li>
+        [% END %]
                </ol>
        </fieldset>
+    [% END # hide fieldset %]
+
+    [% UNLESS nouserid && nopassword %]
        <fieldset class="rows" id="memberentry_userid">
                <legend>OPAC/Staff Login</legend><ol>
+        [% UNLESS nouserid %]
                <li>
                        [% IF ( mandatoryuserid ) %]
                        <label for="userid" class="required">
 
          [% IF ( mandatoryuserid ) %]<span class="required">Required</span>[% END %]
                </li>
+        [%END %]
+        [% UNLESS nopassword %]
                <li>
                        [% IF ( mandatorypassword ) %]
                        <label for="password" class="required">
                        [% END %]
          [% IF ( mandatorypassword ) %]<span class="required">Required</span>[% END %][% IF ( ERROR_short_password ) %]<span class="required">Password is too short</span>[% END %]
 [% IF ( minPasswordLength ) %]<div class="hint">Minimum password length: [% minPasswordLength %]</div>[% END %]
-               </li></ol>
+               </li>
+        [% END %]
+    </ol>
                </fieldset>
+        [% END # hide fieldset %]
                <!--this zones are not necessary in modif mode -->
                [% UNLESS ( opadd ) %]
                <fieldset class="rows">
             </li>
                        [% END %]
                        <li>
-                               <label for="yesdebarred" class="radio">Debarred: </label>
+                               <label for="yesdebarred" class="radio">Restricted: </label>
                                [% IF ( debarred ) %]
                                <label for="yesdebarred">Yes </label>
                                <input type="radio" id="yesdebarred" name="debarred" value="1" checked="checked"/>
index 454032c..c3d7063 100644 (file)
@@ -168,7 +168,7 @@ function validate1(date) {
             <li>Patron is restricted[% IF ( userdebarreddate ) %] until [% userdebarreddate%] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %][% END %]
             <form class="inline compact" action="/cgi-bin/koha/members/setdebar.pl" method="post">
                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
-                <input type="submit" value="Lift Debarment" />
+                <input type="submit" value="Lift Restriction" />
             </form>
             </li>
         [% END %]
@@ -215,11 +215,11 @@ function validate1(date) {
         [% IF ( email ) %]<li><span class="label">Primary email:</span><a href="mailto:[% email %]">[% email %]</a></li>[% END %]
         [% IF ( emailpro ) %]<li><span class="label">Secondary email: </span><a href="mailto:[% emailpro %]">[% emailpro %]</a></li>[% END %]
     [% END %]
-    <li><span class="label">Initials: </span>[% initials %]</li>
-    <li><span class="label">Date of birth:</span>[% dateofbirth %]</li>
-    <li><span class="label">Gender:</span>
+    [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %]
+    [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth %]</li>[% END %]
+    [% IF ( sex ) %]<li><span class="label">Gender:</span>
     [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]
-    </li>[% END %]
+    </li>[% END %][% END %]
     [% IF ( printethnicityline ) %]
     <li><span class="label">Ethnicity:</span>[% ethnicity %]</li>
     <li><span class="label">Ethnicity notes: </span>[% ethnotes %]</li>
@@ -369,9 +369,9 @@ function validate1(date) {
       <li><span class="label">City: </span>[% B_city %]</li>
       [% IF ( B_state ) %]<li><span class="label">State: </span>[% B_state %]</li>[% END %]
       <li><span class="label">Zip/Postal Code: </span>[% B_zipcode %]</li>
-      <li><span class="label">Country: </span>[% B_country %]</li>
+      [% IF ( B_country ) %]<li><span class="label">Country: </span>[% B_country %]</li>[% END %]
       [% IF ( B_phone ) %]<li><span class="label">Phone: </span>[% B_phone %]</li>[% END %]
-      [% IF ( B_email ) %]<li><span class="label">Email: </span>[% B_email %]</li>[% END %]</ol></div>
+      [% IF ( B_email ) %]<li><span class="label">Email: </span><a href="mailto:[% B_email %]">[% email %]</a></li>[% END %]</ol></div>
 </div>
 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=6">Edit</a></div>
     [% END %]
@@ -383,10 +383,11 @@ function validate1(date) {
     <li><span class="label">Address: </span>[% altcontactaddress1 %]</li>
     <li><span class="label">Address 2: </span>[% altcontactaddress2 %]</li>
        <li><span class="label">City: </span>[% altcontactaddress3 %]</li>
-        [% IF ( altcontactstate ) %]<li><span class="label">State: </span>[% altcontactstate %]</li>[% END %]
+    [% IF ( altcontactstate ) %]<li><span class="label">State: </span>[% altcontactstate %]</li>[% END %]
        <li><span class="label">Zip/Postal Code: </span>[% altcontactzipcode %]</li>
-       <li><span class="label">Country: </span>[% altcontactcountry %]</li>
-    <li><span class="label">Phone: </span>[% altcontactphone %]</li></ol></div>
+       [% IF ( altcontactcountry ) %]<li><span class="label">Country: </span>[% altcontactcountry %]</li>[% END %]
+    [% IF ( altcontactphone ) %]<li><span class="label">Phone: </span>[% altcontactphone %]</li>[% END %]
+    </ol></div>
 </div>
 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=2">Edit</a></div>
 
index 48ad8a3..d751fc0 100644 (file)
                        </tr>
                                [% IF ( looptable.looprow ) %]
                                [% FOREACH loopro IN looptable.looprow %]
-                    [% UNLESS ( loop.odd ) %]<tr class="highlight">
-                    [% ELSE %]<tr>[% END %]
+                               [% DEFAULT
+                                   loopro.itemcallnumber="No Call Number"
+                                   loopro.barcode="No Barcode"
+                                   loopro.title="NO TITLE"
+                                   loopro.author=""
+                               %]
+                                   [% UNLESS ( loop.odd ) %]<tr class="highlight">
+                                   [% ELSE %]<tr>[% END %]
+                   
                                                <td>[% loop.count %]</td>
-                                               <td>[% DEFAULT loopro.itemcallnumber="No Call Number" %]</td>
-                                               <td>[% DEFAULT loopro.barcode="No Barcode" %]</td>
-                                               <td><p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.biblionumber %]">[% DEFAULT loopro.title="NO TITLE" %]</a></p>
-                                                       [% DEFAULT loopro.author="" %]
+                                               <td>[% loopro.itemcallnumber %]</td>
+                                               <td>[% loopro.barcode %]</td>
+                                               <td><p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.biblionumber %]">[% loopro.title %]</a></p>
+                                                       [% loopro.author %]
                                                        [% IF ( loopro.branch ) %]at [% loopro.branch %][% END %]
                                                </td>
                                        </tr>
index 65fa34e..26199e6 100644 (file)
@@ -1,12 +1,20 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Reports &rsaquo; Item Types</title>
+<title>Koha &rsaquo; Reports &rsaquo; Catalog by Item Types</title>
 [% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
+//<![CDATA[
+$(document).ready(function() {
+       $("#itemtypest").tablesorter();
+});
+//]]>
+</script>
 </head>
 <body>
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( do_it ) %] &rsaquo; <a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Item Types</a> &rsaquo; Results[% ELSE %] &rsaquo; Item Types[% END %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( do_it ) %] &rsaquo; <a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Catalog by Item Type</a> &rsaquo; Results[% ELSE %] &rsaquo; Catalog by Item Type[% END %]</div>
 
 <div id="doc3" class="yui-t2">
    
 
 [% IF ( do_it ) %]
 [% FOREACH mainloo IN mainloop %]
-       <h1>Reports on item types [% IF ( mainloo.branch ) %] for branch = [% mainloo.branch %][% END %]</h1>
-       <table>
+       <h1>Reports on item types [% IF ( mainloo.branchname ) %] held at [% mainloo.branchname %][% END %]</h1>
+       <table id="itemtypest">
+               <thead>
                <tr>
                        <th>Item type</th>
-                       <th>count</th>
+                       <th>Count</th>
                </tr>
+               </thead>
+               <tfoot>
+                       <tr>
+                               <th>TOTAL</th>
+                               <th>[% mainloo.total %]</th>
+                       </tr>
+               </tfoot>
+               <tbody>
                        [% FOREACH loopitemtyp IN mainloo.loopitemtype %]
                                <tr>
                                        <td>[% loopitemtyp.itemtype %]</td>
                                        <td>[% loopitemtyp.count %]</td>
                                </tr>
                        [% END %]
-                       <tr>
-                               <th>TOTAL</th>
-                               <th>[% mainloo.total %]</th>
-                       </tr>
+               </tbody>
        </table>
 [% END %]
 [% ELSE %]
-
+       <h3>View a count of items held at your library grouped by item type</h3>
        <form method="post" action="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">
-               <fieldset class="rows"><legend>View catalog group by item types</legend><ol><li><label for="value">Select a branch</label> [% CGIbranch %]
-               <span class="tip">Select none to see all branches</span></li></ol></fieldset>
+               <fieldset class="rows"><ol><li><label for="value">Select a library</label> [% CGIbranch %]
+               <span class="tip">Select none to see all libraries</span></li></ol></fieldset>
                <fieldset class="action"><input type="submit" value="Submit" />
                <input type="hidden" name="report_name" value="[% report_name %]" />
                <input type="hidden" name="do_it" value="1" /></fieldset>
index 3d7bb22..a1dabbd 100644 (file)
@@ -1,29 +1,13 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Tools &rsaquo; Comments waiting for Approval</title>
+<title>Koha &rsaquo; Tools &rsaquo; Comments &rsaquo; [% IF ( status ) %] Approved comments[% ELSE %] Comments awaiting moderation[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/javascript">//<![CDATA[
-$(document).ready(function() {
-$.tablesorter.addParser({
-    id: 'articles', 
-    is: function(s) {return false;  }, 
-    format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
-    type: 'text' 
-});
-       $("#commentst").tablesorter({
-               sortList: [[0,0]],
-               headers: { 1: {sorter: 'articles'},2: { sorter: false },3: { sorter: false }}
-       }); 
-}); 
-//]]>
-</script>
 </head>
 <body>
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cat-search.inc' %]
 
 <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; Comments Awaiting Moderation</div>
+&rsaquo; <a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a> &rsaquo;[% IF ( status ) %] Approved comments[% ELSE %] Comments awaiting moderation[% END %]</div>
 
 <div id="doc3" class="yui-t2">
    
@@ -33,6 +17,14 @@ $.tablesorter.addParser({
 
 <h1>Comments</h1>
 
+<!-- The manual invoice and credit buttons -->
+<div class="toptabs">
+<ul class="ui-tabs-nav">
+    [% IF ( status ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?status=1">Approved comments</a></li>
+    [% IF ( status ) %]<li>[% ELSE %]<li class="ui-tabs-selected">[% END %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl" >Comments awaiting moderation</a></li>
+</ul>
+<div class="tabs-container">
+
 [% IF ( reviews ) %]
 <table id="commentst">
     <thead><tr>
@@ -61,15 +53,18 @@ $.tablesorter.addParser({
             [% review.review |html %]
         </td>
         <td>
-            <a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&amp;reviewid=[% review.reviewid %]">Approve</a> |
+            [% IF ( status ) %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=unapprove&amp;reviewid=[% review.reviewid %]">Unapprove</a>[% ELSE %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&amp;reviewid=[% review.reviewid %]">Approve</a>[% END %] |
             <a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=delete&amp;reviewid=[% review.reviewid %]">Delete</a>
         </td>
     </tr>
     [% END %]</tbody>
 </table>
+ <div class="pages">[% pagination_bar %]</div>
 [% ELSE %]
-<b>No comments to moderate</b>
+[% IF ( status ) %]<p><b>No comments have been approved.</b></p>[% ELSE %]<p><b>No comments to moderate.</b></p>[% END %]
 [% END %]
+</div>
+</div>
 
 </div>
 </div>
index bd52497..3777f47 100644 (file)
@@ -71,7 +71,7 @@ $(document).ready(function() {
 
 [% IF ( subscriptions ) %]
 <table>
-[% IF ( onesubscription ) %]
+[% IF ( subscriptions.size == 1 ) %]
 <caption> Subscription Summary</caption>
 [% ELSE %]
 <caption> Subscription Summaries</caption>
@@ -161,9 +161,10 @@ $(document).ready(function() {
       </tr>
 [% END %]
 [% IF ( subscr ) %]
-[% UNLESS ( onesubscription ) %]
-<tr ><td colspan="7">  <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
-</tr>[% END %]
+[% IF ( subscriptioncount > 1 ) %]
+<tr ><td colspan="8">  <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
+</tr>
+[% END %]
 [% END %]
 </table>
 [% END %]
@@ -181,9 +182,9 @@ $(document).ready(function() {
 
  [% FOREACH year IN years %]
 <div id="subscription-year-[% year.year %]">
-        <table style="width:400px;">
+        <table>
          <tr>
-[% UNLESS ( year.onesubscription ) %]
+[% IF ( subscriptions.size > 1 ) %]
                 <th># Subs</th>
 [% END %]
                 <th>Date published
@@ -205,7 +206,7 @@ $(document).ready(function() {
             </tr>
       [% FOREACH serial IN year.serials %]
     [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
-[% UNLESS ( serial.onesubscription ) %]
+[% IF ( subscriptions.size > 1 ) %]
                  <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid %]">[% serial.subscriptionid %]</a></td>
 [% END %]
                 <td>
index 7753fd3..fb310d5 100644 (file)
@@ -99,9 +99,7 @@ Serials updated :
                 [% 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">[% IF ( subscription.title ) %][% subscription.title |html %][% ELSE %]
-                    ---
-                [% END %]</a>
+                <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 %]
index b308896..5301ce3 100644 (file)
@@ -1115,12 +1115,12 @@ $(document).ready(function() {
         <li>
            <label for="acqui_date"> First issue publication date:</label>
                 [% UNLESS ( modify ) %]<img src="[% themelang %]/lib/calendar/cal.gif" id="acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />[% END %]
-                [% IF ( modify ) %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" disabled="disabled" style="border-width: 0px;"  />
-                [% ELSE %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" style="border-width: 0px;"  />[% END %]
+                [% IF ( modify ) %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" disabled="disabled" />
+                [% ELSE %]<input type="text" name="firstacquidate" value="[% firstacquidate %]"  size="13" maxlength="10" id="acqui_date" />[% END %]
         </li>
            [% IF ( modify ) %]<li><label for="next_acqui_date"> Next issue publication date:</label>
                 <img src="[% themelang %]/lib/calendar/cal.gif" id="next_acqui_button" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
-                <input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" style="border-width: 0px;"  />
+                <input type="text" name="nextacquidate" value="[% nextacquidate %]" size="13" maxlength="10" id="next_acqui_date" />
                 </li>[% END %]
                 
         <li><!-- both scripts for calendar must follow the input field --> 
@@ -1307,7 +1307,7 @@ $(document).ready(function() {
            <label for="beginning_date" class="required"> Subscription start date:</label>
             
                 <img src="[% themelang %]/lib/calendar/cal.gif" id="button1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
-                <input type="text" name="startdate" value="[% startdate %]" size="13" maxlength="10" id="beginning_date" style="border-width: 0px;" />
+                <input type="text" name="startdate" value="[% startdate %]" size="13" maxlength="10" id="beginning_date" />
                 <!-- both scripts for calendar must follow the input field --> 
                 <script type="text/javascript">
                     Calendar.setup({
@@ -1340,7 +1340,7 @@ $(document).ready(function() {
            <label for="ending_date"> Subscription end date:</label>
             
                 <img src="[% themelang %]/lib/calendar/cal.gif" id="buttonend1" style="cursor: pointer;" alt="Show Calendar" title="Show Calendar" />
-                <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="ending_date" style="border-width: 0px;" />
+                <input type="text" name="enddate" value="[% enddate %]" size="13" maxlength="10" id="ending_date" />
                 <!-- both scripts for calendar must follow the input field --> 
                 <script type="text/javascript">
                     Calendar.setup({
index ac867fe..19b2309 100644 (file)
                $("a.helptext").click(function(){
                        $(this).parent().find(".hint").toggle(); return false;
                });
+               $("#dateofrange").each(function () { this.value = "" });
        });
 //]]>
 </script>
                                <input type="hidden" id="newBranchName" name="newBranchName" />
                        </li>
                        <li>
-                               <strong>Date:</strong>
+                               <strong>From Date:</strong>
                                <span id="newDaynameOutput"></span>, 
 
                                [% IF ( dateformat_us ) %]<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span>[% ELSIF ( dateformat_metric ) %]<span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span>[% ELSE %]<span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>[% END %]
                                <input type="hidden" id="newMonth" name="newMonth" />
                                <input type="hidden" id="newYear" name="newYear" />
                        </li>
+                       <li class="dateinsert">
+                               <b>To Date : </b>
+                               <input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange %]" />
+                               <img src="[% themelang %]/lib/calendar/cal.gif" id="dateofrange_button" alt="Show Calendar" />
+                               <script language="JavaScript" type="text/javascript">
+                               Calendar.setup(
+                                       {
+                                       inputField : "dateofrange",
+                                       ifFormat : "[% DHTMLcalendar_dateformat %]",
+                                       button : "dateofrange_button"
+                                       }
+                               );
+                               </script>
+                       </li>
                        <li><label for="title">Title: </label><input type="text" name="newTitle" id="title" size="35" /></li>
                        <li><label for="newDescription">Description:</label>
                                <textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
                                                        <a href="#" class="helptext">[?]</a>
                                                        <div class="hint">This will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.</div>
                                                        </li>
+            <li class="radio"><input type="radio" name="newOperation" id="newOperationField" value="holidayrange" />
+                            <label for="newOperationField">Holidays on a range</label>.
+                            <a href="#" class="helptext">[?]</a>
+                            <div class="hint">Make a single holiday on a range. For example, selecting August 1st, 2012  and August 10st, 2012 will make all days between 1st and 10st holiday, but will not affect August 1st-10st in other years.</div>
+                            </li>
+            <li class="radio"><input type="radio" name="newOperation" id="newOperationFieldyear" value="holidayrangerepeat" />
+                            <label for="newOperationFieldyear">Holidays repeated yearly on a range</label>.
+                            <a href="#" class="helptext">[?]</a>
+                            <div class="hint">Make a single holiday on a range repeated yearly. For example, selecting August 1st, 2012  and August 10st, 2012 will make all days between 1st and 10st holiday, and will affect August 1st-10st in other years.</div>
+                            </li>
                                <li class="radio">
                                <input type="checkbox" name="allBranches" id="allBranches" />
                                <label for="allBranches">Copy to all libraries</label>.
        var day_month_holidays = new Array();
        var hola= "[% code %]";
        [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
-       week_days["[% WEEK_DAYS_LOO.KEY %]"] = {title:"[% WEEK_DAYS_LOO.TITLE %]", description:"[% WEEK_DAYS_LOO.DESCRIPTION %]"};
+       week_days["[% WEEK_DAYS_LOO.KEY %]"] = {title:"[% WEEK_DAYS_LOO.TITLE | replace('"','\"') %]", description:"[% WEEK_DAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
        [% END %]
        [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
-       holidays["[% HOLIDAYS_LOO.KEY %]"] = {title:"[% HOLIDAYS_LOO.TITLE %]", description:"[% HOLIDAYS_LOO.DESCRIPTION %]"};
+       holidays["[% HOLIDAYS_LOO.KEY %]"] = {title:"[% HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
        [% END %]
        [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
-       exception_holidays["[% EXCEPTION_HOLIDAYS_LOO.KEY %]"] = {title:"[% EXCEPTION_HOLIDAYS_LOO.TITLE %]", description:"[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION %]"};
+       exception_holidays["[% EXCEPTION_HOLIDAYS_LOO.KEY %]"] = {title:"[% EXCEPTION_HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
        [% END %]
        [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
-       day_month_holidays["[% DAY_MONTH_HOLIDAYS_LOO.KEY %]"] = {title:"[% DAY_MONTH_HOLIDAYS_LOO.TITLE %]", description:"[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION %]"};
+       day_month_holidays["[% DAY_MONTH_HOLIDAYS_LOO.KEY %]"] = {title:"[% DAY_MONTH_HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
        [% END %]
 
        /* This function gives css clases to each kind of day */
index fc6db51..0f9568e 100644 (file)
@@ -94,7 +94,7 @@ function CheckForm(f) {
        </li>
        <li>
                <label for="encoding">Character encoding: </label>
-            <select name="encoding" id="encoding"><option value="" selected="selected">Default</option><option value="utf8">UTF-8</option><option value="MARC-8">MARC 8</option><option value="ISO_5426">ISO 5426</option><option value="ISO_6937">ISO 6937</option><option value=ISO_8859-1">ISO 8859-1</option><option value="EUC-KR">EUC-KR</option></select>
+            <select name="encoding" id="encoding"><option value="utf8" selected="selected">UTF-8 (Default)</option><option value="MARC-8">MARC 8</option><option value="ISO_5426">ISO 5426</option><option value="ISO_6937">ISO 6937</option><option value=ISO_8859-1">ISO 8859-1</option><option value="EUC-KR">EUC-KR</option></select>
        </li>
 </ol></fieldset>
   <fieldset class="rows">
index 10f1d6d..05bdb47 100644 (file)
@@ -16,8 +16,8 @@
 <h3>Patrons and circulation</h3>
 <dl>
     [% IF ( CAN_user_tools_moderate_comments ) %]
-    <dt><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a></dt>
-       <dd>Moderate patron comments</dd>
+    <dt><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a> [% IF ( pendingcomments ) %]<span class="holdcount"><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">[% pendingcomments %]</a></span>[% END %]</dt>
+       <dd>Moderate patron comments</dd>
     [% END %]
     
     [% IF ( CAN_user_tools_import_patrons ) %]
@@ -46,7 +46,7 @@
     [% END %]
 
     [% IF ( CAN_user_tools_moderate_tags ) %]
-    <dt><a href="/cgi-bin/koha/tags/review.pl">Tags</a></dt>
+    <dt><a href="/cgi-bin/koha/tags/review.pl">Tags</a> [% IF ( pendingtags ) %]<span class="holdcount"><a href="/cgi-bin/koha/tags/review.pl">[% pendingtags %]</a></span>[% END %]</dt>
        <dd>Moderate patron tags</dd>
     [% END %]
 
index d7a34a1..b054e09 100644 (file)
@@ -95,7 +95,7 @@ function placeHold () {
                var _alertString="";
                var alertString2;
 
-           if(f.addshelf.value.length ==0){
+           if($("#shelfname").val() == ""){
                        _alertString += _("- You must enter a List Name") + "\n";
                }
 
@@ -194,7 +194,7 @@ function placeHold () {
                        </td>
                        [% END %]
                        [% UNLESS ( item_level_itypes ) %]<td>
-                [% UNLESS ( noItemTypeImages ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
+                [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl %]" alt="[% itemsloo.description %]" title="[% itemsloo.description %]" />[% END %][% itemsloo.description %]
                        </td>[% END %]
                        <td>
                        [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
@@ -349,7 +349,7 @@ function placeHold () {
                        <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr>
                 [% FOREACH shelveslooppri IN shelveslooppriv %]
                     [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
-        <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&amp;[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td>
+        <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.viewcategory1 ) %]Private[% END %]
@@ -399,10 +399,11 @@ function placeHold () {
         [% IF ( shelvesloop ) %]
                <div class="pages">[% pagination_bar %]</div>
         <table>
-        <tr><th>List Name</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
+        <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr>
             [% FOREACH shelvesloo IN shelvesloop %]
                 [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
                <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.viewcategory1 ) %]Private[% END %]
index e706763..2d6d5ba 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
        <xsl:import href="MARC21slimUtils.xsl"/>
        <xsl:output method="xml" indent="yes"/>
index 2b038c9..2ba9cf1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
 <xsl:stylesheet version="1.0"
   xmlns:marc="http://www.loc.gov/MARC21/slim"
index 33ccb81..c641b8c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns="http://www.loc.gov/mods/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
        <xsl:include href="MARC21slimUtils.xsl"/>
        <xsl:output method="xml" indent="yes"/>
index e78a888..d796f66 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xlink marc">
-       <xsl:include href="http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl"/>
+       <xsl:include href="MARC21slimUtils-MODS31.xsl"/>
        <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
        <!--
 
@@ -2518,4 +2519,4 @@ Added Log Comment
 <metaInformation>
 <scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
 </metaInformation>
--->
\ No newline at end of file
+-->
index 54cda25..e040c76 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xlink marc">
        <xsl:include href="MARC21slimUtils.xsl"/>
        <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
index 13b25b4..a4cd457 100644 (file)
@@ -1,3 +1,4 @@
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet xmlns="http://www.loc.gov/mods/v3" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xlink marc" version="1.0">
        <xsl:include href="MARC21slimUtils.xsl"/>
        <xsl:output encoding="UTF-8" indent="yes" method="xml"/>
index 60975e0..289bde7 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
        <xsl:import href="MARC21slimUtils.xsl"/>
        <xsl:output method="xml" indent="yes"/>
 <metaInformation>
 <scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
 </metaInformation>
--->
\ No newline at end of file
+-->
index 23ffe7c..b888431 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
        <xsl:import href="MARC21slimUtils.xsl"/>
        <xsl:output method="xml" indent="yes"/>
 <metaInformation>
 <scenarios ><scenario default="no" name="MODS Website Samples" userelativepaths="yes" externalpreview="no" url="..\xml\MARC21slim\modswebsitesamples.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="Ray Charles" userelativepaths="yes" externalpreview="no" url="..\xml\MARC21slim\raycharles.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="yes" name="s6" userelativepaths="yes" externalpreview="no" url="..\ifla\sally6.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="s7" userelativepaths="yes" externalpreview="no" url="..\ifla\sally7.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/><scenario default="no" name="s12" userelativepaths="yes" externalpreview="no" url="..\ifla\sally12.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
 </metaInformation>
--->
\ No newline at end of file
+-->
index b78e860..00201a7 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
        <xsl:import href="MARC21slimUtils.xsl"/>
        <xsl:output method="xml" indent="yes"/>
 <metaInformation>
 <scenarios ><scenario default="yes" name="RDF" userelativepaths="yes" externalpreview="no" url="marcxmlfile.xml" htmlbaseurl="" outputurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
 </metaInformation>
--->
\ No newline at end of file
+-->
index 89074ea..f16fcc4 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
        <xsl:import href="MARC21slimUtils2.xsl"/>
        <xsl:output method="xml" indent="yes"/>
index 96daef1..e01e38c 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:srw_dc="info:srw/schema/1/dc-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
        <xsl:import href="MARC21slimUtils.xsl"/>
        <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
 <metaInformation>
 <scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
 </metaInformation>
--->
\ No newline at end of file
+-->
index b0de609..426fa11 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
 <xsl:stylesheet version="1.0"
   xmlns:marc="http://www.loc.gov/MARC21/slim"
                     <xsl:call-template name="subfieldSelect">
                         <xsl:with-param name="codes">a</xsl:with-param>
                     </xsl:call-template>
-                    <xsl:if test="marc:subfield[@code='b']">
+                    <xsl:if test="marc:subfield[@code='h']">
                         <xsl:text> </xsl:text>
                         <xsl:call-template name="subfieldSelect">
-                            <xsl:with-param name="codes">b</xsl:with-param>
+                            <xsl:with-param name="codes">h</xsl:with-param>
                         </xsl:call-template>
                     </xsl:if>
-                    <xsl:if test="marc:subfield[@code='h']">
+                    <xsl:if test="marc:subfield[@code='b']">
                         <xsl:text> </xsl:text>
                         <xsl:call-template name="subfieldSelect">
-                            <xsl:with-param name="codes">h</xsl:with-param>
+                            <xsl:with-param name="codes">b</xsl:with-param>
                         </xsl:call-template>
                     </xsl:if>
                     <xsl:text> </xsl:text>
         <span class="results_summary series"><span class="label">Series: </span>
         <!-- 440 -->
         <xsl:for-each select="marc:datafield[@tag=440]">
-             <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+            <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
             <xsl:call-template name="chopPunctuation">
                             <xsl:with-param name="chopString">
                                 <xsl:call-template name="subfieldSelect">
 
         <!-- 490 Series not traced, Ind1 = 0 -->
         <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
-             <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+            <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
                         <xsl:call-template name="chopPunctuation">
                             <xsl:with-param name="chopString">
                                 <xsl:call-template name="subfieldSelect">
         <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
             <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
                 <xsl:choose>
-                    <xsl:when test="marc:subfield[@code='w']">
+                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
                         <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
                             <xsl:call-template name="chopPunctuation">
                                 <xsl:with-param name="chopString">
                                     <xsl:call-template name="subfieldSelect">
-                                        <xsl:with-param name="codes">at</xsl:with-param>
+                                        <xsl:with-param name="codes">a_t</xsl:with-param>
                                     </xsl:call-template>
                                 </xsl:with-param>
                             </xsl:call-template>
                         </a>
                     </xsl:when>
                     <xsl:otherwise>
-                        <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+                        <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
                             <xsl:call-template name="chopPunctuation">
                                 <xsl:with-param name="chopString">
                                     <xsl:call-template name="subfieldSelect">
-                                        <xsl:with-param name="codes">at</xsl:with-param>
+                                        <xsl:with-param name="codes">a_t</xsl:with-param>
                                     </xsl:call-template>
                                 </xsl:with-param>
                             </xsl:call-template>
         </span>
        </xsl:if>
 
+        <xsl:if test="marc:datafield[@tag=242]">
+        <span class="results_summary translated_title"><span class="label">Title translated: </span>
+            <xsl:for-each select="marc:datafield[@tag=242]">
+                <xsl:call-template name="chopPunctuation">
+                  <xsl:with-param name="chopString">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">abchnp</xsl:with-param>
+                    </xsl:call-template>
+                   </xsl:with-param>
+               </xsl:call-template>
+                    <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>
+        </span>
+       </xsl:if>
+
         <!-- Uniform Title  Statement: Alternate Graphic Representation (MARC 880) -->
         <xsl:if test="$display880">
             <xsl:call-template name="m880Select">
         </xsl:for-each>
         </xsl:if>
 
+        <!-- 866 textual holdings -->
+        <xsl:if test="marc:datafield[@tag=866]">
+            <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
+                <xsl:for-each select="marc:datafield[@tag=866]">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">axz</xsl:with-param>
+                    </xsl:call-template>
+                    <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>
+            </span>
+        </xsl:if>
+
         <!--  775 Other Edition  -->
         <xsl:if test="marc:datafield[@tag=775]">
         <span class="results_summary other_editions"><span class="label">Other Editions: </span>
index 617844f..351e366 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
 <xsl:stylesheet version="1.0"
   xmlns:marc="http://www.loc.gov/MARC21/slim"
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils-MODS31.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils-MODS31.xsl
new file mode 100644 (file)
index 0000000..5a8d6cc
--- /dev/null
@@ -0,0 +1,190 @@
+<?xml version='1.0'?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+       <!-- 08/08/08: tmee added corrected chopPunctuation templates for 260c -->
+       <!-- 08/19/04: ntra added "marc:" prefix to datafield element -->
+       <!-- 12/14/07: ntra added url encoding template -->
+       <!-- url encoding -->
+
+       <xsl:variable name="ascii">
+               <xsl:text> !"#$%&amp;'()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~</xsl:text>
+       </xsl:variable>
+
+       <xsl:variable name="latin1">
+               <xsl:text> ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ</xsl:text>
+       </xsl:variable>
+       <!-- Characters that usually don't need to be escaped -->
+       <xsl:variable name="safe">
+               <xsl:text>!'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~</xsl:text>
+       </xsl:variable>
+
+       <xsl:variable name="hex">0123456789ABCDEF</xsl:variable>
+
+
+       <xsl:template name="datafield">
+               <xsl:param name="tag"/>
+               <xsl:param name="ind1">
+                       <xsl:text> </xsl:text>
+               </xsl:param>
+               <xsl:param name="ind2">
+                       <xsl:text> </xsl:text>
+               </xsl:param>
+               <xsl:param name="subfields"/>
+               <xsl:element name="marc:datafield">
+                       <xsl:attribute name="tag">
+                               <xsl:value-of select="$tag"/>
+                       </xsl:attribute>
+                       <xsl:attribute name="ind1">
+                               <xsl:value-of select="$ind1"/>
+                       </xsl:attribute>
+                       <xsl:attribute name="ind2">
+                               <xsl:value-of select="$ind2"/>
+                       </xsl:attribute>
+                       <xsl:copy-of select="$subfields"/>
+               </xsl:element>
+       </xsl:template>
+
+       <xsl:template name="subfieldSelect">
+               <xsl:param name="codes">abcdefghijklmnopqrstuvwxyz</xsl:param>
+               <xsl:param name="delimeter">
+                       <xsl:text> </xsl:text>
+               </xsl:param>
+               <xsl:variable name="str">
+                       <xsl:for-each select="marc:subfield">
+                               <xsl:if test="contains($codes, @code)">
+                                       <xsl:value-of select="text()"/>
+                                       <xsl:value-of select="$delimeter"/>
+                               </xsl:if>
+                       </xsl:for-each>
+               </xsl:variable>
+               <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
+       </xsl:template>
+
+       <xsl:template name="buildSpaces">
+               <xsl:param name="spaces"/>
+               <xsl:param name="char">
+                       <xsl:text> </xsl:text>
+               </xsl:param>
+               <xsl:if test="$spaces>0">
+                       <xsl:value-of select="$char"/>
+                       <xsl:call-template name="buildSpaces">
+                               <xsl:with-param name="spaces" select="$spaces - 1"/>
+                               <xsl:with-param name="char" select="$char"/>
+                       </xsl:call-template>
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template name="chopPunctuation">
+               <xsl:param name="chopString"/>
+               <xsl:param name="punctuation">
+                       <xsl:text>.:,;/ </xsl:text>
+               </xsl:param>
+               <xsl:variable name="length" select="string-length($chopString)"/>
+               <xsl:choose>
+                       <xsl:when test="$length=0"/>
+                       <xsl:when test="contains($punctuation, substring($chopString,$length,1))">
+                               <xsl:call-template name="chopPunctuation">
+                                       <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
+                                       <xsl:with-param name="punctuation" select="$punctuation"/>
+                               </xsl:call-template>
+                       </xsl:when>
+                       <xsl:when test="not($chopString)"/>
+                       <xsl:otherwise>
+                               <xsl:value-of select="$chopString"/>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template name="chopPunctuationFront">
+               <xsl:param name="chopString"/>
+               <xsl:variable name="length" select="string-length($chopString)"/>
+               <xsl:choose>
+                       <xsl:when test="$length=0"/>
+                       <xsl:when test="contains('.:,;/[ ', substring($chopString,1,1))">
+                               <xsl:call-template name="chopPunctuationFront">
+                                       <xsl:with-param name="chopString" select="substring($chopString,2,$length - 1)"
+                                       />
+                               </xsl:call-template>
+                       </xsl:when>
+                       <xsl:when test="not($chopString)"/>
+                       <xsl:otherwise>
+                               <xsl:value-of select="$chopString"/>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template name="chopPunctuationBack">
+               <xsl:param name="chopString"/>
+               <xsl:param name="punctuation">
+                       <xsl:text>.:,;/] </xsl:text>
+               </xsl:param>
+               <xsl:variable name="length" select="string-length($chopString)"/>
+               <xsl:choose>
+                       <xsl:when test="$length=0"/>
+                       <xsl:when test="contains($punctuation, substring($chopString,$length,1))">
+                               <xsl:call-template name="chopPunctuation">
+                                       <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
+                                       <xsl:with-param name="punctuation" select="$punctuation"/>
+                               </xsl:call-template>
+                       </xsl:when>
+                       <xsl:when test="not($chopString)"/>
+                       <xsl:otherwise>
+                               <xsl:value-of select="$chopString"/>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <!-- nate added 12/14/2007 for lccn.loc.gov: url encode ampersand, etc. -->
+       <xsl:template name="url-encode">
+
+               <xsl:param name="str"/>
+
+               <xsl:if test="$str">
+                       <xsl:variable name="first-char" select="substring($str,1,1)"/>
+                       <xsl:choose>
+                               <xsl:when test="contains($safe,$first-char)">
+                                       <xsl:value-of select="$first-char"/>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:variable name="codepoint">
+                                               <xsl:choose>
+                                                       <xsl:when test="contains($ascii,$first-char)">
+                                                               <xsl:value-of
+                                                                       select="string-length(substring-before($ascii,$first-char)) + 32"
+                                                               />
+                                                       </xsl:when>
+                                                       <xsl:when test="contains($latin1,$first-char)">
+                                                               <xsl:value-of
+                                                                       select="string-length(substring-before($latin1,$first-char)) + 160"/>
+                                                               <!-- was 160 -->
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <xsl:message terminate="no">Warning: string contains a character
+                                                                       that is out of range! Substituting "?".</xsl:message>
+                                                               <xsl:text>63</xsl:text>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:variable>
+                                       <xsl:variable name="hex-digit1"
+                                               select="substring($hex,floor($codepoint div 16) + 1,1)"/>
+                                       <xsl:variable name="hex-digit2" select="substring($hex,$codepoint mod 16 + 1,1)"/>
+                                       <!-- <xsl:value-of select="concat('%',$hex-digit2)"/> -->
+                                       <xsl:value-of select="concat('%',$hex-digit1,$hex-digit2)"/>
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:if test="string-length($str) &gt; 1">
+                               <xsl:call-template name="url-encode">
+                                       <xsl:with-param name="str" select="substring($str,2)"/>
+                               </xsl:call-template>
+                       </xsl:if>
+               </xsl:if>
+       </xsl:template>
+</xsl:stylesheet>
+<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
+<metaInformation>
+<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
+</metaInformation>
+-->
+
index cfc434e..46b35fa 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version='1.0'?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template name="datafield">
                <xsl:param name="tag"/>
index ca68bb7..8998b53 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version='1.0'?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <!-- 8/19/04: ntra added "marc:" prefix to datafield element -->
        <xsl:template name="datafield">
@@ -76,4 +77,4 @@
                        <xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
                </xsl:choose>
        </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
index 60975e0..289bde7 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
        <xsl:import href="MARC21slimUtils.xsl"/>
        <xsl:output method="xml" indent="yes"/>
 <metaInformation>
 <scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
 </metaInformation>
--->
\ No newline at end of file
+-->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl
new file mode 100644 (file)
index 0000000..163ed29
--- /dev/null
@@ -0,0 +1,535 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
+<xsl:stylesheet version="1.0"
+  xmlns:marc="http://www.loc.gov/MARC21/slim"
+  xmlns:items="http://www.koha-community.org/items"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  exclude-result-prefixes="marc items">
+    <xsl:import href="NORMARCslimUtils.xsl"/>
+    <xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" />
+    <xsl:template match="/">
+            <xsl:apply-templates/>
+    </xsl:template>
+
+    <xsl:template match="marc:record">
+
+        <!-- Sysprefs -->
+        <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
+
+        <xsl:variable name="leader" select="marc:leader"/>
+        <xsl:variable name="leader6" select="substring($leader,7,1)"/>
+        <xsl:variable name="leader7" select="substring($leader,8,1)"/>
+        <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
+        <xsl:variable name="field019b" select="marc:datafield[@tag=019]/marc:subfield[@code='b']"/>
+        <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
+        <xsl:variable name="materialTypeCode">
+            <xsl:choose>
+                <xsl:when test="$field019b='b' or $field019b='k' or $field019b='l' or $leader6='b'">Mon</xsl:when>
+                <xsl:when test="$field019b='e' or contains($field019b,'ec') or contains($field019b,'ed') or contains($field019b,'ee') or contains($field019b,'ef') or $leader6='g'">FV</xsl:when>
+                <xsl:when test="$field019b='c' or $field019b='d' or contains($field019b,'da') or contains($field019b,'db') or contains($field019b,'dc') or contains($field019b,'dd') or contains($field019b,'dg') or contains($field019b,'dh') or contains($field019b,'di') or contains($field019b,'dj') or contains($field019b,'dk') or $leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">Mus</xsl:when>
+                <xsl:when test="$field019b='a' or contains($field019b,'ab') or contains($field019b,'aj') or $leader6='e' or $leader6='f'">Kar</xsl:when>
+                <xsl:when test="$field019b='f' or $field019b='i' or contains($field019b,'ib') or contains($field019b,'ic') or contains($field019b,'fd') or contains($field019b,'ff') or contains($field019b,'fi') or $leader6='k'">gra</xsl:when>
+                <xsl:when test="$field019b='g' or contains($field019b,'gb') or contains($field019b,'gd') or contains($field019b,'ge') or $leader6='m'">Fil</xsl:when>
+                <xsl:when test="$leader6='o'">kom</xsl:when>
+                <xsl:when test="$field019b='h' or $leader6='r'">trd</xsl:when>
+                <xsl:when test="$field019b='j' or $leader6='a'">
+                    <xsl:choose>
+                        <xsl:when test="$leader7='a' or $leader7='c' or $leader7='m' or $leader7='p'">Mon</xsl:when>
+                        <xsl:when test="$field019b='j' or $leader7='b' or $leader7='s'">Per</xsl:when>
+                    </xsl:choose>
+                </xsl:when>
+            </xsl:choose>
+        </xsl:variable>
+        <xsl:variable name="materialTypeLabel">
+                        <xsl:choose>
+                <xsl:when test="$field019b='b' or $field019b='k' or $field019b='l' or $leader6='b'">Bok</xsl:when>
+                <xsl:when test="$field019b='e' or contains($field019b,'ec') or contains($field019b,'ed') or contains($field019b,'ee') or contains($field019b,'ef') or $leader6='g'">Film og video</xsl:when>
+                <xsl:when test="$field019b='c' or $field019b='d' or contains($field019b,'da') or contains($field019b,'db') or contains($field019b,'dc') or contains($field019b,'dd') or contains($field019b,'dg') or contains($field019b,'dh') or contains($field019b,'di') or contains($field019b,'dj') or contains($field019b,'dk') or $leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">Musikalier</xsl:when>
+                <xsl:when test="$field019b='a' or contains($field019b,'ab') or contains($field019b,'aj') or $leader6='e' or $leader6='f'">Kart</xsl:when>
+                <xsl:when test="$field019b='f' or $field019b='i' or contains($field019b,'ib') or contains($field019b,'ic') or contains($field019b,'fd') or contains($field019b,'ff') or contains($field019b,'fi') or $leader6='k'">Grafisk materiale</xsl:when>
+                <xsl:when test="$field019b='g' or contains($field019b,'gb') or contains($field019b,'gd') or contains($field019b,'ge') or $leader6='m'">Fil</xsl:when>
+                <xsl:when test="$leader6='o'">Kombidokument</xsl:when>
+                <xsl:when test="$field019b='h' or $leader6='r'">Tredimensjonal gjenstand</xsl:when>
+                <xsl:when test="$field019b='j' or $leader6='a'">
+                    <xsl:choose>
+                        <xsl:when test="$leader7='a' or $leader7='c' or $leader7='m' or $leader7='p'">Bok</xsl:when>
+                        <xsl:when test="$field019b='j' or $leader7='b' or $leader7='s'">Periodikum</xsl:when>
+                    </xsl:choose>
+                </xsl:when>
+            </xsl:choose>
+
+        </xsl:variable>
+
+        <!-- Tittel og ansvarsopplysninger -->
+        <xsl:if test="marc:datafield[@tag=245]">
+        <h1>
+            <xsl:for-each select="marc:datafield[@tag=245]">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">a</xsl:with-param>
+                    </xsl:call-template>
+                    <xsl:if test="marc:subfield[@code='b']">
+                        <xsl:text> : </xsl:text>
+                        <xsl:call-template name="subfieldSelect">
+                            <xsl:with-param name="codes">b</xsl:with-param>
+                        </xsl:call-template>
+                    </xsl:if>
+                    <xsl:if test="marc:subfield[@code='h']">
+                        <xsl:text> </xsl:text>
+                        (<xsl:call-template name="subfieldSelect">
+                            <xsl:with-param name="codes">h</xsl:with-param>
+                        </xsl:call-template>) 
+                    </xsl:if>
+                    <xsl:text> </xsl:text>
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">np</xsl:with-param>
+                    </xsl:call-template>
+            </xsl:for-each>
+        </h1>
+        </xsl:if>
+
+        <!-- Author Statement -->
+               <!-- 245$9 is Koha authority number --> 
+        <xsl:choose>
+        <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
+        <h5 class="author">av
+        <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
+        <a>
+        <xsl:choose>
+            <xsl:when test="marc:subfield[@code=9]">
+                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:call-template name="nameABCDQ"/></a>
+        <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>
+
+        <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
+        <a>
+        <xsl:choose>
+            <xsl:when test="marc:subfield[@code=9]">
+                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>      
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:call-template name="nameABCDN"/></a>
+        <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>
+
+        <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
+        <a>
+        <xsl:choose>
+            <xsl:when test="marc:subfield[@code=9]">
+                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+            <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:call-template name="nameACDEQ"/></a>
+        <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>
+        </h5>
+        </xsl:when>
+        </xsl:choose>
+
+
+        <xsl:if test="$materialTypeCode!=''">
+        <span class="results_summary"><span class="label">Materialtype: </span>
+        <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
+        <xsl:value-of select="$materialTypeLabel"/>
+        </span>
+        </xsl:if>
+
+        <!--Series -->
+        <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
+               <span class="results_summary"><span class="label">Series: </span>
+               <xsl:for-each select="marc:datafield[@tag=440]">
+                    <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+                   <xsl:call-template name="chopPunctuation">
+                                   <xsl:with-param name="chopString">
+                                       <xsl:call-template name="subfieldSelect">
+                                           <xsl:with-param name="codes">av</xsl:with-param>
+                                       </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>
+               </xsl:for-each>
+       
+               <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
+                    <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
+                               <xsl:call-template name="chopPunctuation">
+                                   <xsl:with-param name="chopString">
+                                       <xsl:call-template name="subfieldSelect">
+                                           <xsl:with-param name="codes">av</xsl:with-param>
+                                       </xsl:call-template>
+                                   </xsl:with-param>
+                               </xsl:call-template>
+                   </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>
+               </span>
+        </xsl:if>
+
+        <!-- Publisher Statement -->
+        
+        <xsl:if test="marc:datafield[@tag=260]">
+        <span class="results_summary"><span class="label">Utgiver: </span>
+            <xsl:for-each select="marc:datafield[@tag=260]">
+                <xsl:call-template name="chopPunctuation">
+                  <xsl:with-param name="chopString">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">bcg</xsl:with-param>
+                    </xsl:call-template>
+                   </xsl:with-param>
+               </xsl:call-template>
+                    <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>
+        </span> 
+        </xsl:if>
+
+        <!-- Edition Statement -->
+        
+        <xsl:if test="marc:datafield[@tag=250]">
+        <span class="results_summary"><span class="label">Utgave: </span>
+            <xsl:for-each select="marc:datafield[@tag=250]">
+                <xsl:call-template name="chopPunctuation">
+                  <xsl:with-param name="chopString">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">ab</xsl:with-param>
+                    </xsl:call-template>
+                   </xsl:with-param>
+               </xsl:call-template>
+                    <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>
+        </span>
+        </xsl:if>
+
+        <!-- Description -->
+        
+        <xsl:if test="marc:datafield[@tag=300]">
+        <span class="results_summary"><span class="label">Beskrivelse: </span>
+            <xsl:for-each select="marc:datafield[@tag=300]">
+                <xsl:call-template name="chopPunctuation">
+                  <xsl:with-param name="chopString">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">abceg</xsl:with-param>
+                    </xsl:call-template>
+                   </xsl:with-param>
+               </xsl:call-template>
+                    <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>
+        </span>
+       </xsl:if>
+
+       <abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=999]/marc:subfield[@code='c']}" ><!-- unAPI --></abbr>
+
+       <xsl:if test="marc:datafield[@tag=020]">
+        <span class="results_summary"><span class="label">ISBN: </span>
+        <xsl:for-each select="marc:datafield[@tag=020]">
+        <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
+                <xsl:value-of select="marc:subfield[@code='a']"/>
+                <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>
+        </span>
+        </xsl:if>
+
+        <xsl:if test="marc:datafield[@tag=022]">
+        <span class="results_summary"><span class="label">ISSN: </span>
+        <xsl:for-each select="marc:datafield[@tag=022]">
+                <xsl:value-of select="marc:subfield[@code='a']"/>
+                <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>
+        </span>
+        </xsl:if>
+
+        <!-- Other Title  Statement -->
+
+        <xsl:if test="marc:datafield[@tag=246]">
+        <span class="results_summary"><span class="label">Parallelltittel: </span>
+            <xsl:for-each select="marc:datafield[@tag=246]">
+                <xsl:call-template name="chopPunctuation">
+                  <xsl:with-param name="chopString">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">abhfgnp</xsl:with-param>
+                    </xsl:call-template>
+                   </xsl:with-param>
+               </xsl:call-template>
+                    <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>
+        </span>
+       </xsl:if>
+
+        <!-- Uniform Title  Statement -->
+
+        <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
+        <span class="results_summary"><span class="label">Standardtittel: </span>
+        <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
+            <xsl:variable name="str">
+                <xsl:for-each select="marc:subfield">
+                    <xsl:if test="(contains('adfklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">
+                        <xsl:value-of select="text()"/>
+                        <xsl:text> </xsl:text>
+                     </xsl:if>
+                </xsl:for-each>
+            </xsl:variable>
+            <xsl:call-template name="chopPunctuation">
+                <xsl:with-param name="chopString">
+                    <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+                        
+                </xsl:with-param>
+            </xsl:call-template>
+            <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>
+        </span>
+        </xsl:if>
+
+        <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
+            <span class="results_summary"><span class="label">Emner: </span>
+            <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
+            <a>
+            <xsl:choose>
+            <xsl:when test="marc:subfield[@code=9]">
+                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
+            </xsl:otherwise>
+            </xsl:choose>
+            <xsl:call-template name="chopPunctuation">
+                <xsl:with-param name="chopString">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">abcdvxyz</xsl:with-param>
+                        <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
+                        <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
+                    </xsl:call-template>
+                </xsl:with-param>
+            </xsl:call-template></a>
+            <xsl:choose>
+            <xsl:when test="position()=last()"></xsl:when>
+            <xsl:otherwise> | </xsl:otherwise>
+            </xsl:choose>
+
+            </xsl:for-each>
+            </span>
+        </xsl:if>
+
+        <xsl:if test="marc:datafield[@tag=856]">
+        <span class="results_summary"><span class="label">Nettbasert ressurs: </span>
+        <xsl:for-each select="marc:datafield[@tag=856]">
+            <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
+        <xsl:choose>
+            <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">y3z</xsl:with-param>
+                    </xsl:call-template>
+            </xsl:when>
+        <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
+        Klikk her for tilgang
+        </xsl:when>
+        </xsl:choose>
+        </a>
+            <xsl:choose>
+            <xsl:when test="position()=last()"></xsl:when>
+            <xsl:otherwise> | </xsl:otherwise>
+            </xsl:choose>  
+        </xsl:for-each>
+        </span>
+        </xsl:if>
+        
+        <!-- NORMARC does not define indicators for 505
+        <xsl:if test="marc:datafield[@tag=505]">
+        <xsl:for-each select="marc:datafield[@tag=505]">
+        <span class="results_summary"><span class="label">
+        <xsl:choose>
+        <xsl:when test="@ind1=0">
+            Contents:
+        </xsl:when>
+        <xsl:when test="@ind1=1">
+            Incomplete contents:
+        </xsl:when>
+        <xsl:when test="@ind1=1">
+            Partial contents:
+        </xsl:when>
+        </xsl:choose>  
+        </span>
+        <xsl:choose>
+        <xsl:when test="@ind2=0">
+            <xsl:for-each select="marc:subfield[@code='t']">
+                <xsl:value-of select="marc:subfield[@code=t]"/> <xsl:value-of select="marc:subfield[@code=r]"/>
+            </xsl:for-each> 
+        </xsl:when>
+        <xsl:otherwise>
+            <xsl:call-template name="subfieldSelect">
+                <xsl:with-param name="codes">au</xsl:with-param>
+            </xsl:call-template>
+        </xsl:otherwise>
+        </xsl:choose>
+        </span>
+        </xsl:for-each>
+        </xsl:if>
+        -->
+        <xsl:if test="marc:datafield[@tag=505]">
+               <xsl:call-template name="subfieldSelect">
+                <xsl:with-param name="codes">a</xsl:with-param>
+            </xsl:call-template>
+               </xsl:if>
+               
+        <!-- 780 -->
+        <xsl:if test="marc:datafield[@tag=780]">
+        <xsl:for-each select="marc:datafield[@tag=780]">
+        <span class="results_summary"><span class="label">
+        <xsl:choose>
+               <xsl:when test="@ind2=0">
+                   Fortsettelse av:
+               </xsl:when>
+               <xsl:when test="@ind2=1">
+                   Delvis fortsettelse av:
+               </xsl:when>
+               <xsl:when test="@ind2=2">
+                   Avløser:
+               </xsl:when>
+               <xsl:when test="@ind2=3">
+                   Avløser delvis:
+               </xsl:when>
+               <xsl:when test="@ind2=4">
+                   Sammenslåing av: ... ; og ...
+               </xsl:when>
+               <xsl:when test="@ind2=5">
+                   Har tatt opp:
+               </xsl:when>
+               <xsl:when test="@ind2=6">
+                   Har delvis tatt opp:
+               </xsl:when>
+               <xsl:when test="@ind2=7">
+                   Utskilt fra:
+               </xsl:when>
+        </xsl:choose>
+        </span>
+                <xsl:variable name="f780">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">a_t</xsl:with-param>
+                    </xsl:call-template>
+                </xsl:variable>
+             <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
+                <xsl:value-of select="translate($f780, '()', '')"/>
+            </a>
+        </span>
+        <xsl:choose>
+        <xsl:when test="@ind1=0">
+            <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
+        </xsl:when>
+        </xsl:choose>
+
+        </xsl:for-each>
+        </xsl:if>
+
+        <!-- 785 -->
+        <xsl:if test="marc:datafield[@tag=785]">
+        <xsl:for-each select="marc:datafield[@tag=785]">
+        <span class="results_summary"><span class="label">
+        <xsl:choose>
+               <xsl:when test="@ind2=0">
+                   Fortsettelse i:
+               </xsl:when>
+               <xsl:when test="@ind2=1">
+                   Fortsettes delvis i:
+               </xsl:when>
+               <xsl:when test="@ind2=2">
+                   Avløst av:
+               </xsl:when>
+               <xsl:when test="@ind2=3">
+                   Delvis avløst av:
+               </xsl:when>
+               <xsl:when test="@ind2=4">
+                   Gått inn i:
+               </xsl:when>
+               <xsl:when test="@ind2=5">
+                   Delvis gått inn i:
+               </xsl:when>
+               <xsl:when test="@ind2=6">
+                   Fortsettes av: ...; og ...
+               </xsl:when>
+               <xsl:when test="@ind2=7">
+                       Slått sammen med: .., til: ...
+               </xsl:when>
+        </xsl:choose>
+        </span>
+                   <xsl:variable name="f785">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">a_t</xsl:with-param>
+                    </xsl:call-template>
+                </xsl:variable>
+
+                <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
+                <xsl:value-of select="translate($f785, '()', '')"/>
+            </a>
+
+        </span>
+        </xsl:for-each>
+        </xsl:if>
+
+        <!-- This will only work if the OPACBaseURL syspref is set. -->
+        <xsl:if test="string-length($OPACBaseURL) > 0">
+        <p>OPAC View: <a>
+                      <xsl:attribute name="href">http://<xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
+                      <xsl:attribute name="target">_blank</xsl:attribute>
+                      Open in new window
+                      </a></p>
+         </xsl:if>
+
+    </xsl:template>
+
+    <xsl:template name="part">
+        <xsl:variable name="partNumber">
+            <xsl:call-template name="specialSubfieldSelect">
+                <xsl:with-param name="axis">n</xsl:with-param>
+                <xsl:with-param name="anyCodes">n</xsl:with-param>
+                <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name="partName">
+            <xsl:call-template name="specialSubfieldSelect">
+                <xsl:with-param name="axis">p</xsl:with-param>
+                <xsl:with-param name="anyCodes">p</xsl:with-param>
+                <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
+            </xsl:call-template>
+        </xsl:variable>
+        <xsl:if test="string-length(normalize-space($partNumber))">
+                <xsl:call-template name="chopPunctuation">
+                    <xsl:with-param name="chopString" select="$partNumber"/>
+                </xsl:call-template>
+        </xsl:if>
+        <xsl:if test="string-length(normalize-space($partName))">
+                <xsl:call-template name="chopPunctuation">
+                    <xsl:with-param name="chopString" select="$partName"/>
+                </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template name="specialSubfieldSelect">
+        <xsl:param name="anyCodes"/>
+        <xsl:param name="axis"/>
+        <xsl:param name="beforeCodes"/>
+        <xsl:param name="afterCodes"/>
+        <xsl:variable name="str">
+            <xsl:for-each select="marc:subfield">
+                <xsl:if test="contains($anyCodes, @code)      or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis])      or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">
+                    <xsl:value-of select="text()"/>
+                    <xsl:text> </xsl:text>
+                </xsl:if>
+            </xsl:for-each>
+        </xsl:variable>
+        <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+    </xsl:template>
+</xsl:stylesheet>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl
new file mode 100644 (file)
index 0000000..7c2bf21
--- /dev/null
@@ -0,0 +1,205 @@
+<?xml version='1.0'?>
+<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+       <xsl:template name="datafield">
+               <xsl:param name="tag"/>
+               <xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
+               <xsl:param name="ind2"><xsl:text> </xsl:text></xsl:param>
+               <xsl:param name="subfields"/>
+               <xsl:element name="datafield">
+                       <xsl:attribute name="tag">
+                               <xsl:value-of select="$tag"/>
+                       </xsl:attribute>
+                       <xsl:attribute name="ind1">
+                               <xsl:value-of select="$ind1"/>
+                       </xsl:attribute>
+                       <xsl:attribute name="ind2">
+                               <xsl:value-of select="$ind2"/>
+                       </xsl:attribute>
+                       <xsl:copy-of select="$subfields"/>
+               </xsl:element>
+       </xsl:template>
+
+       <xsl:template name="subfieldSelect">
+               <xsl:param name="codes"/>
+               <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
+               <xsl:param name="subdivCodes"/>
+               <xsl:param name="subdivDelimiter"/>
+               <xsl:variable name="str">
+                       <xsl:for-each select="marc:subfield">
+                               <xsl:if test="contains($codes, @code)">
+                    <xsl:if test="contains($subdivCodes, @code)">
+                        <xsl:value-of select="$subdivDelimiter"/>
+                    </xsl:if>
+                                       <xsl:value-of select="text()"/><xsl:value-of select="$delimeter"/>
+                               </xsl:if>
+                       </xsl:for-each>
+               </xsl:variable>
+               <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
+       </xsl:template>
+
+       <xsl:template name="buildSpaces">
+               <xsl:param name="spaces"/>
+               <xsl:param name="char"><xsl:text> </xsl:text></xsl:param>
+               <xsl:if test="$spaces>0">
+                       <xsl:value-of select="$char"/>
+                       <xsl:call-template name="buildSpaces">
+                               <xsl:with-param name="spaces" select="$spaces - 1"/>
+                               <xsl:with-param name="char" select="$char"/>
+                       </xsl:call-template>
+               </xsl:if>
+       </xsl:template>
+
+       <xsl:template name="chopPunctuation">
+               <xsl:param name="chopString"/>
+               <xsl:variable name="length" select="string-length($chopString)"/>
+               <xsl:choose>
+                       <xsl:when test="$length=0"/>
+                       <xsl:when test="contains('.:,;/ ', substring($chopString,$length,1))">
+                               <xsl:call-template name="chopPunctuation">
+                                       <xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
+                               </xsl:call-template>
+                       </xsl:when>
+                       <xsl:when test="not($chopString)"/>
+                       <xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
+               </xsl:choose>
+<xsl:text> </xsl:text>
+       </xsl:template>
+
+<xsl:template name="nameABCDQ">
+<xsl:call-template name="chopPunctuation">
+<xsl:with-param name="chopString">
+<xsl:call-template name="subfieldSelect">
+<xsl:with-param name="codes">aq</xsl:with-param>
+</xsl:call-template>
+</xsl:with-param>
+<xsl:with-param name="punctuation">
+<xsl:text>:,;/ </xsl:text>
+</xsl:with-param>
+</xsl:call-template>
+<xsl:call-template name="termsOfAddress"/>
+</xsl:template>
+
+<xsl:template name="nameABCDN">
+<xsl:for-each select="marc:subfield[@code='a']">
+<xsl:call-template name="chopPunctuation">
+<xsl:with-param name="chopString" select="."/>
+</xsl:call-template>
+</xsl:for-each>
+<xsl:for-each select="marc:subfield[@code='b']">
+<xsl:value-of select="."/>
+</xsl:for-each>
+<xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
+<xsl:call-template name="subfieldSelect">
+<xsl:with-param name="codes">cdn</xsl:with-param>
+</xsl:call-template>
+</xsl:if>
+</xsl:template>
+
+<xsl:template name="nameACDEQ">
+<xsl:call-template name="subfieldSelect">
+<xsl:with-param name="codes">acdeq</xsl:with-param>
+</xsl:call-template>
+</xsl:template>
+
+<xsl:template name="termsOfAddress">
+<xsl:if test="marc:subfield[@code='b' or @code='c']">
+<xsl:call-template name="chopPunctuation">
+<xsl:with-param name="chopString">
+<xsl:call-template name="subfieldSelect">
+<xsl:with-param name="codes">bc</xsl:with-param>
+</xsl:call-template>
+</xsl:with-param>
+</xsl:call-template>
+</xsl:if>
+</xsl:template>
+
+    <!-- Function m880Select:  Display Alternate Graphic Representation (MARC 880) for selected latin "base"tags
+        - should be called immediately before the corresonding latin tags are processed 
+        - tags in right-to-left languages are displayed floating right
+        * Parameter:
+           + basetags: display these tags if found in linkage section ( subfield 6) of tag 880
+           + codes: display these subfields codes
+        * Options: 
+            - class: wrap output in <span class="$class">...</span>
+            - label: prefix each(!) tag with label $label
+            - bibno: link to biblionumber $bibno
+            - index: build a search link using index $index with subfield $a as key; if subfield $9 is present use index 'an' with key $9 instead.
+         * Limitations:
+            - displays every field on a separate line (to switch between rtl and ltr)
+         * Pitfalls:
+           (!) output might be empty
+    -->
+    <xsl:template name="m880Select">
+         <xsl:param name="basetags"/> <!-- e.g.  100,700,110,710 -->
+        <xsl:param name="codes"/> <!-- e.g. abc  -->
+        <xsl:param name="class"/> <!-- e.g. results_summary -->
+        <xsl:param name="label"/> <!-- e.g.  Edition -->
+        <xsl:param name="bibno"/>
+        <xsl:param name="index"/> <!-- e.g.  au -->
+
+        <xsl:for-each select="marc:datafield[@tag=880]">
+            <xsl:variable name="code6" select="marc:subfield[@code=6]"/>
+            <xsl:if test="contains(string($basetags), substring($code6,1,3))">
+                <span>
+                    <xsl:if test="boolean($class)">
+                        <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute>
+                    </xsl:if>
+                    <xsl:choose>
+                        <!-- display right-to-left tags floating right of their left-to-right counterparts -->
+                        <xsl:when test="substring($code6,10,2) ='/r'">
+                            <xsl:attribute name="style">display:block; text-align:right; float:right; width:50%; padding-left:20px</xsl:attribute>
+                            <xsl:attribute name="dir">rtl</xsl:attribute>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:attribute name="style">display:block; </xsl:attribute>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                    <xsl:if test="boolean($label)">
+                        <span class="label">
+                            <xsl:value-of select="$label"/>
+                        </span>
+                    </xsl:if>
+                    <xsl:variable name="str">
+                        <xsl:for-each select="marc:subfield">
+                            <xsl:if test="contains($codes, @code)">
+                                <xsl:value-of select="text()"/>
+                                <xsl:text> </xsl:text>
+                            </xsl:if>
+                        </xsl:for-each>
+                    </xsl:variable>
+                    <xsl:choose>
+                        <xsl:when test="boolean($bibno)">
+                            <a>
+                                <xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of  select="$bibno"/></xsl:attribute>
+                                <xsl:value-of select="$str"/>
+                            </a>
+                        </xsl:when>
+                       <xsl:when test="boolean($index) and boolean(marc:subfield[@code=9])">
+                            <a>
+                                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of  select="marc:subfield[@code=9]"/></xsl:attribute>
+                                  <xsl:value-of select="$str"/>
+                            </a>
+                        </xsl:when>
+                        <xsl:when test="boolean($index)">
+                            <a>
+                                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of  select="$index"/>:<xsl:value-of  select="marc:subfield[@code='a']"/></xsl:attribute>
+                                <xsl:value-of select="$str"/>
+                            </a>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <xsl:value-of select="$str"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </span>
+            </xsl:if>
+        </xsl:for-each>
+
+    </xsl:template>
+
+</xsl:stylesheet>
+
+<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
+<metaInformation>
+<scenarios/><MapperInfo srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/>
+</metaInformation>
+-->
index 7891650..7b69a0c 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-  
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
index 0e5a80d..6352384 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet version="1.0" 
   xmlns:marc="http://www.loc.gov/MARC21/slim" 
   xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" 
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-  xmlns:dc="http://purl.org/dc/elements/1.1/" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
-       <xsl:import href="MARC21slimUtils.xsl"/>
-       <xsl:output method="xml" indent="yes"/>
-       <xsl:template match="/">
-               <xsl:if test="marc:collection">
-                       <oai_dc:dcCollection xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
-                               <xsl:for-each select="marc:collection">
-                                       <xsl:for-each select="marc:record">
-                                               <oai_dc:dc>
-                                                       <xsl:apply-templates select="."/>
-                                               </oai_dc:dc>
-                                       </xsl:for-each>
-                               </xsl:for-each>
-                       </oai_dc:dcCollection>
-               </xsl:if>
-               <xsl:if test="marc:record">
-          <oai_dc:dc
-            xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
-            xmlns:dc="http://purl.org/dc/elements/1.1/"
-            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-            xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
-                               <xsl:apply-templates/>
-                       </oai_dc:dc>
-               </xsl:if>
-       </xsl:template>
-       <xsl:template match="marc:record">
-               <xsl:variable name="leader" select="marc:leader"/>
-               <xsl:variable name="leader6" select="substring($leader,7,1)"/>
-               <xsl:variable name="leader7" select="substring($leader,8,1)"/>
-               <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
-
-               <xsl:for-each select="marc:datafield[@tag=200]">
-                       <dc:title>
-                               <xsl:call-template name="subfieldSelect">
-                                       <xsl:with-param name="codes">a</xsl:with-param>
-                               </xsl:call-template>
-                       </dc:title>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=700]|marc:datafield[@tag=701]|marc:datafield[@tag=702]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=712]">
-             <dc:creator>
-           <xsl:value-of select="marc:subfield[@code='a']"/>
-               <xsl:if test="marc:subfield[@code='b']">,
-                  <xsl:value-of select="marc:subfield[@code='b']"/>
-               </xsl:if>
-                       <xsl:choose>
-                 <xsl:when test="marc:subfield[@code='4']='010'">, adapter</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='020'">, annotator</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='075'">, author of afterword</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='080'">, prefacer</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='100'">, bibliographic antecedent</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='205'">, collaborator</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='212'">, commentator</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='220'">, compiler</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='230'">, composer</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='245'">, conceptor</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='295'">, degree-grantor</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='340'">, editor</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='370'">, film editor</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='395'">, founder</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='440'">, illustrator</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='520'">, lyricist</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='557'">, organiser of meeting</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='570'">, other</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='600'">, photographer</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='605'">, presenter</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='650'">, publisher</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='651'">, publishing director</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='673'">, research team head</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='675'">, reviewer</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='710'">, redactor</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='723'">, sponsor</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='727'">, thesis advisor</xsl:when>
-                 <xsl:when test="marc:subfield[@code='4']='730'">, translator</xsl:when>
-               </xsl:choose>
-                 </dc:creator>
-               </xsl:for-each>
-               <dc:type>
-                 <xsl:value-of select="marc:datafield[@tag=200]/marc:subfield[@code='b']"/>
-               </dc:type>
-               <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='c']">
-                       <dc:publisher>
-                               <xsl:value-of select="."/>
-                       </dc:publisher>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='d']">
-                       <dc:date>
-                               <xsl:value-of select="."/>
-                       </dc:date>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=101]/marc:subfield[@code='a']">
-                 <dc:language>
-                       <xsl:value-of select="."/>
-             </dc:language>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
-                       <dc:format>
-                               <xsl:value-of select="."/>
-                       </dc:format>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=520]">
-                       <dc:description>
-                               <xsl:value-of select="marc:subfield[@code='a']"/>
-                       </dc:description>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=521]">
-                       <dc:description>
-                               <xsl:value-of select="marc:subfield[@code='a']"/>
-                       </dc:description>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[300&lt;@tag][@tag&lt;=345]">
-                       <dc:description>
-                               <xsl:value-of select="marc:subfield[@code='a']"/>
-                       </dc:description>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=600]|marc:datafield[@tag=601]|marc:datafield[@tag=602]|marc:datafield[@tag=604]|marc:datafield[@tag=605]|marc:datafield[@tag=606]">
-                       <dc:subject>
-                               <xsl:call-template name="subfieldSelect">
-                                       <xsl:with-param name="codes">abcdq</xsl:with-param>
-                               </xsl:call-template>
-                       </dc:subject>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=752]">
-                       <dc:coverage>
-                               <xsl:call-template name="subfieldSelect">
-                                       <xsl:with-param name="codes">abcd</xsl:with-param>
-                               </xsl:call-template>
-                       </dc:coverage>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=530]">
-                       <dc:relation type="original">
-                               <xsl:call-template name="subfieldSelect">
-                                       <xsl:with-param name="codes">abcdu</xsl:with-param>
-                               </xsl:call-template>
-                       </dc:relation>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=461]|marc:datafield[@tag=464]">
-                       <dc:relation>
-                               <xsl:call-template name="subfieldSelect">
-                                       <xsl:with-param name="codes">t</xsl:with-param>
-                               </xsl:call-template>
-                       </dc:relation>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=856]">
-                       <dc:identifier>
-                               <xsl:value-of select="marc:subfield[@code='u']"/>
-                       </dc:identifier>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=010]">
-                       <dc:identifier>
-                               <xsl:text>URN:ISBN:</xsl:text>
-                               <xsl:value-of select="marc:subfield[@code='a']"/>
-                       </dc:identifier>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=011]">
-                       <dc:identifier>
-                               <xsl:text>URN:ISSN:</xsl:text>
-                               <xsl:value-of select="marc:subfield[@code='a']"/>
-                       </dc:identifier>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=090]">
-             <dc:identifier>
-                   <xsl:text>http://opac.mylibrary.org/bib/</xsl:text>
-                   <xsl:value-of select="marc:subfield[@code='a']"/>
-                 </dc:identifier>
-               </xsl:for-each>
-               <xsl:for-each select="marc:datafield[@tag=995]">
-             <dc:identifier>
-                   <xsl:text>LOC:</xsl:text>
-                   <xsl:choose>
-                 <xsl:when test="marc:subfield[@code='c']='MAIN'">Main Branch</xsl:when>
-                 <xsl:when test="marc:subfield[@code='c']='BIB2'">Library 2</xsl:when>
-               </xsl:choose>
-               <xsl:foreach select="marc:subfield[@code='k']">
-             <xsl:text>:</xsl:text>
-                     <xsl:value-of select="."/>
-                   </xsl:foreach>
-                 </dc:identifier>
-               </xsl:for-each>
-       </xsl:template>
+  <xsl:import href="MARC21slimUtils.xsl"/>
+  <xsl:output method="xml" indent="yes"/>
+  <xsl:template match="/">
+    <xsl:if test="marc:collection">
+      <oai_dc:dcCollection xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
+        <xsl:for-each select="marc:collection">
+          <xsl:for-each select="marc:record">
+            <oai_dc:dc>
+              <xsl:apply-templates select="."/>
+            </oai_dc:dc>
+          </xsl:for-each>
+        </xsl:for-each>
+      </oai_dc:dcCollection>
+    </xsl:if>
+    <xsl:if test="marc:record">
+      <oai_dc:dc
+      xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
+      xmlns:dc="http://purl.org/dc/elements/1.1/"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
+        <xsl:apply-templates/>
+      </oai_dc:dc>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="marc:record">
+    <xsl:for-each select="marc:datafield[@tag=200]">
+      <dc:title>
+        <xsl:call-template name="subfieldSelect">
+          <xsl:with-param name="codes">a</xsl:with-param>
+        </xsl:call-template>
+      </dc:title>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=700]|marc:datafield[@tag=701]|marc:datafield[@tag=702]|marc:datafield[@tag=710]|marc:datafield[@tag=711]|marc:datafield[@tag=712]">
+      <dc:creator>
+      <xsl:value-of select="marc:subfield[@code='a']"/>
+      <xsl:if test="marc:subfield[@code='b']">
+         <xsl:text>, </xsl:text>
+         <xsl:value-of select="marc:subfield[@code='b']"/>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="marc:subfield[@code='4']='010'">, adapter</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='020'">, annotator</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='075'">, author of afterword</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='080'">, prefacer</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='100'">, bibliographic antecedent</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='205'">, collaborator</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='212'">, commentator</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='220'">, compiler</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='230'">, composer</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='245'">, conceptor</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='295'">, degree-grantor</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='340'">, editor</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='370'">, film editor</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='395'">, founder</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='440'">, illustrator</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='520'">, lyricist</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='557'">, organiser of meeting</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='570'">, other</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='600'">, photographer</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='605'">, presenter</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='650'">, publisher</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='651'">, publishing director</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='673'">, research team head</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='675'">, reviewer</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='710'">, redactor</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='723'">, sponsor</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='727'">, thesis advisor</xsl:when>
+        <xsl:when test="marc:subfield[@code='4']='730'">, translator</xsl:when>
+      </xsl:choose>
+      </dc:creator>
+    </xsl:for-each>
+    <dc:type>
+      <xsl:value-of select="marc:datafield[@tag=200]/marc:subfield[@code='b']"/>
+    </dc:type>
+    <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='c']">
+      <dc:publisher>
+        <xsl:value-of select="."/>
+      </dc:publisher>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=210]/marc:subfield[@code='d']">
+      <dc:date>
+        <xsl:value-of select="."/>
+      </dc:date>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=101]/marc:subfield[@code='a']">
+      <dc:language>
+      <xsl:value-of select="."/>
+      </dc:language>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q']">
+      <dc:format>
+        <xsl:value-of select="."/>
+      </dc:format>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=520]">
+      <dc:description>
+        <xsl:value-of select="marc:subfield[@code='a']"/>
+      </dc:description>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=521]">
+      <dc:description>
+        <xsl:value-of select="marc:subfield[@code='a']"/>
+      </dc:description>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[300&lt;@tag][@tag&lt;=345]">
+      <dc:description>
+        <xsl:value-of select="marc:subfield[@code='a']"/>
+      </dc:description>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=600]|marc:datafield[@tag=601]|marc:datafield[@tag=602]|marc:datafield[@tag=604]|marc:datafield[@tag=605]|marc:datafield[@tag=606]">
+      <dc:subject>
+        <xsl:call-template name="subfieldSelect">
+          <xsl:with-param name="codes">abcdq</xsl:with-param>
+        </xsl:call-template>
+      </dc:subject>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=752]">
+      <dc:coverage>
+        <xsl:call-template name="subfieldSelect">
+          <xsl:with-param name="codes">abcd</xsl:with-param>
+        </xsl:call-template>
+      </dc:coverage>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=530]">
+      <dc:relation type="original">
+        <xsl:call-template name="subfieldSelect">
+          <xsl:with-param name="codes">abcdu</xsl:with-param>
+        </xsl:call-template>
+      </dc:relation>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=461]|marc:datafield[@tag=464]">
+      <dc:relation>
+        <xsl:call-template name="subfieldSelect">
+          <xsl:with-param name="codes">t</xsl:with-param>
+        </xsl:call-template>
+      </dc:relation>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=856]">
+      <dc:identifier>
+        <xsl:value-of select="marc:subfield[@code='u']"/>
+      </dc:identifier>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=010]">
+      <dc:identifier>
+        <xsl:text>URN:ISBN:</xsl:text>
+        <xsl:value-of select="marc:subfield[@code='a']"/>
+      </dc:identifier>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=011]">
+      <dc:identifier>
+        <xsl:text>URN:ISSN:</xsl:text>
+        <xsl:value-of select="marc:subfield[@code='a']"/>
+      </dc:identifier>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=090]">
+       <dc:identifier>
+      <xsl:text>http://opac.mylibrary.org/bib/</xsl:text>
+      <xsl:value-of select="marc:subfield[@code='a']"/>
+      </dc:identifier>
+    </xsl:for-each>
+    <xsl:for-each select="marc:datafield[@tag=995]">
+       <dc:identifier>
+      <xsl:text>LOC:</xsl:text>
+      <xsl:choose>
+        <xsl:when test="marc:subfield[@code='c']='MAIN'">Main Branch</xsl:when>
+        <xsl:when test="marc:subfield[@code='c']='BIB2'">Library 2</xsl:when>
+      </xsl:choose>
+      <xsl:foreach select="marc:subfield[@code='k']">
+        <xsl:text>:</xsl:text>
+        <xsl:value-of select="."/>
+      </xsl:foreach>
+      </dc:identifier>
+    </xsl:for-each>
+  </xsl:template>
 </xsl:stylesheet>
index 22b8b78..263b140 100644 (file)
@@ -1,4 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
   
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns="http://www.w3.org/1999/xhtml"
index e26ccb7..2e0743e 100644 (file)
@@ -1,3 +1,4 @@
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <!-- identity transformation -->
   <!-- Whenever you match any node or any attribute -->
index f41b110..8f49e73 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:output method="html"/>
        
diff --git a/koha-tmpl/intranet-tmpl/prog/img/alert-bg.gif b/koha-tmpl/intranet-tmpl/prog/img/alert-bg.gif
deleted file mode 100644 (file)
index 44625a2..0000000
Binary files a/koha-tmpl/intranet-tmpl/prog/img/alert-bg.gif and /dev/null differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/bg-tab.png b/koha-tmpl/intranet-tmpl/prog/img/bg-tab.png
deleted file mode 100644 (file)
index 18554b0..0000000
Binary files a/koha-tmpl/intranet-tmpl/prog/img/bg-tab.png and /dev/null differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/button-bg.gif b/koha-tmpl/intranet-tmpl/prog/img/button-bg.gif
deleted file mode 100644 (file)
index a63f487..0000000
Binary files a/koha-tmpl/intranet-tmpl/prog/img/button-bg.gif and /dev/null differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/dialog-bg.gif b/koha-tmpl/intranet-tmpl/prog/img/dialog-bg.gif
deleted file mode 100644 (file)
index b70cf23..0000000
Binary files a/koha-tmpl/intranet-tmpl/prog/img/dialog-bg.gif and /dev/null differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/fade-butt.png b/koha-tmpl/intranet-tmpl/prog/img/fade-butt.png
deleted file mode 100644 (file)
index 42f08b7..0000000
Binary files a/koha-tmpl/intranet-tmpl/prog/img/fade-butt.png and /dev/null differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival lDVD.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival lDVD.gif
deleted file mode 100644 (file)
index 5b278cb..0000000
Binary files a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archival lDVD.gif and /dev/null differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif
new file mode 100644 (file)
index 0000000..5b278cb
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/Seshat/archivalDVD.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/7Day_book.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/7Day_book.gif
new file mode 100644 (file)
index 0000000..4be3ee1
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/7Day_book.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/juvenile_book.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/juvenile_book.gif
new file mode 100644 (file)
index 0000000..bd2eb76
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/juvenile_book.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/noncirc_book.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/noncirc_book.gif
new file mode 100644 (file)
index 0000000..171e9d7
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/noncirc_book.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/noncirc_dvd.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/noncirc_dvd.gif
new file mode 100644 (file)
index 0000000..8bff4a9
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/noncirc_dvd.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/reserve_book.gif b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/reserve_book.gif
new file mode 100644 (file)
index 0000000..ff64371
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/itemtypeimg/bridge/reserve_book.gif differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/message-bg.gif b/koha-tmpl/intranet-tmpl/prog/img/message-bg.gif
deleted file mode 100644 (file)
index 553546f..0000000
Binary files a/koha-tmpl/intranet-tmpl/prog/img/message-bg.gif and /dev/null differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient-hover.gif b/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient-hover.gif
deleted file mode 100644 (file)
index 9fcdc96..0000000
Binary files a/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient-hover.gif and /dev/null differ
diff --git a/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient.gif b/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient.gif
deleted file mode 100644 (file)
index af3addb..0000000
Binary files a/koha-tmpl/intranet-tmpl/prog/img/side-tab-gradient.gif and /dev/null differ
index 11c434f..21dc08f 100755 (executable)
@@ -220,9 +220,21 @@ h6 {
        font-size : 100%;
 }
 
-input[type=submit], input[type=button], input[type=reset] {
-       background : #b8d0e6 url(../../images/submit-bg.gif) repeat-x 0 0;
-       background-color : #b8d0e6;
+input[type=submit],
+input[type=button],
+input[type=reset],
+fieldset.brief input[type=submit],
+fieldset.brief input[type=button],
+fieldset.brief input[type=reset]
+{
+       background: #f4f9fc; /* Old browsers */
+       background: -moz-linear-gradient(top, #f4f9fc 0%, #dfeefa 4%, #bfd5ea 93%, #a1c4e2 97%, #b8d0e6 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f4f9fc), color-stop(4%,#dfeefa), color-stop(93%,#bfd5ea), color-stop(97%,#a1c4e2), color-stop(100%,#b8d0e6)); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* Chrome10+,Safari5.1+ */
+       background: -o-linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* Opera11.10+ */
+       background: -ms-linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* IE10+ */
+       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f9fc', endColorstr='#b8d0e6',GradientType=0 ); /* IE6-9 */
+       background: linear-gradient(top, #f4f9fc 0%,#dfeefa 4%,#bfd5ea 93%,#a1c4e2 97%,#b8d0e6 100%); /* W3C */
        border-top: 1px solid #cccccc;
        border-left: 1px solid #cccccc;
        border-right: 1px solid #eeeeee;
@@ -233,7 +245,7 @@ input[type=submit], input[type=button], input[type=reset] {
        padding : 4px;
 }
 
-input[type=submit]:active, input[type=button], input[type=reset] {
+input[type=submit]:active, input[type=button]:active, input[type=reset]:active {
        border: 1px inset #666666;
 }
 
@@ -760,10 +772,14 @@ body#advsearch #listsmenulink {
 }
 
 #opac-main-search {
-       background-image : url( ../../images/menu-background.gif);
-       background-repeat : repeat-x;
-       background-color : #739ACF;
-       background-position : -10px top;
+       background: #8fb4e8; /* Old browsers */
+       background: -moz-linear-gradient(top, #8fb4e8 0%, #8cb1e5 19%, #80a8dc 48%, #7da5d8 52%, #7198cf 83%, #618ac0 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#8fb4e8), color-stop(19%,#8cb1e5), color-stop(48%,#80a8dc), color-stop(52%,#7da5d8), color-stop(83%,#7198cf), color-stop(100%,#618ac0)); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* Chrome10+,Safari5.1+ */
+       background: -o-linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* Opera 11.10+ */
+       background: -ms-linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* IE10+ */
+       background: linear-gradient(top, #8fb4e8 0%,#8cb1e5 19%,#80a8dc 48%,#7da5d8 52%,#7198cf 83%,#618ac0 100%); /* W3C */
+       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8fb4e8', endColorstr='#618ac0',GradientType=0 ); /* IE6-9 */
        border-top : 1px solid #335599;
        border-bottom : 1px solid #335599;
        margin-left : -10px;
@@ -1340,8 +1356,15 @@ padding-left : .4em;
   }
  
 div.alert {
-  background : #FFC url(../../images/alert-bg.gif) repeat-x left 0;
-  text-align : center;
+       background: #fef8d3; /* Old browsers */
+       background: -moz-linear-gradient(top, #fef8d3 0%, #ffec91 9%, #ffed87 89%, #f9dc00 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fef8d3), color-stop(9%,#ffec91), color-stop(89%,#ffed87), color-stop(100%,#f9dc00)); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Chrome10+,Safari5.1+ */
+       background: -o-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* Opera11.10+ */
+       background: -ms-linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* IE10+ */
+       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fef8d3', endColorstr='#f9dc00',GradientType=0 ); /* IE6-9 */
+       background: linear-gradient(top, #fef8d3 0%,#ffec91 9%,#ffed87 89%,#f9dc00 100%); /* W3C */
+       text-align : center;
 }
 
 div.alert strong {
@@ -1349,8 +1372,15 @@ div.alert strong {
 }
 
 div.message {
-       background : white url("../../images/message-bg.gif") repeat-x left 0;
-   border : 1px solid #bcbcbc;
+       background: #ffffff; /* Old browsers */
+       background: -moz-linear-gradient(top, #ffffff 0%, #f4f6fa 2%, #eaeef5 23%, #e8edf6 94%, #cddbf2 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(2%,#f4f6fa), color-stop(23%,#eaeef5), color-stop(94%,#e8edf6), color-stop(100%,#cddbf2)); /* Chrome,Safari4+ */
+       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 */
+       background: linear-gradient(top, #ffffff 0%,#f4f6fa 2%,#eaeef5 23%,#e8edf6 94%,#cddbf2 100%); /* W3C */
+       border : 1px solid #bcbcbc;
        width : 55%;
 }
 
@@ -1388,11 +1418,15 @@ div.message {
 }
 
 #opac-main-search #listsmenu .bd {
-       background-color : #f3f3f3;
+       background: #eef4fe; /* Old browsers */
+       background: -moz-linear-gradient(left, #eef4fe 0%, #eef4fe 88%, #f6f9fe 98%, #ffffff 99%, #a5c2f6 99%, #e6eefe 100%, #cbdefe 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eef4fe), color-stop(88%,#eef4fe), color-stop(98%,#f6f9fe), color-stop(99%,#ffffff), color-stop(99%,#a5c2f6), color-stop(100%,#e6eefe), color-stop(100%,#cbdefe)); /* Chrome,Safari4+ */
+       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;
-       background-image : url("../../images/listmenu-container-bg.gif");
-       background-position : top right;
-       background-repeat : repeat-y;
        padding : .3em 1em 0 0;
 }
 
@@ -1448,6 +1482,10 @@ div#changelanguage li.yuimenuitem a.yuimenuitemlabel {
        padding : 0;
 }
 
+div.lang{
+        float:left;
+}
+
 #cartDetails,#cartUpdate,#holdDetails,#listsDetails {
        background-color : #FFF;
        border: 1px solid #739acf;
@@ -1474,12 +1512,21 @@ div#changelanguage li.yuimenuitem a.yuimenuitemlabel {
 }
 
 #opac-main-search input.submit {
-       background : #b8d0e6 url(../../images/submit-bg.gif) repeat-x 0 0;
-       background-color : #b8d0e6;
-       border-top: 1px solid #cccccc;
-       border-left: 1px solid #cccccc;
-       border-right: 1px solid #eeeeee;
-       border-bottom: 1px solid #eeeeee;
+       background: #e6f3fe; /* Old browsers */
+       background: -moz-linear-gradient(top, #e6f3fe 0%, #dfeefa 8%, #bfd5ea 49%, #b8d0e6 52%, #b8d0e6 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e6f3fe), color-stop(8%,#dfeefa), color-stop(49%,#bfd5ea), color-stop(52%,#b8d0e6), color-stop(100%,#b8d0e6)); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* Chrome10+,Safari5.1+ */
+       background: -o-linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* Opera11.10+ */
+       background: -ms-linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* IE10+ */
+       filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e6f3fe', endColorstr='#b8d0e6',GradientType=0 ); /* IE6-9 */
+       background: linear-gradient(top, #e6f3fe 0%,#dfeefa 8%,#bfd5ea 49%,#b8d0e6 52%,#b8d0e6 100%); /* W3C */
+       -webkit-border-radius: 4px;
+       -moz-border-radius: 4px;
+       border-radius: 4px;
+       -webkit-box-shadow: 1px 1px 1px 1px , , .3);
+       -moz-box-shadow: 1px 1px 1px 1px , , .3);
+       box-shadow: 1px 1px 1px 1px , , .3);
+
        color : #333;
        font-weight : normal;
        font-size : 80%;
@@ -1495,9 +1542,16 @@ div#menu {
 }
 
 div#menu li a {
+       background: #eeeeee; /* Old browsers */
+       background: -moz-linear-gradient(left, #eeeeee 0%, #eeeeee 96%, #e6e6e6 97%, #cccccc 99%, #c1c1c1 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eeeeee), color-stop(96%,#eeeeee), color-stop(97%,#e6e6e6), color-stop(99%,#cccccc), color-stop(100%,#c1c1c1)); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(left, #eeeeee 0%,#eeeeee 96%,#e6e6e6 97%,#cccccc 99%,#c1c1c1 100%); /* Chrome10+,Safari5.1+ */
+       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;
-       background : #EEE url(../../images/side-tab-gradient.gif) repeat-y top right;
        border : 1px solid #979797;
        font-size : 111%;
        margin : .5em 0;
@@ -1506,7 +1560,14 @@ div#menu li a {
 }
 
 div#menu li a:hover {
-       background : #E8F0F6 url(../../images/side-tab-gradient-hover.gif) repeat-y top right;
+       background: #eaeef5; /* Old browsers */
+       background: -moz-linear-gradient(left, #eaeef5 0%, #dee6f4 96%, #c4d5ef 98%, #a2bee8 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, right top, color-stop(0%,#eaeef5), color-stop(96%,#dee6f4), color-stop(98%,#c4d5ef), color-stop(100%,#a2bee8)); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(left, #eaeef5 0%,#dee6f4 96%,#c4d5ef 98%,#a2bee8 100%); /* Chrome10+,Safari5.1+ */
+       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 {
@@ -2173,36 +2234,39 @@ a.koha_url {
     background-color:#D9D9D9;
 }
 .nav_results ul.pg_menu {
-    height:25px;
     border-top: 1px solid #D0D0D0;
+    white-space : nowrap;
 }
 .nav_results ul.pg_menu li {
     color:#B2B2B2;
-    display:block;
-    float:left;
-    padding:5px 0;
+    display:inline;
     list-style:none;
-    text-align:center;
+    margin: 0;
 }
-.nav_results ul.pg_menu li.back_results {
-    padding:5px 0px;
-    width:45%;
+.nav_results ul.pg_menu li.back_results a {
     border-left: 1px solid #D0D0D0;
     border-right: 1px solid #D0D0D0;
 }
-.nav_results ul.pg_menu li a {
+.nav_results ul.pg_menu li a,
+.nav_results ul.pg_menu li span {
+       background-color: #F3F3F3;
+       display : block;
+    float:left;
+    padding:.4em .5em;
     text-decoration:none;
     font-weight:normal;
-    color:#4D4D4D;
+    text-align:center;
 }
-.nav_results ul.pg_menu li a:hover {
-    color:#006699;
+
+.nav_results ul.pg_menu li span {
+       color : #B2B2B2;
 }
-.nav_results ul.pg_menu li.left_results {
-    margin-right:10px;
+
+.nav_results ul.pg_menu li.left_results a {
+       padding-left : 0;
 }
-.nav_results ul.pg_menu li.right_results {
-    margin-left:10px;
+
+.nav_results ul.pg_menu li a:hover {
 }
 
 .nav_results #listResults{
index 53db2bc..85df351 100644 (file)
@@ -17,7 +17,7 @@ body {
        background-color : #FFF;
        color : #333333;
        font-family : arial, geneva, sans-serif;
-       font-size : 12px;
+       font-size : 14px;
        margin : 0px 0px 0px 0px;
 }
 
@@ -98,8 +98,7 @@ table {
        border-left : 0px solid #CCCCCC;
        margin : 3px 0px 5px 0px;
        padding : 0px;
-       width : 100%;
-       height : 100%;
+       width : 99%;
 }
 
 td {
@@ -108,8 +107,6 @@ td {
        border-right : 1px solid #CCCCCC;
        padding : 5px 5px 5px 5px;
        vertical-align : top;
-       width : 100%;
-       height : 100%;
 }
 
 td:last-child {
@@ -126,8 +123,6 @@ th {
        border-right : 1px solid #CCCCCC;
        font-weight : bold;
        padding : 5px 5px 5px 5px;
-       width: 100%;
-       height : 100%;
 }
 
 th:last-child {
index 140abeb..43ba022 100644 (file)
@@ -1,6 +1,66 @@
 <link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css"/>
 <script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
-<script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-en.js"></script>
+<script type="text/javascript">
+// full day names
+Calendar._DN = new Array(_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday"),_("Sunday"));
+// short day names
+Calendar._SDN = new Array(_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat"),_("Sun"));
+// First day of the week. "0" means display Sunday first, "1" means display
+// Monday first, etc.
+Calendar._FD = 1;
+// full month names
+Calendar._MN = new Array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
+// short month names
+Calendar._SMN = new Array(_("Jan"),_("Feb"),_("Mar"),_("Apr"),_("May"),_("Jun"),_("Jul"),_("Aug"),_("Sep"),_("Oct"),_("Nov"),_("Dec"));
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = _("About the calendar");
+
+Calendar._TT["ABOUT"] =
+_("Dhtml Date/Time Selector")+"\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+_("For latest version visit: http://dynarch.com/mishoo/calendar.epl")+"\n" +
+_("Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details.") +
+"\n\n" +
+_("Date selection:")+"\n" +
+_("- Use the \xab, \xbb buttons to select year")+"\n" +
+_("- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month")+"\n" +
+_("- Hold mouse button on any of the above buttons for faster selection.");
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+_("Time selection:")+"\n" +
+_("- Click on any of the time parts to increase it")+"\n" +
+_("- or Shift-click to decrease it")+"\n" +
+_("- or click and drag for faster selection.");
+
+Calendar._TT["PREV_YEAR"] = _("Prev. year (hold for menu)");
+Calendar._TT["PREV_MONTH"] = _("Prev. month (hold for menu)");
+Calendar._TT["GO_TODAY"] = _("Go to Today");
+Calendar._TT["NEXT_MONTH"] = _("Next month (hold for menu)");
+Calendar._TT["NEXT_YEAR"] = _("Next year (hold for menu)");
+Calendar._TT["SEL_DATE"] = _("Select date");
+Calendar._TT["DRAG_TO_MOVE"] = _("Drag to move");
+Calendar._TT["PART_TODAY"] = _(" (today)");
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = _("Display %s first");
+
+// This may be locale-dependent.  It specifies the week-end days, as an array
+// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = _("Close");
+Calendar._TT["TODAY"] = _("Today");
+Calendar._TT["TIME_PART"] = _("(Shift-)Click or drag to change value");
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = _("wk");
+Calendar._TT["TIME"] = _("Time:");
+</script>
 <script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
 <script type="text/javascript">
 //<![CDATA[
index 59188ef..a264af3 100644 (file)
@@ -9,11 +9,12 @@
 <div id="changelanguage" class="ft">
 [% IF ( languages_loop && opaclanguagesdisplay ) %]
     [% UNLESS ( one_language_enabled ) %]
-        <strong>Languages: </strong>
+        <div class="lang"><strong>Languages:&nbsp;</strong></div>
         [% FOREACH languages_loo IN languages_loop %]
+           <div class="lang">
             [% IF ( languages_loo.group_enabled ) %]
             [% IF ( languages_loo.plural ) %]
-            <a id="show[% languages_loo.rfc4646_subtag %]" class="sublangs more" href="#">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</a>
+            <a id="show[% languages_loo.rfc4646_subtag %]" class="sublangs more" href="#">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</a>[% UNLESS ( loop.last ) %] | [% END %]
                        <div id="sub[% languages_loo.rfc4646_subtag %]">
             <div class="bd"><ul>
             [% FOREACH sublanguages_loo IN languages_loo.sublanguages_loop %]
@@ -37,7 +38,8 @@
                 [% END %]
                [% END %]
             [% END %]
-            [% END %][% UNLESS ( loop.last ) %] | [% END %]
+            [% END %][% UNLESS ( loop.last || languages_loo.plural ) %] | [% END %]
+            </div>
         [% END %]
     [% END %]
 [% END %]
index 4e6c935..ccb37b0 100755 (executable)
@@ -19,7 +19,7 @@
 [% END %]
 <ul>
         [% FOREACH facet IN facets_loo.facets %]<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]&amp;limit=[% facet.type_link_value %]:[% facet.facet_link_value %]" title="[% facet.facet_title_value |html %]">[% facet.facet_label_value %]</a> [% IF ( displayFacetCount ) %]([% facet.facet_count %])[% END %]</li>[% END %][% IF ( facets_loo.expandable ) %]
-        <li class="showmore"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]&amp;offset=[% facets_loo.offset %]&amp;expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li>
+        <li class="showmore"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %][% IF ( offset ) %]&amp;offset=[% offset %][% END %]&amp;expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li>
 [% END %]
 </ul></li>
 [% END %]
index 5fc5503..62be158 100644 (file)
@@ -118,7 +118,7 @@ function tagAdded() {
 
 <div id="doc" class="yui-t7">
 <div id="userbasket" class="container">
-<h1>Your Cart</h1>
+<h2>Your Cart</h2>
 
 [% UNLESS ( print_basket ) %]
 <div id="toolbar">
index 8cba98b..066f4ff 100755 (executable)
@@ -1,4 +1,4 @@
-[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield %][% END %]
+[% 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="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <script type="text/JavaScript" language="JavaScript">
@@ -249,7 +249,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     [% IF ( OPACXSLTDetailsDisplay ) %]
         [% XSLTBloc %]
     [% ELSE %]
-    <h1 class="title">[% title |html %][% IF ( subtitle ) %] <span class="subtitle">[% FOREACH subtitl IN subtitle %][% subtitl.subfield %] [% END %]</span>[% END %]</h1>
+    <h1 class="title">[% title |html %][% IF ( subtitle ) %] <span class="subtitle">[% FOREACH subtitl IN subtitle %][% subtitl.subfield |html %] [% END %]</span>[% END %]</h1>
     [% IF ( author ) %]<h5 class="author">by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% author |url %]">[% author |html %]</a></h5>[% END %] 
 
     <span class="results_summary">[% UNLESS ( item_level_itypes ) %]
@@ -266,7 +266,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     [% IF ( MARCAUTHORS ) %]
     <span class="results_summary"><span class="label">Authors:</span>
                 [% FOREACH MARCAUTHOR IN MARCAUTHORS %]
-                [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="&#8225;[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %] 
+                [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %]<a title="[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a>[% END %] 
         [% UNLESS ( loop.last ) %]|
 [% END %]
                 [% END %]
@@ -853,21 +853,23 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
             [% IF ( review.your_comment ) %]
             <div class="commentline yours" id="c[% review.reviewid %]">
                 [% IF ( review.avatarurl ) %]
-            <img class="avatar" src="[% review.avatarurl %]" height="80" width="80"/>
+            <img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
                 [% END %]
             <h5>
                 Your Comment
             </h5>
             <small>[% review.datereviewed %]</small>
         <p>
-          [% review.review %]
+          [% FILTER html_break %]
+          [% review.review |html %]
+          [% END %]
           <a href="#" onclick="Dopop('/cgi-bin/koha/opac-review.pl?biblionumber=[% review.biblionumber %]&amp;reviewid=[% review.reviewid %]');">Edit</a>
         </p></div>
             [% ELSE %]
             <div class="commentline">
             [% IF ( ShowReviewer ) %]
                 [% IF ( review.avatarurl ) %]
-            <img class="avatar" src="[% review.avatarurl %]" height="80" width="80"/>
+            <img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
                 [% END %]
             <h5>
                 Comment by
@@ -878,7 +880,9 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
             [% END %]
             <small>[% review.datereviewed %]</small>
         <p>
-          [% review.review %]
+          [% FILTER html_break %]
+          [% review.review |html %]
+          [% END %]
         </p></div>
             [% END %]
         [% END %]
@@ -994,11 +998,11 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 <div id="ulactioncontainer" class="container">
 [% IF ( busc ) %]
     <div class="nav_results">
-        <div class="l_Results">[% IF ( listResults ) %]<a href="#" id="a_listResults" title="Show pagination list ([% indexPag %]-[% indexPagEnd %] / [% totalPag %])">Browse results</a>[% ELSE %]Browse results[% END %]</div>
-        <ul class="pg_menu">
-            <li class="left_results">[% IF ( previous ) %]<a href="[% previous %]" title="See: [% IF ( previousTitle ) %][% previousTitle |html %][% ELSE %]previous biblio[% END %]">&laquo; Previous</a>[% ELSE %]Previous[% END %]</li>
+        <div class="l_Results">[% IF ( listResults ) %]<a href="#" id="a_listResults" title="Show pagination list ([% indexPag %]-[% indexPagEnd %] / [% totalPag %])">Browse results</a>[% ELSE %]<span>Browse results</span>[% END %]</div>
+        <ul class="pg_menu clearfix">
+            <li class="left_results">[% IF ( previous ) %]<a href="[% previous %]" title="See: [% IF ( previousTitle ) %][% previousTitle |html %][% ELSE %]previous biblio[% END %]">&laquo; Previous</a>[% ELSE %]<span>Previous</span>[% END %]</li>
             <li class="back_results"><a href="opac-search.pl?[% busc %]" title="Back to the results search list">Back to results</a></li>
-            <li class="right_results">[% IF ( next ) %]<a href="[% next %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next &raquo;</a>[% ELSE %]Next[% END %]</li>
+            <li class="right_results">[% IF ( next ) %]<a href="[% next %]" title="See: [% IF ( nextTitle ) %][% nextTitle |html %][% ELSE %]next biblio[% END %]">Next &raquo;</a>[% ELSE %]<span>Next</span>[% END %]</li>
         </ul>
         [% IF ( listResults ) %]
         <div class="pagination">
index 93a717f..a92d71d 100644 (file)
@@ -22,7 +22,7 @@
 [% INCLUDE 'masthead.inc' %]
 
        <div id="yui-main">
-       <div class="yui-b">
+       <div class="yui-b"><div class="yui-g" id="usermessaging">
 
 [% FOREACH BORROWER_INF IN BORROWER_INFO %]
 <h3><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your Messaging Settings</h3>
 </form>
 </div>
 </div>
+</div>
 <div class="yui-b">
 <div id="leftmenus" class="container">
 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
index 0710344..14a5f3e 100644 (file)
 [% IF ( rss2 ) %]
 <rss version="2.0"
       xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
+      xmlns:dc="http://purl.org/dc/elements/1.1/"
       xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
      <title><![CDATA[[% LibraryName |html %] Search [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc |html %]'[% END %]]]></title>
      <link>[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;format=rss2</link>
-     <atom:link rel="self" type="application/rss+xml" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;format=rss2" />
+     <atom:link rel="self" type="application/rss+xml" href="[% OPACBaseurl %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;sort_by=[% sort_by |html %]&amp;format=rss2"/>
      <description><![CDATA[ Search results [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc |html %]'[% END %] at [% LibraryName |html %]]]></description>
      <opensearch:totalResults>[% total %]</opensearch:totalResults>
      <opensearch:startIndex>[% offset %]</opensearch:startIndex>
      [% ELSE %]
        <opensearch:itemsPerPage>20</opensearch:itemsPerPage>
      [% END %]
-     <atom:link rel="search" type="application/opensearchdescription+xml" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?format=opensearchdescription"/>
-     <opensearch:Query role="request" searchTerms="[% query_desc |html %] [% limit_desc |html %]" startPage="[% page %]" />
         [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
+     <atom:link rel="search" type="application/opensearchdescription+xml" href="[% SEARCH_RESULT.OPACBaseurl %]/cgi-bin/koha/opac-search.pl?[% SEARCH_RESULT.query_cgi |html %][% SEARCH_RESULT.limit_cgi |html %]&amp;sort_by=[% SEARCH_RESULT.sort_by |html %]&amp;format=opensearchdescription"/>
+     <opensearch:Query role="request" searchTerms="[% SEARCH_RESULT.query_desc |url %][% SEARCH_RESULT.limit_desc |url %]" startPage="[% SEARCH_RESULT.page %]" />
      <item>
        <title>[% SEARCH_RESULT.title |html %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield |html %][% END %]</title>
-       <isbn>[% SEARCH_RESULT.isbn |html %]</isbn>
+       <dc:identifier>ISBN [% SEARCH_RESULT.isbn |html %]</dc:identifier>
        <link>[% IF ( SEARCH_RESULT.BiblioDefaultViewmarc ) %][% OPACBaseURL %]/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %][% ELSE %][% IF ( SEARCH_RESULT.BiblioDefaultViewisbd ) %][% OPACBaseURL %]/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %][% ELSE %][% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %][% END %][% END %]</link>
        <description><![CDATA[
 [% IF ( OPACAmazonEnabled ) %][% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<img src="http://images.amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn %].01.TZZZZZZZ.jpg" alt="" />[% END %][% END %][% END %]
-
-[% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( SEARCH_RESULT.content_identifier_exists ) %][% IF ( using_https ) %]<img src="https://secure.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc %]" alt="" />
+[% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( SEARCH_RESULT.content_identifier_exists ) %]<img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&amp;client=[% SEARCH_RESULT.SyndeticsClientCode %]&amp;type=xw10[% IF ( SEARCH_RESULT.normalized_upc ) %]&amp;upc=[% SEARCH_RESULT.normalized_upc %][% END %][% IF ( SEARCH_RESULT.normalized_oclc ) %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc %][% END %]" alt="" />
 [% ELSE %]
 <img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% SEARCH_RESULT.normalized_upc %]&amp;oclc=[% SEARCH_RESULT.normalized_oclc %]" alt="" />
-[% END %][% END %][% END %][% END %]
+[% END %][% END %][% END %]
 
 [% IF ( BakerTaylorEnabled ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<a href="https://[% BakerTaylorBookstoreURL |html %][% SEARCH_RESULT.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% SEARCH_RESULT.normalized_isbn %]" /></a>[% END %][% END %]
           <p>[% IF ( SEARCH_RESULT.author ) %]By [% SEARCH_RESULT.author |html %]. [% END %]
@@ -51,7 +51,7 @@
                         [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size |html %]. [% END %]
                         [% IF ( SEARCH_RESULT.isbn ) %] [% SEARCH_RESULT.isbn |html %][% END %] </p><p>
 [% IF ( RequestOnOpac ) %]
-<a href="[% OPACBaseURL %]/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Place Hold on <i>[% SEARCH_RESULT.title |html %]</i></a></p>
+<a href="[% SEARCH_RESULT.OPACBaseurl %]/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Place Hold on <i>[% SEARCH_RESULT.title %]</i></a></p>
 [% END %]
                                                ]]></description>
        <guid>[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]</guid>
      <opensearch:itemsPerPage>20</opensearch:itemsPerPage>
    [% END %]
    <opensearch:Query role="request" searchTerms="[% query_desc |html %] [% limit_desc |html %]" startPage="[% page |html %]" />
-   <link rel="alternate" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]pw=[% page %]" type="text/html"/>
+   <link rel="alternate" href="[% OPACBaseurl %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=[% page %]&amp;format=atom" type="application/atom+xml"/>
    <link rel="self" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]&amp;format=atom" type="application/atom+xml"/>
    <link rel="first" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=1&amp;format=atom" type="application/atom+xml"/>
    <link rel="previous" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=2&amp;format=atom" type="application/atom+xml"/>
    <link rel="next" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=4&amp;format=atom" type="application/atom+xml"/>
-   <link rel="last" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]pw=42299&amp;format=atom" type="application/atom+xml"/>
+   <link rel="last" href="[% OPACBaseurl %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi %]pw=42299&amp;format=atom" type="application/atom+xml"/>
    <link rel="search" type="application/opensearchdescription+xml" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?format=opensearchdescription"/>
 
    [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
index baf7676..9e1b855 100644 (file)
@@ -1,7 +1,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo;
 [% IF ( searchdesc ) %]
-       Results of Search [% IF ( query_desc ) %]for '[% query_desc %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc %]'[% END %]
+       Results of Search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %]
 [% ELSE %]
     You did not specify any search criteria.
 [% END %]
index 7201a82..e7c6e2d 100755 (executable)
@@ -1,7 +1,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo;
 [% IF ( searchdesc ) %]
-       Results of Search [% IF ( query_desc ) %]for '[% query_desc %]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc %]'[% END %]
+       Results of Search [% IF ( query_desc ) %]for '[% query_desc | html%]'[% END %][% IF ( limit_desc ) %]&nbsp;with limit(s):&nbsp;'[% limit_desc | html %]'[% END %]
 [% ELSE %]
     You did not specify any search criteria.
 [% END %]
@@ -417,7 +417,7 @@ $(document).ready(function(){
                                 [% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber |url %]" title="View details for this title">
                                 [% END %]
                                 [% END %]
-                                                               [% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %][% subtitl.subfield %][% END %]</a>
+                                                               [% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %][% subtitl.subfield %][% END %]</a>
                                 [% IF ( SEARCH_RESULT.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% SEARCH_RESULT.author |url %]" title="Search for works by this author" class="author">[% SEARCH_RESULT.author %]</a>
                                 [% ELSE %]&nbsp;
                                 [% END %]
index 528b8a7..391037f 100644 (file)
@@ -70,7 +70,7 @@ $(function() {
   $("a.print").show();
 
     [% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]$("#placehold").html("<a href=\"#\" class=\"hold tag_hides\">"+_('Place Hold')+"<\/a>");
-      $("a.hold").click(function(){
+      $("#toolbar a.hold").click(function(){
          holdSelections();
          return false;
       });[% END %][% END %]
@@ -92,7 +92,6 @@ $(function() {
           $("#addtags").html("<a id=\"tagsel_tag\" href=\"#\">"+_("Tag")+"<\/a> |");
 
         $(".tagbutton").click(KOHA.Tags.add_tag_button);
-      [% IF ( TagsInputOnList ) %]
       [% IF ( loggedinusername ) %]
             $("#tagsel_tag").click(function(){
                 tagSelected();
@@ -112,7 +111,6 @@ $(function() {
                 return false;
             });
         [% END %]
-        [% END %]
         [% END %][% END %][% END %]
   [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
 });
@@ -278,14 +276,16 @@ $(function() {
           [% END %][% ELSE %]This record has no items.[% END %]</span>
             [% END %]
         [% IF ( TagsEnabled ) %]
-                [% IF ( TagsShowOnList ) %]
-                [% IF ( itemsloo.TagLoop ) %]
-          <div class="results_summary">
-                        <span class="label">Tags:</span>
-                        <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN itemsloo.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 ( TagsShowOnList ) %]
+            [% IF ( itemsloo.TagLoop.size ) %]
+              <div class="results_summary">
+              <span class="label">Tags:</span>
+              <ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN itemsloo.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>
+              </div>
+            [% END %]
+          [% END %]
                 [% IF ( TagsInputOnList ) %]
           [% IF ( loggedinusername ) %]
                     <form name="tagform[% itemsloo.biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl">
@@ -299,10 +299,10 @@ $(function() {
                     [% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span>
                   [% END %]
                 [% END %]
-                  [% IF ( itemsloo.TagLoop ) %]
-          </div>[% END %]
+            [% IF ( loggedinusername ) %]
+              <span id="newtag[% itemsloo.biblionumber %]_status" class="tagstatus" style="display:none;">Tag status here.</span>
+            [% END %]
         [% END %]
-                [% END %]
 
 <span class="results_summary actions"><span class="label">Actions:</span>
       [% IF ( RequestOnOpac ) %]
index d9a630f..fdea679 100644 (file)
@@ -14,7 +14,7 @@ $(document).ready(function(){
    <div id="bd">
 [% INCLUDE 'masthead.inc' %]
        <div id="yui-main">
-       <div class="yui-b"><div id="usershowreviews" class="container">
+       <div id="usershowreviews" class="container">
     <div id="recentcomments" class="searchresults">
 <h3>Recent comments</h3>
 <table>
@@ -28,7 +28,7 @@ $(document).ready(function(){
     [% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
     [% END %]
     [% END %]
-    [% IF ( review.title ) %][% review.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN review.subtitle %] [% subtitl.subfield %][% END %]</a>
+    [% IF ( review.title ) %][% review.title %][% ELSE %]No title[% END %] [% FOREACH subtitl IN review.subtitle %] [% subtitl.subfield |html %][% END %]</a>
     [% IF ( review.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% review.author |url %]" title="Search for works by this author" class="author">[% review.author %]</a></p>
     [% END %]
     <p>
@@ -48,16 +48,16 @@ $(document).ready(function(){
 
             <p class="commentline[% IF ( review.your_comment ) %] yours[% END %]">
             [% IF ( review.avatarurl ) %]
-                <img class="avatar" src="[% review.avatarurl %]" height="40" width="40"/>
+                <img class="avatar" src="[% review.avatarurl %]" height="40" width="40" alt="" />
             [% END %]
+            [% FILTER html_break %]
             [% review.review |html %]
+            [% END %]
             <span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
             [% IF ( ShowReviewer ) %] by
             [% review.firstname %] [% review.surname %][% END %][% END %]</span></p>
         </td>
         <td>
-            <a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber %]">
-
 [% IF ( review.BiblioDefaultViewmarc ) %]<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
     [% ELSE %]
     [% IF ( review.BiblioDefaultViewisbd ) %]<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
@@ -93,7 +93,6 @@ $(document).ready(function(){
 </div>
 </div>
 </div>
-</div>
 [% IF ( OpacNav ) %]
 <div class="yui-b"><div id="leftmenus" class="container">
 [% INCLUDE 'navigation.inc' %]
index 0971f46..b78fc03 100644 (file)
@@ -27,7 +27,7 @@ $.tablesorter.addParser({
             }); 
                        $("#overduest").tablesorter();
 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
-        [% IF ( OpacRenewalAllowed ) %][% IF ( canrenew ) %]$("#renewselected").submit(function(){
+        [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]$("#renewselected").submit(function(){
             valid = false;
             $("input[type=checkbox]").each(function(){
                 if($(this).is(':checked')){
@@ -45,7 +45,7 @@ $.tablesorter.addParser({
         $("#renewall_link").live('click',function(){
             $("#renewall").submit();
         });
-        $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %][% END %]
+        $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %]
             });
 //]]>
 </script>
@@ -92,8 +92,8 @@ $.tablesorter.addParser({
         [% IF ( BORROWER_INF.flagged ) %]
                <div class="dialog alert">
         <ul>
-            [% IF ( BORROWER_INF.debarred ) %]
-                <li><strong>Please note:</strong> Your account has been frozen until [% BORROWER_INF.debarred %] - [% BORROWER_INF.debarredcomment %]. Usually the reason for freezing an account is old overdues or damage fees.If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
+            [% IF ( userdebarred ) %]
+                <li><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until [% BORROWER_INF.userdebarreddate %][% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment "[% BORROWER_INF.debarredcomment %]"[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
             [% END %]
             [% IF ( BORROWER_INF.gonenoaddress ) %]
                 <li><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file.  Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li>
@@ -260,14 +260,11 @@ $.tablesorter.addParser({
             </tr>
         [% END %]</tbody>
         </table>
-          [% IF ( canrenew ) %]
-               [% IF ( OpacRenewalAllowed ) %]
+          [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
                <input type="submit" value="Renew Selected" />
                [% END %]
-        [% END %]
                </form>
-               [% IF ( OpacRenewalAllowed ) %]
-        [% IF ( canrenew ) %]
+        [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
                <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
                        <input type="hidden" name="from" value="opac_user" />
                        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
@@ -277,7 +274,6 @@ $.tablesorter.addParser({
                        [% UNLESS patron_flagged %]<input type="submit" value="Renew All" />[% END %]
                </form>
                [% END %]
-        [% END %]
     [% ELSE %]
         <table>
             <tr><td>You have nothing checked out</td></tr>
index e16db73..be2b4fd 100755 (executable)
                     <xsl:call-template name="subfieldSelect">
                         <xsl:with-param name="codes">a</xsl:with-param>
                     </xsl:call-template>
-                    <xsl:if test="marc:subfield[@code='b']">
+                    <xsl:if test="marc:subfield[@code='h']">
                         <xsl:text> </xsl:text>
                         <xsl:call-template name="subfieldSelect">
-                            <xsl:with-param name="codes">b</xsl:with-param>
+                            <xsl:with-param name="codes">h</xsl:with-param>
                         </xsl:call-template>
                     </xsl:if>
-                    <xsl:if test="marc:subfield[@code='h']">
+                    <xsl:if test="marc:subfield[@code='b']">
                         <xsl:text> </xsl:text>
                         <xsl:call-template name="subfieldSelect">
-                            <xsl:with-param name="codes">h</xsl:with-param>
+                            <xsl:with-param name="codes">b</xsl:with-param>
                         </xsl:call-template>
                     </xsl:if>
                 <xsl:text> </xsl:text>
         <span class="results_summary series"><span class="label">Series: </span>
         <!-- 440 -->
         <xsl:for-each select="marc:datafield[@tag=440]">
-             <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
+            <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
             <xsl:call-template name="chopPunctuation">
                             <xsl:with-param name="chopString">
                                 <xsl:call-template name="subfieldSelect">
 
         <!-- 490 Series not traced, Ind1 = 0 -->
         <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
-             <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
+            <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
                         <xsl:call-template name="chopPunctuation">
                             <xsl:with-param name="chopString">
                                 <xsl:call-template name="subfieldSelect">
         <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
             <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
                 <xsl:choose>
-                    <xsl:when test="marc:subfield[@code='w']">
+                    <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
                         <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
                             <xsl:call-template name="chopPunctuation">
                                 <xsl:with-param name="chopString">
                         </a>
                     </xsl:when>
                     <xsl:otherwise>
-                        <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
+                        <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
                             <xsl:call-template name="chopPunctuation">
                                 <xsl:with-param name="chopString">
                                     <xsl:call-template name="subfieldSelect">
         </span>
        </xsl:if>
 
+
+        <xsl:if test="marc:datafield[@tag=242]">
+        <span class="results_summary translated_title"><span class="label">Title translated: </span>
+            <xsl:for-each select="marc:datafield[@tag=242]">
+                <xsl:call-template name="chopPunctuation">
+                  <xsl:with-param name="chopString">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">abchnp</xsl:with-param>
+                    </xsl:call-template>
+                   </xsl:with-param>
+               </xsl:call-template>
+                    <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>
+        </span>
+       </xsl:if>
+
         <!-- Uniform Title  Statement: Alternate Graphic Representation (MARC 880) -->
         <xsl:if test="$display880">
             <xsl:call-template name="m880Select">
         </span>
         </xsl:for-each>
 
-       <!-- 866 holdings public note -->
+        <!-- 866 textual holdings -->
         <xsl:if test="marc:datafield[@tag=866]">
-        <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
-        <xsl:for-each select="marc:datafield[@tag=866]">
-                <xsl:value-of select="marc:subfield[@code='z']"/>
-                <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>
-        </span>
+            <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
+                <xsl:for-each select="marc:datafield[@tag=866]">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">az</xsl:with-param>
+                    </xsl:call-template>
+                    <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>
+            </span>
         </xsl:if>
 
         <!--  775 Other Edition  -->
index ee4058a..fe18b80 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:output method="html"/>
 
@@ -52,4 +53,4 @@
                <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><br /></xsl:otherwise></xsl:choose>
        </xsl:template>
 
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
index 9c6c307..d742a29 100644 (file)
             </xsl:for-each>
        </span>
     </xsl:if>
+    <xsl:if test="marc:datafield[@tag=242]">
+       <span class="results_summary">
+    <span class="label">Title translated: </span>
+            <xsl:for-each select="marc:datafield[@tag=242]">
+                    <xsl:call-template name="subfieldSelect">
+                        <xsl:with-param name="codes">abh</xsl:with-param>
+                    </xsl:call-template>
+                    <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>
+       </span>
+    </xsl:if>
     <xsl:if test="marc:datafield[@tag=856]">
          <span class="results_summary">
                           <span class="label">Online Access: </span>
index 27d0891..9ec913c 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version='1.0'?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template name="datafield">
                <xsl:param name="tag"/>
index d2b6b1b..1a4e042 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
 <xsl:stylesheet version="1.0"
   xmlns:marc="http://www.loc.gov/MARC21/slim"
index a5534ee..9d5323c 100644 (file)
@@ -1,4 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
 <xsl:stylesheet version="1.0"
   xmlns:marc="http://www.loc.gov/MARC21/slim"
index 7c2bf21..31317b1 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version='1.0'?>
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
 <xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template name="datafield">
                <xsl:param name="tag"/>
index 22b8b78..17c9b67 100644 (file)
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-  
+
+<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
+
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/koha-tmpl/opac-tmpl/prog/images/alert-bg.gif b/koha-tmpl/opac-tmpl/prog/images/alert-bg.gif
deleted file mode 100644 (file)
index 44625a2..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/images/alert-bg.gif and /dev/null differ
diff --git a/koha-tmpl/opac-tmpl/prog/images/listmenu-container-bg.gif b/koha-tmpl/opac-tmpl/prog/images/listmenu-container-bg.gif
deleted file mode 100644 (file)
index bdeb1aa..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/images/listmenu-container-bg.gif and /dev/null differ
diff --git a/koha-tmpl/opac-tmpl/prog/images/menu-background.gif b/koha-tmpl/opac-tmpl/prog/images/menu-background.gif
deleted file mode 100644 (file)
index 7d0743f..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/images/menu-background.gif and /dev/null differ
diff --git a/koha-tmpl/opac-tmpl/prog/images/message-bg.gif b/koha-tmpl/opac-tmpl/prog/images/message-bg.gif
deleted file mode 100644 (file)
index 553546f..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/images/message-bg.gif and /dev/null differ
diff --git a/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient-hover.gif b/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient-hover.gif
deleted file mode 100644 (file)
index 9fcdc96..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient-hover.gif and /dev/null differ
diff --git a/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient.gif b/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient.gif
deleted file mode 100644 (file)
index af3addb..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/images/side-tab-gradient.gif and /dev/null differ
diff --git a/koha-tmpl/opac-tmpl/prog/images/submit-bg.gif b/koha-tmpl/opac-tmpl/prog/images/submit-bg.gif
deleted file mode 100644 (file)
index ef5635b..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/images/submit-bg.gif and /dev/null differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/Seshat/archival lDVD.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/Seshat/archival lDVD.gif
deleted file mode 100644 (file)
index 5b278cb..0000000
Binary files a/koha-tmpl/opac-tmpl/prog/itemtypeimg/Seshat/archival lDVD.gif and /dev/null differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/Seshat/archivalDVD.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/Seshat/archivalDVD.gif
new file mode 100644 (file)
index 0000000..5b278cb
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/Seshat/archivalDVD.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/7Day_book.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/7Day_book.gif
new file mode 100644 (file)
index 0000000..4be3ee1
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/7Day_book.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/juvenile_book.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/juvenile_book.gif
new file mode 100644 (file)
index 0000000..bd2eb76
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/juvenile_book.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/noncirc_book.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/noncirc_book.gif
new file mode 100644 (file)
index 0000000..171e9d7
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/noncirc_book.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/noncirc_dvd.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/noncirc_dvd.gif
new file mode 100644 (file)
index 0000000..8bff4a9
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/noncirc_dvd.gif differ
diff --git a/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/reserve_book.gif b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/reserve_book.gif
new file mode 100644 (file)
index 0000000..ff64371
Binary files /dev/null and b/koha-tmpl/opac-tmpl/prog/itemtypeimg/bridge/reserve_book.gif differ
index c5b614e..01e17d5 100755 (executable)
@@ -39,7 +39,7 @@ push @pm, 'missing_pm' if $missing || $all;
 push @pm, 'upgrade_pm' if $upgrade || $all;
 push @pm, 'current_pm' if $installed || $all;
 
-print color 'bold white' if $color;
+print color 'bold blue' if $color;
 print"
                                               Installed         Required          Module is
 Module Name                                   Version           Version            Required
@@ -68,7 +68,7 @@ write;
         }
     }
 }
-print color 'bold white' if $color;
+print color 'bold blue' if $color;
 my $footer = "
 --------------------------------------------------------------------------------------------
 Total modules reported: $count                      ";
@@ -81,6 +81,7 @@ else {
 }
 
 print $footer;
+print color 'reset' if $color;
 
 1;
 
index 60d3d9b..3d16573 100644 (file)
@@ -6,7 +6,7 @@
 
 the kohaversion is divided in 4 parts :
  - #1 : the major number. 3 atm
- - #2 : the functionnal release. 00 atm
+ - #2 : the functional release. 00 atm
  - #3 : the subnumber, moves only on a public release
  - #4 : the developer version. The 4th number is the database subversion.
         used by developers when the database changes. updatedatabase take care of the changes itself
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.07.00.002';
+    our $VERSION = '3.07.00.008';
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install
index 50262df..6e2263f 100755 (executable)
@@ -1,5 +1,23 @@
 #!/usr/bin/perl
 
+# Copyright Koha development team 2011
+#
+# 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
+#
+
 use strict;
 use warnings;
 
@@ -13,11 +31,14 @@ use C4::Labels 1.000000;
 
 my $cgi = new CGI;
 
-my $batch_id    = $cgi->param('batch_id') if $cgi->param('batch_id');
+my $batch_id;
+my @label_ids;
+my @item_numbers;
+$batch_id    = $cgi->param('batch_id') if $cgi->param('batch_id');
 my $template_id = $cgi->param('template_id') || undef;
 my $layout_id   = $cgi->param('layout_id') || undef;
-my @label_ids   = $cgi->param('label_id') if $cgi->param('label_id');
-my @item_numbers  = $cgi->param('item_number') if $cgi->param('item_number');
+@label_ids   = $cgi->param('label_id') if $cgi->param('label_id');
+@item_numbers  = $cgi->param('item_number') if $cgi->param('item_number');
 
 my $items = undef;
 
index 857bd7c..bd1c9e5 100755 (executable)
@@ -26,6 +26,9 @@ use C4::Auth;
 use C4::AuthoritiesMarc;
 use C4::Koha;
 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;
 my $authtypes = getauthtypes;
 my @authtypesloop;
@@ -66,4 +69,14 @@ $template->param(
     koha_news_count => $koha_news_count
 );
 
+my $pendingcomments = numberofreviews(0);
+my $pendingtags = get_count_by_tag_status(0);
+my $pendingsuggestions       = CountSuggestion("ASKED");
+
+$template->param(
+    pendingcomments    => $pendingcomments,
+    pendingtags        => $pendingtags,
+    pendingsuggestions => $pendingsuggestions
+);
+
 output_html_with_http_headers $query, $cookie, $template->output;
index d169dbd..6de07bf 100755 (executable)
@@ -100,6 +100,13 @@ my @field_check=split(/\|/,$check_BorrowerMandatoryField);
 foreach (@field_check) {
        $template->param( "mandatory$_" => 1);    
 }
+# function to designate unwanted fields
+my $check_BorrowerUnwantedField=C4::Context->preference("BorrowerUnwantedField");
+@field_check=split(/\|/,$check_BorrowerUnwantedField);
+foreach (@field_check) {
+    next unless m/\w/o;
+       $template->param( "no$_" => 1);
+}
 $template->param( "add" => 1 ) if ( $op eq 'add' );
 $template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' );
 $template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 );
@@ -649,7 +656,7 @@ if (C4::Context->preference('uppercasesurnames')) {
 }
 
 $data{debarred} = C4::Overdues::CheckBorrowerDebarred($borrowernumber);
-$data{datedebarred} = $data{debarred} if ( $data{debarred} ne "9999-12-31" );
+$data{datedebarred} = $data{debarred} if ( $data{debarred} && $data{debarred} ne "9999-12-31" );
 foreach (qw(dateenrolled dateexpiry dateofbirth datedebarred)) {
        $data{$_} = format_date($data{$_});     # back to syspref for display
        $template->param( $_ => $data{$_});
index 12aa12b..99310df 100755 (executable)
 use strict;
 use warnings;
 
-BEGIN {
+use constant DEFAULT_ZEBRAQ_PURGEDAYS => 30;
+use constant DEFAULT_IMPORT_PURGEDAYS => 60;
+use constant DEFAULT_LOGS_PURGEDAYS => 180;
 
+BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
     use FindBin;
@@ -31,14 +34,11 @@ BEGIN {
 use C4::Context;
 use C4::Dates;
 
-#use C4::Debug;
-#use C4::Letters;
-#use File::Spec;
 use Getopt::Long;
 
 sub usage {
     print STDERR <<USAGE;
-Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueue DAYS] [-m|--mail] [--merged]
+Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueue DAYS] [-m|--mail] [--merged] [--import DAYS] [--logs DAYS]
 
    -h --help          prints this help message, and exits, ignoring all
                       other options
@@ -47,15 +47,19 @@ Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueu
    --sessdays DAYS    purge only sessions older than DAYS days.
    -v --verbose       will cause the script to give you a bit more information
                       about the run.
-   --zebraqueue DAYS  purge completed entries from the zebraqueue from 
-                      more than DAYS days ago.
+   --zebraqueue DAYS  purge completed zebraqueue entries older than DAYS days.
+                      Defaults to 30 days if no days specified.
    -m --mail          purge the mail queue. 
    --merged           purged completed entries from need_merge_authorities.
+   --import DAYS      purge records from import tables older than DAYS days.
+                      Defaults to 60 days if no days specified.
+   --logs DAYS        purge entries from action_logs older than DAYS days.
+                      Defaults to 180 days if no days specified.
 USAGE
     exit $_[0];
 }
 
-my ( $help, $sessions, $sess_days, $verbose, $zebraqueue_days, $mail, $purge_merged);
+my ( $help, $sessions, $sess_days, $verbose, $zebraqueue_days, $mail, $purge_merged, $pImport, $pLogs);
 
 GetOptions(
     'h|help'       => \$help,
@@ -65,14 +69,22 @@ GetOptions(
     'm|mail'       => \$mail,
     'zebraqueue:i' => \$zebraqueue_days,
     'merged'       => \$purge_merged,
+    'import:i'     => \$pImport,
+    'logs:i'       => \$pLogs,
 ) || usage(1);
+
 $sessions=1 if $sess_days && $sess_days>0;
+# if --import, --logs or --zebraqueue were passed without number of days,
+# use defaults
+$pImport= DEFAULT_IMPORT_PURGEDAYS if defined($pImport) && $pImport==0;
+$pLogs= DEFAULT_LOGS_PURGEDAYS if defined($pLogs) && $pLogs==0;
+$zebraqueue_days= DEFAULT_ZEBRAQ_PURGEDAYS if defined($zebraqueue_days) && $zebraqueue_days==0;
 
 if ($help) {
     usage(0);
 }
 
-if ( !( $sessions || $zebraqueue_days || $mail || $purge_merged) ) {
+if ( !( $sessions || $zebraqueue_days || $mail || $purge_merged || $pImport || $pLogs) ) {
     print "You did not specify any cleanup work for the script to do.\n\n";
     usage(1);
 }
@@ -145,6 +157,19 @@ if($purge_merged) {
     print "Done with purging need_merge_authorities.\n" if $verbose;
 }
 
+if($pImport) {
+    print "Purging records from import tables.\n" if $verbose;
+    PurgeImportTables();
+    print "Done with purging import tables.\n" if $verbose;
+}
+
+if($pLogs) {
+    print "Purging records from action_logs.\n" if $verbose;
+    $sth = $dbh->prepare("DELETE FROM action_logs WHERE timestamp < date_sub(curdate(), interval ? DAY)");
+    $sth->execute($pLogs) or die $dbh->errstr;
+    print "Done with purging action_logs.\n" if $verbose;
+}
+
 exit(0);
 
 sub RemoveOldSessions {
@@ -173,3 +198,22 @@ sub RemoveOldSessions {
         print "$count sessions were deleted.\n";
     }
 }
+
+sub PurgeImportTables {
+    #First purge import_records
+    #Delete cascades to import_biblios, import_items and import_record_matches
+    $sth = $dbh->prepare("DELETE FROM import_records WHERE upload_timestamp < date_sub(curdate(), interval ? DAY)");
+    $sth->execute($pImport) or die $dbh->errstr;
+
+    # Now purge import_batches
+    # Timestamp cannot be used here without care, because records are added
+    # continuously to batches without updating timestamp (z3950 search).
+    # So we only delete older empty batches.
+    # This delete will therefore not have a cascading effect.
+    $sth = $dbh->prepare("DELETE ba
+ FROM import_batches ba
+ LEFT JOIN import_records re ON re.import_batch_id=ba.import_batch_id
+ WHERE re.import_record_id IS NULL AND
+ ba.upload_timestamp < date_sub(curdate(), interval ? DAY)");
+    $sth->execute($pImport) or die $dbh->errstr;
+}
index 2179d10..5dca494 100755 (executable)
@@ -35,11 +35,12 @@ BEGIN {
 }
 use C4::Context;
 use C4::Items;
+use C4::Circulation qw/LostItem/;
 use Getopt::Long;
 
 my  $lost;  #  key=lost value,  value=num days.
 my ($charge, $verbose, $confirm, $quiet);
-my $endrange = 366;  # FIXME hardcoded - don't deal with anything overdue by more than this num days.
+my $endrange = 366;
 
 GetOptions( 
     'lost=s%'    => \$lost,
@@ -47,6 +48,7 @@ GetOptions(
     'confirm'    => \$confirm,
     'verbose'    => \$verbose,
     'quiet'      => \$quiet,
+    'maxdays=s'  => \$endrange
 );
 
 my $usage = << 'ENDUSAGE';
@@ -68,6 +70,11 @@ This script takes the following parameters :
     --confirm           confirm.  without this option, the script will report the number of affected items and
                         return without modifying any records.
 
+    --quiet             suppress summary output.
+
+    --maxdays           Specifies the end of the range of overdue days to deal with (defaults to 366).  This
+                        value is universal to all lost num days overdue passed.
+
   examples :
   $PERL5LIB/misc/cronjobs/longoverdue.pl --lost 30=1
     Would set LOST=1 after 30 days (up to one year), but not charge the account.
@@ -154,7 +161,7 @@ foreach my $startrange (sort keys %$lost) {
             printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose);
             if($confirm) {
                 ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'});
-                LostItem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue);
+                LostItem($row->{'itemnumber'}, undef, 'CHARGE FEE') if( $charge && $charge eq $lostvalue);
             }
             $count++;
         }
diff --git a/misc/cronjobs/notifyMailsOp.pl b/misc/cronjobs/notifyMailsOp.pl
deleted file mode 100755 (executable)
index 7c655c9..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-#!/usr/bin/perl
-use strict;
-#use warnings; FIXME - Bug 2505
-use Carp;
-BEGIN {
-    # find Koha's Perl modules
-    # test carefully before changing this
-    use FindBin;
-    eval { require "$FindBin::Bin/../kohalib.pl" };
-}
-use C4::Context;
-use C4::Dates qw/format_date/;
-use Mail::Sendmail;  # comment out if not doing e-mail notices
-use Getopt::Long;
-use C4::Circulation;
-# use C4::Members;
-#  this module will notify only the mail case
-# Now it's only programmed for ouest provence, you can modify it for yourself
-# sub function for get all notifications are not sends
-sub GetNotifys {
-#      my($branch) = @_;
-       my $dbh = C4::Context->dbh;
-       my $sth=$dbh->prepare("SELECT DISTINCT notifys.borrowernumber , borrowers.surname , borrowers.firstname , borrowers.title AS borrower_title , categories.category_type AS categorycode , borrowers.email , borrowers.contacttitle , borrowers.contactname , borrowers.contactfirstname ,
-       notifys.notify_level , notifys.method
-       FROM notifys,borrowers,categories WHERE (notifys.borrowernumber=borrowers.borrowernumber) AND (notifys.notify_send_date IS NULL) AND (borrowers.categorycode = categories.categorycode)");
-       
-       $sth->execute();
-               my @getnotifys;
-               my $i=0;
-               while (my $data=$sth->fetchrow_hashref){
-                       $getnotifys[$i]=$data;
-                       $i++;   
-               }
-               $sth->finish;
-               return(@getnotifys);
-
-}
-
-sub GetBorrowerNotifys{
-       my ($borrowernumber) = @_;
-       my $dbh = C4::Context->dbh;
-       my @getnotifys2;
-       my $sth2=$dbh->prepare("SELECT notifys.itemnumber,notifys.notify_level,biblio.title ,itemtypes.description,
-                       issues.date_due
-                       FROM notifys,biblio,items,itemtypes,biblioitems,issues 
-                       WHERE
-                       (items.itemnumber=notifys.itemnumber
-                       AND biblio.biblionumber=items.biblionumber)
-                       AND (itemtypes.itemtype=biblioitems.itemtype AND biblioitems.biblionumber=biblio.biblionumber)
-                       AND
-                       (notifys.borrowernumber=issues.borrowernumber AND notifys.itemnumber=issues.itemnumber)
-                       AND
-                       notifys.borrowernumber=?
-                       AND notify_send_date IS NULL");
-                       $sth2->execute($borrowernumber);
-                       my $j=0;
-                       while (my $data2=$sth2->fetchrow_hashref){
-                               $getnotifys2[$j]=$data2;
-                               $j++;
-                       }
-                       $sth2->finish;
-                       return(@getnotifys2);
-
-}
-
-sub GetOverduerules{
-       my($category,$notify_level) = @_;
-       my $dbh = C4::Context->dbh;
-       my $sth=$dbh->prepare("SELECT letter".$notify_level.",debarred".$notify_level." FROM overduerules WHERE categorycode=?");
-       $sth->execute($category);
-       my (@overduerules)=$sth->fetchrow_array;
-       $sth->finish;
-       return(@overduerules);
-
-}
-
-sub GetLetter{
-
-       my($letterid) = @_;
-       my $dbh = C4::Context->dbh;
-       my $sth=$dbh->prepare("SELECT title,content FROM letter WHERE code=?");
-       $sth->execute($letterid);
-       my (@getletter)=$sth->fetchrow_array;
-       $sth->finish;
-       return(@getletter);
-
-}
-
-sub UpdateBorrowerDebarred{
-       my($borrowernumber) = @_;
-       my $dbh = C4::Context->dbh;
-       my $sth=$dbh->prepare("UPDATE borrowers SET debarred='1' WHERE borrowernumber=?");
-       $sth->execute($borrowernumber);
-       $sth->finish;
-       return 1;
-}
-
-sub UpdateNotifySendDate{
-       my($borrowernumber,$itemnumber,$notifyLevel) = @_;
-       my $dbh = C4::Context->dbh;
-       my $sth=$dbh->prepare("UPDATE notifys SET notify_send_date=now() 
-       WHERE borrowernumber=? AND itemnumber=? AND notify_send_date IS NULL AND notify_level=?");
-       $sth->execute($borrowernumber,$itemnumber,$notifyLevel);
-       $sth->finish;
-       return 1;
-
-}
-
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
-
-# work with get notifys
-my $smtpserver = 'smtp.yoursmtpserver'; # your smtp server (the server who sent mails)
-my $from = 'your@librarymailadress'; # all the mails sent to the borrowers will appear coming from here.
-
-
-# initiate file for wrong_mails
-my $outfile = 'wrong_mails.txt';
-open( OUT, ">$outfile" );
-binmode(OUT, 'utf8');
-
-my @getnofifys = GetNotifys();
-foreach my $num (@getnofifys) {
-       my %notify;     
-#      if we have a method mail, we check witch mail letter we launch
-       if ($num->{'method'} eq 'mail'){
-               my ($letterid,$debarred) = GetOverduerules($num->{'categorycode'},$num->{'notify_level'});
-#                      now, we get the letter associated to letterid
-                       my($title,$content) = GetLetter($letterid);
-                       my $email = $num->{'email'};
-                       #my $email = 'alaurin@ouestprovence.fr';
-                       my $mailtitle = $title; # the title of the mails
-# Work with the adult category code
-                               if ($num->{'categorycode'} eq 'A') {
-       #                       now deal with $content
-                                       $content =~ s/\<<borrowers.title>\>/$num->{'borrower_title'}/g ;
-                                       $content =~ s/\<<borrowers.surname>\>/$num->{'surname'}/g ;
-                                       $content =~ s/\<<borrowers.firstname>\>/$num->{'firstname'}/g ;
-                                       
-                                       my @getborrowernotify=GetBorrowerNotifys($num->{'borrowernumber'});
-                                       my $overdueitems;
-                                       foreach my $notif(@getborrowernotify){
-                                               my $date=format_date($notif->{'date_due'});
-                                               if ($notif->{'notify_level'} eq $num->{'notify_level'}){
-                                               $overdueitems .= " - <b>".$notif->{'title'}."</b>" ;
-                                               $overdueitems .= "  ( ".$notif->{'description'}." )  " ;
-                                               $overdueitems .= "emprunté le :".$date;
-                                               $overdueitems .= "<br>";
-                                               
-# FIXME at this time, the program consider the mail is send (in notify_send_date) but with no real check must be improved , we don't know if the mail was really to a real adress, and if there is a problem, we don't know how to return the notification to koha...
-       UpdateNotifySendDate($num->{'borrowernumber'},$notif->{'itemnumber'},$num->{'notify_level'});
-}
-                                       }
-                               # if we don't have overdueitem replace content by nonotifys value, deal with it later
-                                       if ($overdueitems){     
-                                       $content =~ s/\<<items.content>\>/$overdueitems/g;
-                               }
-                               else {
-                               $content = 'nonotifys';
-                               }
-                       }
-# Work with the child category code (we add the parents infos)
-                               if ($num->{'categorycode'} eq 'C') {
-                                       $content =~ s/\<<borrowers.contacttitle>\>/$num->{'contacttitle'}/g ;
-                                       $content =~ s/\<<borrowers.contactname>\>/$num->{'contactname'}/g ;
-                                       $content =~ s/\<<borrowers.contactfirstname>\>/$num->{'contactfirstname'}/g ;
-                                       $content =~ s/\<<borrowers.title>\>/$num->{'borrower_title'}/g ;
-                                       $content =~ s/\<<borrowers.surname>\>/$num->{'surname'}/g ;
-                                       $content =~ s/\<<borrowers.firstname>\>/$num->{'firstname'}/g ;
-                                       
-                                       my @getborrowernotify=GetBorrowerNotifys($num->{'borrowernumber'});
-                                       my $overdueitems;
-                                       foreach my $notif(@getborrowernotify){
-                                               my $date=format_date($notif->{'date_due'});
-                                               
-                                               $overdueitems .= " - <b>".$notif->{'title'}."</b>" ;
-                                               $overdueitems .= "  ( ".$notif->{'description'}." )  " ;
-                                               $overdueitems .= "emprunté le :".$date;
-                                               $overdueitems .= "<br>";
-# FIXME at this time, the program consider the mail is send (in notify_send_date) but with no real check must be improved ...
-                               UpdateNotifySendDate($num->{'borrowernumber'},$notif->{'itemnumber'},$num->{'notify_level'});
-                                               }
-                                       
-                                       if ($overdueitems){
-                                               $content =~ s/\<<items.content>\>/$overdueitems/g;
-                                       }
-                                       else {
-                                       $content = 'nonotifys';
-                                       }
-                               }
-# initiate the send mail
-
-#       decoding mailtitle for lisibility of mailtitle (bug with utf-8 values, so decoding it)
-        utf8::decode($mailtitle);
-
-                       my $mailtext = $content;
-                               unshift @{$Mail::Sendmail::mailcfg{'smtp'}} , $smtpserver;
-#                                         set your own mail server name here
-                                       my %mail = ( To      => $email,
-                                                               From    => $from,
-                                                               Subject => $mailtitle,
-                                                               Message => $mailtext,
-                                                               'content-type' => 'text/html; charset="utf-8"',
-                                       );
-                               # if we don't have any content for the mail, we don't launch mail, but notify it in a file
-                if ($mailtext ne 'nonotifys') {
-                    sendmail(%mail) or carp $Mail::Sendmail::error;
-                }
-                else {
-                    print OUT $email ;
-                }
-                                       
-# now deal with the debarred mode
-#              if ($debarred eq 1) {
-#              �ajouter : si le lecteur est en mode debarred, ajouter la fonction qui nous permettra cela
-#              UpdateBorrowerDebarred($num->{'borrowernumber'});
-#              }
-       close(OUT);
-       }
-}
index 5646efc..71e6a05 100755 (executable)
@@ -305,7 +305,7 @@ if (@branchcodes) {
     @branches = grep { $seen{$_} } @overduebranches;
     
     
-    if (@overduebranches) {
+    if (@branches) {
 
        my $branch_word = scalar @branches > 1 ? 'branches' : 'branch';
        $verbose and warn "$branch_word @branches have overdue rules\n";
@@ -330,6 +330,7 @@ our $csv;       # the Text::CSV_XS object
 our $csv_fh;    # the filehandle to the CSV file.
 if ( defined $csvfilename ) {
     my $sep_char = C4::Context->preference('delimiter') || ',';
+    $sep_char = "\t" if ($sep_char eq 'tabulation');
     $csv = Text::CSV_XS->new( { binary => 1 , sep_char => $sep_char } );
     if ( $csvfilename eq '' ) {
         $csv_fh = *STDOUT;
@@ -409,7 +410,7 @@ END_SQL
             my $mindays = $overdue_rules->{"delay$i"};    # the notice will be sent after mindays days (grace period)
             my $maxdays = (
                   $overdue_rules->{ "delay" . ( $i + 1 ) }
-                ? $overdue_rules->{ "delay" . ( $i + 1 ) }
+                ? $overdue_rules->{ "delay" . ( $i + 1 ) } - 1
                 : ($MAX)
             );                                            # issues being more than maxdays late are managed somewhere else. (borrower probably suspended)
 
@@ -425,7 +426,7 @@ END_SQL
             # <date> <itemcount> <firstname> <lastname> <address1> <address2> <address3> <city> <postcode>
 
             my $borrower_sql = <<'END_SQL';
-SELECT COUNT(*), issues.borrowernumber, firstname, surname, address, address2, city, zipcode, country, email, MIN(date_due) as longest_issue
+SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email
 FROM   issues,borrowers,categories
 WHERE  issues.borrowernumber=borrowers.borrowernumber
 AND    borrowers.categorycode=categories.categorycode
@@ -439,13 +440,12 @@ END_SQL
                 $borrower_sql .= ' AND borrowers.categorycode=? ';
                 push @borrower_parameters, $overdue_rules->{categorycode};
             }
-            $borrower_sql .= '  AND categories.overduenoticerequired=1
-                                GROUP BY issues.borrowernumber ';
+            $borrower_sql .= '  AND categories.overduenoticerequired=1 ';
             if($triggered) {
-                $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) = ?';
+                $borrower_sql .= ' AND TO_DAYS(NOW())-TO_DAYS(date_due) = ?';
                 push @borrower_parameters, $mindays;
             } else {
-                $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue) BETWEEN ? and ? ' ;
+                $borrower_sql .= ' AND TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN ? and ? ' ;
                 push @borrower_parameters, $mindays, $maxdays;
             }
 
@@ -454,11 +454,11 @@ END_SQL
             $sth->execute(@borrower_parameters);
             $verbose and warn $borrower_sql . "\n $branchcode | " . $overdue_rules->{'categorycode'} . "\n ($mindays, $maxdays)\nreturns " . $sth->rows . " rows";
 
-            while ( my ($itemcount, $borrowernumber, $firstname, $lastname,
-                    $address1, $address2, $city, $postcode, $country, $email,
-                    $longest_issue ) = $sth->fetchrow )
+            while ( my ( $borrowernumber, $firstname, $lastname,
+                    $address1, $address2, $city, $postcode, $country, $email
+                    ) = $sth->fetchrow )
             {
-                $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has $itemcount items triggering level $i.";
+                $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has items triggering level $i.";
     
                 my $letter = C4::Letters::getletter( 'circulation', $overdue_rules->{"letter$i"} );
 
@@ -504,7 +504,8 @@ END_SQL
                         items           => \@items,
                         substitute      => {    # this appears to be a hack to overcome incomplete features in this code.
                                             bib             => $branch_details->{'branchname'}, # maybe 'bib' is a typo for 'lib<rary>'?
-                                            'items.content' => $titles
+                                            'items.content' => $titles,
+                                            'count'         => $itemcount,
                                            }
                     }
                 );
@@ -683,6 +684,7 @@ sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:pa
             $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblio',      $item->{'biblionumber'} );
             $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $item->{'biblionumber'} );
             $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'items', $item->{'itemnumber'} );
+            $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'issues', $item->{'itemnumber'} );
             $params->{'letter'}->{'content'} =~ s/(<item>.*<\/item>)/$1\n$item_format/ if scalar(@{$params->{'items'}} > 0);
 
         }
diff --git a/misc/load_testing/benchmark_staff.pl b/misc/load_testing/benchmark_staff.pl
new file mode 100644 (file)
index 0000000..ba659c9
--- /dev/null
@@ -0,0 +1,388 @@
+#!/usr/bin/perl
+# This script implements a basic benchmarking and regression testing
+# utility for Koha
+
+use strict;
+use warnings;
+BEGIN {
+    # find Koha's Perl modules
+    # test carefully before changing this
+    use FindBin;
+    eval { require "$FindBin::Bin/kohalib.pl" };
+}
+
+use Getopt::Long;
+use HTTPD::Bench::ApacheBench;
+use LWP::UserAgent;
+use Data::Dumper;
+use HTTP::Cookies;
+use C4::Context;
+use C4::Debug;
+
+my ($help, $steps, $baseurl, $max_tries, $user, $password,$short_print);
+GetOptions(
+    'help'    => \$help,
+    'steps:s'   => \$steps,
+    'url:s' => \$baseurl,
+    'user:s' => \$user,
+    'password:s' => \$password,
+    'maxtries:s' => \$max_tries,
+    'short' => \$short_print,
+);
+my $concurrency = 30;
+$max_tries=20 unless $max_tries;
+# if steps not provided, run all tests
+$steps='0123456789' unless $steps;
+
+# if short is set, we will only give number for direct inclusion on the wiki
+my $short_ms="|-\n|ON\n";
+my $short_psec="|-\n|ON\n";
+
+if ($help || !$baseurl || !$user || !$password) {
+    print <<EOF
+This script runs a benchmark of the staff interface. It benchmark 6 different pages:
+\t1- the staff main page
+\t2- the catalog detail page, with a random biblionumber
+\t3- the catalog search page, using a term retrieved from one of the 10 first title/author in the database
+\t4- the patron detail page, with a random borrowernumber
+\t5- the patron search page, searching for "Jean"
+\t6- the circulation itself, doing check-out and check-in of random items to random patrons
+
+\t0 all those tests at once
+parameters :
+\thelp = this screen
+\tsteps = which steps you want to run. 
+\t\tDon't use it if you want to run all tests. enter 125 if you want to run tests 1, 2 and 5
+\t\tThe "all those tests at once" is numbered 0,and will run all tests previously run.
+\t\tIf you run only one step, it's useless to run the 0, you'll get the same result.
+\turl = the URL or your staff interface
+\tlogin = Koha login
+\tpassword = Koha password
+\tmaxtries = how many tries you want to do. Defaulted to 20
+
+SAMPLE : ./benchmark_staff.pl --url=http://yourstaff.org/cgi-bin/koha/ --user=test --password=test --steps=12
+
+EOF
+;
+exit;
+}
+
+
+# Authenticate via our handy dandy RESTful services
+# and grab a cookie
+my $ua = LWP::UserAgent->new();
+my $cookie_jar = HTTP::Cookies->new();
+my $cookie;
+$ua->cookie_jar($cookie_jar);
+my $resp = $ua->post( "$baseurl"."/svc/authentication" , {userid =>$user, password => $password} );
+if( $resp->is_success ) {
+    $cookie_jar->extract_cookies( $resp );
+    $cookie = $cookie_jar->as_string;
+    unless ($short_print) {
+        print "Authentication successful\n";
+        print "Auth:\n $resp->content" if $debug;
+    }
+}
+
+# remove some unnecessary garbage from the cookie
+$cookie =~ s/ path_spec; discard; version=0//;
+$cookie =~ s/Set-Cookie3: //;
+
+# Get some data to work with
+my $dbh=C4::Context->dbh();
+# grab some borrowernumbers
+my $sth = $dbh->prepare("select max(borrowernumber) from borrowers");
+$sth->execute;
+my ($borrowernumber_max) = $sth->fetchrow;
+my @borrowers;
+for (my $i=1;$i<=$max_tries;$i++) {
+    my $rand_borrowernumber = int(rand($borrowernumber_max)+1);
+    push @borrowers,"$baseurl/members/moremember.pl?borrowernumber=$rand_borrowernumber";
+}
+
+# grab some biblionumbers
+$sth = $dbh->prepare("select max(biblionumber) from biblio");
+$sth->execute;
+my ($biblionumber_max) = $sth->fetchrow;
+my @biblios;
+for (my $i=1;$i<=$max_tries;$i++) {
+    my $rand_biblionumber = int(rand($biblionumber_max)+1);
+    push @biblios,"$baseurl/catalogue/detail.pl?biblionumber=$rand_biblionumber";
+}
+
+# grab some title and author, for random search
+$sth = $dbh->prepare ("SELECT title, author FROM biblio LIMIT 10");
+$sth->execute;
+my ($title,$author);
+my @searchwords;
+while (($title,$author)=$sth->fetchrow) {
+    push @searchwords,split / /, $author;
+    push @searchwords,split / /, $title;
+}
+
+$sth = $dbh->prepare("select max(itemnumber) from items");
+$sth->execute;
+# find the biggest itemnumber
+my ($itemnumber_max) = $sth->fetchrow;
+
+$|=1;
+unless ($short_print) {
+    print "--------------\n";
+    print "Koha STAFF benchmarking utility\n";
+    print "--------------\n";
+    print "Benchmarking with $max_tries occurences of each operation and $concurrency concurrent sessions \n";
+}
+#
+# the global benchmark we do at the end...
+#
+my $b = HTTPD::Bench::ApacheBench->new;
+$b->concurrency( $concurrency );
+my $ro;
+#
+# STEP 1: mainpage : (very) low RDBMS dependency
+#
+if ($steps=~ /1/) {
+    my $b0 = HTTPD::Bench::ApacheBench->new;
+    $b0->concurrency( $concurrency );    my @mainpage;
+    unless ($short_print) {
+        print "Step 1: staff client main page     ";
+    }
+    for (my $i=1;$i<=$max_tries;$i++) {
+        push @mainpage,"$baseurl/mainpage.pl";
+    }
+    my $run0 = HTTPD::Bench::ApacheBench::Run->new
+        ({ urls => \@mainpage,
+           cookies => [$cookie],
+        });
+    $b0->add_run($run0);
+    $b->add_run($run0);
+
+    # send HTTP request sequences to server and time responses
+    $ro = $b0->execute;
+    # calculate hits/sec
+    if ($short_print) {
+        $short_ms.= "|".$b0->total_time."\n";
+        $short_psec.="|".(int((1000*$b0->total_requests/$b0->total_time)*1000)/1000)."\n";
+    } else {
+        print ("\t".$b0->total_time."ms\t".(int((1000*$b0->total_requests/$b0->total_time)*1000)/1000)." pages/sec\n");
+        print "ALERT : ".$b0->total_responses_failed." failures\n" if $b0->total_responses_failed;
+    }
+} else {
+    print "Skipping step 1\n";
+}
+
+#
+# STEP 2: biblios
+#
+if ($steps=~ /2/) {
+    my $b1 = HTTPD::Bench::ApacheBench->new;
+    $b1->concurrency( $concurrency );
+
+    unless ($short_print) {
+        print "Step 2: catalog detail page        ";
+    }
+    my $run1 = HTTPD::Bench::ApacheBench::Run->new
+        ({ urls => \@biblios,
+           cookies => [$cookie],
+        });
+    $b1->add_run($run1);
+    $b->add_run($run1);
+
+    # send HTTP request sequences to server and time responses
+    $ro = $b1->execute;
+    # calculate hits/sec
+    if ($short_print) {
+        $short_ms.= "|".$b1->total_time."\n";
+        $short_psec.="|".(int((1000*$b1->total_requests/$b1->total_time)*1000)/1000)."\n";
+    } else {
+        print ("\t".$b1->total_time."ms\t".(int((1000*$b1->total_requests/$b1->total_time)*1000)/1000)." biblios/sec\n");
+        print "ALERT : ".$b1->total_responses_failed." failures\n" if $b1->total_responses_failed;
+    }
+} else {
+    print "Skipping step 2\n";
+}
+#
+# STEP 3: search
+#
+if ($steps=~ /3/) {
+    my $b1 = HTTPD::Bench::ApacheBench->new;
+    $b1->concurrency( $concurrency );
+    unless ($short_print) {
+        print "Step 3: catalogue search               ";
+    }
+    my @searches;
+    for (my $i=1;$i<=$max_tries;$i++) {
+        push @searches,"$baseurl/catalogue/search.pl?q=".@searchwords[int(rand(scalar @searchwords))];
+    }
+    my $run1 = HTTPD::Bench::ApacheBench::Run->new
+        ({ urls => \@searches,
+           cookies => [$cookie],
+        });
+    $b1->add_run($run1);
+    $b->add_run($run1);
+
+    # send HTTP request sequences to server and time responses
+    $ro = $b1->execute;
+    # calculate hits/sec
+    if ($short_print) {
+        $short_ms.= "|".$b1->total_time."\n";
+        $short_psec.="|".(int((1000*$b1->total_requests/$b1->total_time)*1000)/1000)."\n";
+    } else {
+        print ("\t".$b1->total_time."ms\t".(int((1000*$b1->total_requests/$b1->total_time)*1000)/1000)." biblios/sec\n");
+        print "ALERT : ".$b1->total_responses_failed." failures\n" if $b1->total_responses_failed;
+    }
+} else {
+    print "Skipping step 3\n";
+}
+#
+# STEP 4: borrowers
+#
+if ($steps=~ /4/) {
+    my $b2 = HTTPD::Bench::ApacheBench->new;
+    $b2->concurrency( $concurrency );
+    unless ($short_print) {
+        print "Step 5: patron detail page         ";
+    }
+    my $run2 = HTTPD::Bench::ApacheBench::Run->new
+        ({ urls => \@borrowers,
+           cookies => [$cookie],
+        });
+    $b2->add_run($run2);
+    $b->add_run($run2);
+
+    # send HTTP request sequences to server and time responses
+    $ro = $b2->execute;
+    # calculate hits/sec
+    if ($short_print) {
+        $short_ms.= "|".$b2->total_time."\n";
+        $short_psec.="|".(int((1000*$b2->total_requests/$b2->total_time)*1000)/1000)."\n";
+    } else {
+        print ("\t".$b2->total_time."ms\t".(int((1000*$b2->total_requests/$b2->total_time)*1000)/1000)." borrowers/sec\n");
+    }
+} else {
+    print "Skipping step 4\n";
+}
+
+#
+# STEP 5: borrowers search
+#
+if ($steps=~ /5/) {
+    my $b2 = HTTPD::Bench::ApacheBench->new;
+    $b2->concurrency( $concurrency );
+    unless ($short_print) {
+        print "Step 5: patron search page             ";
+    }
+    for (my $i=1;$i<=$max_tries;$i++) {
+    #     print "$baseurl/members/moremember.pl?borrowernumber=$rand_borrowernumber\n";
+        push @borrowers,"$baseurl/members/member.pl?member=jean";
+    }
+    my $run2 = HTTPD::Bench::ApacheBench::Run->new
+        ({ urls => \@borrowers,
+           cookies => [$cookie],
+        });
+    $b2->add_run($run2);
+    $b->add_run($run2);
+
+    # send HTTP request sequences to server and time responses
+    $ro = $b2->execute;
+    if ($short_print) {
+        $short_ms.= "|".$b2->total_time."\n";
+        $short_psec.="|".(int((1000*$b2->total_requests/$b2->total_time)*1000)/1000)."\n";
+    } else {
+        print ("\t".$b2->total_time."ms\t".(int((1000*$b2->total_requests/$b2->total_time)*1000)/1000)." borrowers/sec\n");
+    }
+} else {
+    print "Skipping step 5\n";
+}
+
+#
+# STEP 6: issue (& then return) books
+#
+if ($steps=~ /6/) {
+    my $b3 = HTTPD::Bench::ApacheBench->new;
+    $b3->concurrency( $concurrency );
+    my $b4 = HTTPD::Bench::ApacheBench->new;
+    $b4->concurrency( $concurrency );
+
+    my @issues;
+    my @returns;
+    unless ($short_print) {
+        print "Step 6a circulation (checkouts)        ";
+    }
+    $sth = $dbh->prepare("SELECT barcode FROM items WHERE itemnumber=?");
+    my $sth2 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE borrowernumber=?");
+    for (my $i=1;$i<=$max_tries;$i++) {
+        my $rand_borrowernumber;
+        # check that the borrowernumber exist
+        until ($rand_borrowernumber) {
+            $rand_borrowernumber = int(rand($borrowernumber_max)+1);
+            $sth2->execute($rand_borrowernumber);
+            ($rand_borrowernumber) = $sth2->fetchrow;
+        }
+        # find a barcode & check it exists
+        my $rand_barcode;
+        until ($rand_barcode) {
+            my $rand_itemnumber = int(rand($itemnumber_max)+1);
+            $sth->execute($rand_itemnumber);
+            ($rand_barcode) = $sth->fetchrow();
+        }
+        push @issues,"$baseurl/circ/circulation.pl?borrowernumber=$rand_borrowernumber&barcode=$rand_barcode&issueconfirmed=1";
+        push @returns,"$baseurl/circ/returns.pl?barcode=$rand_barcode";
+    }
+    my $run3 = HTTPD::Bench::ApacheBench::Run->new
+        ({ urls => \@issues,
+           cookies => [$cookie],
+        });
+    $b3->add_run($run3);
+    $b->add_run($run3);
+
+    # send HTTP request sequences to server and time responses
+    $ro = $b3->execute;
+    # calculate hits/sec
+    if ($short_print) {
+        $short_ms.= "|".$b3->total_time."\n";
+        $short_psec.="|".(int((1000*$b3->total_requests/$b3->total_time)*1000)/1000)."\n";
+    } else {
+        print ("\t".$b3->total_time."ms\t".(int((1000*$b3->total_requests/$b3->total_time)*1000)/1000)." checkouts/sec\n");
+    }
+    unless ($short_print) {
+        print "Step 6b circulation (checkins)         ";
+    }
+    my $run4 = HTTPD::Bench::ApacheBench::Run->new
+        ({ urls => \@returns,
+           cookies => [$cookie],
+        });
+    $b4->add_run($run4);
+    $b->add_run($run4);
+
+    # send HTTP request sequences to server and time responses
+    $ro = $b4->execute;
+    # calculate hits/sec
+    if ($short_print) {
+        $short_ms.= "|".$b4->total_time."\n";
+        $short_psec.="|".(int((1000*$b4->total_requests/$b4->total_time)*1000)/1000)."\n";
+    } else {
+        print ("\t".$b4->total_time."ms\t".(int((1000*$b4->total_requests/$b4->total_time)*1000)/1000)." checkins/sec\n");
+    }
+} else {
+    print "Skipping step 6\n";
+}
+
+if ($steps=~ /0/) {
+    unless ($short_print) {
+        print "all transactions at once               ";
+    }
+    $ro = $b->execute;
+    if ($short_print) {
+        $short_ms.= "|".$b->total_time."\n";
+        $short_psec.="|".(int((1000*$b->total_requests/$b->total_time)*1000)/1000)."\n";
+    } else {
+        print ("\t".$b->total_time."ms\t".(int((1000*$b->total_requests/$b->total_time)*1000)/1000)." operations/sec\n");
+    }
+} else {
+    print "Skipping 'testing all transactions at once'\n (step 0)";
+}
+
+if ($short_print) {
+print $short_ms."\n=====\n".$short_psec."\n";
+}
index 5c02f12..2c4bf2b 100755 (executable)
@@ -234,7 +234,7 @@ while (my ($bibid) = $sth->fetchrow) {
                     }
                 }
                 if ($#x >4) {
-                    # too many $x, not handled, warn the developper that tries to migrate
+                    # too many $x, not handled, warn the developer that tries to migrate
                     print "warning there is ".$#x.'$x values';
                 }
             }
index fa87f22..cd12277 100755 (executable)
@@ -34,7 +34,7 @@ my $want_help;
 my $as_xml;
 my $process_zebraqueue;
 my $do_not_clear_zebraqueue;
-my $verbose_logging;
+my $verbose_logging = 0;
 my $zebraidx_log_opt = " -v none,fatal,warn ";
 my $result = GetOptions(
     'd:s'           => \$directory,
@@ -51,7 +51,7 @@ my $result = GetOptions(
        'x'                             => \$as_xml,
     'y'             => \$do_not_clear_zebraqueue,
     'z'             => \$process_zebraqueue,
-    'v            => \$verbose_logging,
+    'v+'            => \$verbose_logging,
 );
 
 
@@ -96,8 +96,8 @@ if ($noshadow) {
 
 #  -v is for verbose, which seems backwards here because of how logging is set
 #    on the CLI of zebraidx.  It works this way.  The default is to not log much
-if ($verbose_logging) {
-    $zebraidx_log_opt = '';
+if ($verbose_logging >= 2) {
+    $zebraidx_log_opt = '-v none,fatal,warn,all';
 }
 
 my $use_tempdir = 0;
@@ -175,7 +175,7 @@ if ($keep_export) {
 sub check_zebra_dirs {
        my ($base) = shift() . '/';
        my $needed_repairing = 0;
-       my @dirs = ( '', 'key', 'register', 'shadow' );
+       my @dirs = ( '', 'key', 'register', 'shadow', 'tmp' );
        foreach my $dir (@dirs) {
                my $bdir = $base . $dir;
         if (! -d $bdir) {
@@ -637,6 +637,7 @@ Parameters:
 
     -v                      increase the amount of logging.  Normally only 
                             warnings and errors from the indexing are shown.
+                            Use log level 2 (-v -v) to include all Zebra logs.
 
     -munge-config           Deprecated option to try
                             to fix Zebra config files.
index 21fc394..aa6248e 100644 (file)
@@ -6,7 +6,7 @@ If you want to adopt Koha, please do, but you're warned that this release candid
 If you test it and let us know about any we haven't seen yet, it will help us to fix them.
 
 The 2.0.x series version is "feature freezed". Only bugs or minor changes will be made in this branch.
-The koha team is already working on the 2.2.x version. In CVS (HEAD branch), developpers can already get 1st draft of a working z3950 server.
+The koha team is already working on the 2.2.x version. In CVS (HEAD branch), developers can already get 1st draft of a working z3950 server.
 
 
 INSTALLATION
index 0560597..89c7387 100644 (file)
@@ -6,7 +6,7 @@ If you want to adopt Koha, please do, but you're warned that this release candid
 If you test it and let us know about any we haven't seen yet, it will help us to fix them.
 
 The 2.0.x series version is "feature freezed". Only bugs or minor changes will be made in this branch.
-The koha team is already working on the 2.2.x version. In CVS (HEAD branch), developpers can already get 1st draft of a working z3950 server.
+The koha team is already working on the 2.2.x version. In CVS (HEAD branch), developers can already get 1st draft of a working z3950 server.
 
 
 INSTALLATION
index f810421..3610236 100644 (file)
@@ -48,7 +48,7 @@ WHAT'S NEW
 1 Auto installer
 ****************
 If you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question.
-A very usefull feature for developpers that want to install/uninstall Koha quite often.
+A very usefull feature for developers that want to install/uninstall Koha quite often.
 A sample of auto_install_file is provided in misc/auto_install_file.
 
 2 Uninstaller
@@ -102,7 +102,7 @@ Circulation has been heavily rewritten...
 You can define rules like : "up to 2 CDROM, up to 10 books, max 10 items".
 * circulation works now like this (internally) :
 - get borrower cardnumber & item number
-- check "can book be issued". This sub (canbookbeissued) checks everything. For each problem, 2 arrays can be set up : MUSTCONFIRM and IMPOSSIBLE. MUSTCONFIRM entries needs a librarian confirmation before effective issuing. IMPOSSIBLE entries makes the issue impossible. It's now very easy to alter issuing rules for a given library (with a developper), as every test is heavily documented & in  a single sub.
+- check "can book be issued". This sub (canbookbeissued) checks everything. For each problem, 2 arrays can be set up : MUSTCONFIRM and IMPOSSIBLE. MUSTCONFIRM entries needs a librarian confirmation before effective issuing. IMPOSSIBLE entries makes the issue impossible. It's now very easy to alter issuing rules for a given library (with a developer), as every test is heavily documented & in  a single sub.
 - if >=1 IMPOSSIBLE entry : issuing is impossible, show why.
 - if >=1 MUSTCONFIRM : show problems, and ask for confirmation.
 - if both are empty : issue.
@@ -139,7 +139,7 @@ Should be used for MARC21 with some work. We need volunteers here.
 ==============
 HELP NEEDED
 ==============
-We alway accept new developpers wanting to code or test features of the Roadmap.
+We alway accept new developers wanting to code or test features of the Roadmap.
 We still can accept features not in the RoadMap if :
 - strongly supported/coded by someone.
 - compatible with other features.
@@ -167,4 +167,4 @@ Frameworks have to be defined to be choosable at installation stage. The idea be
 Same as for MARC21 frameworks. Except we don't have authority structure for MARC21 (we have for UNIMARC in french, thanks to ENSMP)
 
 * provide ISBD for MARC21 
-(ISBD for UNIMARC is being done, thanks to doXulting)
\ No newline at end of file
+(ISBD for UNIMARC is being done, thanks to doXulting)
index 2d68bcf..20b996b 100644 (file)
@@ -61,4 +61,4 @@ The next release will probably be 2.2RC1.
 It should contains :
 * bugfixes.
 * some new code for a better LDAP handling (automatic creation of the borrower if it does not exist, getting informations from LDAP directory)
-* a barcode generator ! it's a new feature that should be commited by a new developper coming from south america (argentina). I've seen the code, it's clean & nice. Just a new dependencay, for PDF generating. Should be non mandatory for ppl that don't want to print barcodes.
+* a barcode generator ! it's a new feature that should be commited by a new developer coming from south america (argentina). I've seen the code, it's clean & nice. Just a new dependencay, for PDF generating. Should be non mandatory for ppl that don't want to print barcodes.
index 3b95480..5677f2d 100644 (file)
@@ -4,7 +4,7 @@ RELEASE NOTES
 Koha is the 1st Open-Source Integrated Library System.
 Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system.
 
-Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators).
+Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators).
 
 With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items).
 
@@ -196,7 +196,7 @@ General :
 * (almost) complete rewrite of librarian GUI : now Koha uses CSS, and is easier to use. However, users of Koha 2.0.0 won't be lost, as the general organisation of the product has not changed.
 * Online Help : an online help is available everywhere in the librarian interface. It's complete in the parameters section of Koha and for new features. It will be completed for the rest of the product.
 * Better LDAP suport : Koha 2.2 can be "connected" to a LDAP server and get all borrower informations from there (including borrower category where applicable). However, to avoid problems for libraries without LDAP server, the LDAP features have been stored in modules/C4/Auth_with_ldap.pm file. The standard Auth.pm don't use it. If you want LDAP, just perldoc Auth_with_ldap.pm and manually tune your Auth package !
-* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developpers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file.
+* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file.
 * Uninstaller : run misc/uninstall.pl, provide the mysql root password. that's all. Koha is completely deleted and can be reinstalled. With the previous feature, it's a very nice solution for test platform.
 * mod_perl : Koha should now work under mod_perl, that gives a big performance boost (Release Manager don't use mod_perl. fixes comes from A. Tarallo, Argentina, that ensure Koha works fine with mod_perl with the patches applied)
 * Nelsonville have shared their templates. They are available as NPL theme.
index 06ceb19..24afbb7 100644 (file)
@@ -4,7 +4,7 @@ RELEASE NOTES
 Koha is the 1st Open-Source Integrated Library System.
 Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system.
 
-Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators).
+Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators).
 
 With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items).
 
@@ -215,7 +215,7 @@ General :
 * (almost) complete rewrite of librarian GUI : now Koha uses CSS, and is easier to use. However, users of Koha 2.0.0 won't be lost, as the general organisation of the product has not changed.
 * Online Help : an online help is available everywhere in the librarian interface. It's complete in the parameters section of Koha and for new features. It will be completed for the rest of the product.
 * Better LDAP suport : Koha 2.2 can be "connected" to a LDAP server and get all borrower informations from there (including borrower category where applicable). However, to avoid problems for libraries without LDAP server, the LDAP features have been stored in modules/C4/Auth_with_ldap.pm file. The standard Auth.pm don't use it. If you want LDAP, just perldoc Auth_with_ldap.pm and manually tune your Auth package !
-* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developpers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file.
+* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file.
 * Uninstaller : run misc/uninstall.pl, provide the mysql root password. that's all. Koha is completely deleted and can be reinstalled. With the previous feature, it's a very nice solution for test platform.
 * mod_perl : Koha should now work under mod_perl, that gives a big performance boost (Release Manager don't use mod_perl. fixes comes from A. Tarallo, Argentina, that ensure Koha works fine with mod_perl with the patches applied)
 * Nelsonville have shared their templates. They are available as NPL theme.
index 0522389..6b11e75 100644 (file)
@@ -4,7 +4,7 @@ RELEASE NOTES
 Koha is the 1st Open-Source Integrated Library System.
 Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system.
 
-Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators).
+Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators).
 
 With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items).
 
@@ -361,7 +361,7 @@ General :
 * (almost) complete rewrite of librarian GUI : now Koha uses CSS, and is easier to use. However, users of Koha 2.0.0 won't be lost, as the general organisation of the product has not changed.
 * Online Help : an online help is available everywhere in the librarian interface. It's complete in the parameters section of Koha and for new features. It will be completed for the rest of the product.
 * Better LDAP suport : Koha 2.2 can be "connected" to a LDAP server and get all borrower informations from there (including borrower category where applicable). However, to avoid problems for libraries without LDAP server, the LDAP features have been stored in modules/C4/Auth_with_ldap.pm file. The standard Auth.pm don't use it. If you want LDAP, just perldoc Auth_with_ldap.pm and manually tune your Auth package !
-* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developpers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file.
+* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file.
 * Uninstaller : run misc/uninstall.pl, provide the mysql root password. that's all. Koha is completely deleted and can be reinstalled. With the previous feature, it's a very nice solution for test platform.
 * mod_perl : Koha should now work under mod_perl, that gives a big performance boost (Release Manager don't use mod_perl. fixes comes from A. Tarallo, Argentina, that ensure Koha works fine with mod_perl with the patches applied)
 * Nelsonville have shared their templates. They are available as NPL theme.
index 6eb7311..5ecc63e 100644 (file)
@@ -4,7 +4,7 @@ RELEASE NOTES
 Koha is the 1st Open-Source Integrated Library System.
 Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system.
 
-Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators).
+Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators).
 
 With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items).
 
@@ -408,7 +408,7 @@ General :
 * (almost) complete rewrite of librarian GUI : now Koha uses CSS, and is easier to use. However, users of Koha 2.0.0 won't be lost, as the general organisation of the product has not changed.
 * Online Help : an online help is available everywhere in the librarian interface. It's complete in the parameters section of Koha and for new features. It will be completed for the rest of the product.
 * Better LDAP suport : Koha 2.2 can be "connected" to a LDAP server and get all borrower informations from there (including borrower category where applicable). However, to avoid problems for libraries without LDAP server, the LDAP features have been stored in modules/C4/Auth_with_ldap.pm file. The standard Auth.pm don't use it. If you want LDAP, just perldoc Auth_with_ldap.pm and manually tune your Auth package !
-* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developpers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file.
+* Auto installer : if you install koha with ./install -i /path/to/auto_install_file, then Koha will be installed almost without question. A very usefull feature for developers that want to install/uninstall Koha quite often. A sample of auto_install_file is provided in misc/auto_install_file.
 * Uninstaller : run misc/uninstall.pl, provide the mysql root password. that's all. Koha is completely deleted and can be reinstalled. With the previous feature, it's a very nice solution for test platform.
 * mod_perl : Koha should now work under mod_perl, that gives a big performance boost (Release Manager don't use mod_perl. fixes comes from A. Tarallo, Argentina, that ensure Koha works fine with mod_perl with the patches applied)
 * Nelsonville have shared their templates. They are available as NPL theme.
index 2b6cc5f..bdbfa15 100644 (file)
@@ -5,7 +5,7 @@ Welcome to the 1st Release Candidate of the 2.2 version of Koha.
 Koha is the 1st Open-Source Integrated Library System.
 Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system.
 
-Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators !).
+Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators !).
 
 With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items).
 
index 162630a..8484c5c 100644 (file)
@@ -4,7 +4,7 @@ RELEASE NOTES
 Koha is the 1st Open-Source Integrated Library System.
 Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system.
 
-Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators !).
+Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators !).
 
 With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items).
 
index 2c9aa08..4121fb1 100644 (file)
@@ -4,7 +4,7 @@ RELEASE NOTES
 Koha is the 1st Open-Source Integrated Library System.
 Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system.
 
-Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators !).
+Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators !).
 
 With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items).
 
index 3608697..7db7665 100644 (file)
@@ -4,7 +4,7 @@ RELEASE NOTES
 Koha is the 1st Open-Source Integrated Library System.
 Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system.
 
-Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators).
+Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators).
 
 With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items).
 
index 6f5009d..8a6ac1e 100644 (file)
@@ -4,7 +4,7 @@ RELEASE NOTES
 Koha is the 1st Open-Source Integrated Library System.
 Released at first in New zealand, in 2000 januaray, it is maintained by a team of volunteers from around the globe, the Koha system is a full catalogue, opac, circulation and acquisitions system.
 
-Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developpers (excluding translators).
+Koha 2.2 is more than 247 000 lines of code, developped by more than 30 differents developers (excluding translators).
 
 With the 2.2 version, Koha is now a mature product, with a lot of nice features. It's used in more than 50 libraries, from all kinds (public, schools, search, religious...), of all size (from 1 to 8 branches, from 1000 to 300 000 items).
 
index be9a9a5..7d93493 100644 (file)
@@ -212,7 +212,7 @@ Release Manager:        Chris Cormack <chrisc@catalyst.net.nz>
 Documentation Manager:  Nicole C Engard <nengard@gmail.com>
 Translation Manager:    Frédéric Demians <frederic@tamil.fr>
 QA Manager:             Ian Walls <ian.walls@bywatersolutions.com>
-Bug Wranglers:          MJ Ray, Marcel Roy, Paul Poulain, Mason James
+Bug Wranglers:          MJ Ray, Marcel de Rooy, Paul Poulain, Mason James
 
 Release Maintainer (3.4.x):
                         Chris Nighswonger <cnighswonger@foundations.edu>
index 3f18082..6e2b30c 100755 (executable)
@@ -1,7 +1,25 @@
 #!/usr/bin/perl
 
+# This file is part of Koha.
+#
+# Copyright (C) 2007 LibLime
+# Parts Copyright BSZ 2011
+#
+# 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 this program; 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 warnings;
 BEGIN {
     # find Koha's Perl modules
     # test carefully before changing this
@@ -17,6 +35,7 @@ use Getopt::Long;
 $| = 1;
 
 # command-line parameters
+my $encoding = "";
 my $match_bibs = 0;
 my $add_items = 0;
 my $input_file = "";
@@ -25,14 +44,19 @@ my $want_help = 0;
 my $no_replace ;
 
 my $result = GetOptions(
+    'encoding:s'    => \$encoding,
     'file:s'        => \$input_file,
-    'match-bibs:s'    => \$match_bibs,
+    'match-bibs:s'  => \$match_bibs,
     'add-items'     => \$add_items,
     'no-replace'    => \$no_replace,
     'comment:s'     => \$batch_comment,
     'h|help'        => \$want_help
 );
 
+if ($encoding eq "") {
+    $encoding = "utf8";
+}
+
 if (not $result or $input_file eq "" or $want_help) {
     print_usage();
     exit 0;
@@ -67,11 +91,9 @@ sub process_batch {
     }
     close IN;
 
-    my $marc_flavor = C4::Context->preference('marcflavour');
-
     print "... staging MARC records -- please wait\n";
     my ($batch_id, $num_valid, $num_items, @import_errors) = 
-        BatchStageMarcRecords($marc_flavor, $marc_records, $input_file, $batch_comment, '', $add_items, 0,
+        BatchStageMarcRecords($encoding, $marc_records, $input_file, $batch_comment, '', $add_items, 0,
                               100, \&print_progress_and_commit);
     print "... finished staging MARC records\n";
 
@@ -141,6 +163,9 @@ records into the main Koha database.
 
 Parameters:
     --file <file_name>      name of input MARC bib file
+    --encoding <encoding>   encoding of MARC records, default is utf8.
+                            Other possible options are: MARC-8,
+                            ISO_5426, ISO_6937, ISO_8859-1, EUC-KR
     --match-bibs <match_id> use this option to match bibs
                             in the file with bibs already in 
                             the database for future overlay.
index ebd5ce5..90f2950 100755 (executable)
@@ -49,6 +49,10 @@ my ($cmd, $lang) = @ARGV;
 $cmd = lc $cmd;
 if ( $cmd =~ /create|install|update/ ) {
     my $installer = LangInstaller->new( $lang, $pref );
+    if ( $cmd !~ /create/ && $lang && not $lang ~~ $installer->{langs} ) {
+        print "Unsupported language: $lang\n";
+        exit;
+    }
     if ( $all ) {
         usage() if $cmd eq 'create';
         for my $lang ( @{$installer->{langs}} ) {
index e2fb069..8949444 100755 (executable)
@@ -66,6 +66,22 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
 
 my $biblionumber = $query->param('biblionumber') || $query->param('bib');
 
+my $record       = GetMarcBiblio($biblionumber);
+if ( ! $record ) {
+    print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early
+    exit;
+}
+$template->param( biblionumber => $biblionumber );
+
+
+SetUTF8Flag($record);
+
+# XSLT processing of some stuff
+if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
+    $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail', 'opac') );
+}
+
+
 # We look for the busc param to build the simple paging from the search
 my $session = get_session($query->cookie("CGISESSID"));
 my %paging = (previous => {}, next => {});
@@ -351,19 +367,7 @@ if ($session->param('busc')) {
 $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
 $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
 
-my $record       = GetMarcBiblio($biblionumber);
-if ( ! $record ) {
-    print $query->redirect("/cgi-bin/koha/errors/404.pl");
-    exit;
-}
-$template->param( biblionumber => $biblionumber );
-
-SetUTF8Flag($record);
 
-# XSLT processing of some stuff
-if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
-    $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail', 'opac') );
-}
 
 $template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); 
 # change back when ive fixed request.pl
@@ -603,9 +607,14 @@ $template->param(
 );
 
 my $libravatar_enabled = 0;
-eval 'use Libravatar::URL';
-if (!$@ and C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) {
-    $libravatar_enabled = 1;
+if ( C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) {
+    eval {
+        require Libravatar::URL;
+        Libravatar::URL->import();
+    };
+    if (!$@ ) {
+        $libravatar_enabled = 1;
+    }
 }
 
 my $reviews = getreviews( $biblionumber, 1 );
index 42eb0ec..12baf3b 100755 (executable)
@@ -48,10 +48,10 @@ use CGI qw('-no_undef_params');
 my $cgi = new CGI;
 
 BEGIN {
-       if (C4::Context->preference('BakerTaylorEnabled')) {
-               require C4::External::BakerTaylor;
-               import C4::External::BakerTaylor qw(&image_url &link_url);
-       }
+    if (C4::Context->preference('BakerTaylorEnabled')) {
+        require C4::External::BakerTaylor;
+        import C4::External::BakerTaylor qw(&image_url &link_url);
+    }
 }
 
 my ($template,$borrowernumber,$cookie);
@@ -64,13 +64,13 @@ my @params = $cgi->param("limit");
 my $format = $cgi->param("format") || '';
 my $build_grouped_results = C4::Context->preference('OPACGroupResults');
 if ($format =~ /(rss|atom|opensearchdescription)/) {
-       $template_name = 'opac-opensearch.tmpl';
+    $template_name = 'opac-opensearch.tmpl';
 }
 elsif (@params && $build_grouped_results) {
     $template_name = 'opac-results-grouped.tmpl';
 }
 elsif ((@params>=1) || ($cgi->param("q")) || ($cgi->param('multibranchlimit')) || ($cgi->param('limit-yr')) ) {
-       $template_name = 'opac-results.tmpl';
+    $template_name = 'opac-results.tmpl';
 }
 else {
     $template_name = 'opac-advsearch.tmpl';
@@ -89,7 +89,7 @@ if ($template_name eq 'opac-results.tmpl') {
 }
 
 if ($format eq 'rss2' or $format eq 'opensearchdescription' or $format eq 'atom') {
-       $template->param($format => 1);
+    $template->param($format => 1);
     $template->param(timestamp => strftime("%Y-%m-%dT%H:%M:%S-00:00", gmtime)) if ($format eq 'atom'); 
     # FIXME - the timestamp is a hack - the biblio update timestamp should be used for each
     # entry, but not sure if that's worth an extra database query for each bib
@@ -104,18 +104,18 @@ $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHo
 $template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResultsFound') );
 
 if (C4::Context->preference('BakerTaylorEnabled')) {
-       $template->param(
-               BakerTaylorEnabled  => 1,
-               BakerTaylorImageURL => &image_url(),
-               BakerTaylorLinkURL  => &link_url(),
-               BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
-       );
+    $template->param(
+        BakerTaylorEnabled  => 1,
+        BakerTaylorImageURL => &image_url(),
+        BakerTaylorLinkURL  => &link_url(),
+        BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
+    );
 }
 if (C4::Context->preference('TagsEnabled')) {
-       $template->param(TagsEnabled => 1);
-       foreach (qw(TagsShowOnList TagsInputOnList)) {
-               C4::Context->preference($_) and $template->param($_ => 1);
-       }
+    $template->param(TagsEnabled => 1);
+    foreach (qw(TagsShowOnList TagsInputOnList)) {
+        C4::Context->preference($_) and $template->param($_ => 1);
+    }
 }
 
 ## URI Re-Writing
@@ -163,32 +163,32 @@ my $cnt;
 my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes");
 
 if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {
-       foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
-           my %row =(  number=>$cnt++,
-               ccl => "$itype_or_itemtype,phr",
+    foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
+        my %row =(  number=>$cnt++,
+        ccl => "$itype_or_itemtype,phr",
                 code => $thisitemtype,
                 selected => $selected,
                 description => $itemtypes->{$thisitemtype}->{'description'},
                 count5 => $cnt % 4,
                 imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
             );
-       $selected = 0; # set to zero after first pass through
-       push @itemtypesloop, \%row;
-       }
+        $selected = 0; # set to zero after first pass through
+        push @itemtypesloop, \%row;
+    }
 } else {
     my $advsearchtypes = GetAuthorisedValues($advanced_search_types, '', 'opac');
-       for my $thisitemtype (@$advsearchtypes) {
-               my %row =(
-                               number=>$cnt++,
-                               ccl => $advanced_search_types,
+    for my $thisitemtype (@$advsearchtypes) {
+        my %row =(
+                number=>$cnt++,
+                ccl => $advanced_search_types,
                 code => $thisitemtype->{authorised_value},
                 selected => $selected,
                 description => $thisitemtype->{'lib'},
                 count5 => $cnt % 4,
                 imageurl=> getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ),
             );
-               push @itemtypesloop, \%row;
-       }
+        push @itemtypesloop, \%row;
+    }
 }
 $template->param(itemtypeloop => \@itemtypesloop);
 
@@ -244,20 +244,20 @@ if ( $template_type && $template_type eq 'advsearch' ) {
         }
 
     }
-    $template->param(uc(C4::Context->preference("marcflavour")) => 1,   # we already did this for UNIMARC
-                                         advsearch => 1,
-                      search_boxes_loop => \@search_boxes_array);
-
-# use the global setting by default
-       if ( C4::Context->preference("expandedSearchOption") == 1 ) {
-               $template->param( expanded_options => C4::Context->preference("expandedSearchOption") );
-       }
-       # but let the user override it
-       if (defined $cgi->param('expanded_options')) {
-           if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) {
-           $template->param( expanded_options => $cgi->param('expanded_options'));
-           }
+    $template->param(uc(    C4::Context->preference("marcflavour")) => 1,   # we already did this for UNIMARC
+                            advsearch => 1,
+                            search_boxes_loop => \@search_boxes_array);
+
+    # use the global setting by default
+    if ( C4::Context->preference("expandedSearchOption") == 1 ) {
+        $template->param( expanded_options => C4::Context->preference("expandedSearchOption") );
+    }
+    # but let the user override it
+    if (defined $cgi->param('expanded_options')) {
+        if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) {
+            $template->param( expanded_options => $cgi->param('expanded_options'));
         }
+    }
     output_html_with_http_headers $cgi, $cookie, $template->output;
     exit;
 }
@@ -284,8 +284,6 @@ for (keys %$params) {
         $j++;
     }
 }
-#
-
 
 # Params that can have more than one value
 # sort by is used to sort the query
@@ -388,7 +386,7 @@ my ($error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_
 my @results;
 
 ## I. BUILD THE QUERY
-my $lang = C4::Templates::getlanguagecookie($cgi);
+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 ($) { 
@@ -430,15 +428,15 @@ my $results_hashref;
 my @coins;
 
 if ($tag) {
-       $query_cgi = "tag=" .$tag . "&" . $query_cgi;
-       my $taglist = get_tags({term=>$tag, approved=>1});
-       $results_hashref->{biblioserver}->{hits} = scalar (@$taglist);
-       my @biblist  = (map {GetBiblioData($_->{biblionumber})} @$taglist);
-       my @marclist = (map {$_->{marc}} @biblist );
-       $DEBUG and printf STDERR "taglist (%s biblionumber)\nmarclist (%s records)\n", scalar(@$taglist), scalar(@marclist);
-       $results_hashref->{biblioserver}->{RECORDS} = \@marclist;
-       # FIXME: tag search and standard search should work together, not exclusively
-       # FIXME: No facets for tags search.
+    $query_cgi = "tag=" .$tag . "&" . $query_cgi;
+    my $taglist = get_tags({term=>$tag, approved=>1});
+    $results_hashref->{biblioserver}->{hits} = scalar (@$taglist);
+    my @biblist  = (map {GetBiblioData($_->{biblionumber})} @$taglist);
+    my @marclist = (map {$_->{marc}} @biblist );
+    $DEBUG and printf STDERR "taglist (%s biblionumber)\nmarclist (%s records)\n", scalar(@$taglist), scalar(@marclist);
+    $results_hashref->{biblioserver}->{RECORDS} = \@marclist;
+    # FIXME: tag search and standard search should work together, not exclusively
+    # FIXME: No facets for tags search.
 }
 elsif (C4::Context->preference('NoZebra')) {
     eval {
@@ -494,76 +492,82 @@ for (my $i=0;$i<@servers;$i++) {
             @newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan,
                                         @{$results_hashref->{$server}->{"RECORDS"}},, C4::Context->preference('hidelostitems'));
         }
-               my $tag_quantity;
-               if (C4::Context->preference('TagsEnabled') and
-                       $tag_quantity = C4::Context->preference('TagsShowOnList')) {
-                       foreach (@newresults) {
-                               my $bibnum = $_->{biblionumber} or next;
-                               $_->{itemsissued} = CountItemsIssued( $bibnum );
-                               $_ ->{'TagLoop'} = get_tags({biblionumber=>$bibnum, approved=>1, 'sort'=>'-weight',
-                                                                               limit=>$tag_quantity });
-                       }
-               }
-                if (C4::Context->preference('COinSinOPACResults')) {
-                   foreach (@newresults) {
-                      my $record = GetMarcBiblio($_->{'biblionumber'});
-                     $_->{coins} = GetCOinSBiblio($record);
-                   }
-                }
+
+        # must define a value for size if not present in DB
+        # in order to avoid problems generated by the default size value in TT
+        foreach my $line (@newresults) {
+            if ( not exists $line->{'size'} ) { $line->{'size'} = "" }
+        }
+
+        my $tag_quantity;
+        if (C4::Context->preference('TagsEnabled') and
+            $tag_quantity = C4::Context->preference('TagsShowOnList')) {
+            foreach (@newresults) {
+                my $bibnum = $_->{biblionumber} or next;
+                $_->{itemsissued} = CountItemsIssued( $bibnum );
+                $_ ->{'TagLoop'} = get_tags({biblionumber=>$bibnum, approved=>1, 'sort'=>'-weight',
+                                        limit=>$tag_quantity });
+            }
+        }
+        if (C4::Context->preference('COinSinOPACResults')) {
+            foreach (@newresults) {
+                my $record = GetMarcBiblio($_->{'biblionumber'});
+                $_->{coins} = GetCOinSBiblio($record);
+            }
+        }
       
-       if ($results_hashref->{$server}->{"hits"}){
-           $total = $total + $results_hashref->{$server}->{"hits"};
-       }
-       # Opac search history
-       my $newsearchcookie;
-       if (C4::Context->preference('EnableOpacSearchHistory')) {
-           my @recentSearches; 
-           # Getting the (maybe) already sent cookie
-           my $searchcookie = $cgi->cookie('KohaOpacRecentSearches');
-           if ($searchcookie){
-               $searchcookie = uri_unescape($searchcookie);
-               if (thaw($searchcookie)) {
-                   @recentSearches = @{thaw($searchcookie)};
-               }
-           }
-           # Adding the new search if needed
-           if (!$borrowernumber || $borrowernumber eq '') {
-           # To a cookie (the user is not logged in)
-               if (($params->{'offset'}||'') eq '') {
-                   push @recentSearches, {
-                                           "query_desc" => $query_desc || "unknown", 
-                                           "query_cgi"  => $query_cgi  || "unknown", 
-                                           "time"       => time(),
-                                           "total"      => $total
-                                         };
-                   $template->param(ShowOpacRecentSearchLink => 1);
-               }
-            shift @recentSearches if (@recentSearches > 15);
-               # Pushing the cookie back 
-               $newsearchcookie = $cgi->cookie(
-                                           -name => 'KohaOpacRecentSearches',
-                                           # We uri_escape the whole freezed structure so we're sure we won't have any encoding problems
-                                           -value => uri_escape(freeze(\@recentSearches)),
-                                           -expires => ''
-                       );
-                       $cookie = [$cookie, $newsearchcookie];
-           } 
-               else {
-           # To the session (the user is logged in)
-                       if (($params->{'offset'}||'') eq '') {
-                               AddSearchHistory($borrowernumber, $cgi->cookie("CGISESSID"), $query_desc, $query_cgi, $total);
-                   $template->param(ShowOpacRecentSearchLink => 1);
-               }
-           }
-       }
-    ## If there's just one result, redirect to the detail page
+        if ($results_hashref->{$server}->{"hits"}){
+            $total = $total + $results_hashref->{$server}->{"hits"};
+        }
+
+        # Opac search history
+        my $newsearchcookie;
+        if (C4::Context->preference('EnableOpacSearchHistory')) {
+            my @recentSearches;
+
+            # Getting the (maybe) already sent cookie
+            my $searchcookie = $cgi->cookie('KohaOpacRecentSearches');
+            if ($searchcookie){
+                $searchcookie = uri_unescape($searchcookie);
+                if (thaw($searchcookie)) {
+                    @recentSearches = @{thaw($searchcookie)};
+                }
+            }
+
+            # Adding the new search if needed
+            if (!$borrowernumber || $borrowernumber eq '') {
+                # To a cookie (the user is not logged in)
+                if (($params->{'offset'}||'') eq '') {
+                    push @recentSearches, {
+                                "query_desc" => $query_desc || "unknown",
+                                "query_cgi"  => $query_cgi  || "unknown",
+                                "time"       => time(),
+                                "total"      => $total
+                              };
+                    $template->param(ShowOpacRecentSearchLink => 1);
+                }
+
+                shift @recentSearches if (@recentSearches > 15);
+                # Pushing the cookie back
+                $newsearchcookie = $cgi->cookie(
+                            -name => 'KohaOpacRecentSearches',
+                            # We uri_escape the whole freezed structure so we're sure we won't have any encoding problems
+                            -value => uri_escape(freeze(\@recentSearches)),
+                            -expires => ''
+                );
+                $cookie = [$cookie, $newsearchcookie];
+            }
+            else {
+                # To the session (the user is logged in)
+                if (($params->{'offset'}||'') eq '') {
+                    AddSearchHistory($borrowernumber, $cgi->cookie("CGISESSID"), $query_desc, $query_cgi, $total);
+                    $template->param(ShowOpacRecentSearchLink => 1);
+                }
+            }
+        }
+        ## If there's just one result, redirect to the detail page
         if ($total == 1 && $format ne 'rss2'
-           && $format ne 'opensearchdescription' && $format ne 'atom') {   
+        && $format ne 'opensearchdescription' && $format ne 'atom') {
             my $biblionumber=$newresults[0]->{biblionumber};
             if (C4::Context->preference('BiblioDefaultView') eq 'isbd') {
                 print $cgi->redirect("/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=$biblionumber");
@@ -668,7 +672,7 @@ for (my $i=0;$i<@servers;$i++) {
             $template->param(   PAGE_NUMBERS => \@page_numbers,
                                 previous_page_offset => $previous_page_offset) unless $pages < 2;
             $template->param(next_page_offset => $next_page_offset) unless $pages eq $current_page_number;
-         }
+        }
         # no hits
         else {
             $template->param(searchdesc => 1,query_desc => $query_desc,limit_desc => $limit_desc);
@@ -699,7 +703,7 @@ $template->param(
             total => $total,
             opacfacets => 1,
             facets_loop => $facets,
-           displayFacetCount=> C4::Context->preference('displayFacetCount')||0,
+            displayFacetCount=> C4::Context->preference('displayFacetCount')||0,
             scan => $scan,
             search_error => $error,
 );
@@ -715,18 +719,18 @@ my @addpubshelves;
 my $pubshelves = $session->param('pubshelves');
 my $barshelves = $session->param('barshelves');
 foreach my $shelf (@$pubshelves) {
-       next if ( ($shelf->{'owner'} != ($borrowernumber ? $borrowernumber : -1)) && ($shelf->{'category'} < 3) );
-       push (@addpubshelves, $shelf);
+    next if ( ($shelf->{'owner'} != ($borrowernumber ? $borrowernumber : -1)) && ($shelf->{'category'} < 3) );
+    push (@addpubshelves, $shelf);
 }
 
 if (@addpubshelves) {
-       $template->param( addpubshelves     => scalar (@addpubshelves));
-       $template->param( addpubshelvesloop => \@addpubshelves);
+    $template->param( addpubshelves     => scalar (@addpubshelves));
+    $template->param( addpubshelvesloop => \@addpubshelves);
 }
 
 if (defined $barshelves) {
-       $template->param( addbarshelves     => scalar (@$barshelves));
-       $template->param( addbarshelvesloop => $barshelves);
+    $template->param( addbarshelves     => scalar (@$barshelves));
+    $template->param( addbarshelvesloop => $barshelves);
 }
 
 my $content_type = ($format eq 'rss' or $format eq 'atom') ? $format : 'html';
index df1b4c5..6a6e825 100755 (executable)
@@ -39,7 +39,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
         template_name   => "opac-sendbasketform.tmpl",
         query           => $query,
         type            => "opac",
-        authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
+        authnotrequired => 0,
         flagsrequired   => { borrow => 1 },
     }
 );
index 1de95ae..6e60bc9 100755 (executable)
@@ -41,7 +41,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
         template_name   => "opac-sendshelfform.tmpl",
         query           => $query,
         type            => "opac",
-        authnotrequired => 1,
+        authnotrequired => 0,
         flagsrequired   => { borrow => 1 },
     }
 );
index 3a74270..74f4684 100755 (executable)
@@ -66,14 +66,19 @@ if($format eq "rss"){
 }
 
 my $libravatar_enabled = 0;
-eval 'use Libravatar::URL';
-if (!$@ and C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) {
-    $libravatar_enabled = 1;
+if ( C4::Context->preference('ShowReviewer') and C4::Context->preference('ShowReviewerPhoto')) {
+    eval {
+        require Libravatar::URL;
+        Libravatar::URL->import();
+    };
+    if ( !$@ ) {
+        $libravatar_enabled = 1;
+    }
 }
 
 my $reviews = getallreviews(1,$offset,$results_per_page);
 my $marcflavour      = C4::Context->preference("marcflavour");
-my $hits = numberofreviews();
+my $hits = numberofreviews(1);
 my $i = 0;
 my $latest_comment_date;
 for my $result (@$reviews){
index 6899215..05b7a27 100755 (executable)
@@ -2,6 +2,7 @@
 
 
 # Copyright 2000-2002 Katipo Communications
+# Parts Copyright Catalyst IT 2011
 #
 # This file is part of Koha.
 #
@@ -83,7 +84,14 @@ if($advanced_search_types eq 'ccode'){
                     ";
     $template->param(ccodesearch => 1);
 }else{
-    $whereclause .= ' AND biblioitems.itemtype='.$dbh->quote($itemtype) if $itemtype;
+    if ($itemtype){
+       if (C4::Context->preference('item-level_itypes')){
+           $whereclause .= ' AND items.itype = ' . $dbh->quote($itemtype);
+       }
+       else {
+           $whereclause .= ' AND biblioitems.itemtype='.$dbh->quote($itemtype);
+        }
+    }
     $query = "SELECT datecreated, biblio.biblionumber, title,
                     author, sum( items.issues ) AS tot, biblioitems.itemtype,
                     biblioitems.publishercode,biblioitems.publicationyear,
index 9806c9f..f6ed484 100755 (executable)
@@ -30,6 +30,7 @@ use C4::Members;
 use C4::Members::AttributeTypes;
 use C4::Members::Attributes qw/GetBorrowerAttributeValue/;
 use C4::Output;
+use C4::Overdues qw/CheckBorrowerDebarred/;
 use C4::Biblio;
 use C4::Items;
 use C4::Dates qw/format_date/;
@@ -78,7 +79,18 @@ for (qw(dateenrolled dateexpiry dateofbirth)) {
 }
 $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} );
 
-if ( $borr->{'debarred'} || $borr->{'gonenoaddress'} || $borr->{'lost'} ) {
+my $debar = CheckBorrowerDebarred($borrowernumber);
+my $userdebarred;
+
+if ($debar) {
+    $userdebarred = 1;
+    $template->param( 'userdebarred' => $userdebarred );
+    if ( $debar ne "9999-12-31" ) {
+        $borr->{'userdebarreddate'} = C4::Dates::format_date($debar);
+    }
+}
+
+if ( $userdebarred || $borr->{'gonenoaddress'} || $borr->{'lost'} ) {
     $borr->{'flagged'} = 1;
 }
 
@@ -104,7 +116,6 @@ if ( $borr->{'amountoutstanding'} < 0 ) {
 }
 
 $borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'};
-$borr->{'debarred'} = C4::Dates->new($borr->{'debarred'},'iso')->output;
 
 my @bordat;
 $bordat[0] = $borr;
@@ -127,6 +138,7 @@ $template->param(   BORROWER_INFO     => \@bordat,
                     OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
                     surname           => $borr->{surname},
                     showname          => $borr->{showname},
+
                 );
 
 #get issued items ....
@@ -142,7 +154,7 @@ my $canrenew = 0;
 if ($issues){
        foreach my $issue ( sort { $b->{'date_due'} cmp $a->{'date_due'} } @$issues ) {
                # check for reserves
-               my ( $restype, $res ) = CheckReserves( $issue->{'itemnumber'} );
+               my ( $restype, $res, undef ) = CheckReserves( $issue->{'itemnumber'} );
                if ( $restype ) {
                        $issue->{'reserved'} = 1;
                }
index f8273ce..297d5be 100755 (executable)
@@ -40,7 +40,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
         template_name   => "opac-userupdate.tmpl",
         query           => $query,
         type            => "opac",
-        authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
+        authnotrequired => 0,
         flagsrequired   => { borrow => 1 },
         debug           => 1,
     }
@@ -89,10 +89,9 @@ if ( $query->param('modify') ) {
 
     # get all the fields:
     my $message = <<"EOF";
-Patron $borr->{'cardnumber'}
+Patron $borr->{'cardnumber'} has requested to change her/his personal details.
+Please check these new details and make the changes to these fields:
 
-has requested to change her/his personal details.
-Please check these new details and make the changes:
 EOF
 
     my $streetnumber = $borr->{'streetnumber'} || '';
@@ -113,12 +112,13 @@ EOF
            $borrowerfield  = format_date( $borr->{'dateofbirth'} ) || '';
         }
 
-        if($borrowerfield eq $newfield) {
-            $message .= "$field : $borrowerfield  -->  $newfield\n";
-        } else {
-            $message .= uc($field) . " : $borrowerfield  -->  $newfield\n";
+        if($borrowerfield ne $newfield) {
+            $message .= $field . " : $borrowerfield  -->  $newfield\n";
         }
     }
+
+    $message .= "\nEdit this patron's record: http://".C4::Context->preference('staffClientBaseURL ')."/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=".$borr->{'borrowernumber'}."&categorycode=".$borr->{'categorycode'} if C4::Context->preference('staffClientBaseURL ');
+
     $message .= "\n\nThanks,\nKoha\n\n";
     my %mail = (
         To      => $updateemailaddress,
index 8220148..4d041d0 100755 (executable)
@@ -47,10 +47,10 @@ my $fullreportname = "reports/acquisitions_stats.tmpl";
 my $line           = $input->param("Line");
 my $column         = $input->param("Column");
 my @filters        = $input->param("Filter");
-$filters[0]= (($line =~ /closedate/ || $column =~ /closedate/) ? format_date_in_iso($filters[0]) : undef);
-$filters[1]= (($line =~ /closedate/ || $column =~ /closedate/) ? format_date_in_iso($filters[1]) : undef);
-$filters[2]= (($line =~ /delivery/ || $column =~ /delivery/) ? format_date_in_iso($filters[2]) : undef);
-$filters[3]= (($line =~ /delivery/ || $column =~ /delivery/) ? format_date_in_iso($filters[3]) : undef);
+$filters[0]= format_date_in_iso($filters[0]);
+$filters[1]= format_date_in_iso($filters[1]);
+$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.
index 5b43023..825a492 100755 (executable)
@@ -22,7 +22,6 @@ use strict;
 use C4::Auth;
 use CGI;
 use C4::Context;
-use HTML::Template::Pro;
 use C4::Search;
 use C4::Output;
 use C4::Koha;
index d541429..8134354 100755 (executable)
@@ -22,7 +22,6 @@ use strict;
 use C4::Auth;
 use CGI;
 use C4::Context;
-use HTML::Template::Pro;
 use C4::Search;
 use C4::Output;
 use C4::Koha;
@@ -36,20 +35,23 @@ sub set_parameters {
        my $dbh = C4::Context->dbh;
        my $branches=GetBranches();
        my @branches;
+       my $default;
        my @select_branch;
        my %select_branches;
        push @select_branch,"";
        $select_branches{""} = "";
-       foreach my $branch (keys %$branches) {
+       for my $branch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
                push @select_branch, $branch;
                $select_branches{$branch} = $branches->{$branch}->{'branchname'};
+               $default = C4::Context->userenv->{'branch'} if (C4::Context->userenv && C4::Context->userenv->{'branch'});
        }
        my $CGIbranch=CGI::scrolling_list( -name     => 'value',
                                -id => 'value',
                                -values   => \@select_branch,
                                -labels   => \%select_branches,
                                -size     => 1,
-                               -multiple => 0 );
+                               -multiple => 0,
+                               -default => $default, );
        $template->param(CGIbranch => $CGIbranch);
        return $template;
 }
@@ -66,7 +68,8 @@ sub calculate {
                        FROM itemtypes,items         
                WHERE items.itype=itemtypes.itemtype         
                AND items.holdingbranch=?            
-               GROUP BY  items.itype");
+               GROUP BY items.itype
+               ORDER BY itemtypes.description");
 
                }
                else {
@@ -76,7 +79,8 @@ sub calculate {
                WHERE biblioitems.itemtype=itemtypes.itemtype 
                AND items.biblioitemnumber=biblioitems.biblioitemnumber
                AND items.holdingbranch=?
-                       GROUP BY  biblioitems.itemtype");
+                       GROUP BY  biblioitems.itemtype
+                       ORDER BY itemtypes.description");
                }
                $sth->execute($branch);
        } else {
@@ -85,14 +89,16 @@ sub calculate {
                SELECT description,items.itype AS itemtype, COUNT(*) AS total 
                        FROM itemtypes,items
                WHERE items.itype=itemtypes.itemtype
-                       GROUP BY items.itype");
+                       GROUP BY items.itype
+                       ORDER BY itemtypes.description");
                }
                else {
                $sth = $dbh->prepare("SELECT description, biblioitems.itemtype, COUNT(*) AS total
                        FROM itemtypes, biblioitems,items 
                WHERE biblioitems.itemtype=itemtypes.itemtype 
                AND biblioitems.biblioitemnumber = items.biblioitemnumber
-                       GROUP BY biblioitems.itemtype");
+                       GROUP BY biblioitems.itemtype
+                       ORDER BY itemtypes.description");
                }
                $sth->execute;
        }
@@ -117,6 +123,7 @@ sub calculate {
        $globalline{loopitemtype} = \@results;
        $globalline{total} = $grantotal;
        $globalline{branch} = $branch;
+       $globalline{branchname} = GetBranchName($branch);
        push @mainloop,\%globalline;
        return \@mainloop;
 }
index 4d28a96..7107216 100755 (executable)
@@ -39,16 +39,23 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 );
 
 my $op       = $query->param('op') || '';
+my $status   = $query->param('status') || 0;
 my $reviewid = $query->param('reviewid');
+my $offset   = $query->param('offset') || 0;
+my $count    = C4::Context->preference('numSearchResults') || 20;
+my $total    = numberofreviews($status);
 
 if ( $op eq 'approve' ) {
     approvereview($reviewid);
 }
+elsif ( $op eq 'unapprove' ) {
+    unapprovereview($reviewid);
+}
 elsif ( $op eq 'delete' ) {
     deletereview($reviewid);
 }
 
-my $reviews = getallreviews(0);
+my $reviews = getallreviews($status,$offset,$count);
 
 foreach ( @$reviews ) {
     my $borrowernumber = $_->{borrowernumber};
@@ -60,6 +67,12 @@ foreach ( @$reviews ) {
     $_->{firstname}   = $borrowerData->{'firstname'};
 }
 
-$template->param( reviews => $reviews );
+my $url = "/cgi-bin/koha/reviews/reviewswaiting.pl?status=$status";
+
+$template->param(
+    status => $status,
+    reviews => $reviews,
+    pagination_bar => pagination_bar( $url, ( int( $total / $count ) ) + ( ( $total % $count ) > 0 ? 1 : 0 ), $offset, "offset" )
+);
 
 output_html_with_http_headers $query, $cookie, $template->output;
index 8c7c32b..a67db7a 100755 (executable)
@@ -93,6 +93,7 @@ if($op eq 'gennext' && @subscriptionid){
     print $query->redirect('/cgi-bin/koha/serials/serials-collection.pl?subscriptionid='.$subscriptionid);
 }
 
+my $subscriptioncount;
 my ($location, $callnumber);
 if (@subscriptionid){
    my @subscriptioninformation=();
@@ -123,6 +124,7 @@ if (@subscriptionid){
     @subscriptioninformation=(@$tmpsubscription,@subscriptioninformation);
   }
   $subscriptions=PrepareSerialsData(\@subscriptioninformation);
+  $subscriptioncount = CountSubscriptionFromBiblionumber($subscriptiondescs->[0]{'biblionumber'});
 } else {
   $subscriptiondescs = GetSubscriptionsFromBiblionumber($biblionumber) ;
   my $subscriptioninformation = GetFullSubscriptionsFromBiblionumber($biblionumber);
@@ -147,7 +149,6 @@ foreach (@$location) {
 
 chop $subscriptionidlist;
 $template->param(
-          onesubscription => (scalar(@$subscriptiondescs)==1),
           subscriptionidlist => $subscriptionidlist,
           biblionumber => $biblionumber,
           subscriptions => $subscriptiondescs,
@@ -158,6 +159,7 @@ $template->param(
           suggestion => C4::Context->preference("suggestion"),
           virtualshelves => C4::Context->preference("virtualshelves"),
           subscr=>$query->param('subscriptionid'),
+          subscriptioncount => $subscriptioncount,
     location          => $locationlib,
     callnumber        => $callnumber,
           );
index 18f71b0..272ca6f 100755 (executable)
@@ -307,13 +307,21 @@ $template->param( "statusselected_$$suggestion_ref{'STATUS'}" =>1);
 # get currencies and rates
 my @rates = GetCurrencies();
 my $count = scalar @rates;
+my $active_currency = GetCurrency();
+my $selected_currency;
+if ($$suggestion_ref{'currency'}) {
+    $selected_currency = $$suggestion_ref{'currency'};
+}
+else {
+    $selected_currency = $active_currency->{currency};
+}
 
 my @loop_currency = ();
 for ( my $i = 0 ; $i < $count ; $i++ ) {
     my %line;
     $line{currcode} = $rates[$i]->{'currency'};
     $line{rate}     = $rates[$i]->{'rate'};
-       $line{selected} = 1 if ($$suggestion_ref{'currency'} && $line{'currcode'} eq $$suggestion_ref{'currency'});
+       $line{selected} = 1 if ($line{'currcode'} eq $selected_currency);
     push @loop_currency, \%line;
 }
 
diff --git a/t/00-checkdatabase-version.t b/t/00-checkdatabase-version.t
new file mode 100644 (file)
index 0000000..3a3df52
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright 2010 Chris Cormack
+#
+# 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 Test::More;
+use File::Spec;
+use File::Find;
+use IO::File;
+
+my @files =('kohaversion.pl','installer/data/mysql/updatedatabase.pl');
+
+foreach my $file (@files){
+    next unless -f $file;
+    my @name_parts = File::Spec->splitpath($file);
+    my %dirs = map { $_ => 1 } File::Spec->splitdir($name_parts[1]);
+    next if exists $dirs{'.git'};
+
+    my $fh = IO::File->new($file, 'r');
+    my $xxx_found = 0;
+    my $line = 0;
+    while (<$fh>) {
+       $line++;
+       if (/XXX/i) {
+           #two lines are an exception for updatedatabase (routine SetVersion and TransferToNum)
+           next if $file=~ /updatedatabase/ && ( /s\/XXX\$\/999\/;/ || /\$_\[0\]=~ \/XXX\$\/;/ );
+           $xxx_found = 1;
+          last;
+       }
+     }
+     close $fh;
+     if ($xxx_found) {
+         fail("$file has no XXX in it");
+        diag("XXX found in line $line");
+     } else {
+        pass("$file has no XXX in it");
+    }
+}
+
+done_testing();
index fa8181f..8f96e22 100644 (file)
@@ -32,4 +32,22 @@ find({
         use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
     },
 }, $lib);
+
+$lib = File::Spec->rel2abs('Koha');
+find(
+    {
+        bydepth  => 1,
+        no_chdir => 1,
+        wanted   => sub {
+            my $m = $_;
+            return unless $m =~ s/[.]pm$//;
+            $m =~ s{^.*/Koha/}{Koha/};
+            $m =~ s{/}{::}g;
+            use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
+        },
+    },
+    $lib
+);
+
+
 done_testing();
index da11a58..2e3b2fd 100644 (file)
@@ -29,7 +29,7 @@ find({
     wanted => sub {
         my $file = $_;
 
-        return if $file =~ /\.(ico|jpg|gif|ogg|pdf|png|psd|swf|zip)$/;
+        return if $file =~ /\.(ico|jpg|gif|ogg|pdf|png|psd|swf|zip|.*\~)$/;
         return unless -f $file;
 
         my @name_parts = File::Spec->splitpath($file);
index 19e53fb..6018502 100755 (executable)
@@ -16,8 +16,8 @@ my @all_koha_dirs = qw( acqui admin authorities basket C4 catalogue cataloguing
 labels members misc offline_circ opac patroncards reports reserve reviews rotating_collections
 serials sms suggestion t tags test tools virtualshelves);
 
-my @dirs = qw( acqui admin authorities basket circ debian errors offline_circ reserve reviews rotating_collections
-serials sms virtualshelves );
+my @dirs = qw( acqui admin authorities basket catalogue cataloguing circ debian errors labels
+    offline_circ reserve reviews rotating_collections serials sms virtualshelves );
 
 if ( not $ENV{TEST_QA} ) {
     my $msg = 'Author test. Set $ENV{TEST_QA} to a true value to run';
index 0a55cd6..4d26f39 100755 (executable)
@@ -6,9 +6,11 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 2;
 
 BEGIN {
         use_ok('C4::AuthoritiesMarc::UNIMARC');
 }
 
+my @test = C4::AuthoritiesMarc::UNIMARC::default_auth_type_location();
+ok(($test[0] == 152) && ($test[1] eq 'b'), "correct variables being returned");
index fb3b0bf..0f04913 100755 (executable)
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 12;
+use Test::More tests => 13;
 
 BEGIN { use_ok( 'C4::Boolean', qw( true_p ) ); }
 
@@ -19,3 +19,4 @@ is( true_p('YES'),  '1', 'verified case insensitivity' );
 
 is( true_p(undef), undef, 'recognizes undefined as not boolean' );
 is( true_p('foo'), undef, 'recognizes \'foo\' as not boolean' );
+is( true_p([]), undef, 'recognizes a reference as not a boolean' );
index a2d3dc1..7a4d7f4 100755 (executable)
@@ -6,9 +6,23 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 6;
 
 BEGIN {
         use_ok('C4::ClassSortRoutine::Dewey');
 }
 
+my $cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key(undef, undef );
+is($cn_sort,"","testing whitespace");
+
+$cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("....",".....");
+is($cn_sort,"","testing fullstops");
+
+$cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("123","456");
+is($cn_sort,"123_456000000000000","testing numbers");
+
+$cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("abc123","456");
+is($cn_sort,"ABC_123_456000000000000","testing alphanumeric");
+
+$cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key("ab         c123","45   6");
+is($cn_sort,"AB_C123_45_600000000000000","testing middle whitespace");
index d627259..128006b 100755 (executable)
@@ -6,9 +6,19 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 3;
 
 BEGIN {
         use_ok('C4::ClassSortRoutine::Generic');
 }
 
+my $cn_class = "My class ";
+my $cn_item = " hellO";
+
+my $cn_sort = C4::ClassSortRoutine::Generic::get_class_sort_key($cn_class, $cn_item);
+
+is($cn_sort,"MY_CLASS_HELLO","testing cnsort");
+
+$cn_sort = C4::ClassSortRoutine::Generic::get_class_sort_key(undef, undef);
+
+is($cn_sort,"","Testing blank cnsort");
diff --git a/t/Koha_template_plugin_KohaDates.t b/t/Koha_template_plugin_KohaDates.t
new file mode 100644 (file)
index 0000000..f9a0e72
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/perl
+#
+
+use strict;
+use warnings;
+use C4::Context;
+use C4::Dates;
+use Test::More tests => 5;
+
+BEGIN {
+        use_ok('Koha::Template::Plugin::KohaDates');
+}
+
+my $date = "1973-05-21";
+my $context = C4::Context->new();
+my $dateobj = C4::Dates->new();
+
+my $filter = Koha::Template::Plugin::KohaDates->new();
+ok ($filter, "new()");
+
+
+$context->set_preference( "dateformat", 'iso' );
+$context->clear_syspref_cache();
+$dateobj->reset_prefformat;
+
+my $filtered_date = $filter->filter($date);
+is ($filtered_date,$date, "iso conversion") or diag ("iso conversion fails");
+
+#$filter = Koha::Template::Plugin::KohaDates->new();
+$context->set_preference( "dateformat", 'us' );
+$context->clear_syspref_cache();
+$dateobj->reset_prefformat;
+
+$filtered_date = $filter->filter($date);
+is ($filtered_date,'05/21/1973', "us conversion") or diag ("us conversion fails $filtered_date");
+
+$context->set_preference( "dateformat", 'metric' );
+$context->clear_syspref_cache();
+$dateobj->reset_prefformat;
+
+$filtered_date = $filter->filter($date);
+is ($filtered_date,'21/05/1973', "metric conversion") or diag ("metric conversion fails $filtered_date");
index 667cb8c..e28efd6 100755 (executable)
@@ -6,9 +6,11 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 2;
 
 BEGIN {
         use_ok('C4::Reports');
 }
 
+
+ok(GetDelimiterChoices(),"Testing getting delimeter choices");  #Not testing the value of the output just that it returns something.
diff --git a/t/SIP_ILS.t b/t/SIP_ILS.t
deleted file mode 100755 (executable)
index 4a3ee70..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/perl
-#
-# This Koha test module is a stub!  
-# Add more tests here!!!
-
-use strict;
-use warnings;
-
-use Test::More tests => 1;
-
-BEGIN {
-        use FindBin;
-        use lib "$FindBin::Bin/../C4/SIP";
-        use_ok('C4::SIP::ILS');
-}
-
index 879c983..d837609 100755 (executable)
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 4;
+use Test::More tests => 8;
 
 BEGIN {
         use FindBin;
@@ -25,3 +25,19 @@ like( $date_time, qr/^\d{8}    \d{6}$/, 'Timestamp format secs');
 $date_time = Sip::timestamp('2011-01-12');
 ok( $date_time eq '20110112    235900', 'Timestamp iso date string');
 
+my $myChecksum = Sip::Checksum::checksum("12345");
+my $checker = 65281;
+my $stringChecksum = Sip::Checksum::checksum("teststring");
+my $stringChecker = 64425;
+
+is( $myChecksum, $checker, "Checksum: $myChecksum matches expected output");
+is( $stringChecksum, $stringChecker, "Checksum: $stringChecksum matches expected output");
+
+my $testdata = "abcdAZ";
+my $something = Sip::Checksum::checksum($testdata);
+
+$something =  sprintf("%4X", $something);
+ok( Sip::Checksum::verify_cksum($testdata.$something), "Checksum: $something is valid.");
+
+my $invalidTest = Sip::Checksum::verify_cksum("1234567");
+is($invalidTest, 0, "Checksum: 1234567 is invalid as expected");
index ce1503f..0fe3a60 100755 (executable)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 11;
+use Test::More tests => 19;
 BEGIN {
        use FindBin;
        use lib $FindBin::Bin;
@@ -20,7 +20,7 @@ sub pretty_line {
 
 my ($scrubber,$html,$result,@types,$collapse);
 $collapse = 1;
-@types = qw(comment tag);
+@types = qw(default comment tag staff);
 $html = q|
 <![CDATA[selfdestruct]]&#x5d;>
 <?php  echo(" EVIL EVIL EVIL "); ?>    <!-- COMMENT -->
@@ -58,7 +58,7 @@ $collapse and $result =~ s/\s*\n\s*/\n/g;
 print pretty_line('default'), $result, "\n", pretty_line();
 
 foreach(@types) {
-       ok($scrubber = C4::Scrubber->new($_), "Constructor: C4::Scrubber->new($_)");
+       ok($scrubber = C4::Scrubber->new($_), "testing Constructor: C4::Scrubber->new($_)");
        ok(printf("# scrubber settings: default %s, comment %s, process %s\n",
                $scrubber->default(),$scrubber->comment(),$scrubber->process()),
                "Outputting settings from scrubber object (type: $_)"
@@ -67,4 +67,22 @@ foreach(@types) {
        $collapse and $result =~ s/\s*\n\s*/\n/g;
        print pretty_line($_), $result, "\n", pretty_line();
 }
+
+print "\n\n######################################################\nStart of invalid tests\n";
+
+#Test for invalid new entry
+eval{
+       C4::Scrubber->new("");
+       fail("test should fail on entry of ''\n");
+};
+pass("Test should have failed on entry of '' (empty string) and it did. YAY!\n");
+
+eval{
+       C4::Scrubber->new("Client");
+       fail("test should fail on entry of 'Client'\n");
+};
+pass("Test should have failed on entry of 'Client' and it did. YAY!\n");
+
+print "######################################################\n";
+
 diag "done.\n";
diff --git a/t/TmplToken.t b/t/TmplToken.t
new file mode 100755 (executable)
index 0000000..b9f1612
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+#
+# This Koha test module is a stub!  
+# Add more tests here!!!
+
+use strict;
+use warnings;
+use C4::TmplTokenType;
+use Test::More tests => 7;
+
+BEGIN {
+        use_ok('C4::TmplToken');
+}
+
+ok (my $token = C4::TmplToken->new('test',C4::TmplTokenType::TEXT,10,'/tmp/translate.txt'), "Create new");
+ok ($token->string eq 'test', "String works");
+ok ($token->type == C4::TmplTokenType::TEXT, "Token works");
+ok ($token->line_number == 10, "Line number works");
+ok ($token->pathname eq '/tmp/translate.txt', "Path works");
+
+
+ok ($token->text_p, "text_p works");
index 2726eb3..0afa315 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 use C4::Auth;
 use CGI;
-use Test::More tests => 8;
+use Test::More tests => 11;
 
 BEGIN {
         use_ok('C4::BackgroundJob');
@@ -17,8 +17,8 @@ my ($userid, $cookie, $sessionID) = &checkauth($query, 1);
 #my ($sessionID, $job_name, $job_invoker, $num_work_units) = @_;
 my $background;
 diag $sessionID;
-ok ($background=C4::BackgroundJob->new($sessionID));
-ok ($background->id);
+ok ($background=C4::BackgroundJob->new($sessionID), "making job");
+ok ($background->id, "fetching id number");
 
 $background->name("George");
 is ($background->name, "George", "testing name");
@@ -29,8 +29,15 @@ is ($background->invoker, "enjoys", "testing invoker");
 $background->progress("testing");
 is ($background->progress, "testing", "testing progress");
 
-ok ($background->status);
+ok ($background->status, "testing status");
 
 $background->size("56");
 is ($background->size, "56", "testing size");
 
+ok (!$background->fetch($sessionID, $background->id), "testing fetch");
+
+
+$background->finish("finished");
+is ($background->status,'completed', "testing finished");
+
+ok ($background->results); #Will return undef unless finished
index fdccaee..e6e6118 100755 (executable)
@@ -1,14 +1,34 @@
 #!/usr/bin/perl
-#
-# This Koha test module is a stub!  
-# Add more tests here!!!
+
+# some simple tests of the elements of C4::External::BakerTaylor that do not require a valid username and password
 
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 9;
 
 BEGIN {
         use_ok('C4::External::BakerTaylor');
 }
 
+# for testing, to avoid using C4::Context
+my $username="testing_username";
+my $password="testing_password";
+
+# taken from C4::External::BakerTaylor::initialize
+my $image_url = "http://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=$username&Password=$password&Options=Y&Return=T&Type=S&Value=";
+
+# test without initializing
+is( C4::External::BakerTaylor::image_url(), undef, "testing image url pre initilization");
+is( C4::External::BakerTaylor::link_url(), undef, "testing link url pre initilization");
+is( C4::External::BakerTaylor::content_cafe_url(""), undef, "testing content cafe url pre initilization");
+is( C4::External::BakerTaylor::http_jacket_link(""), undef, "testing http jacket link pre initilization");
+is( C4::External::BakerTaylor::availability(""), undef, "testing availability pre initilization");
+
+# intitialize
+C4::External::BakerTaylor::initialize($username, $password, "link_url");
+
+# testing basic results
+is( C4::External::BakerTaylor::image_url("aa"), $image_url."aa", "testing image url construction");
+is( C4::External::BakerTaylor::link_url("bb"), "link_urlbb", "testing link url construction");
+is( C4::External::BakerTaylor::content_cafe_url("cc"), "http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=$username&Password=$password&Options=Y&ItemKey=cc", "testing content cafe url  construction");
index 462f056..fe8ef3a 100644 (file)
@@ -41,7 +41,7 @@ my $default_layout = {
         font_size       =>      3,
         callnum_split   =>      0,
         text_justify    =>      'L',
-        format_string   =>      'title, author, isbn, issn, itemtype, barcode, callnumber',
+        format_string   =>      'title, author, isbn, issn, itemtype, barcode, itemcallnumber',
     };
 
 my $layout;
index b09d887..420f7f3 100755 (executable)
@@ -18,7 +18,7 @@ my $CARDNUMBER   = 'TESTCARD01';
 my $FIRSTNAME    = 'Marie';
 my $SURNAME      = 'Mcknight';
 my $CATEGORYCODE = 'S';
-my $BRANCHCODE   = 's';
+my $BRANCHCODE   = 'CPL';
 
 my $CHANGED_FIRSTNAME = "Marry Ann";
 my $EMAIL             = "Marie\@email.com";
@@ -43,7 +43,7 @@ my @USERENV = (
     'Test',
     0,
 );
-my $BRANCH_IDX = 5;
+my $BRANCH_IDX = 4;
 
 C4::Context->_new_userenv ('DUMMY_SESSION_ID');
 C4::Context->set_userenv ( @USERENV );
index 177febb..ca4d42e 100755 (executable)
@@ -51,12 +51,12 @@ AddReserve($branch,    $borrowernumber, $biblionumber,
         $constraint, $bibitems,  $priority,       $notes,
         $title,      $checkitem, $found);
         
-my ($status, $reserve) = CheckReserves($itemnumber, $barcode);
+my ($status, $reserve, $all_reserves) = CheckReserves($itemnumber, $barcode);
 ok($status eq "Reserved", "CheckReserves Test 1");
 
-($status, $reserve) = CheckReserves($itemnumber);
+($status, $reserve, $all_reserves) = CheckReserves($itemnumber);
 ok($status eq "Reserved", "CheckReserves Test 2");
 
-($status, $reserve) = CheckReserves(undef, $barcode);
+($status, $reserve, $all_reserves) = CheckReserves(undef, $barcode);
 ok($status eq "Reserved", "CheckReserves Test 3");
 
diff --git a/t/db_dependent/SIP_ILS.t b/t/db_dependent/SIP_ILS.t
new file mode 100755 (executable)
index 0000000..daf1c29
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+#
+# This Koha test module is a stub!
+# Add more tests here!!!
+
+use strict;
+use warnings;
+
+use Test::More tests => 4;
+
+BEGIN {
+        use FindBin;
+        use lib "$FindBin::Bin/../../C4/SIP";
+        use_ok('C4::SIP::ILS');
+};
+
+my $transaction = ILS::Transaction::RenewAll->new();
+
+$transaction->patron(my $patron = ILS::Patron->new(23529000120056));
+
+ok(defined $patron, "patron code: 23529000120056 is valid");
+
+my $transaction2 = ILS::Transaction::RenewAll->new();
+$transaction2->patron(my $patron2 = ILS::Patron->new("ABCDE12345"));
+
+#This test assumes that the patron code ABCDE12345 is invalid
+ok(!defined $patron2, "patron code: ABCDE12345 is invalid");
+
+ok($transaction->do_renew_all(), "items renewed correctly");
index cb26ed1..d6d2b99 100755 (executable)
@@ -10,7 +10,7 @@ use YAML;
 use C4::Debug;
 use C4::SQLHelper qw(:all);
 
-use Test::More tests => 22;
+use Test::More tests => 20;
 
 use_ok('C4::SQLHelper');
 
@@ -50,12 +50,8 @@ $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef
 ok(keys %{$$borrowers[0]} ==1, "Search In Table columns out limit");
 $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname surname title)]);
 ok(@$borrowers>0, "Search In Table columns out limit to borrowernumber AND filter firstname surname title");
-$borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)]);
-ok(@$borrowers==0, "Search In Table columns filter firstname title limit Valjean not in other fields than surname ");
 $borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"start_with");
 ok(@$borrowers>0, "Search In Table columns filter surname  Val on a wide search found ");
-$borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"exact");
-ok(@$borrowers==0, "Search In Table columns filter surname  Val in exact search not found ");
 $borrowers=eval{SearchInTable("borrowers",["Val",{member=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)],"exact")};
 ok(@$borrowers==0 && !($@), "Search In Table fails gracefully when no correct field passed in hash");
 $borrowers=eval{SearchInTable("borrowers",["Jea"],undef,undef,undef,[qw(firstname surname borrowernumber)],"start_with")};
index 31316f2..17fac6e 100644 (file)
@@ -23,7 +23,7 @@ foreach my $string ("Leçon","modèles") {
     ok($results[0] eq $string,"$string is not modified");
 }
 
-foreach my $string ("Les chaussettes de l'archiduchesse") {
+foreach my $string ("A book about the stars") {
     my @results=C4::Search::_remove_stopwords($string,"kw");
     $debug && warn "$string ",Dump(@results);
     ok($results[0] ne $string,"$results[0] from $string");
index dd01e1b..e6008d9 100755 (executable)
@@ -1,14 +1,16 @@
 #!/usr/bin/perl
 #
-# This Koha test module is a stub!  
-# Add more tests here!!!
+
+# A simple test for UploadedFile
+# only ->new is covered
 
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 2;
 
 BEGIN {
         use_ok('C4::UploadedFile');
 }
 
+ok(my $file = C4::UploadedFile->new());
index 3e6634c..b25cd11 100644 (file)
@@ -38,7 +38,6 @@ sub methods : Test( 1 ) {
                        GetFrameworkCode
                        GetPublisherNameFromIsbn
                        TransformKohaToMarc
-                       TransformKohaToMarcOneField
                        TransformHtmlToXml
                        TransformHtmlToMarc
                        TransformMarcToKoha
index 949c670..13eb1f2 100644 (file)
@@ -34,7 +34,6 @@ sub methods : Test( 1 ) {
                        CheckAccountLineLevelInfo 
                        GetOverduerules
                        CheckBorrowerDebarred
-                       UpdateBorrowerDebarred
                        CheckExistantNotifyid 
                        CheckAccountLineItemInfo 
                        CheckItemNotify 
index 5317029..8b05dd0 100644 (file)
@@ -29,6 +29,7 @@ sub methods : Test( 1 ) {
                        ModReserveAffect 
                        ModReserveCancelAll 
                        ModReserveMinusPriority 
+                       MoveReserve
                        GetReserveInfo 
                        _FixPriority 
                        _Findgroupreserve 
diff --git a/t/db_dependent/sysprefs.t b/t/db_dependent/sysprefs.t
new file mode 100755 (executable)
index 0000000..f457391
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+
+use Modern::Perl;
+use Test::More tests => 2;
+use C4::Context;
+
+my $opacheader = C4::Context->preference('opacheader');
+my $newopacheader = "newopacheader";
+
+C4::Context->set_preference('OPACHEADER', $newopacheader);
+ok(C4::Context->preference('opacheader') eq $newopacheader);
+
+C4::Context->set_preference('opacheader', $opacheader);
+ok(C4::Context->preference('OPACHEADER') eq $opacheader);
index 53a34a6..287273c 100644 (file)
@@ -1 +1,5 @@
 exclude = Miscellanea::RequireRcsKeywords
+
+
+[Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval]
+allow_includes =1
\ No newline at end of file
index 701d421..94cfa69 100755 (executable)
@@ -177,7 +177,7 @@ if ($op eq "action") {
                        UpdateMarcWith( $marcitem, $localmarcitem );
                        eval{
                 if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) {
-                    LostItem($itemnumber, 'MARK RETURNED') if $item->{itemlost};
+                    LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $item->{itemlost};
                 }
             };
                    }
index 90ef56a..b3912eb 100755 (executable)
@@ -147,6 +147,7 @@ $template->param(WEEK_DAYS_LOOP => \@week_days,
         keydate => $keydate,
         branchcodes => $branchcodes,
         branch => $branch,
+        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
         branchname => $branchname
   );
 
index 34469d8..c36d328 100755 (executable)
@@ -10,25 +10,44 @@ use C4::Output;
 
 
 use C4::Calendar;
+use DateTime;
 
-my $input = new CGI;
-my $dbh = C4::Context->dbh();
+my $input               = new CGI;
+my $dbh                 = C4::Context->dbh();
 
-my $branchcode = $input->param('newBranchName');
-my $originalbranchcode = $branchcode;
-my $weekday = $input->param('newWeekday');
-my $day = $input->param('newDay');
-my $month = $input->param('newMonth');
-my $year = $input->param('newYear');
-my $title = $input->param('newTitle');
-my $description = $input->param('newDescription');
-my $newoperation = $input->param('newOperation');
-my $allbranches = $input->param('allBranches');
+my $branchcode          = $input->param('newBranchName');
+my $originalbranchcode  = $branchcode;
+my $weekday             = $input->param('newWeekday');
+my $day                 = $input->param('newDay');
+my $month               = $input->param('newMonth');
+my $year                = $input->param('newYear');
+my $day1;
+my $month1;
+my $year1;
+my $dateofrange         = $input->param('dateofrange');
+my $title               = $input->param('newTitle');
+my $description         = $input->param('newDescription');
+my $newoperation        = $input->param('newOperation');
+my $allbranches         = $input->param('allBranches');
 
-my $calendardate = sprintf("%04d-%02d-%02d", $year, $month, $day);
-my $isodate = C4::Dates->new($calendardate, 'iso');
-$calendardate = $isodate->output('syspref');
+my $calendardate        = sprintf("%04d-%02d-%02d", $year, $month, $day);
+my $isodate             = C4::Dates->new($calendardate, 'iso');
+$calendardate           = $isodate->output('syspref');
 
+my @dateend = split(/[\/-]/, $dateofrange);
+if (C4::Context->preference("dateformat") eq "metric") {
+    $day1 = $dateend[0];
+    $month1 = $dateend[1];
+    $year1 = $dateend[2];
+}elsif (C4::Context->preference("dateformat") eq "us") {
+    $month1 = $dateend[0];
+    $day1 = $dateend[1];
+    $year1 = $dateend[2];
+} else {
+    $year1 = $dateend[0];
+    $month1 = $dateend[1];
+    $day1 = $dateend[2];
+}
 $title || ($title = '');
 if ($description) {
        $description =~ s/\r/\\r/g;
@@ -80,5 +99,52 @@ sub add_holiday {
                                                             description => $description);
                }
 
-       }
+       } elsif ( $newoperation eq 'holidayrange' ) {
+        #Make an array with holiday's days
+        my $first_dt = DateTime->new(year => $year, month  => $month,  day => $day);
+        my $end_dt   = DateTime->new(year => $year1, month  => $month1,  day => $day1);
+        my @holiday_list = ();
+
+        for (my $dt = $first_dt->clone();
+            $dt <= $end_dt;
+            $dt->add(days => 1) )
+            {
+            push @holiday_list, $dt->clone();
+            }
+
+        foreach my $date (@holiday_list){
+            unless ( $calendar->isHoliday( $date->{local_c}->{day}, $date->{local_c}->{month}, $date->{local_c}->{year} ) ) {
+            $calendar->insert_single_holiday(
+                day         => $date->{local_c}->{day},
+                month       => $date->{local_c}->{month},
+                year        => $date->{local_c}->{year},
+                title       => $title,
+                description => $description
+                );
+            }
+        }
+    } elsif ( $newoperation eq 'holidayrangerepeat' ) {
+        #Make an array with holiday's days
+        my $first_dt = DateTime->new(year => $year, month  => $month,  day => $day);
+        my $end_dt   = DateTime->new(year => $year1, month  => $month1,  day => $day1);
+        my @holiday_list = ();
+
+        for (my $dt = $first_dt->clone();
+            $dt <= $end_dt;
+            $dt->add(days => 1) )
+            {
+            push @holiday_list, $dt->clone();
+            }
+
+        foreach my $date (@holiday_list){
+            unless ( $calendar->isHoliday( $date->{local_c}->{day}, $date->{local_c}->{month}, $date->{local_c}->{year} ) ) {
+            $calendar->insert_day_month_holiday(
+                day         => $date->{local_c}->{day},
+                month       => $date->{local_c}->{month},
+                title       => $title,
+                description => $description
+                );
+            }
+        }
+    }
 }
index 7028358..055f7f4 100755 (executable)
@@ -21,6 +21,8 @@ use warnings;
 use CGI;
 use C4::Auth;
 use C4::Output;
+use C4::Review qw/numberofreviews/;
+use C4::Tags qw/get_count_by_tag_status/;
 
 my $query = new CGI;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
@@ -34,4 +36,12 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
+my $pendingcomments = numberofreviews(0);
+my $pendingtags = get_count_by_tag_status(0);
+
+$template->param(
+    pendingcomments => $pendingcomments,
+    pendingtags     => $pendingtags
+);
+
 output_html_with_http_headers $query, $cookie, $template->output;
index 0c2e477..8079cd6 100644 (file)
@@ -38,8 +38,11 @@ sub test_string_extraction {
     my @warnings;
     while (<PH>) {
         # ignore some noise on STDERR
-        next if /^\.* done\.$/;
-       next if /^\.* terminé\.$/;
+        # the output of msmerge, that consist in .... followed by a "done" (localized), followed by a .
+        # The "done" localized can include diacritics, so ignoring the whole word
+        # FIXME PP: the flow is not correct UTF8, testing \p{IsLetter} does not work, but I think this regexp will do the job
+        next if (/^\.+ .*\.$/);
+        # other Koha-specific catses that should not worry us
         next if /^Warning: Can't determine original templates' charset/;
         next if /^Warning: Charset Out defaulting to/;
         next if /^Removing empty file /;
index a4fa71e..202ef57 100644 (file)
@@ -50,13 +50,18 @@ done_testing();
 sub create_template_test {
     my $includes = shift;
     return sub {
-       my $tt = Template->new({ABSOLUTE => 1,
-                                  INCLUDE_PATH => $includes });
-       my $vars;
-       my $output;
-       if ( ! ok($tt->process($_,$vars,\$output), $_) ){
-           diag($tt->error);
-       }
+        my $tt = Template->new(
+            {
+                ABSOLUTE     => 1,
+                INCLUDE_PATH => $includes,
+                PLUGIN_BASE  => 'Koha::Template::Plugin',
+            }
+        );
+        my $vars;
+        my $output;
+        if ( !ok( $tt->process( $_, $vars, \$output ), $_ ) ) {
+            diag( $tt->error );
+        }
     }
 }