[open-ils-commits] [GIT] Evergreen ILS branch tags/rel_2_5_0 created. 4f56621ff36a867cfe747f6f4924af3f01d8004f
Evergreen Git
git at git.evergreen-ils.org
Fri Nov 8 17:28:33 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, tags/rel_2_5_0 has been created
at 4f56621ff36a867cfe747f6f4924af3f01d8004f (commit)
- Log -----------------------------------------------------------------
commit 4f56621ff36a867cfe747f6f4924af3f01d8004f
Author: Dan Wells <dbw2 at calvin.edu>
Date: Thu Nov 7 17:23:54 2013 -0500
Manual tweaks to upgrade file
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.4.3-2.5.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.4.3-2.5.0-upgrade-db.sql
index ac803a3..80531c9 100644
--- a/Open-ILS/src/sql/Pg/version-upgrade/2.4.3-2.5.0-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.4.3-2.5.0-upgrade-db.sql
@@ -1,4 +1,73 @@
--Upgrade Script for 2.4.3 to 2.5.0
+
+\qecho **** Libraries that upgraded or installed 2.0 before May 2011 never
+\qecho **** got this schema, so add it first.
+\qecho **** If this fails, don't worry, it probably won't be an issue.
+\qecho
+
+BEGIN;
+
+CREATE SCHEMA staging;
+
+CREATE TABLE staging.user_stage (
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL,
+ profile TEXT,
+ email TEXT,
+ passwd TEXT,
+ ident_type INT DEFAULT 3,
+ first_given_name TEXT,
+ second_given_name TEXT,
+ family_name TEXT,
+ day_phone TEXT,
+ evening_phone TEXT,
+ home_ou INT DEFAULT 2,
+ dob TEXT,
+ complete BOOL DEFAULT FALSE
+);
+
+CREATE TABLE staging.card_stage ( -- for new library barcodes
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL,
+ barcode TEXT NOT NULL,
+ complete BOOL DEFAULT FALSE
+);
+
+CREATE TABLE staging.mailing_address_stage (
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL, -- user's SIS barcode, for linking
+ street1 TEXT,
+ street2 TEXT,
+ city TEXT NOT NULL DEFAULT '',
+ state TEXT NOT NULL DEFAULT 'OK',
+ country TEXT NOT NULL DEFAULT 'US',
+ post_code TEXT NOT NULL,
+ complete BOOL DEFAULT FALSE
+);
+
+CREATE TABLE staging.billing_address_stage (
+ LIKE staging.mailing_address_stage INCLUDING DEFAULTS
+);
+
+ALTER TABLE staging.billing_address_stage ADD PRIMARY KEY (row_id);
+
+CREATE TABLE staging.statcat_stage (
+ row_id BIGSERIAL PRIMARY KEY,
+ row_date TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
+ usrname TEXT NOT NULL,
+ statcat TEXT NOT NULL, -- for things like 'Year of study'
+ value TEXT NOT NULL, -- and the value, such as 'Freshman'
+ complete BOOL DEFAULT FALSE
+);
+
+COMMIT;
+
+
+\qecho **** REAL 2.5 upgrade starting now...
+
\set eg_version '''2.5.0'''
BEGIN;
INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.5.0', :eg_version);
@@ -484,7 +553,7 @@ $BODY$
ROWS 1000;
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0795', :eg_version); -- berick/dbwells
+SELECT evergreen.upgrade_deps_block_check('0795', :eg_version);
CREATE OR REPLACE FUNCTION
evergreen.z3950_attr_name_is_valid(TEXT) RETURNS BOOLEAN AS $func$
@@ -589,7 +658,7 @@ INSERT INTO vandelay.bib_attr_definition (id, code, description, xpath)
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0796', :eg_version); -- berick/dbwells
+SELECT evergreen.upgrade_deps_block_check('0796', :eg_version);
ALTER TABLE vandelay.bib_queue ADD COLUMN match_bucket
INTEGER REFERENCES container.biblio_record_entry_bucket(id)
@@ -723,7 +792,7 @@ END;
$$ LANGUAGE PLPGSQL;
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0797', :eg_version); -- tsbere/Dyrcona/dbwells
+SELECT evergreen.upgrade_deps_block_check('0797', :eg_version);
-- New global flags for the purge function
INSERT INTO config.global_flag (name, label, enabled)
@@ -1093,7 +1162,7 @@ CREATE TRIGGER action_hold_request_aging_tgr
EXECUTE PROCEDURE action.age_hold_on_delete ();
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0798', :eg_version); -- tsbere/Dyrcona/dbwells
+SELECT evergreen.upgrade_deps_block_check('0798', :eg_version);
INSERT INTO config.global_flag (name, label)
VALUES (
@@ -9268,13 +9337,6 @@ INSERT INTO config.org_unit_setting_type (
);
-\qecho This is a browse-only reingest of your bib records. It may take a while.
-\qecho You may cancel now without losing the effect of the rest of the
-\qecho upgrade script, and arrange the reingest later.
-\qecho .
-SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE)
- FROM biblio.record_entry;
-
-- NOTE: very IDs are still correct for perms and event_def data at merge.
SELECT evergreen.upgrade_deps_block_check('0817', :eg_version);
@@ -10173,7 +10235,6 @@ END;
$$ LANGUAGE PLPGSQL;
-
SELECT evergreen.upgrade_deps_block_check('0826', :eg_version);
INSERT INTO permission.perm_list ( id, code, description ) VALUES (
@@ -10189,12 +10250,6 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES (
-SELECT evergreen.upgrade_deps_block_check('0827', :eg_version);
-
-ALTER TABLE action_trigger.event_definition ADD COLUMN repeat_delay INTERVAL;
-
-
-
SELECT evergreen.upgrade_deps_block_check('0828', :eg_version);
INSERT into config.org_unit_setting_type
@@ -12021,10 +12076,6 @@ DELETE FROM config.metabib_field_index_norm_map
WHERE func IN ('search_normalize','split_date_range')
);
-\qecho If your site's bibcn searches are affected by this issue, you may wish
-\qecho to reingest your bib records now. It's probably not worth it for many
-\qecho sites.
-
-- check whether patch can be applied
SELECT evergreen.upgrade_deps_block_check('0839', :eg_version);
@@ -12038,97 +12089,6 @@ WHERE
field_class = 'title' AND name = 'alternative' ;
--- The following function only appears in the upgrade script and not the
--- baseline schema because it's not necessary in the latter (and it's a
--- temporary function). It just serves to do a hopefully cheaper, more
--- focused reingest just to hit the alternative title index.
-
--- This cribs from the guts of metabib.reingest_metabib_field_entries(),
--- and if it actually is a timesaver over a full reingest, then at some
--- point in the future it would be nice if we broke it out into a separate
--- function to make things like this easier.
-
-CREATE OR REPLACE FUNCTION pg_temp.alternative_title_reingest( bib_id BIGINT ) RETURNS VOID AS $func$
-DECLARE
- ind_data metabib.field_entry_template%ROWTYPE;
- mbe_row metabib.browse_entry%ROWTYPE;
- mbe_id BIGINT;
- b_skip_facet BOOL := false;
- b_skip_browse BOOL := false;
- b_skip_search BOOL := false;
- alt_title INT;
- value_prepped TEXT;
-BEGIN
- SELECT INTO alt_title id FROM config.metabib_field WHERE field_class = 'title' AND name = 'alternative';
- FOR ind_data IN SELECT * FROM biblio.extract_metabib_field_entry( bib_id ) WHERE field = alt_title LOOP
- IF ind_data.field < 0 THEN
- ind_data.field = -1 * ind_data.field;
- END IF;
-
- IF ind_data.facet_field AND NOT b_skip_facet THEN
- INSERT INTO metabib.facet_entry (field, source, value)
- VALUES (ind_data.field, ind_data.source, ind_data.value);
- END IF;
-
- IF ind_data.browse_field AND NOT b_skip_browse THEN
- -- A caveat about this SELECT: this should take care of replacing
- -- old mbe rows when data changes, but not if normalization (by
- -- which I mean specifically the output of
- -- evergreen.oils_tsearch2()) changes. It may or may not be
- -- expensive to add a comparison of index_vector to index_vector
- -- to the WHERE clause below.
-
- value_prepped := metabib.browse_normalize(ind_data.value, ind_data.field);
- SELECT INTO mbe_row * FROM metabib.browse_entry
- WHERE value = value_prepped AND sort_value = ind_data.sort_value;
-
- IF FOUND THEN
- mbe_id := mbe_row.id;
- ELSE
- INSERT INTO metabib.browse_entry
- ( value, sort_value ) VALUES
- ( value_prepped, ind_data.sort_value );
-
- mbe_id := CURRVAL('metabib.browse_entry_id_seq'::REGCLASS);
- END IF;
-
- INSERT INTO metabib.browse_entry_def_map (entry, def, source, authority)
- VALUES (mbe_id, ind_data.field, ind_data.source, ind_data.authority);
- END IF;
-
- -- Avoid inserting duplicate rows, but retain granularity of being
- -- able to search browse fields with "starts with" type operators
- -- (for example, for titles of songs in music albums)
- IF (ind_data.search_field OR ind_data.browse_field) AND NOT b_skip_search THEN
- EXECUTE 'SELECT 1 FROM metabib.' || ind_data.field_class ||
- '_field_entry WHERE field = $1 AND source = $2 AND value = $3'
- INTO mbe_id USING ind_data.field, ind_data.source, ind_data.value;
- -- RAISE NOTICE 'Search for an already matching row returned %', mbe_id;
- IF mbe_id IS NULL THEN
- EXECUTE $$
- INSERT INTO metabib.$$ || ind_data.field_class || $$_field_entry (field, source, value)
- VALUES ($$ ||
- quote_literal(ind_data.field) || $$, $$ ||
- quote_literal(ind_data.source) || $$, $$ ||
- quote_literal(ind_data.value) ||
- $$);$$;
- END IF;
- END IF;
-
- END LOOP;
-
- IF NOT b_skip_search THEN
- PERFORM metabib.update_combined_index_vectors(bib_id);
- END IF;
-
- RETURN;
-END;
-$func$ LANGUAGE PLPGSQL;
-
-\qecho This is a partial reingest of your bib records. It may take a while.
-
-SELECT pg_temp.alternative_title_reingest(id) FROM biblio.record_entry WHERE NOT deleted;
-
SELECT evergreen.upgrade_deps_block_check('0840', :eg_version);
INSERT INTO config.usr_setting_type (name,grp,opac_visible,label,description,datatype) VALUES (
@@ -15843,15 +15803,6 @@ UPDATE config.metabib_field SET browse_field = FALSE, browse_xpath = NULL, brows
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, authority_xpath, browse_field, browse_sort_xpath ) VALUES
(31, 'title', 'browse', oils_i18n_gettext(31, 'Title Proper (Browse)', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleBrowse$$, FALSE, '//@xlink:href', TRUE, $$*[local-name() != "nonSort"]$$ );
-
-\qecho This is a browse-only reingest of your bib records. It may take a while.
-\qecho You may cancel now without losing the effect of the rest of the
-\qecho upgrade script, and arrange the reingest later.
-\qecho .
-SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE)
- FROM biblio.record_entry;
-
--- check whether patch can be applied
SELECT evergreen.upgrade_deps_block_check('0845', :eg_version);
ALTER FUNCTION metabib.browse_pivot (integer[], text) STABLE;
@@ -16032,4 +15983,35 @@ BEGIN
END;
$f$ STABLE LANGUAGE PLPGSQL;
+SELECT evergreen.upgrade_deps_block_check('0827', :eg_version);
+SET CONSTRAINTS ALL IMMEDIATE;
+-- otherwise, the ALTER TABLE statement below
+-- will fail with pending trigger events.
+ALTER TABLE action_trigger.event_definition ADD COLUMN repeat_delay INTERVAL;
+
COMMIT;
+
+\qecho
+\qecho
+\qecho **** Certain improvements in 2.5, particularly browse, require a reingest
+\qecho **** of all records. In order to allow this to continue without locking
+\qecho **** your entire bibliographic data set, consider generating SQL scripts
+\qecho **** with the following queries, then running those via psql:
+\qecho
+\qecho **** If you require a more responsive catalog/database while reingesting,
+\qecho **** consider adding 'pg_sleep()' calls between each reingest select or
+\qecho **** update.
+\qecho
+\qecho '\\t'
+\qecho '\\o /tmp/reingest_2.5_bib_recs.sql'
+\qecho 'SELECT ''select metabib.reingest_metabib_field_entries('' || id || '');'' FROM biblio.record_entry WHERE NOT DELETED AND id > 0;'
+\qecho
+\qecho '\\o /tmp/reingest_2.5_auth_recs.sql'
+\qecho 'SELECT ''-- Grab current setting'';'
+\qecho 'SELECT ''\\set force_reingest '' || enabled FROM config.internal_flag WHERE name = ''ingest.reingest.force_on_same_marc'';'
+\qecho 'SELECT ''update config.internal_flag set enabled = true where name = ''''ingest.reingest.force_on_same_marc'''';'';'
+\qecho 'SELECT ''update authority.record_entry set id = id where id = '' || id || '';'' FROM authority.record_entry WHERE NOT DELETED;'
+\qecho 'SELECT ''-- Restore previous setting'';'
+\qecho 'SELECT ''update config.internal_flag set enabled = :force_reingest where name = \'\'ingest.reingest.force_on_same_marc\'\';'';'
+\qecho '\\o'
+\qecho '\\t'
commit 04365259d673c632ec01ec4553f04615a83e6c48
Author: Dan Wells <dbw2 at calvin.edu>
Date: Fri Nov 8 16:10:07 2013 -0500
Bumping version numbers, adding Upgrade Script and Changelog
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/ChangeLog b/ChangeLog
index 1f72b2c..e8c239d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9306 @@
-Evergreen doesn't keep a GNU-style ChangeLog except in release tarballs.
-Those seeking a change log are encouraged to run 'git log -v', or read
-it online at: http://git.evergreen-ils.org/?p=Evergreen.git;a=log
+commit 0d82736b6960d5e4b9c6deb1aa42faaf7802c9d2
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Sep 26 19:21:43 2013 -0400
+
+ Bump OpenILS.pm version
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/perlmods/lib/OpenILS.pm
+
+commit c19d61170e270bc1edfdfa24cfbbca8f6711c541
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Nov 8 11:30:13 2013 -0500
+
+ Forward-port upgrade scripts from recent releases
+
+ In accordance with LP #894052.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+121 0 Open-ILS/src/sql/Pg/version-upgrade/2.3.10-2.3.11-upgrade-db.sql
+21 0 Open-ILS/src/sql/Pg/version-upgrade/2.4.2-2.4.3-upgrade-db.sql
+ create mode 100644 Open-ILS/src/sql/Pg/version-upgrade/2.3.10-2.3.11-upgrade-db.sql
+ create mode 100644 Open-ILS/src/sql/Pg/version-upgrade/2.4.2-2.4.3-upgrade-db.sql
+
+commit 4d742521e9c59ee6449180fbcd1a53df6568dfbf
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Nov 7 15:13:55 2013 -0500
+
+ Update OpenSRF minimum version in install docs
+
+ Evergreen now requires OpenSRF 2.2.1 or later, so it makes sense to be
+ clear about it.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 docs/installation/server_installation.txt
+
+commit 84ce52a52ca4e432d79d8863204fa432aa91c6f0
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Nov 7 15:10:02 2013 -0500
+
+ Update upgrade instructions for 2.5.0 release
+
+ - Bump up minimum OpenSRF to 2.2.1
+ - Replace all 2.5-beta1 markers (and few stray 2.4 markers) with 2.5.0
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+15 15 docs/installation/server_upgrade.txt
+
+commit 869a696a9681a7855dfbf2df27b07453ac059245
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Nov 7 11:39:12 2013 -0500
+
+ Translation updates - newpot
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 1 build/i18n/po/serial.properties/serial.properties.pot
+17 13 build/i18n/po/tpac/tpac.pot
+
+commit 3c8bc9fbe3c14538460061f678582503c2976706
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Nov 7 11:31:54 2013 -0500
+
+ Translation updates - po files
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+12 10 build/i18n/po/admin.properties/es-ES.po
+7 7 build/i18n/po/common.properties/es-ES.po
+1298 788 build/i18n/po/db.seed/cs-CZ.po
+258 250 build/i18n/po/db.seed/de-DE.po
+258 250 build/i18n/po/db.seed/en-CA.po
+258 250 build/i18n/po/db.seed/en-GB.po
+257 249 build/i18n/po/db.seed/es-ES.po
+258 250 build/i18n/po/db.seed/fr-CA.po
+258 250 build/i18n/po/db.seed/hy-AM.po
+258 250 build/i18n/po/db.seed/oc-FR.po
+258 250 build/i18n/po/db.seed/pt-BR.po
+258 250 build/i18n/po/db.seed/ru-RU.po
+258 250 build/i18n/po/db.seed/tr-TR.po
+9 9 build/i18n/po/fm_IDL.dtd/cs-CZ.po
+5 5 build/i18n/po/fm_IDL.dtd/es-ES.po
+11 11 build/i18n/po/lang.dtd/cs-CZ.po
+5 5 build/i18n/po/offline.properties/es-ES.po
+15 9 build/i18n/po/opac.dtd/es-ES.po
+6 5 build/i18n/po/opac.js/es-ES.po
+5 5 build/i18n/po/vandelay.dtd/es-ES.po
+
+commit fb9de907e5c114b8c72acb3aa4051d592bfe4361
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Wed Nov 6 12:07:07 2013 -0500
+
+ Don't auto-logout TPAC in staff client
+
+ Wrap the meta refresh in TPAC within a check for ctx.is_staff, so
+ that idle TPAC tabs will not log out when running within the staff
+ client.
+
+ This is intended to resolve the primary cause of symptoms mentioned
+ in bug 1036318 "OPAC timeout within the client"
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/templates/opac/parts/base.tt2
+
+commit ec745cd95af8908cd4c43a08de4003d6138005e0
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Nov 6 17:24:38 2013 -0500
+
+ Fix typos in 2.5 release notes
+
+ These typos were fixed in the separate (now deleted) files, but only
+ after the collective file had been built. This commit transfers those
+ fixes to the built file.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+12 12 docs/RELEASE_NOTES_2_5.txt
+
+commit af83a1617508f5bea1404a4720dd90d0fe88737a
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Nov 6 17:02:16 2013 -0500
+
+ Delete separate NEXT release notes
+
+ These files have been carefully woven together into a single document,
+ so it is time to part with these bits and pieces.
+
+ Also, add a DONOTREMOVE file to preserve the SIP folder in the same
+ fashion as the others.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 5 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-po-activation-sans-assets.txt
+0 11 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-style-cancelled-delayed.txt
+0 15 docs/RELEASE_NOTES_NEXT/Acquisitions/app_acq_copy_overlay.txt
+0 5 docs/RELEASE_NOTES_NEXT/Acquisitions/print_po_name.txt
+0 6 docs/RELEASE_NOTES_NEXT/Administration/default-filter-config-screens.txt
+0 28 docs/RELEASE_NOTES_NEXT/Administration/idl2js-locale-support.txt
+0 9 docs/RELEASE_NOTES_NEXT/Administration/inter-auth-linking-script.txt
+0 29 docs/RELEASE_NOTES_NEXT/Administration/new-updates-tools.txt
+0 45 docs/RELEASE_NOTES_NEXT/Administration/phonelist.txt
+0 9 docs/RELEASE_NOTES_NEXT/Administration/purge_holds.txt
+0 12 docs/RELEASE_NOTES_NEXT/Administration/trigger_event_repeatability.txt
+0 21 docs/RELEASE_NOTES_NEXT/Cataloging/vandelay-item-import-defaults.txt
+0 89 docs/RELEASE_NOTES_NEXT/Cataloging/z39_batch_search_queue.txt
+0 4 docs/RELEASE_NOTES_NEXT/Circulation/check_barcode_regex.txt
+0 8 docs/RELEASE_NOTES_NEXT/Circulation/desk-renewal-at-original-circ-lib.txt
+0 8 docs/RELEASE_NOTES_NEXT/Circulation/disable-patron-credit.txt
+0 7 docs/RELEASE_NOTES_NEXT/Circulation/disallow-pickup.txt
+0 7 docs/RELEASE_NOTES_NEXT/Circulation/floating_groups.txt
+0 10 docs/RELEASE_NOTES_NEXT/Circulation/long-overdue-penalty.txt
+0 92 docs/RELEASE_NOTES_NEXT/Circulation/long-overdue.txt
+0 14 docs/RELEASE_NOTES_NEXT/Circulation/lost_items_modifications.txt
+0 32 docs/RELEASE_NOTES_NEXT/Circulation/per-hold-behind-desk.txt
+0 7 docs/RELEASE_NOTES_NEXT/Circulation/print-single-receipt.txt
+0 12 docs/RELEASE_NOTES_NEXT/Circulation/pull-list-user-name-fields.txt
+0 10 docs/RELEASE_NOTES_NEXT/Circulation/selcheck-styling.txt
+0 13 docs/RELEASE_NOTES_NEXT/Circulation/style-longoverdue-lost.txt
+0 6 docs/RELEASE_NOTES_NEXT/Circulation/trim-whitespace-checkout.txt
+0 9 docs/RELEASE_NOTES_NEXT/Circulation/wrong-shelf-holds.txt
+0 40 docs/RELEASE_NOTES_NEXT/Client/customize-items-out.txt
+0 6 docs/RELEASE_NOTES_NEXT/Client/increase-font-size.txt
+0 5 docs/RELEASE_NOTES_NEXT/Client/standalone-mode-shortcut.txt
+0 4 docs/RELEASE_NOTES_NEXT/Client/user-setting-defaults.txt
+0 56 docs/RELEASE_NOTES_NEXT/OPAC/BibAuthBrowse.txt
+0 53 docs/RELEASE_NOTES_NEXT/OPAC/added_content_by_record_id.txt
+0 25 docs/RELEASE_NOTES_NEXT/OPAC/authority_enhanced_browse.txt
+0 6 docs/RELEASE_NOTES_NEXT/OPAC/conjoined_items.txt
+0 4 docs/RELEASE_NOTES_NEXT/OPAC/copy_location_filter.txt
+0 14 docs/RELEASE_NOTES_NEXT/OPAC/link_library_names.txt
+0 9 docs/RELEASE_NOTES_NEXT/OPAC/locg-ou-name.txt
+0 6 docs/RELEASE_NOTES_NEXT/OPAC/maintenance_message.txt
+0 13 docs/RELEASE_NOTES_NEXT/OPAC/my_list_enhancements.txt
+0 53 docs/RELEASE_NOTES_NEXT/OPAC/patron_self_reg.txt
+0 26 docs/RELEASE_NOTES_NEXT/OPAC/responsive_tpac.txt
+0 5 docs/RELEASE_NOTES_NEXT/OPAC/rss_links.txt
+0 0 docs/RELEASE_NOTES_NEXT/SIP/DONOTREMOVE
+0 26 docs/RELEASE_NOTES_NEXT/SIP/sip-hold-cancel.txt
+0 11 docs/RELEASE_NOTES_NEXT/SIP/sip-hold-info.txt
+0 7 docs/RELEASE_NOTES_NEXT/SIP/sip-renewal-all.txt
+0 9 docs/RELEASE_NOTES_NEXT/Serials/serial-alert-notes.txt
+0 9 docs/RELEASE_NOTES_NEXT/Serials/serial-routing-slip-addresses.txt
+0 9 docs/RELEASE_NOTES_NEXT/password_reset_commit_not_secure.txt
+0 25 docs/RELEASE_NOTES_NEXT/pv_supa_goodstuff.txt
+0 12 docs/RELEASE_NOTES_NEXT/xul_server_addons.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-po-activation-sans-assets.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-style-cancelled-delayed.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/app_acq_copy_overlay.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/print_po_name.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Administration/default-filter-config-screens.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Administration/idl2js-locale-support.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Administration/inter-auth-linking-script.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Administration/new-updates-tools.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Administration/phonelist.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Administration/purge_holds.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Administration/trigger_event_repeatability.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Cataloging/vandelay-item-import-defaults.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Cataloging/z39_batch_search_queue.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/check_barcode_regex.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/desk-renewal-at-original-circ-lib.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/disable-patron-credit.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/disallow-pickup.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/floating_groups.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/long-overdue-penalty.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/long-overdue.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/lost_items_modifications.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/per-hold-behind-desk.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/print-single-receipt.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/pull-list-user-name-fields.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/selcheck-styling.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/style-longoverdue-lost.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/trim-whitespace-checkout.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/wrong-shelf-holds.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Client/customize-items-out.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Client/increase-font-size.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Client/standalone-mode-shortcut.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Client/user-setting-defaults.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/BibAuthBrowse.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/added_content_by_record_id.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/authority_enhanced_browse.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/conjoined_items.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/copy_location_filter.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/link_library_names.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/locg-ou-name.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/maintenance_message.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/my_list_enhancements.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/patron_self_reg.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/responsive_tpac.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/rss_links.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/SIP/DONOTREMOVE
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/SIP/sip-hold-cancel.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/SIP/sip-hold-info.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/SIP/sip-renewal-all.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Serials/serial-alert-notes.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Serials/serial-routing-slip-addresses.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/password_reset_commit_not_secure.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/pv_supa_goodstuff.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/xul_server_addons.txt
+
+commit 67a2d15be9af1ad8662bf4a58b2a1fbcb0284c50
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Thu Jun 6 10:02:27 2013 -0400
+
+ Remove manual TPAC locale applications
+
+ OpenILS::Utils::CStoreEditor::default_locale is no longer set, since the
+ opensrf client locale is now global. Remove all references to this
+ variable.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+0 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+
+commit 859d49c348c3336789c2886e664fe6b0cf1a7bb7
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Thu May 23 15:20:14 2013 -0400
+
+ Default per-request TPAC locale
+
+ Set the OpenSRF default client locale for each TPAC request to ensure
+ all outbound OpenSRF calls use the requested locale. When done, reset
+ the locale to the OpenSRF default.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+14 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+
+commit 4a6345d0383ba3b7b0f73aca06eafa5a8adab1a4
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Nov 4 15:39:02 2013 -0500
+
+ Improve locale picker positioning
+
+ The locale picker was dependant on some header padding which was
+ removed. Let's position it more directly.
+
+ Also, add a small left margin to the 'dashboard' area.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+
+6 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit a32f7424685b42d8e305ec0003cca5d208ec91e7
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Tue Nov 5 13:55:02 2013 -0500
+
+ Only one of these tests was valid, removing the bad one
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+2 51 Open-ILS/src/sql/Pg/live_t/0824.item_import_defaults.pg
+
+commit 3e7f6f1503938e3e5a1cfe3bd90eaa8f021a0d48
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Tue Nov 5 12:31:17 2013 -0500
+
+ Live pgTAP test for 0847, authority overlay generator fixes
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+29 0 Open-ILS/src/sql/Pg/live_t/0847.auth_overlay_generator.pg
+ create mode 100644 Open-ILS/src/sql/Pg/live_t/0847.auth_overlay_generator.pg
+
+commit bdfb29aed7b4312a485dcba4dbf73adc6e2ffe70
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Nov 1 16:45:09 2013 -0400
+
+ Stamping 0847: improved auth overlay generation
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+94 0 Open-ILS/src/sql/Pg/upgrade/0847.function.auth_overlay_generator.sql
+0 94 Open-ILS/src/sql/Pg/upgrade/XXXX.function.auth_overlay_generator.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0847.function.auth_overlay_generator.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.function.auth_overlay_generator.sql
+
+commit 84197529d5b7080c4b61850b591a59103688b644
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Fri Nov 1 13:57:35 2013 -0400
+
+ Add indicators; Remove junk tags
+
+ First, we were not supplying authority tag indicators when generating the
+ overlay template. The xml merge function does not currently transfer
+ indicators, but we need to do this anyway because newer MARC::Field version
+ balk at fields with no indicators.
+
+ Second, PG 9.1+ adds wrapper tags to xml content that is passed to XMLELEMENT
+ as an array. So, we'll use XMLAGG to get around that.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+15 2 Open-ILS/src/sql/Pg/011.schema.authority.sql
+94 0 Open-ILS/src/sql/Pg/upgrade/XXXX.function.auth_overlay_generator.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.function.auth_overlay_generator.sql
+
+commit 23559e20eb03b43e74cdc5a9cf2325795e48f315
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Tue Oct 29 12:15:56 2013 -0400
+
+ Add --refresh mode to completely rewrite linking
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+36 22 Open-ILS/src/support-scripts/authority_control_fields.pl.in
+
+commit 840fbb529ff84ea2edd7c1c3b3d0b8d0b2ead5be
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Tue Oct 29 11:37:36 2013 -0400
+
+ Use all subfield values to link authority records to bibs
+
+ Given an Evergreen instance with two authority records loaded, one
+ being a more specific than the other via a repeated subdivision subfield,
+ we must make sure that we use all the bib-supplied subfield values when
+ attempting to auto-link to the correct authority. Otherwise, the "shorter"
+ authority record may be selected as appropriate, and data in the bib record
+ would be lost.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+3 3 Open-ILS/src/support-scripts/authority_control_fields.pl.in
+
+commit 8c7bbda22d166eb163de2011ce1f4087199bcb24
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Fri Nov 1 15:08:23 2013 -0400
+
+ Clean up 2.5 upgrade instructions
+
+ This commit cleans up a few tiny issues and a large formatting bug,
+ fixes a filename, and reorders the linux distros to put the newest ones
+ first. The content related changes are:
+
+ - fix filename in 'tar' command
+ - reorder linux distros (in two places)
+ - fix various punctuation (add comma; remove colon in header)
+
+ And the AsciiDoc changes:
+
+ - add asciidoc '+'s before and after 'indexterm' commands to fix
+ broken ordered list formatting
+ - remove an unnecessary asciidoc '+'
+ - correct the length of an asciidoc block header line (doesn't change
+ behavior, but helps readability of the text file)
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+10 12 docs/installation/server_upgrade.txt
+
+commit ab685448207ea0ae99b9c954d600090a44d5e640
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Oct 30 15:33:28 2013 -0400
+
+ Stamping 0846: overlay subfield order fix
+
+ Respect source XML subfield order during overlay
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+83 0 Open-ILS/src/sql/Pg/upgrade/0846.function.vand-add_field.sql
+0 83 Open-ILS/src/sql/Pg/upgrade/XXXX.function.vand-add_field.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0846.function.vand-add_field.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.function.vand-add_field.sql
+
+commit 7c4f5754fa8218c3e59565afdd49174cf0a8c4d0
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Fri Oct 25 12:15:25 2013 -0400
+
+ Respect source XML subfield order during overlay
+
+ When adding specific subfields to a field as described by an add
+ or replace rule we were adding them in rule-order. Instead, they
+ should be added in source-XML physical order. This commit does
+ that.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+3 2 Open-ILS/src/sql/Pg/012.schema.vandelay.sql
+83 0 Open-ILS/src/sql/Pg/upgrade/XXXX.function.vand-add_field.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.function.vand-add_field.sql
+
+commit c9a4dee7878648e671fe7c33c431a366746eab34
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Tue Oct 29 15:45:18 2013 -0400
+
+ Stamping upgrade script for 0845: browse pivots should be stable.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+11 0 Open-ILS/src/sql/Pg/upgrade/0845.schema.browse_pivots_stable.sql
+0 11 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.browse_pivots_stable.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0845.schema.browse_pivots_stable.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.browse_pivots_stable.sql
+
+commit 4b35a8cf5034092b6c64d848f09570c5fd5e3820
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Tue Oct 29 09:42:08 2013 -0400
+
+ Make browse pivot DB funcs STABLE
+
+ Since these are just convenience functions doing only selects, these
+ should be STABLE safe, and making this change allows browse to be
+ functional on production-size data sets.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+4 4 Open-ILS/src/sql/Pg/030.schema.metabib.sql
+11 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.browse_pivots_stable.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.browse_pivots_stable.sql
+
+commit ef4d822e9348c8c7150e6afe4440b09d8042c693
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Mon Oct 21 16:37:22 2013 -0400
+
+ Handle Missing copy status (4) in checkin_via_barcode2 in circ.util.js.
+
+ We treate just like available and reshelving.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/xul/staff_client/server/circ/util.js
+
+commit 6ce3e4bb3fec20de325ff79a1f2903d261249d01
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Thu Oct 24 16:10:00 2013 -0400
+
+ Make sure that # can be used in auth browse
+
+ Because we use URLs to call the SuperCat browse API, we need to
+ be more careful about encoding parameters. #, in particular, breaks
+ auth browse because it's seen as a URL fragment separator by the browser
+ and web server.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Yamil Suarez <yamil at yamil.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/web/js/ui/default/cat/authority/list.js
+
+commit 35050456f325bed02b02f15707460865607f8034
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Oct 25 16:15:25 2013 -0400
+
+ Touch-up record detail extras display
+
+ 1) Remove unsightly gaps, which gave it an overly "stripey"
+ appearance.
+
+ 2) Switch off-green arrow graphic with a text-based arrow character.
+
+ 3) Simplify unnecessarily complex positioning styles.
+
+ 4) Lighten and add subtle border to give depth and definition to
+ section headers.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+8 9 Open-ILS/src/templates/opac/css/style.css.tt2
+7 8 Open-ILS/src/templates/opac/parts/record/extras.tt2
+
+commit ee026c9333cd590b47df64de83c68f2c4ec5ac5a
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Oct 25 16:43:14 2013 -0400
+
+ Match main-content right margin to left
+
+ Having a margin on one side but not the other just looks "off". Let's
+ match it on the right.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+2 2 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit a5d6c259f02f894dc9a67df291dd702387149ed2
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Oct 25 15:55:40 2013 -0400
+
+ Tweak TPAC header layout styles
+
+ The TPAC header relies heavily on fixed pixel measurements and relative
+ positioning, which makes it fragile and overly difficult to customize.
+
+ To improve the situation, we can greatly reduce the number of styles
+ while still achieving the same overall effect.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+14 33 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 4cb4ab7aa8f68799b1b4c0df4447d7f252c2d5d1
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Oct 24 09:54:49 2013 -0400
+
+ RDA / TPAC: Add 264 for pubinfo graphic 880 lookups
+
+ Per https://bugs.launchpad.net/evergreen/+bug/1243746 the publication
+ info in search results was coming up empty for RDA records because they
+ use 264 for publication info instead of 260.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+2 0 Open-ILS/src/templates/opac/parts/misc_util.tt2
+
+commit 6379cb99ba343d8d785b5aa0bdb56e8a0ed35a4a
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Thu Oct 24 08:40:05 2013 -0400
+
+ Docs 2.5: Fix floating groups heading level (2nd try)
+
+ The first attempt successfully pushed the Floating Groups chapter to
+ its proper place in the table of contents, but it also mistakenly pushed
+ many following chapters down one heading level. This commit follows the
+ approach already common in the root.txt file, and also undoes the
+ previous approach of shifting the heading level within the chapter file
+ itself. I suspect the previous approach only failed because it lacked a
+ blank line before the final 'leveloffset' command, but this new
+ approach is better because it is already in common use.
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+0 2 docs/admin/floating_groups.txt
+6 0 docs/root.txt
+
+commit 1dead5d9078037d85a3ca19bc12f1a1c3ab7c77f
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Thu Oct 17 12:07:03 2013 -0400
+
+ Serials Docs: Update for new features in 2.5
+
+ This commit adds a "Notes" section to the chapter on Receiving, including
+ a subsection on using the new "alerts" feature in the receiving interface.
+ It also adds a new screenshot for the "Notes" section and updates two
+ screenshots that have changed in 2.5. Finally, this commit updates the
+ Serials Copy Template doc to reflect the new 2.5 Floating Groups feature.
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+- - docs/media/scv-notes.png
+- - docs/media/scv-rec.png
+- - docs/media/scv-status.png
+1 1 docs/serials/B-copy_template.txt
+17 0 docs/serials/F-Receiving.txt
+ create mode 100644 docs/media/scv-notes.png
+
+commit ca588febb141dc49d082c1a657694fc3915aa7b4
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Wed Oct 16 16:13:50 2013 -0400
+
+ Serials Docs: Improve format, fix typos, and update
+
+ This commit makes several minor changes to the Serials doc files, mostly
+ changes in formatting or corrections of bugs/typos. This list covers
+ most of the changes:
+
+ - Add row on 'receiving' to Serials interfaces comparison table
+ - Improve formatting of actionable items (using bold and arrows),
+ e.g. Click on *First Menu* -> *Next Menu* -> *Last Menu*
+ - Standardize formatting of form field names (using italics)
+ - Improve unclear wording
+ - Correct an outdated description of copy template 'status' field
+ (changed before 2.3)
+ - Change heading level for a subsection
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+2 1 docs/serials/A-intro.txt
+23 25 docs/serials/B-copy_template.txt
+39 39 docs/serials/C-subscription-SCV.txt
+3 3 docs/serials/D-subscription-ASCV.txt
+2 2 docs/serials/E-edit_subscriptions.txt
+23 23 docs/serials/F-Receiving.txt
+3 3 docs/serials/H-holdings_statements.txt
+
+commit d1de196ad128c4d795e8009221518f146feedac3
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Wed Oct 23 09:54:00 2013 -0400
+
+ Docs 2.5: Fix floating groups heading level
+
+ The new Floating Groups docs are acting like a Docs Section rather than
+ a Docs Chapter. This commit should bump all the headings down one level
+ so they will take their appropriate place in the TOC.
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+2 0 docs/admin/floating_groups.txt
+
+commit b4e7ab2220a5467a2fdecf2cae2403a9c252564a
+Author: Ben Ostrowsky <sylvar at gmail.com>
+Date: Tue Oct 15 16:52:27 2013 -0400
+
+ LP#1240207: Spellchecked the docs
+
+ Signed-off-by: Ben Ostrowsky <sylvar at gmail.com>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+1 1 docs/QueryParser_Changes.txt
+7 7 docs/RELEASE_NOTES_2_2.txt
+1 1 docs/RELEASE_NOTES_2_2_1.txt
+4 4 docs/RELEASE_NOTES_2_3.txt
+2 2 docs/RELEASE_NOTES_2_4.txt
+1 1 docs/RELEASE_NOTES_NEXT/Acquisitions/app_acq_copy_overlay.txt
+1 1 docs/RELEASE_NOTES_NEXT/Administration/default-filter-config-screens.txt
+2 2 docs/RELEASE_NOTES_NEXT/Administration/inter-auth-linking-script.txt
+1 1 docs/RELEASE_NOTES_NEXT/Circulation/disallow-pickup.txt
+1 1 docs/RELEASE_NOTES_NEXT/Circulation/floating_groups.txt
+1 1 docs/RELEASE_NOTES_NEXT/Circulation/style-longoverdue-lost.txt
+2 2 docs/RELEASE_NOTES_NEXT/OPAC/BibAuthBrowse.txt
+1 1 docs/RELEASE_NOTES_NEXT/OPAC/added_content_by_record_id.txt
+1 1 docs/RELEASE_NOTES_NEXT/README
+1 1 docs/RELEASE_NOTES_NEXT/SIP/sip-hold-cancel.txt
+1 1 docs/RELEASE_NOTES_NEXT/SIP/sip-renewal-all.txt
+2 2 docs/RELEASE_NOTES_NEXT/Serials/serial-routing-slip-addresses.txt
+2 3 docs/RELEASE_NOTES_NEXT/pv_supa_goodstuff.txt
+4 4 docs/TechRef/AutoSuggest/README
+1 1 docs/TechRef/Circ/custom-best-hold-selection.txt
+2 2 docs/TechRef/Flattener/design.txt
+1 1 docs/TechRef/JSONGrammar.xml
+1 1 docs/TechRef/JSONTutorial.xml
+9 9 docs/TechRef/Telephony/telephony-setup-guide.txt
+2 2 docs/TechRef/notify_csv.txt
+1 1 docs/acquisitions/introduction.txt
+4 4 docs/acquisitions/invoices.txt
+1 1 docs/acquisitions/selection_lists_po.txt
+3 3 docs/acquisitions/vandelay_acquisitions_integration.txt
+2 2 docs/admin/Org_Unit_Proximity_Adjustments.txt
+1 1 docs/admin/SMS_messaging.txt
+5 5 docs/admin/acquisitions_admin.txt
+2 2 docs/admin/authorities.txt
+1 1 docs/admin/booking-admin.txt
+1 1 docs/admin/circulation_limit_groups.txt
+1 1 docs/admin/lsa-statcat.txt
+1 1 docs/admin/restrict_Z39.50_sources_by_perm_group.txt
+2 2 docs/admin/staff_client-login.txt
+1 1 docs/admin/template_toolkit.txt
+1 1 docs/admin/user_activity_type.txt
+7 7 docs/admin/workstation_admin.txt
+1 1 docs/admin_initial_setup/describing_your_people.txt
+6 6 docs/admin_initial_setup/designing_your_catalog.txt
+2 2 docs/admin_initial_setup/migrating_patron_data.txt
+1 1 docs/admin_initial_setup/ordering_materials.txt
+1 1 docs/cataloging/batch_importing_MARC.txt
+1 1 docs/cataloging/conjoined_items.txt
+1 2 docs/cataloging/monograph_parts.txt
+1 1 docs/circulation/offline_mode.txt
+3 3 docs/development/intro_opensrf.txt
+1 1 docs/installation/server_installation.txt
+1 1 docs/installation/staff_client_installation.txt
+1 1 docs/installation/system_requirements.txt
+1 1 docs/opac/advanced_features.txt
+1 1 docs/opac/kids_opac.txt
+1 1 docs/opac/my_lists.txt
+2 2 docs/serials/C-subscription-SCV.txt
+2 2 docs/serials/D-subscription-ASCV.txt
+1 1 docs/serials/E-edit_subscriptions.txt
+1 1 docs/serials/Group_Serials_Issues_in_the_OPAC_2.2.txt
+1 1 docs/serials/H-holdings_statements.txt
+
+commit fc01be26dcd91714217a9f5090f07a5966b757b6
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Oct 21 11:12:06 2013 -0400
+
+ Fix "elfield" typo noted by Ben Ostrowsky
+
+ Per sylvar in IRC and in
+ https://bugs.launchpad.net/evergreen/+bug/1240636, "elfield" should be
+ "selfield" (even though the code in question is currently inside an "#if
+ 0" block and will never execute).
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+1 1 Open-ILS/src/c-apps/oils_sql.c
+
+commit 3dd5ec033b5edaf948dfc5d1c0698efbff833018
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Wed Oct 16 13:52:43 2013 -0400
+
+ Fixing little problems in Serials docs
+
+ A few title capitalization fixes. Also fix an AsciiDoc title underlining
+ bug (since the underline must be the same length as the title).
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+2 2 docs/serials/C-subscription-SCV.txt
+1 1 docs/serials/E-edit_subscriptions.txt
+
+commit 7e785f3acb9cfb945f7a2cc86f1f7f1ee45ffb93
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Wed Oct 16 17:04:11 2013 -0400
+
+ Release notes cleanup
+
+ General release notes clean-up including the following:
+
+ * Fixing typos and grammatical errors. Thank you to paxed and remingtron
+ for alerting me to some typos.
+ * Fixing up the section headers so that they don't go beyond 5 levels
+ deep. In some cases, this invovled reorganizing content. I didn't trim
+ content as suggested by dbwells, but there may be room for some more
+ trimming.
+ * Renaming some things to reflect the name that is used in the staff
+ client to make the release notes more accessible to the average user.
+ * Reorganizing some content in a logical order.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+165 245 docs/RELEASE_NOTES_2_5.txt
+
+commit 8866470bf0c79e39324917f89523fefb2cf9a4fa
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Tue Oct 15 17:27:57 2013 -0400
+
+ Initial compilation of release notes for 2.5
+
+ This is a first real attempt at compiled release notes for 2.5.
+
+ A few things to note:
+ 1) While content was moved around a little (New Features vs Upgrade
+ Notes), nothing was outright removed.
+ 2) Some of the sections are indented using ':leveloffset:'. As a
+ result, some section headers end up being more than 5 levels deep, and
+ therefore do not display when generating (for example) HTML. I think
+ (in most cases) we want to trim these parts out of this 'release notes'
+ file and put the offending sections in the actual documentation for
+ the feature, so I am leaving it as-is for now.
+
+ To easily see these too-deep sections, you can run:
+
+ asciidoc -a toc -a numbered RELEASE_NOTES_2_5.txt
+
+ and look at the warnings.
+
+ I have also not yet cleared out the RELEASE_NOTES_NEXT folder, as I
+ want to ask some of the docs folks first before I do so.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1224 0 docs/RELEASE_NOTES_2_5.txt
+ create mode 100644 docs/RELEASE_NOTES_2_5.txt
+
+commit aff73bfba1fbc30a046ad5b7df65ed862bc84767
+Author: Galen Charlton <gmc at esilibrary.com>
+Date: Mon Oct 14 09:21:58 2013 -0700
+
+ LP#1086458: remove unecessary anonymous hashes when calling xulG.set_tab()
+
+ This follows up on observations made by Steven Chan that
+ suggests that even the act of creating an anonymous hash and
+ passing it to a global function can cause (I assume) JavaScript
+ execution contexts to be leaked.
+
+ Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/xul/staff_client/chrome/content/main/menu.js
+
+commit d22371c49a1bd6833aaf45571f1d88cb6514bd8d
+Author: Galen Charlton <gmc at esilibrary.com>
+Date: Mon Oct 14 08:47:49 2013 -0700
+
+ LP#1086458: invoke new 'refresh_checkout' event
+
+ This implements using the new custom event rather than
+ xulG.set_tab() to refresh a refresh of the checkout tab. It
+ also removes use of a callback function to request the tab
+ refresh in favor of a simple setTimeout().
+
+ Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+15 26 Open-ILS/xul/staff_client/server/circ/checkout.js
+
+commit de7d768c8c2bbaada238c5570dd3cd7a5eb7ebbc
+Author: Galen Charlton <gmc at esilibrary.com>
+Date: Thu Sep 26 13:05:26 2013 -0700
+
+ LP#1086458: define custom event for refreshing the checkout page
+
+ Using a custom event handled by a chrome event handler rather
+ than calling xulG.set_tab() directly avoids any possibility of
+ leaking objects and executation contexts from the code that's
+ requesting refresh of the checkout page.
+
+ Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+14 0 Open-ILS/xul/staff_client/chrome/content/main/menu.js
+
+commit 09f8847f4dac346c76df9adb617eab2dade65f3d
+Author: Galen Charlton <gmc at esilibrary.com>
+Date: Mon Oct 14 08:23:23 2013 -0700
+
+ LP#1086458: convert last-print information hash to JSON string before caching
+
+ By serializing the printing message and context information to a
+ JSON string before caching it, we avoid inadvertantly dragging in
+ things like Javascript execution contexts and possibly references
+ to objects created by the checkout interface. This was contributing
+ to the staff client memory leaks observed during receipt printing.
+
+ Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 4 Open-ILS/xul/staff_client/chrome/content/util/print.js
+
+commit 55e1bf14026636ab4f4c96e18b494eac0a3e12c9
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Oct 14 16:07:17 2013 -0400
+
+ Fix typo in acq code to allow quick PO creation
+
+ When using 'Actions for this Record'->'View/Place Orders', the
+ 'Create Purchase Order' button dies due to an undefined variable,
+ 'filter'.
+
+ Looking at the commit which caused the problem, it seems like this
+ variable should have been 'state'. Simple testing bears this out.
+
+ Original change was part of:
+ LP1193095 lineitem batch actions sanity filters
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+1 1 Open-ILS/web/js/ui/default/acq/common/li_table.js
+
+commit 3a01d737895a1eee4088f2254d0d71e66c758e72
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Tue Oct 15 09:33:46 2013 -0400
+
+ Serial alert notes missing commit
+
+ These changes were somehow lost during the hacking on this feature
+ at the Hack-a-Way. The translation string is nice, but the changes
+ to notes.xul are necessary for being able to create notes.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+1 0 Open-ILS/xul/staff_client/server/locale/en-US/serial.properties
+1 1 Open-ILS/xul/staff_client/server/serial/manage_items.js
+4 1 Open-ILS/xul/staff_client/server/serial/notes.xul
+
+commit ed34006457b33125462332a37df73eced5a0f5de
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Oct 14 23:09:54 2013 -0400
+
+ Fix TPAC account preferences
+
+ Clean up a few problems in the TPAC "My Account" preferences area:
+
+ 1. Add a missing </form> closing element, which was preventing any
+ submitted changes from actually being posted to the correct URL
+ (thus preventing most account preference changes such as
+ notifications).
+ 2. Remove trailing semicolon from several generated <option> elements
+ for cleaner HTML.
+ 3. Make the aria-label for the element translatable.
+
+ As we're touching a majority of the lines in the section and the lines
+ do not follow normal whitespace standards (mixed tabs, inconsistent
+ indentation, etc), clean up the whitespace.
+
+ Also turn one HTML comment into a Template::Toolkit comment.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+15 13 Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
+
+commit 2130d757192426904688a302ed9e3671bb675daf
+Author: Chris Sharp <csharp at georgialibraries.org>
+Date: Tue Oct 15 09:01:57 2013 -0400
+
+ Fixing typo in the crontab.example file
+
+ I'm assuming here that the intention was to set the purge_pending_users.srfsh
+ job to run at 2:30 a.m., but it was set to run at 30:02 - obviously an invalid
+ time.
+
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+1 1 Open-ILS/examples/crontab.example
+
+commit ffda0fb55a409ed7dd5e146adce26ee45a3b5dbf
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Oct 14 19:28:11 2013 -0400
+
+ Translation updates - newpot
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+258 248 build/i18n/po/db.seed/db.seed.pot
+31 18 build/i18n/po/tpac/tpac.pot
+
+commit 4bd95ecdd95a522a099ea219eda0389674a508e7
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Oct 14 19:19:31 2013 -0400
+
+ Translation updates - po files
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+16 14 build/i18n/po/cat.properties/cs-CZ.po
+15 13 build/i18n/po/cat.properties/de-DE.po
+15 13 build/i18n/po/cat.properties/en-CA.po
+15 13 build/i18n/po/cat.properties/en-GB.po
+26 19 build/i18n/po/cat.properties/es-ES.po
+15 13 build/i18n/po/cat.properties/fr-CA.po
+15 13 build/i18n/po/cat.properties/hy-AM.po
+15 13 build/i18n/po/cat.properties/oc-FR.po
+15 13 build/i18n/po/cat.properties/pt-BR.po
+15 13 build/i18n/po/cat.properties/ru-RU.po
+7 13 build/i18n/po/cat.properties/tr-TR.po
+27 6 build/i18n/po/circ.properties/cs-CZ.po
+22 4 build/i18n/po/circ.properties/de-DE.po
+27 6 build/i18n/po/circ.properties/en-CA.po
+27 6 build/i18n/po/circ.properties/en-GB.po
+26 5 build/i18n/po/circ.properties/es-ES.po
+26 5 build/i18n/po/circ.properties/fr-CA.po
+27 6 build/i18n/po/circ.properties/hy-AM.po
+22 4 build/i18n/po/circ.properties/oc-FR.po
+27 6 build/i18n/po/circ.properties/pt-BR.po
+26 5 build/i18n/po/circ.properties/ru-RU.po
+22 4 build/i18n/po/circ.properties/tr-TR.po
+12 4 build/i18n/po/common.properties/cs-CZ.po
+11 3 build/i18n/po/common.properties/de-DE.po
+11 3 build/i18n/po/common.properties/en-CA.po
+11 3 build/i18n/po/common.properties/en-GB.po
+11 3 build/i18n/po/common.properties/es-ES.po
+11 3 build/i18n/po/common.properties/fr-CA.po
+11 3 build/i18n/po/common.properties/hy-AM.po
+11 3 build/i18n/po/common.properties/oc-FR.po
+11 3 build/i18n/po/common.properties/pt-BR.po
+11 3 build/i18n/po/common.properties/ru-RU.po
+9039 3079 build/i18n/po/db.seed/cs-CZ.po
+8448 2324 build/i18n/po/db.seed/de-DE.po
+8745 2722 build/i18n/po/db.seed/en-CA.po
+8753 2795 build/i18n/po/db.seed/en-GB.po
+8429 2407 build/i18n/po/db.seed/es-ES.po
+9760 3802 build/i18n/po/db.seed/fr-CA.po
+9801 3843 build/i18n/po/db.seed/hy-AM.po
+8460 2331 build/i18n/po/db.seed/oc-FR.po
+9309 3270 build/i18n/po/db.seed/pt-BR.po
+9161 3125 build/i18n/po/db.seed/ru-RU.po
+7953 1827 build/i18n/po/db.seed/tr-TR.po
+2673 2474 build/i18n/po/fm_IDL.dtd/cs-CZ.po
+2637 2444 build/i18n/po/fm_IDL.dtd/de-DE.po
+2670 2468 build/i18n/po/fm_IDL.dtd/en-CA.po
+2669 2467 build/i18n/po/fm_IDL.dtd/en-GB.po
+2640 2447 build/i18n/po/fm_IDL.dtd/es-ES.po
+2639 2446 build/i18n/po/fm_IDL.dtd/fr-CA.po
+2670 2468 build/i18n/po/fm_IDL.dtd/hy-AM.po
+2636 2443 build/i18n/po/fm_IDL.dtd/oc-FR.po
+2655 2462 build/i18n/po/fm_IDL.dtd/pt-BR.po
+2655 2462 build/i18n/po/fm_IDL.dtd/ru-RU.po
+2634 2441 build/i18n/po/fm_IDL.dtd/tr-TR.po
+270 257 build/i18n/po/ils_events.xml/cs-CZ.po
+267 254 build/i18n/po/ils_events.xml/de-DE.po
+269 256 build/i18n/po/ils_events.xml/en-CA.po
+269 256 build/i18n/po/ils_events.xml/en-GB.po
+267 254 build/i18n/po/ils_events.xml/es-ES.po
+270 257 build/i18n/po/ils_events.xml/fr-CA.po
+269 256 build/i18n/po/ils_events.xml/hy-AM.po
+269 256 build/i18n/po/ils_events.xml/pt-BR.po
+269 256 build/i18n/po/ils_events.xml/ru-RU.po
+827 16 build/i18n/po/lang.dtd/ar-AR.po
+892 30 build/i18n/po/lang.dtd/cs-CZ.po
+853 21 build/i18n/po/lang.dtd/de-DE.po
+883 30 build/i18n/po/lang.dtd/en-CA.po
+882 29 build/i18n/po/lang.dtd/en-GB.po
+845 19 build/i18n/po/lang.dtd/es-ES.po
+871 27 build/i18n/po/lang.dtd/fr-CA.po
+883 30 build/i18n/po/lang.dtd/hy-AM.po
+835 18 build/i18n/po/lang.dtd/oc-FR.po
+877 27 build/i18n/po/lang.dtd/pt-BR.po
+877 27 build/i18n/po/lang.dtd/ru-RU.po
+843 20 build/i18n/po/lang.dtd/tr-TR.po
+8 4 build/i18n/po/offline.properties/cs-CZ.po
+7 3 build/i18n/po/offline.properties/de-DE.po
+7 3 build/i18n/po/offline.properties/en-CA.po
+7 3 build/i18n/po/offline.properties/en-GB.po
+7 3 build/i18n/po/offline.properties/es-ES.po
+7 3 build/i18n/po/offline.properties/fr-CA.po
+7 3 build/i18n/po/offline.properties/hy-AM.po
+7 3 build/i18n/po/offline.properties/oc-FR.po
+7 3 build/i18n/po/offline.properties/pt-BR.po
+7 3 build/i18n/po/offline.properties/ru-RU.po
+7 3 build/i18n/po/offline.properties/tr-TR.po
+41 18 build/i18n/po/patron.properties/cs-CZ.po
+38 14 build/i18n/po/patron.properties/de-DE.po
+39 15 build/i18n/po/patron.properties/en-CA.po
+39 15 build/i18n/po/patron.properties/en-GB.po
+22 10 build/i18n/po/patron.properties/es-ES.po
+38 14 build/i18n/po/patron.properties/fr-CA.po
+39 15 build/i18n/po/patron.properties/hy-AM.po
+18 9 build/i18n/po/patron.properties/oc-FR.po
+38 14 build/i18n/po/patron.properties/pt-BR.po
+38 14 build/i18n/po/patron.properties/ru-RU.po
+23 11 build/i18n/po/patron.properties/tr-TR.po
+30 23 build/i18n/po/register.js/cs-CZ.po
+29 22 build/i18n/po/register.js/de-DE.po
+29 22 build/i18n/po/register.js/en-CA.po
+29 22 build/i18n/po/register.js/en-GB.po
+29 22 build/i18n/po/register.js/es-ES.po
+29 22 build/i18n/po/register.js/fr-CA.po
+29 22 build/i18n/po/register.js/hy-AM.po
+29 22 build/i18n/po/register.js/oc-FR.po
+30 23 build/i18n/po/register.js/pt-BR.po
+29 22 build/i18n/po/register.js/ru-RU.po
+23 20 build/i18n/po/register.js/tr-TR.po
+62 30 build/i18n/po/selfcheck.js/cs-CZ.po
+41 25 build/i18n/po/selfcheck.js/de-DE.po
+60 29 build/i18n/po/selfcheck.js/en-CA.po
+60 29 build/i18n/po/selfcheck.js/en-GB.po
+48 26 build/i18n/po/selfcheck.js/es-ES.po
+60 29 build/i18n/po/selfcheck.js/fr-CA.po
+60 29 build/i18n/po/selfcheck.js/hy-AM.po
+44 25 build/i18n/po/selfcheck.js/oc-FR.po
+60 29 build/i18n/po/selfcheck.js/pt-BR.po
+40 24 build/i18n/po/selfcheck.js/ru-RU.po
+21 13 build/i18n/po/serial.properties/cs-CZ.po
+11 3 build/i18n/po/serial.properties/de-DE.po
+11 3 build/i18n/po/serial.properties/en-CA.po
+11 3 build/i18n/po/serial.properties/en-GB.po
+11 3 build/i18n/po/serial.properties/es-ES.po
+11 3 build/i18n/po/serial.properties/fr-CA.po
+11 3 build/i18n/po/serial.properties/hy-AM.po
+11 3 build/i18n/po/serial.properties/oc-FR.po
+11 3 build/i18n/po/serial.properties/pt-BR.po
+11 3 build/i18n/po/serial.properties/tr-TR.po
+
+commit c4a5e58cff8c6223bd717a5b78cffae9c75885b2
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Oct 1 20:24:25 2013 +0300
+
+ Finnish translation update.
+ Add the Finnish translation files for FlattenerGrid and PCrudFilterPane.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+3 3 build/i18n/po/AutoFieldWidget.js/fi-FI.po
+29 0 build/i18n/po/FlattenerGrid.js/fi-FI.po
+118 0 build/i18n/po/PCrudFilterPane.js/fi-FI.po
+4 3 build/i18n/po/Searcher.js/fi-FI.po
+4 3 build/i18n/po/TranslatorPopup.js/fi-FI.po
+3 3 build/i18n/po/User.js/fi-FI.po
+3 3 build/i18n/po/XULTermLoader.js/fi-FI.po
+66 41 build/i18n/po/acq.js/fi-FI.po
+6 4 build/i18n/po/admin.properties/fi-FI.po
+6 4 build/i18n/po/auth.properties/fi-FI.po
+3 3 build/i18n/po/authority.js/fi-FI.po
+6 5 build/i18n/po/capture.js/fi-FI.po
+116 41 build/i18n/po/cat.properties/fi-FI.po
+48 32 build/i18n/po/circ.properties/fi-FI.po
+36 11 build/i18n/po/common.properties/fi-FI.po
+6 4 build/i18n/po/conify.dtd/fi-FI.po
+4 3 build/i18n/po/conify.js/fi-FI.po
+11122 3334 build/i18n/po/db.seed/fi-FI.po
+2728 2526 build/i18n/po/fm_IDL.dtd/fi-FI.po
+287 273 build/i18n/po/ils_events.xml/fi-FI.po
+2223 1300 build/i18n/po/lang.dtd/fi-FI.po
+28 27 build/i18n/po/offline.properties/fi-FI.po
+17 21 build/i18n/po/opac.dtd/fi-FI.po
+6 5 build/i18n/po/opac.js/fi-FI.po
+88 67 build/i18n/po/patron.properties/fi-FI.po
+4 3 build/i18n/po/pickup_and_return.js/fi-FI.po
+4 3 build/i18n/po/pull_list.js/fi-FI.po
+28 22 build/i18n/po/register.js/fi-FI.po
+9 7 build/i18n/po/reports.dtd/fi-FI.po
+5 5 build/i18n/po/reports.js/fi-FI.po
+7 9 build/i18n/po/reservation.js/fi-FI.po
+48 33 build/i18n/po/selfcheck.js/fi-FI.po
+29 21 build/i18n/po/serial.properties/fi-FI.po
+4648 827 build/i18n/po/tpac/fi-FI.po
+90 90 build/i18n/po/vandelay.dtd/fi-FI.po
+ create mode 100644 build/i18n/po/FlattenerGrid.js/fi-FI.po
+ create mode 100644 build/i18n/po/PCrudFilterPane.js/fi-FI.po
+
+commit 6c7591ab82d78135d968a82dbd14a4805763a857
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Oct 14 15:24:39 2013 -0400
+
+ Fix integrated subscription editor record field
+
+ When trying to edit a subscription using the new 'integrated' editor,
+ it foolishly tries to populate an unfiltered bre dropdown selector.
+ This works OK in test environments, but (as expected) fails miserably
+ with production-size data sets.
+
+ The end result is that the dropdown either never populates, or takes
+ a really long time. If the user saves before the dropdown loads, the
+ associated record ID is lost, and the subscription is no longer
+ properly associated with the record.
+
+ To fix this, simply turn the dropdown into a disabled text input
+ instead, as the ability to edit this field would generally be more
+ harmful than it is necessary.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+2 0 Open-ILS/web/js/ui/default/serial/subscription.js
+
+commit d8278e3dfd7632f2a7b1165b9c6229297f7844de
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Oct 4 11:34:04 2013 -0400
+
+ TPAC: Remove needless divs from results header bar
+
+ In the current state of the TPAC, these "div"ider elements were
+ completely invisible, yet nobody seemed to miss them. It wasn't
+ altogether clear what the divisions meant anyway, so rather than fix
+ them, let's just trim them out for now.
+
+ Also, get rid of a useless clearing div while we are at it. I could
+ not detect a valuable display difference in current Chrome, Firefox,
+ or IE9.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 9 Open-ILS/src/templates/opac/css/style.css.tt2
+0 4 Open-ILS/src/templates/opac/results.tt2
+
+commit 00a58d70ab5f94813decf11d3443e46f27318227
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Oct 4 11:23:13 2013 -0400
+
+ TPAC: Redo some margins/padding for better collapse behavior
+
+ In the "results header", we have both buttons and form elements. In
+ order to have these elements collapse in an orderly fashion, they need
+ to be exactly the same size. To accomplish this, let's simplify and
+ redo a few of the element margins and padding.
+
+ At the very least, this will make the elements line up better
+ vertically when viewed at the normal screen width.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+18 9 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit e797f7b0e94ab62b9f0d0c45c208a8fb4394b32e
+Author: Ben Shum <bshum at biblio.org>
+Date: Wed Oct 9 14:54:28 2013 -0400
+
+ Use libnet-z3950-simpleserver-perl package
+
+ Instead of building from source, there is a package available now for
+ Debian Wheezy and Ubuntu Precise. Let's use that instead!
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+1 1 Open-ILS/src/extras/install/Makefile.debian-wheezy
+1 1 Open-ILS/src/extras/install/Makefile.ubuntu-precise
+
+commit cd36c2e08f5374c5afe4561be3a43cfe6e3ff2c0
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Sep 4 14:55:57 2013 -0400
+
+ Vandelay copy overlay call number merge
+
+ When overlaying a copy, if the copy brings with it a new call number
+ which collides with an existing call number AND said copy is the only
+ copy linked to its (old) call number, merge the copy's (old) call
+ number into the (new) existing call number, i.e. the one we collided
+ with.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+47 8 Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm
+
+commit cb27b41c27856814045c3d25d65b2e49091cfd26
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Sep 18 15:38:08 2013 -0400
+
+ ACQ general search sort funds; display year
+
+ * Display fiscal year next to fund code in the search fund selector.
+ * Sort by newest fiscal year first, followed by code
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+6 1 Open-ILS/web/js/ui/default/acq/search/unified.js
+
+commit 1ef503bc1a34e60bbe98663292c36b9348aee15e
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Oct 10 17:15:12 2013 -0400
+
+ Stamping 0844: better MODS for browse, etc.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+3623 0 Open-ILS/src/sql/Pg/upgrade/0844.data.better_mods_for_browse_etc.sql
+0 3623 Open-ILS/src/sql/Pg/upgrade/XXXX.data.better_mods_for_browse_etc.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0844.data.better_mods_for_browse_etc.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.better_mods_for_browse_etc.sql
+
+commit 6c700725cc695e682de8443b7560330d254b7b58
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Oct 9 13:53:35 2013 -0400
+
+ Add new functions and optional reingest to upgrade
+
+ Add improved functions and optional browse only reingest to the
+ upgrade script.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+290 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.better_mods_for_browse_etc.sql
+
+commit 844facb811f1f14c2cb4c91970fdbaaff00628a0
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Oct 9 13:46:55 2013 -0400
+
+ Don't index browse extracts as search terms unless needed
+
+ In previous releases, we didn't have any major config.metabib_field
+ rows which had 'browse_field = true' but 'search_field = false'. Now
+ that we have one (for title browse), make sure we honor the
+ 'search_field = false' by not creating rows in the
+ metabib.xxxxxx_field_entry tables.
+
+ This gets us back to where we started as far as what gets into the
+ search index tables, but we should consider going a step further and
+ *not* adding the glommed row to the search tables if we are already
+ adding separate rows for search+browse.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+10 4 Open-ILS/src/sql/Pg/030.schema.metabib.sql
+
+commit 6211cbf6c8b2d17bb5320163dceb9ef7f22e3717
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Oct 7 17:55:58 2013 -0400
+
+ Upgrade script for better MODS browse and Name Subject facets
+
+ This upgrade covers the three previous commits:
+
+ * Add new MODS <titleBrowse> to the default config
+ * Tweak MODS32 stylesheet for titles
+ * Fix LP1118245: Name Subject facet ordering change
+
+ Since these all deal with the in-db MODS xsl, it made sense to lump
+ the upgrades together.
+
+ NOTE: We are purposely ignoring similar changes to MODS33, pending
+ a discussion of how best to handle EG specific MODS changes overall.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+3333 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.better_mods_for_browse_etc.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.better_mods_for_browse_etc.sql
+
+commit 02368ab9bdc2db5b94a6ccad1dd2153b26cf34f6
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Oct 7 17:47:25 2013 -0400
+
+ Add new MODS <titleBrowse> to the default config
+
+ Now that we have a field which will both display and sort how we
+ want it, use it.
+
+ Also, remove the browse info from the 'Title Proper' row (id = 6).
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+4 2 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit d1f553f184426655470142447d2cf48812565e1e
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Oct 7 17:22:42 2013 -0400
+
+ Tweak MODS32 stylesheet for titles
+
+ <titleNonfiling> was added to help certain search cases, but trailing
+ punctuation makes it unsuitable for display. <titleInfo>, on the other
+ hand, chops all trailing punctuation out, which helps the trailing case
+ but actually makes display of subtitle information worse. Let's split
+ the difference and simplify at the same time by building the whole
+ title, then trimming extra punctuation.
+
+ While the above was done to help in browse display, it turns out that
+ <titleNonfiling> is not able to generate correct browse data. We want
+ the display as corrected above, but we also need to preserve the
+ <nonSort> tag for proper browse sorting.
+
+ Rather than complicate the metabib logic, we'll add another special-
+ purpose field to the MODS called <titleBrowse>. This field is a hybrid
+ of <titleInfo> and <titleNonfiling>, which will give us a preformatted
+ string (for preserving needed punctuation) but also keep the <nonSort>
+ stuff in a separate field (for sorting).
+
+ NOTE: We are purposely ignoring similar changes to MODS33, pending
+ a discussion of how best to handle EG specific MODS changes overall.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+34 27 Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql
+34 27 Open-ILS/xsl/MARC21slim2MODS32.xsl
+
+commit 114d433a5cfdb72596cc749f73167363778721d5
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Mon Jun 24 19:59:58 2013 +0300
+
+ Fix LP1118245: Name Subject facet ordering change
+
+ Where Name Subject facet shows subfields in order "cad" and Personal
+ Author shows subfields in order "acd". This change makes the Name
+ Subject show the subfields in the same order as in record view and the
+ Personal Author facet.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+
+ NOTE: We are purposely ignoring similar changes to MODS33, pending
+ a discussion of how best to handle EG specific MODS changes overall.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+1 1 Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql
+1 1 Open-ILS/xsl/MARC21slim2MODS32.xsl
+
+commit d4b34797cc94fbe2acf54ccaea4ed481ee861f13
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Oct 10 15:54:40 2013 -0400
+
+ Adding 0842, 0843 to help with 0841 deficiencies
+
+ A clean backport of 0841 was not possible due to partial schema
+ differences in the upgrade. While we may have planned ahead better,
+ add 0842 just for 2_3 upgraders which ends up being a no-op for
+ 2_4, and adds ON UPDATE CASCADE for 2_5.
+
+ Also, for similar but additional reasons, add 0843, which serves two
+ purposes:
+ 1) add ON UPDATE CASCADE to the rest for those upgrading 2_5/master
+ 2) alter config.z3950_index_field_map for those upgrading from 2_4
+ and previous (other lines are no-ops in this case)
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+4 4 Open-ILS/src/sql/Pg/002.schema.config.sql
+1 1 Open-ILS/src/sql/Pg/030.schema.metabib.sql
+11 0 Open-ILS/src/sql/Pg/upgrade/0842.schema.redo_config_metabib_field_sequence_2_3_to_2_4.sql
+18 0 Open-ILS/src/sql/Pg/upgrade/0843.schema.redo_config_metabib_field_sequence_2_5.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0842.schema.redo_config_metabib_field_sequence_2_3_to_2_4.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0843.schema.redo_config_metabib_field_sequence_2_5.sql
+
+commit 6530fb4806670765a61dbbdf1d0b5f9040c264c5
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Aug 22 12:48:53 2013 -0400
+
+ Add a TestUtils library for live tests
+
+ Package commonly used live test calls in a new Perl module to they can
+ be shared by different test scripts.
+
+ Based it off of Cronscript. Added a cache method to Cronscript for getting at
+ memcached. TestUtils currently has methods for checkin, checkout, and
+ workstation registration.
+
+ Ported existing live tests to use TestUtils.
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+8 0 Open-ILS/src/perlmods/lib/OpenILS/Utils/Cronscript.pm.in
+36 0 Open-ILS/src/perlmods/lib/OpenILS/Utils/TestUtils.pm
+3 12 Open-ILS/src/perlmods/live_t/00-simple.t
+13 132 Open-ILS/src/perlmods/live_t/01-auth.t
+23 159 Open-ILS/src/perlmods/live_t/02-simple_circ.t
+31 162 Open-ILS/src/perlmods/live_t/03-overdue_circ.t
+34 165 Open-ILS/src/perlmods/live_t/04-overdue_with_closed_dates.t
+24 141 Open-ILS/src/perlmods/live_t/05-pay_bills.t
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/Utils/TestUtils.pm
+
+commit 5c883f0dc891cb5c377e2105cca4923081bda1a1
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Fri Aug 2 15:25:58 2013 -0400
+
+ test bill payment
+
+ ./05-pay_bills.t ..................
+ 1..10
+ # Test bill payment against the admin user.
+ ok 1 - open-ils.storage.direct.actor.user.retrieve returned aou object
+ ok 2 - User with id = 1 is admin user
+ # authtime is 7200, authtoken is b039320a72bbd06c30f0918d1aeeb07a
+ ok 3 - Have an authtoken
+ ok 4 - Registered a new workstation
+ # authtime is 7200, authtoken is b039320a72bbd06c30f0918d1aeeb07a
+ ok 5 - Have an authtoken associated with the workstation
+ ok 6 - Two billable xacts for admin user from previous tests
+ ok 7 - Both transactions combined have a balance owed of 1.25
+ ok 8 - Payment attempt returned HASH
+ ok 9 - Payment response included two payment ids
+ ok 10 - Zero billable xacts for admin user after payment
+ ok
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+256 0 Open-ILS/src/perlmods/live_t/05-pay_bills.t
+ create mode 100644 Open-ILS/src/perlmods/live_t/05-pay_bills.t
+
+commit 310a0d54be9bf141141d0a8647f0af9c8f3120ca
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Wed Jul 17 17:55:07 2013 -0400
+
+ tests against stock test data and live Evergreen
+
+ I'm running these on a machine where Evergreen has been installed with the stock
+ test data. Repeat invocations of the tests will cause test failures, as they
+ don't completely cleanup after themselves (the goal long-term is to rely on
+ complete database wipes between invocations).
+
+ Manual cleanup right now could include doing the following in psql:
+ DELETE FROM actor.workstation WHERE name ~ '.t$';
+
+ and paying the bills on the admin user (otherwise, once a Max Fines penalty is
+ generated, checkout tests will fail).
+
+ opensrf at dev141:~/git/Evergreen/Open-ILS/src/perlmods (livetests)$ make livecheck 2> /dev/null
+ perl Build.PL --destdir || make -s build-perl-fail
+ Creating new 'MYMETA.yml' with configuration results
+ Creating new 'Build' script for 'OpenILS' version '2.4'
+ ./Build test --test_files live_t || make -s build-perl-fail
+ live_t/00-simple.t ..................... ok
+ live_t/01-auth.t ....................... ok
+ live_t/02-simple_circ.t ................ ok
+ live_t/03-overdue_circ.t ............... ok
+ live_t/04-overdue_with_closed_dates.t .. ok
+ All tests successful.
+ Files=5, Tests=62, 11 wallclock secs ( 0.25 usr 0.16 sys + 3.52 cusr 0.63 csys = 4.56 CPU)
+ Result: PASS
+
+ and
+
+ opensrf at dev141:~/git/Evergreen/Open-ILS/src/perlmods (livetests)$ prove -v live_t/
+ live_t/00-simple.t .....................
+ 1..2
+ # Simple tests against the open-ils.storage service and the stock test data.
+ ok 1 - open-ils.storage.direct.actor.user.retrieve returned aou object
+ ok 2 - User with id = 1 is admin user
+ ok
+ live_t/01-auth.t .......................
+ 1..4
+ # Simple tests against the open-ils.auth service, memcached, and the stock test data.
+ # authtime is 7200, authtoken is a3f2d06775fb670284450ad1f1d6ea00
+ ok 1 - Have an authtoken
+ ok 2 - Default authtime for staff login is 7200 seconds
+ ok 3 - Can retrieve authtoken from memcached
+ ok 4 - Authtoken is removed from memcached after logout
+ ok
+ live_t/02-simple_circ.t ................
+ 1..14
+ # Test circulation of item CONC70000345 against the admin user.
+ ok 1 - open-ils.storage.direct.actor.user.retrieve returned aou object
+ ok 2 - User with id = 1 is admin user
+ ok 3 - open-ils.storage.direct.asset.copy.retrieve returned acp object
+ ok 4 - Item with id = 310 has barcode CONC70000345
+ ok 5 - Item with id = 310 has status of Reshelving or Available
+ # authtime is 7200, authtoken is f7c9ae35165ec74ab5e8ce5b84673da8
+ ok 6 - Have an authtoken
+ ok 7 - Registered a new workstation
+ # authtime is 7200, authtoken is f7c9ae35165ec74ab5e8ce5b84673da8
+ ok 8 - Have an authtoken associated with the workstation
+ ok 9 - Checkout request returned a HASH
+ ok 10 - Checkout returned a SUCCESS event
+ ok 11 - Item with id = 310 has status of Checked Out after fresh Storage request
+ ok 12 - Checkin request returned a HASH
+ ok 13 - Checkin returned a SUCCESS event
+ ok 14 - Item with id = 310 has status of Reshelving or Available after fresh Storage request
+ ok
+ live_t/03-overdue_circ.t ...............
+ 1..20
+ # Test fine generation on checkin against the admin user.
+ ok 1 - open-ils.storage.direct.actor.user.retrieve returned aou object
+ ok 2 - User with id = 1 is admin user
+ ok 3 - open-ils.storage.direct.asset.copy.retrieve returned acp object
+ ok 4 - Item with id = 810 has barcode CONC71000345
+ ok 5 - Item with id = 810 has status of Reshelving or Available
+ # authtime is 7200, authtoken is 5ab4ae5b9a09c7fd04b4eb0dabf19da5
+ ok 6 - Have an authtoken
+ ok 7 - Registered a new workstation
+ # authtime is 7200, authtoken is 5ab4ae5b9a09c7fd04b4eb0dabf19da5
+ ok 8 - Have an authtoken associated with the workstation
+ ok 9 - Checkout request returned a HASH
+ ok 10 - Checkout returned a SUCCESS event
+ ok 11 - Checkout response object has payload object
+ ok 12 - Payload object has circ object
+ ok 13 - Circ objection has loan duration of "7 days"
+ ok 14 - Item with id = 810 has status of Checked Out after fresh Storage request
+ ok 15 - Zero bills associated with circulation
+ ok 16 - rewrote circ to have happened 20 days ago
+ ok 17 - Checkin request returned a HASH
+ ok 18 - Checkin returned a SUCCESS event
+ ok 19 - Item with id = 810 has status of Reshelving or Available after fresh Storage request
+ ok 20 - Thirteen bills associated with circulation
+ ok
+ live_t/04-overdue_with_closed_dates.t ..
+ 1..22
+ # Test fine generation with closed date on checkin against the admin user.
+ ok 1 - open-ils.storage.direct.actor.user.retrieve returned aou object
+ ok 2 - User with id = 1 is admin user
+ ok 3 - open-ils.storage.direct.asset.copy.retrieve returned acp object
+ ok 4 - Item with id = 1310 has barcode CONC72000345
+ ok 5 - Item with id = 1310 has status of Reshelving or Available
+ # authtime is 7200, authtoken is dd4b533f677dd5ec6d177312eca2e86b
+ ok 6 - Have an authtoken
+ ok 7 - Registered a new workstation
+ # authtime is 7200, authtoken is dd4b533f677dd5ec6d177312eca2e86b
+ ok 8 - Have an authtoken associated with the workstation
+ ok 9 - Created a closed date for 10 days ago
+ ok 10 - Checkout request returned a HASH
+ ok 11 - Checkout returned a SUCCESS event
+ ok 12 - Checkout response object has payload object
+ ok 13 - Payload object has circ object
+ ok 14 - Circ objection has loan duration of "7 days"
+ ok 15 - Item with id = 1310 has status of Checked Out after fresh Storage request
+ ok 16 - Zero bills associated with circulation
+ ok 17 - rewrote circ to have happened 20 days ago
+ ok 18 - Checkin request returned a HASH
+ ok 19 - Checkin returned a SUCCESS event
+ ok 20 - Item with id = 1310 has status of Reshelving or Available after fresh Storage request
+ ok 21 - Twelve bills associated with circulation (instead of 13, thanks to closed date)
+ ok 22 - Removed closed date
+ ok
+ All tests successful.
+ Files=5, Tests=62, 10 wallclock secs ( 0.06 usr 0.04 sys + 3.29 cusr 0.50 csys = 3.89 CPU)
+ Result: PASS
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+3 0 Open-ILS/src/perlmods/Makefile.am
+37 0 Open-ILS/src/perlmods/live_t/00-simple.t
+167 0 Open-ILS/src/perlmods/live_t/01-auth.t
+270 0 Open-ILS/src/perlmods/live_t/02-simple_circ.t
+347 0 Open-ILS/src/perlmods/live_t/03-overdue_circ.t
+390 0 Open-ILS/src/perlmods/live_t/04-overdue_with_closed_dates.t
+ create mode 100644 Open-ILS/src/perlmods/live_t/00-simple.t
+ create mode 100644 Open-ILS/src/perlmods/live_t/01-auth.t
+ create mode 100644 Open-ILS/src/perlmods/live_t/02-simple_circ.t
+ create mode 100644 Open-ILS/src/perlmods/live_t/03-overdue_circ.t
+ create mode 100644 Open-ILS/src/perlmods/live_t/04-overdue_with_closed_dates.t
+
+commit e917670aee2da991e4a304a6cb9fbf4414372d1b
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Oct 10 13:32:41 2013 -0400
+
+ Stamping 0841: make space in config.metabib_field sequence
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+56 0 Open-ILS/src/sql/Pg/upgrade/0841.schema.redo_config_metabib_field_sequence.sql
+0 56 Open-ILS/src/sql/Pg/upgrade/WWWW.schema.redo_config_metabib_field_sequence.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0841.schema.redo_config_metabib_field_sequence.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/WWWW.schema.redo_config_metabib_field_sequence.sql
+
+commit 04d34abdea1be88d54c2ba1cd42ea45d32e5afcf
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Oct 9 09:38:21 2013 -0400
+
+ Upgrade script for config.metabib_field sequence redo
+
+ [LFW: s/DROP FUNCTION/DROP FUNCTION IF EXISTS/]
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+56 0 Open-ILS/src/sql/Pg/upgrade/WWWW.schema.redo_config_metabib_field_sequence.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/WWWW.schema.redo_config_metabib_field_sequence.sql
+
+commit 6eaa123c11156ef6999cfb595e15368a63735dab
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Oct 9 09:29:01 2013 -0400
+
+ Make some FK constraints on config.metabib_field.id deferrable
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+3 3 Open-ILS/src/sql/Pg/002.schema.config.sql
+1 1 Open-ILS/src/sql/Pg/030.schema.metabib.sql
+
+commit d2bfda00482578e4496399c6d2569339c54f732d
+Author: Robert Soulliere <robert.soulliere at mohawkcollege.ca>
+Date: Thu Oct 10 10:44:47 2013 -0400
+
+ Documentation: Update EG upgrade instructions to 2.5 beta1
+
+ Also added Debian Wheezy references and updated links.
+
+ Signed-off-by: Robert Soulliere <robert.soulliere at mohawkcollege.ca>
+
+17 21 docs/installation/server_upgrade.txt
+
+commit 59a6698d6f312c71e2a2e6928a7ad90406aee6ad
+Author: Elliot V <evoris at slcconline.edu>
+Date: Thu Oct 10 10:03:13 2013 -0400
+
+ Documentation: Update links in installation instructions.
+
+ Addresses these bugs reported in launchpad:
+ https://bugs.launchpad.net/evergreen/+bug/1237781
+ https://bugs.launchpad.net/evergreen/+bug/1237785
+
+ Signed-off-by: Robert Soulliere <robert.soulliere at mohawkcollege.ca>
+
+4 4 docs/installation/server_installation.txt
+
+commit 3f1e692d14418422ff3f1bf03918d6b4087e3a76
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Thu May 9 15:33:04 2013 -0400
+
+ Set config.metabib_field_id_seq to 1000 in 950.data.seed-values.sql.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+ Boosted to 1000 as suggested by Dan Scott and seconded by Bill
+ Erickson.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit 741c1140d76f5d604d9926bcbc52662173ca1b3b
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Tue Oct 8 14:58:37 2013 -0400
+
+ Wrap upgrade script for 0840 circulation column picker.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+24 0 Open-ILS/src/sql/Pg/upgrade/0840.data.circulation-policy-configuration.sql
+0 24 Open-ILS/src/sql/Pg/upgrade/XXXX.data.circulation-policy-configuration.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0840.data.circulation-policy-configuration.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.circulation-policy-configuration.sql
+
+commit 7ee63181783ee3cf7fa773aa52dbe2f4baa6712d
+Author: Garry Collum <gcollum at gmail.com>
+Date: Sun Aug 4 16:10:26 2013 -0400
+
+ lp1193487 Circulation Policy Column Picker not saving configuration.
+
+ The circulation policy column picker is not saving its configuration
+ because ui.grid_columns.conify.config.circ_matrix_matchpoint is not
+ defined in the config.usr_setting_type table. This updates the sql
+ to populate the table.
+
+ Signed-off-by: Garry Collum <gcollum at gmail.com>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+17 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+24 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.circulation-policy-configuration.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.circulation-policy-configuration.sql
+
+commit b8ec73d3f50e2c1b87ed8f112feab645fa69fd10
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Tue Oct 8 12:45:12 2013 -0400
+
+ Stamping upgrade 0839: alternative title index fix
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+105 0 Open-ILS/src/sql/Pg/upgrade/0839.data.alternative-title-indexing.sql
+0 105 Open-ILS/src/sql/Pg/upgrade/XXXX.data.alternative-title-indexing.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0839.data.alternative-title-indexing.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.alternative-title-indexing.sql
+
+commit ef7cefb61f5b73787243317a89a0df8d3b9ae645
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Wed Oct 2 11:52:25 2013 -0400
+
+ Replace inappropriate browse reingest with ...
+
+ ... attempt at reingest across browse/facets/search but limited to
+ the alternative title index.
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+91 7 Open-ILS/src/sql/Pg/upgrade/XXXX.data.alternative-title-indexing.sql
+
+commit c08953aa10258922e6d21dc30c28d47eb393204e
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Mon Sep 30 09:22:26 2013 -0400
+
+ Capture all alternative titles
+
+ With the addition of bib browse, the alternative title index definition
+ was made to point at the 740 (ind2 != 2), which contains non-analytic
+ alternative titles /and/ non-filing indicator info. It used to capture
+ both the 246 and (appropriate) 740's. Allow either to match the XPath.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+21 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.alternative-title-indexing.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.alternative-title-indexing.sql
+
+commit 9e8baba79e91a0a0369a46392ac44a8b6447ff4f
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Oct 7 16:10:04 2013 -0400
+
+ Stamping 0838 - remove bibcn normalizers
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+17 0 Open-ILS/src/sql/Pg/upgrade/0838.data.bibcn_index_normalizers.sql
+0 17 Open-ILS/src/sql/Pg/upgrade/XXXX.data.bibcn_index_normalizers.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0838.data.bibcn_index_normalizers.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.bibcn_index_normalizers.sql
+
+commit 2cb2011016ff24e84ad95ad38478e63df3b05861
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Wed Oct 2 15:28:35 2013 -0400
+
+ The identifier|bibcn field is best served by having no normalizers applied
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+17 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.bibcn_index_normalizers.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.bibcn_index_normalizers.sql
+
+commit a2430dbbe629eaf9c3f745f38b23b396e83b930b
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Wed Oct 2 15:18:17 2013 -0400
+
+ OPAC: Make advanced search -> numeric search -> bib cn hone in on right target
+
+ The bib call number search under the advanced search page's numeric
+ search pane was doing the wrong thing. By thinking the search field
+ desired was called 'bib_cn' where it's actually called 'bibcn', it
+ generated searches that just fell back to the broader search class
+ 'identifier'. This would often find your matches, but would also find
+ too many records that *shouldn't* have been matches.
+
+ Discovered with help from Erica Rohlfs and Mike Rylander.
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
+
+commit 3a2112a8dca891c502fe7f77adfc1a499d6117bd
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Fri Oct 4 16:28:40 2013 -0400
+
+ Remove unnecessary Title Proper (Browse) index from config.metabib_field
+
+ As pointed out by Ben Shum and Dan Wells, we don't need this index, and
+ it made it only into the seed data and not into any upgrade script in
+ master. It's a relic of bib-and-auth-browse development that ought to
+ have been removed before the merge to master.
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 2 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit a1d23269e8dedbcea167312152f063cef6294b1b
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Fri Oct 4 15:32:56 2013 -0400
+
+ Move some release notes to core docs
+
+ The release notes for Phonelist.pm and floating groups provided some good
+ documentation, so let's move them to the core docs and leave just the
+ intro for the release notes.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+3 151 docs/RELEASE_NOTES_NEXT/Administration/phonelist.txt
+2 117 docs/RELEASE_NOTES_NEXT/Circulation/floating_groups.txt
+120 0 docs/admin/floating_groups.txt
+191 0 docs/admin/phonelist.txt
+4 0 docs/root.txt
+ create mode 100644 docs/admin/floating_groups.txt
+ create mode 100644 docs/admin/phonelist.txt
+
+commit a420b0ea38e329570b4df6252ce384fa241f2ea7
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Oct 3 17:54:03 2013 -0400
+
+ Relax MFHD subfield 'a' requirement for caption/patterns
+
+ If going by the book, every caption/pattern field would have a
+ subfield 'a', since the data from subfield 'i' would be moved to
+ 'a' if 'a' was empty. Since that is arcane, and our own wizards
+ used to bend this rule, let's make some minor adjustments to our
+ expectations:
+
+ 1) When calculating date progression, don't expect there to be an 'a'
+ subfield which needs to be "carried" into.
+ 2) When determining whether a field is 'open-ended', check the first
+ availabile enum/chron subfield rather than hard-coding the check to
+ 'a'.
+
+ These changes do not affect the display formatters, so strings
+ generated from 'a'-less caption/pattern combos are not exactly right,
+ but they suffice.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+5 1 Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm
+3 1 Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Holding.pm
+
+commit ebb94c3fd23fbe79f7d1b991431cdc485e2cba00
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Fri Oct 4 12:56:39 2013 -0400
+
+ More release note entries
+
+ Additional release note entries in the areas of administration,
+ circulation, staff client, SIP, and serials.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+6 0 docs/RELEASE_NOTES_NEXT/Administration/default-filter-config-screens.txt
+9 0 docs/RELEASE_NOTES_NEXT/Administration/inter-auth-linking-script.txt
+4 0 docs/RELEASE_NOTES_NEXT/Circulation/check_barcode_regex.txt
+8 0 docs/RELEASE_NOTES_NEXT/Circulation/disable-patron-credit.txt
+7 0 docs/RELEASE_NOTES_NEXT/Circulation/disallow-pickup.txt
+12 0 docs/RELEASE_NOTES_NEXT/Circulation/pull-list-user-name-fields.txt
+10 0 docs/RELEASE_NOTES_NEXT/Circulation/selcheck-styling.txt
+13 0 docs/RELEASE_NOTES_NEXT/Circulation/style-longoverdue-lost.txt
+9 0 docs/RELEASE_NOTES_NEXT/Circulation/wrong-shelf-holds.txt
+6 0 docs/RELEASE_NOTES_NEXT/Client/increase-font-size.txt
+26 0 docs/RELEASE_NOTES_NEXT/SIP/sip-hold-cancel.txt
+11 0 docs/RELEASE_NOTES_NEXT/SIP/sip-hold-info.txt
+7 0 docs/RELEASE_NOTES_NEXT/SIP/sip-renewal-all.txt
+9 0 docs/RELEASE_NOTES_NEXT/Serials/serial-routing-slip-addresses.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/default-filter-config-screens.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/inter-auth-linking-script.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/check_barcode_regex.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/disable-patron-credit.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/disallow-pickup.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/pull-list-user-name-fields.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/selcheck-styling.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/style-longoverdue-lost.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/wrong-shelf-holds.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Client/increase-font-size.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/SIP/sip-hold-cancel.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/SIP/sip-hold-info.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/SIP/sip-renewal-all.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Serials/serial-routing-slip-addresses.txt
+
+commit 51f6c9cbf693b0fd24c6269b4e0c779c67e5b440
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Thu Oct 3 12:54:46 2013 -0400
+
+ Release note additions for new acquisitions features
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+15 0 docs/RELEASE_NOTES_NEXT/Acquisitions/app_acq_copy_overlay.txt
+5 0 docs/RELEASE_NOTES_NEXT/Acquisitions/print_po_name.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/app_acq_copy_overlay.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/print_po_name.txt
+
+commit e66a212ff344231138bdb14d89d4b9ed2654aa17
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Tue Oct 1 13:03:07 2013 -0400
+
+ Adding new OPAC features to Release Notes.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+6 0 docs/RELEASE_NOTES_NEXT/OPAC/conjoined_items.txt
+4 0 docs/RELEASE_NOTES_NEXT/OPAC/copy_location_filter.txt
+9 0 docs/RELEASE_NOTES_NEXT/OPAC/locg-ou-name.txt
+6 0 docs/RELEASE_NOTES_NEXT/OPAC/maintenance_message.txt
+13 0 docs/RELEASE_NOTES_NEXT/OPAC/my_list_enhancements.txt
+5 0 docs/RELEASE_NOTES_NEXT/OPAC/rss_links.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/conjoined_items.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/copy_location_filter.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/locg-ou-name.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/maintenance_message.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/my_list_enhancements.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/rss_links.txt
+
+commit 30a69c4f8c06fd7335a2c4b0594cee7ec4fdc93c
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Tue Oct 1 11:29:41 2013 -0400
+
+ Move various release notes into correct directory
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+193 0 docs/RELEASE_NOTES_NEXT/Administration/phonelist.txt
+9 0 docs/RELEASE_NOTES_NEXT/Administration/purge_holds.txt
+89 0 docs/RELEASE_NOTES_NEXT/Cataloging/z39_batch_search_queue.txt
+25 0 docs/RELEASE_NOTES_NEXT/OPAC/authority_enhanced_browse.txt
+0 193 docs/RELEASE_NOTES_NEXT/phonelist.txt
+0 9 docs/RELEASE_NOTES_NEXT/purge_holds.txt
+0 89 docs/RELEASE_NOTES_NEXT/z39_batch_search_queue.txt
+0 25 docs/opac/authority_enhanced_browse.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/phonelist.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/purge_holds.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Cataloging/z39_batch_search_queue.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/authority_enhanced_browse.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/phonelist.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/purge_holds.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/z39_batch_search_queue.txt
+ delete mode 100644 docs/opac/authority_enhanced_browse.txt
+
+commit ba743246932dd7586d43225f8efeeabcaac9ba33
+Author: Robert Soulliere <robert.soulliere at mohawkcollege.ca>
+Date: Thu Oct 3 15:48:19 2013 -0400
+
+ Documentation: Add migrating patron data from 2.1 docs.
+
+ Converted and added documentation from http://docs.evergreen-ils.org/2.1/html/migratingpatrons.html.
+
+ Signed-off-by: Robert Soulliere <robert.soulliere at mohawkcollege.ca>
+
+228 0 docs/admin_initial_setup/migrating_patron_data.txt
+2 0 docs/root.txt
+ create mode 100644 docs/admin_initial_setup/migrating_patron_data.txt
+
+commit e6617bd153b81bb330b5b0a71a11cc4840db14a4
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Mon Sep 30 15:50:59 2013 -0400
+
+ Responsive tpac release notes
+
+ Add release notes entry for the recent responsive tpac work.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+26 0 docs/RELEASE_NOTES_NEXT/OPAC/responsive_tpac.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/responsive_tpac.txt
+
+commit 297d911e261d9ce100a2384ac90a7436cd111c22
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Sep 27 14:07:54 2013 -0400
+
+ Correct small errors in new AC cover code
+
+ In shelf browser, two problems:
+ - missing '%]' after 'args=rec_attrs;'
+ - cn.record_id should be cn.record.id
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+2 2 Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2
+
+commit ee61da7776acaa528cf31dbc57968ef76fb06bc8
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Sep 26 19:30:17 2013 -0400
+
+ Move 'floating groups' release note docs
+
+ Not sure if this is the best place, but it seems like a better
+ place.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+122 0 docs/RELEASE_NOTES_NEXT/Circulation/floating_groups.txt
+0 122 docs/floating_groups.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/floating_groups.txt
+ delete mode 100644 docs/floating_groups.txt
+
+commit a9c36eeabdc98ad0ffb1a9058d84934c8c9ebb8e
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Sep 26 18:59:00 2013 -0400
+
+ Translation updates - fix Finnish translator email
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 build/i18n/po/AutoFieldWidget.js/fi-FI.po
+1 1 build/i18n/po/Searcher.js/fi-FI.po
+1 1 build/i18n/po/TranslatorPopup.js/fi-FI.po
+1 1 build/i18n/po/User.js/fi-FI.po
+1 1 build/i18n/po/XULTermLoader.js/fi-FI.po
+1 1 build/i18n/po/admin.properties/fi-FI.po
+1 1 build/i18n/po/auth.properties/fi-FI.po
+1 1 build/i18n/po/authority.js/fi-FI.po
+1 1 build/i18n/po/capture.js/fi-FI.po
+1 1 build/i18n/po/cat.properties/fi-FI.po
+1 1 build/i18n/po/circ.properties/fi-FI.po
+1 1 build/i18n/po/common.properties/fi-FI.po
+1 1 build/i18n/po/conify.js/fi-FI.po
+1 1 build/i18n/po/db.seed/fi-FI.po
+1 1 build/i18n/po/fm_IDL.dtd/fi-FI.po
+1 1 build/i18n/po/ils_events.xml/fi-FI.po
+1 1 build/i18n/po/lang.dtd/fi-FI.po
+1 1 build/i18n/po/offline.properties/fi-FI.po
+1 1 build/i18n/po/opac.dtd/fi-FI.po
+1 1 build/i18n/po/opac.js/fi-FI.po
+1 1 build/i18n/po/patron.properties/fi-FI.po
+1 1 build/i18n/po/pickup_and_return.js/fi-FI.po
+1 1 build/i18n/po/pull_list.js/fi-FI.po
+1 1 build/i18n/po/register.js/fi-FI.po
+1 1 build/i18n/po/reports.dtd/fi-FI.po
+1 1 build/i18n/po/reports.js/fi-FI.po
+1 1 build/i18n/po/reservation.js/fi-FI.po
+1 1 build/i18n/po/selfcheck.js/fi-FI.po
+1 1 build/i18n/po/serial.properties/fi-FI.po
+
+commit 8c7c9eec71705a75219e736ba3c8c6684fbf0a41
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Sep 26 18:57:18 2013 -0400
+
+ Translation updates - newpot
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+13 9 build/i18n/po/acq.js/acq.js.pot
+6 12 build/i18n/po/cat.properties/cat.properties.pot
+20 2 build/i18n/po/circ.properties/circ.properties.pot
+10 2 build/i18n/po/common.properties/common.properties.pot
+9503 2610 build/i18n/po/db.seed/db.seed.pot
+2632 2439 build/i18n/po/fm_IDL.dtd/fm_IDL.dtd.pot
+264 252 build/i18n/po/ils_events.xml/ils_events.xml.pot
+822 10 build/i18n/po/lang.dtd/lang.dtd.pot
+4 9 build/i18n/po/match_set.js/match_set.js.pot
+5 1 build/i18n/po/offline.properties/offline.properties.pot
+16 7 build/i18n/po/patron.properties/patron.properties.pot
+19 15 build/i18n/po/register.js/register.js.pot
+38 22 build/i18n/po/selfcheck.js/selfcheck.js.pot
+9 1 build/i18n/po/serial.properties/serial.properties.pot
+524 340 build/i18n/po/tpac/tpac.pot
+
+commit e5eccfe2e032c3d1e5fe4c17833a5993ee3b8bf3
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Thu Sep 26 11:42:23 2013 -0400
+
+ Add apache config examples for AC by record id
+
+ Add apache (and apache 2.4) config examples for added content by
+ record id, update release notes to call out changes.
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/examples/apache/eg.conf.in
+4 0 Open-ILS/examples/apache/eg_vhost.conf.in
+1 0 Open-ILS/examples/apache_24/eg.conf.in
+4 0 Open-ILS/examples/apache_24/eg_vhost.conf.in
+23 0 docs/RELEASE_NOTES_NEXT/OPAC/added_content_by_record_id.txt
+
+commit cc905f44bb5a64c91257160b66a261f4196e273e
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Thu Sep 26 11:16:43 2013 -0400
+
+ Add release notes for AC by record id
+
+ Add release notes for Added Content by record ID.
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+30 0 docs/RELEASE_NOTES_NEXT/OPAC/added_content_by_record_id.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/added_content_by_record_id.txt
+
+commit 07e649049603a0b1e8227ab1b43c50b7efb8afe4
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Thu Sep 19 16:33:01 2013 -0400
+
+ Show jacket on record page even when no isbn/upc
+
+ Show jacket image on record details page even when there is no isbn
+ or upc found -- because we may have an ISSN or local override image.
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+0 2 Open-ILS/src/templates/opac/parts/record/summary.tt2
+
+commit 9c0ea8aee0eb8cc38616674c97b5144a57761502
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Thu Sep 19 14:17:33 2013 -0400
+
+ Add ISSN support to Syndetic AC handler
+
+ Add ISSN support to OpenILS::WWW::AddedContent::Syndetic added
+ content handler to take advantage of new support from upstream
+ provider.
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/src/extras/install/Makefile.debian-squeeze
+1 0 Open-ILS/src/extras/install/Makefile.debian-wheezy
+1 0 Open-ILS/src/extras/install/Makefile.fedora
+1 0 Open-ILS/src/extras/install/Makefile.ubuntu-lucid
+1 0 Open-ILS/src/extras/install/Makefile.ubuntu-precise
+1 0 Open-ILS/src/perlmods/Build.PL
+19 3 Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
+6 4 Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/Syndetic.pm
+
+commit 83d198ae340b563b7573ecf89136b32141a82079
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Thu Sep 19 14:12:43 2013 -0400
+
+ Add method to permit AC handler to expect keyhash
+
+ Add an expects_keyhash method to
+ OpenILS::WWW::AddedContent::Syndetic and look for it from
+ OpenILS::WWW::AddedContent. This allows us to pass a keyhash
+ (containing isbn/upc/whatever) to this handler while still passing a
+ simple scalar containing an ISBN to other AddedContent handlers.
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+7 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
+4 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/Syndetic.pm
+
+commit b69ffb6a8377282d9e1978bb732c439c28cdec1a
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Thu Sep 19 11:17:27 2013 -0400
+
+ Teach TPAC and selfcheck jackets by record ID
+
+ Teach TPAC and web-based selfcheck to display jackets by record ID.
+
+ Not covered yet: KPAC (uses a non-1x1 placeholder at this time) and
+ Acq (where we don't always have a bre.id).
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 4 Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2
+2 2 Open-ILS/src/templates/opac/parts/record/summary.tt2
+2 3 Open-ILS/src/templates/opac/parts/result/table.tt2
+3 3 Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
+
+commit 8b39a8c67ae2dd3239c86092ec40b56566b0683a
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Sat Apr 28 18:18:34 2012 -0400
+
+ Teach OPAC (jspac) jacket images by record id
+
+ Teach the Javascript OPAC how to retrieve jacket images by
+ record id.
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+11 0 Open-ILS/web/opac/common/js/added_content.js
+1 1 Open-ILS/web/opac/skin/default/js/cn_browse.js
+6 4 Open-ILS/web/opac/skin/default/js/rdetail.js
+2 2 Open-ILS/web/opac/skin/default/js/result_common.js
+
+commit 8507b5439b0173da93b83d31c58c80cd14c1974e
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Sat Apr 28 18:16:30 2012 -0400
+
+ Removed unused, commented-out function
+
+ Removed unused, commented-out function: an earlier iteration of
+ buildISBNSrc
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+0 6 Open-ILS/web/opac/common/js/opac_utils.js
+
+commit ded73fbb94ee4290a2e9f2a0080d00233d21f9a8
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Sat Apr 28 17:24:06 2012 -0400
+
+ Teach Syndetic.pm to pass UPC in requests
+
+ Teach OpenILS::WWW::AddedContent::Syndetic to pass UPC when
+ requesting added content from the source.
+
+ Protect against warnings when no isbn/upc provided
+
+ Protect against Perl giving us uninitialized value warnings when
+ isbn or upc has not been provided.
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+4 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/Syndetic.pm
+
+commit ff0b3542d3f7e71157a135890a835b335bd3b7eb
+Author: Jeff Godin <jgodin at tadl.org>
+Date: Wed Apr 25 04:23:28 2012 -0400
+
+ Finish Added Content by record ID
+
+ OpenILS::WWW::AddedContent now supports fetching content by record ID.
+
+ To start, this lets us request content in a way that uses both ISBN
+ and UPC as keys, assuming the AC handler and provider support it.
+
+ The previous method of requesting AC data continues to be
+ supported, and should be unaffected.
+
+ Business::ISBN is used to clean ISBN values when fetching by record ID
+
+ If we find no valid ISBN and no UPC values in the record,
+ do not attempt to call an AC handler. This will need
+ to change when we have AC handlers that rely on other
+ possible keys.
+
+ Attempt to serve from cache before fetching keys from the bib
+ record in the database.
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+66 24 Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
+13 8 Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/Syndetic.pm
+
+commit 7d26505c6b7052770032816f1197cf5d45cf8471
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Apr 27 11:42:58 2011 -0400
+
+ Start of AC by record ID from 2011 hackfest
+
+ Rough, untested cut. use rec id as they added content key;
+ fetch isbn/upc from full_rec; push full set of isbns and upcs
+ down to handler code
+
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+53 10 Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
+
+commit 323b18540069cd7e2755377ccda77937e9b492ee
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Sep 26 13:53:25 2013 -0400
+
+ Fix doc typo in public interface setup section
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+2 2 docs/admin_initial_setup/designing_your_catalog.txt
+
+commit a833b349f6a5d9960eff787e8c719dc6ab163c65
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Sep 26 13:45:08 2013 -0400
+
+ Clean up minor doc problems
+
+ "Content Café" would generate a section ID containing "é" which is not
+ well-formed XML; that was breaking PDF generation. Provide an explicit
+ ID for the section in question.
+
+ The OPAC advanced features section skipped a level of headings, which
+ generated a warning during PDF processing.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+1 0 docs/admin_initial_setup/designing_your_catalog.txt
+3 3 docs/opac/advanced_features.txt
+
+commit 639d4352e3928488dee28d46b19c8dbe2f5465d9
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Sep 26 13:19:10 2013 -0400
+
+ Include auth browse docs in OPAC section
+
+ Also fix a typo in the section title.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+2 2 docs/opac/authority_enhanced_browse.txt
+2 0 docs/root.txt
+
+commit e1e4198e79cd123181f92c9409f45573bacba92b
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Thu Sep 26 13:07:25 2013 -0400
+
+ Numbering upgrade script for auth-only-bib-auth-browse-signoff
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+989 0 Open-ILS/src/sql/Pg/upgrade/0837.schema.browse-auth-linking.plus-joiner.sql
+0 989 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.browse-auth-linking.plus-joiner.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0837.schema.browse-auth-linking.plus-joiner.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.browse-auth-linking.plus-joiner.sql
+
+commit 96e1a74b50f4ce5c84b6366e0a5b0ae4add36d40
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Tue Aug 20 11:15:34 2013 -0400
+
+ Some release notes for browse enhancements
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+
+25 0 docs/opac/authority_enhanced_browse.txt
+ create mode 100644 docs/opac/authority_enhanced_browse.txt
+
+commit d3b65482772825f1c19f0f5649dc5d8fbf75c5e9
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Thu May 23 14:51:27 2013 -0400
+
+ Bi-directional authority enhanced bib browse
+
+ This functionality extends the work committed as the following set:
+
+ e071eb91a40d3871bc0e0a078b88cfdde7ba3b5e Finish stamping for bib record browser
+ c7bad82a66554251b8a0f636e629fe98680b7765 Stamping upgrade scripts for bib record browser
+ 32ec20b71540b1230ecc15f1aec95059e044499e Fix problem where basic search bar was flush with left edge of page
+ 256b4d24240332ae3fd2a5cc14b1709c90f18d05 Fix issues with multiple divs having the search-wrapper id.
+ cfc828d832ecee92478466cd2f4e174c2f4b5c3c OPAC Browse: bugfixes squashed together from LP #1177810
+ 6990fd819c0dae385c3cc7a40d39a0ebed91086c Break up expensive queries, match index to quals
+ c0dea517395c733b77e8eb219d2c3f43f6098d42 OPAC Browse: some squashed commits from LP #1177810
+ 9d37f6890ce6b591d62972ce3e341cecf7c45535 Fix problem with YYYY.schema.bib-auth-browse.sql.
+ e710ecbee519d374bcf69b0c535c3f83814c782b Bib record browser with 'see also', etc from linked authority headings
+ d2f4cac923668ff05854ffc9720cafe514b9b71c Link browse entries to authority record when possible
+ 3eb616e56c82a5106e14f5a446f1d875015db7f0 Inter-authority linking
+
+ With this, we enhance the browse method to allow the return of authority-only
+ terms (that is, main entries not used by a bib record) if the authority record
+ from which the term comes is linked to another authority record via the
+ mechanism created by 3eb616e5, and that linked authority record is itself in
+ use by visible bibliographic records.
+
+ In order to accomplish this we:
+ * extend normalization of both bib and auth records to allow a custom string
+ to be used when joining parts of a term (for instance, joining subject
+ components with " -- ")
+ * cause authority headings to be including in the unique set of values
+ captured by metabib.browse_entry during authority ingest
+ * link authority-heading derived browse entries to their authority-indexed
+ counterparts
+ * extend the metabib.browse() stored procedure (and related) to inspect
+ authority-linked browse entries
+ * extend bibliographic-visiblity testing to cover those bibliographic records
+ in use by remote-linked authority records.
+ * generate browse links between headings found to be appropriately linked
+ and bibliographically in-use and visible
+
+ The addition of this functionality will require, in the least, reingest of
+ all authority records, and would benefit from reingest of bibliographic
+ records as well, as ingest has been improved and extended.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+
+44 0 Open-ILS/examples/fm_IDL.xml
+50 35 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm
+1 0 Open-ILS/src/sql/Pg/002.schema.config.sql
+70 18 Open-ILS/src/sql/Pg/011.schema.authority.sql
+210 71 Open-ILS/src/sql/Pg/030.schema.metabib.sql
+56 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+27 2 Open-ILS/src/sql/Pg/999.functions.global.sql
+989 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.browse-auth-linking.plus-joiner.sql
+53 17 Open-ILS/src/templates/opac/browse.tt2
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.browse-auth-linking.plus-joiner.sql
+
+commit c3a805e5271d28723b9e4120bc52e0446add4040
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Sep 26 12:53:01 2013 -0400
+
+ Stamping upgrade for floating groups
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+88 0 Open-ILS/src/sql/Pg/upgrade/0836.schema.floating_groups.sql
+0 82 Open-ILS/src/sql/Pg/upgrade/XXXX.floating_groups.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0836.schema.floating_groups.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.floating_groups.sql
+
+commit 2307d455215e452bc4d071fb7b07ef591410f350
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Wed Apr 18 22:03:16 2012 -0400
+
+ Floating Groups
+
+ Convert the floating bool to a link to floating groups.
+
+ Each group contains zero or more members that define how copies can float.
+
+ See the included documentation file for an overview.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+47 4 Open-ILS/examples/fm_IDL.xml
+1 1 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
+16 3 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+2 2 Open-ILS/src/sql/Pg/040.schema.asset.sql
+51 0 Open-ILS/src/sql/Pg/120.floating_groups.sql
+4 0 Open-ILS/src/sql/Pg/800.fkeys.sql
+5 2 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+1 0 Open-ILS/src/sql/Pg/sql_file_manifest
+82 0 Open-ILS/src/sql/Pg/upgrade/XXXX.floating_groups.sql
+59 0 Open-ILS/src/templates/conify/global/config/floating_groups.tt2
+197 0 Open-ILS/web/js/ui/default/conify/global/config/floating_groups.js
+3 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+21 0 Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
+1 0 Open-ILS/xul/staff_client/chrome/content/main/constants.js
+4 0 Open-ILS/xul/staff_client/chrome/content/main/menu.js
+4 0 Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
+1 0 Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
+2 2 Open-ILS/xul/staff_client/server/cat/copy_editor.js
+1 1 Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
+15 0 Open-ILS/xul/staff_client/server/circ/checkin.js
+4 0 Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
+7 3 Open-ILS/xul/staff_client/server/circ/util.js
+1 2 Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
+1 0 Open-ILS/xul/staff_client/server/skin/circ.css
+122 0 docs/floating_groups.txt
+ create mode 100644 Open-ILS/src/sql/Pg/120.floating_groups.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.floating_groups.sql
+ create mode 100644 Open-ILS/src/templates/conify/global/config/floating_groups.tt2
+ create mode 100644 Open-ILS/web/js/ui/default/conify/global/config/floating_groups.js
+ create mode 100644 docs/floating_groups.txt
+
+commit 42e8c332faa280857405b5cb4af42747fb9d5d57
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Thu Sep 26 11:30:36 2013 -0400
+
+ OPAC: on the login page, Make "Questions?"/"FAQs" areas not float weird
+
+ One little change from the original patch to make it 2em; instead of just 1em;
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+2 2 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 2d7c6d4c132211b4f6090d7c81c52e3e13347fdd
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Thu Sep 26 11:42:00 2013 -0400
+
+ Push the 2.4.2 inter-version upgrade script forward
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+196 0 Open-ILS/src/sql/Pg/version-upgrade/2.4.1-2.4.2-upgrade-db.sql
+ create mode 100644 Open-ILS/src/sql/Pg/version-upgrade/2.4.1-2.4.2-upgrade-db.sql
+
+commit 15d09432cbeeb326adb3082bc08a370e6485962f
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Mon Sep 23 12:14:18 2013 -0400
+
+ Serials: Support reader address information in routing slip template
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm
+22 2 Open-ILS/src/templates/serial/print_routing_list_users.tt2
+28 0 Open-ILS/web/js/ui/default/serial/print_routing_list_users.js
+
+commit a64be32920aaf036542998323b8feb62d7da7689
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Thu Sep 26 09:52:04 2013 -0400
+
+ Stamping 'patron credit disable' setting
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+25 0 Open-ILS/src/sql/Pg/upgrade/0835.data.yaous-disable-patron-credit.sql
+0 25 Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous-disable-patron-credit.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0835.data.yaous-disable-patron-credit.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous-disable-patron-credit.sql
+
+commit 46629e2065b12d2effe86cc6362f34f2b6aabafb
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Aug 12 15:02:57 2013 -0400
+
+ LP1211473 YAOUS : disable patron credit payments
+
+ New org unit setting circ.disable_patron_credit.
+
+ This prevents "patron_credit" payments in the payment creation API and
+ hides all patron credit related actions in the patron payment interface.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+6 0 Open-ILS/src/extras/ils_events.xml
+13 1 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm
+21 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+25 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous-disable-patron-credit.sql
+13 0 Open-ILS/xul/staff_client/server/patron/bill2.js
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous-disable-patron-credit.sql
+
+commit 64e888e5fd2f378aea6563f4aff0ab6cf8cc1fb0
+Author: Ben Shum <bshum at biblio.org>
+Date: Wed Sep 25 22:36:29 2013 -0400
+
+ TPAC: Add format icon back to record details
+
+ Similar to 502f93acff9a5713668931c980d6ce25962a1f8c finding compromise by
+ putting the format icon back right next to the format label.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/parts/record/summary.tt2
+
+commit 1db3c9196054cdd1f783e5f42b2f6b98b2eff3be
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Mon Jul 15 11:01:28 2013 +0300
+
+ In reports, show old label name as the default in the Alter Display Header -prompt
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+2 1 Open-ILS/web/reports/xul/template-config.js
+
+commit 48a44afbd82ac271c123903de2fa1351c2a0fa43
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Wed Sep 18 14:14:16 2013 -0400
+
+ Add PhoneList.pm stuff to Apache 2.4 config
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/examples/apache_24/eg.conf.in
+22 0 Open-ILS/examples/apache_24/eg_vhost.conf.in
+
+commit 6566aa8007d8156bbf8df2e1df5d38ee94c9ecaf
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Wed Sep 18 13:41:31 2013 -0400
+
+ Add phonelist.txt release notes.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+193 0 docs/RELEASE_NOTES_NEXT/phonelist.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/phonelist.txt
+
+commit e4e39e6777ab40ba1cf61728095a9fd34627f8c4
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Mon Jul 23 10:19:13 2012 -0400
+
+ Fix PhoneList.pm child_init method.
+
+ child_init in an Apache module should return something, so it now
+ returns the OK constant.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList.pm
+
+commit 3448c226d400d104599a05770522e2b95bc30efd
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Tue Mar 6 13:21:14 2012 -0500
+
+ Strip out spaces as well as - from phone numbers in PhoneList::Holds.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList/Holds.pm
+
+commit 6785a4a3a1baed72f8bcff6110cff6288d9cea3b
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Thu May 26 10:30:10 2011 -0400
+
+ Add PhoneList.pm.
+
+ A simple WWW module to list patrons who have holds with their phone
+ numbers and barcodes. The format is as requested by a specific library
+ for their automated calling program.
+
+ Future modifications may include the ability to rearrange the output
+ columns and provide formats for some data.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/examples/apache/eg.conf.in
+1 0 Open-ILS/examples/apache/eg_startup.in
+22 0 Open-ILS/examples/apache/eg_vhost.conf.in
+132 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList.pm
+85 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList/Base.pm
+159 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList/Holds.pm
+174 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList/Overdues.pm
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList.pm
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList/Base.pm
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList/Holds.pm
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/PhoneList/Overdues.pm
+
+commit 954bb310efd5ee54d819ae85ad18c3bc1fab8e22
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Sep 4 09:26:23 2013 -0400
+
+ Fiction records / copies test data
+
+ Adds 17 (mostly) fiction bib records w/ copies to
+ OpenILS/tests/datasets/sql/. New items are loaded via load_all.sql.
+
+ Special thanks to Rogan Hamby for donating (and I believe creating)
+ these records many moons ago. For reference:
+
+ The father hunt;
+ Southern Gods /
+ The winter of our discontent /
+ CliffsNotes Steinbeck's Of mice and men /
+ The rum diary
+ Blueberry girl /
+ Stardust
+ Coraline
+ Objective-C programming :
+ The swordsman of Mars /
+ Ghost story
+ The Avengers
+ Throne of the Crescent Moon /
+ The walking dead.
+ Kraken :
+ The crow
+ The running man /
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+28 0 Open-ILS/tests/datasets/sql/assets_fic.sql
+22 0 Open-ILS/tests/datasets/sql/bibs_fic.sql
+6 0 Open-ILS/tests/datasets/sql/load_all.sql
+ create mode 100644 Open-ILS/tests/datasets/sql/assets_fic.sql
+ create mode 100644 Open-ILS/tests/datasets/sql/bibs_fic.sql
+
+commit 6707d536768f6cb72da4d974d6f742abf0a4681d
+Author: Steven Callender <stevecallender at esilibrary.com>
+Date: Thu Sep 12 13:30:16 2013 -0400
+
+ Added in warning message when placing hold with no email address.
+
+ Previously when an account didn't have an email address associated with it
+ when placing a hold, the input box would be greyed out and the display
+ would show the Email Address text with no address to go with it.
+
+ This change will instead show text warning the user that they have
+ no email address configured and they need to go to My Account in order
+ to add one to their account.
+
+ Signed-off-by: Steven Callender <stevecallender at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+2 1 Open-ILS/src/templates/opac/parts/place_hold.tt2
+
+commit 798a4ff8f74e063312fa8b7d5078dcad1385849e
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Sep 25 16:46:31 2013 -0400
+
+ TPAC: Consolidate and simplify button styles
+
+ TPAC has at least two distinct types of buttons, those created by
+ input tags, and those created by anchor (that is, <a>) tags. This
+ commit simplifies and consolidates the styles used for both types
+ of buttons.
+
+ At least in Firefox, inline blocks display in a closer size rendering
+ to <input> tags than plain 'display:inline'. The switch doesn't seem
+ to hurt in most cases in IE, FF, or Chrome, so let's do it.
+
+ Two cases where inline works better are the floating 'My Account' and
+ 'dash' buttons'. They already have special classes, so let's revert
+ those back to inline. In fact, let's make the logged-in 'dash'
+ buttons share the style of the 'My Account' button which got us there,
+ and make all three buttons more visible when hovering.
+
+ Inputs do not inherit the body font by default, so let's apply it for
+ better display consistency.
+
+ Finally, Firefox inputs have some extra space around them; let's make
+ a modest attempt to remove that.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+38 30 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 757d48b7498e7ff97198772ba2e22f061c14790b
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Sep 25 17:00:29 2013 -0400
+
+ TPAC: href not valid on 'button' tags
+
+ The 'Clear Form' button was moved to a button tag, which solved a
+ display issue but didn't actually clear the form. Let's make it
+ an <a> again.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+2 2 Open-ILS/src/templates/opac/parts/advanced/search.tt2
+
+commit 502f93acff9a5713668931c980d6ce25962a1f8c
+Author: Ben Shum <bshum at biblio.org>
+Date: Wed Sep 25 17:40:57 2013 -0400
+
+ TPAC: Add format icon back to search results
+
+ As a compromise, add the format icon back to the search results to sit alongside
+ the fully spelled out format label for the record. Having the label next to the
+ icon helps to inform on the icon without the need to hover.
+
+ Local sites may consider customizing this to their personal desires.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/parts/result/table.tt2
+
+commit 85a68d8477c2372284723c391b536478267b64ea
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Sep 25 12:53:51 2013 -0400
+
+ TPAC: Make corner image link to server root
+
+ Most people will do this anyway, and in the MOPAC view, you currently
+ get trapped in 'My Account' with no obvious way out unless we have
+ a link like this.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+1 1 Open-ILS/src/templates/opac/parts/topnav_logo.tt2
+
+commit ea017990c589ee3c9abd18c547385286921d087b
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Sep 25 12:27:40 2013 -0400
+
+ MOPAC: Remove fixed height from fines tabs
+
+ With 'overflow:auto' applied, a fixed height isn't needed, and
+ actually causes minor issues.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+0 3 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 2e34bd51de6869f5cd15c810b49322b3e526ce15
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 23:38:23 2013 -0400
+
+ TPAC: Make low hits help support low-width devices
+
+ Inline styles were forcing the width of the low-hits help box to be
+ 353px wide, which is wider than our target 320 width for mobile devices.
+ Let the help use the full available width under the 600px barrier.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+9 0 Open-ILS/src/templates/opac/css/style.css.tt2
+1 1 Open-ILS/src/templates/opac/parts/result/lowhits.tt2
+
+commit d2a643960bc8c854b9a1c38f4fcb654b9a235145
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 23:07:30 2013 -0400
+
+ TPAC: Make home search screen work on IE8+
+
+ The home logo is now centred on IE, and the white background extends
+ across the full width of the page. Huzzah!
+
+ As a bonus, the markup makes more sense without the <strong><center>.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+2 0 Open-ILS/src/templates/opac/css/style.css.tt2
+1 1 Open-ILS/src/templates/opac/parts/homesearch.tt2
+
+commit 207177851b797c2357aa455b35e24cad9389954a
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 24 17:47:16 2013 -0400
+
+ Add missing ending label tag for format selector
+
+ On the basic search, we were missing an ending label tag so it was combining
+ the one from formats and library pickers into a single element which made
+ selecting the library misbehave.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/parts/searchbar.tt2
+
+commit 793168a99f4de8c70a68bbea6dc83eee71ff4868
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 24 16:03:59 2013 -0400
+
+ Remove extra large facets
+
+ While an interesting experiment, as agreed in IRC conversation with kmlussier
+ and dbs, we will remove the extra wide facets being used in wider screens for
+ the time being.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 7 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 77d7cda9b647c744f8c68690e4ef0f20f1651188
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 24 16:02:41 2013 -0400
+
+ Increase height of facet headers
+
+ Because the font size is larger now, the bottom of the facet headers was
+ getting too close to the text. Increase size slightly for now.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 12c37dc68fd03deea857dd003cefea6a09b3f5b8
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Tue Sep 24 16:01:11 2013 -0400
+
+ Remove My Account tabs at higher resolution
+
+ The My Account tabs begin to break at a higher resolution than 600 so
+ let's remove them at 800px instead.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+6 8 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit f3b7bc3befbe09d2102cd7e0027a87869e913775
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Tue Sep 24 15:48:35 2013 -0400
+
+ Remove explicit widths from My account
+
+ There were a couple of explicit width in the My Account area that were
+ causing the account expiration alert to run off the screen. I removed them
+ and a tweak to the CSS to get the page elements to display
+ properly.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 0 Open-ILS/src/templates/opac/css/style.css.tt2
+3 3 Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
+
+commit 3292fc83efe8fd2461c8b9d41988b0fea408a1a1
+Author: Bill Ott <bott at grpl.org>
+Date: Tue Sep 24 15:20:56 2013 -0400
+
+ i18n support for field names in myopac css
+
+ Signed-off-by: Bill Ott <bott at grpl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+13 13 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 405b76152eec34c993eb4e20bf18e69cb79c0ec4
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 24 14:57:16 2013 -0400
+
+ Fix margins in advanced search tabs for mobile view too
+
+ Similarly, in the mobile view, do not have a bottom margin separating the tab
+ from the content below. Clean up margin code while we're at it.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 3 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 51cba9000bbb7138aba2ca8dd7633ce61633e31c
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 24 14:16:21 2013 -0400
+
+ Fix tab button margins
+
+ Remove a hanging 10px margin that made the advanced search tabs and my account
+ tabs appear as though they were floating over the contents they were connected
+ with.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 23e8de55bb283101ba046d40fbdc75c22e55741f
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 13:21:35 2013 -0400
+
+ TPAC: Simplify opac-button styling
+
+ Conflicting padding declarations in the stylesheet, in an old attempt to
+ balance out the sizes of various INPUT types vs A elements in Chrome vs.
+ Firefox, were resulting in increasingly odd sizes for the buttons
+ (depending on which browser you used). Switching to a BUTTON instead of
+ an A tag and dropping all of the padding declarations improves the
+ situation on Firefox, Chrome, and IE8, while simplifying the CSS.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 11 Open-ILS/src/templates/opac/css/style.css.tt2
+2 2 Open-ILS/src/templates/opac/parts/advanced/search.tt2
+
+commit 455c587c23c56dee0eeabee0fba0ba0b927dfa73
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 13:04:56 2013 -0400
+
+ TPAC: Retain advanced search tabs via overflow:auto
+
+ At small widths, the advanced search tabs could be forced to escape the
+ search tab header in a displeasing fashion. Also, the background bar
+ that provides context for the selected tab had been lost - and
+ overflow:auto fixes that. Thanks to Dan Wells for the suggestion.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 3 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit bfda0d74f476629afa3c9934d29501dce3ef9991
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 11:24:39 2013 -0400
+
+ TPAC: Main content needs a clear:both style
+
+ On My Account, the content of tabs was riding up against the tabs. Use
+ clear:both style for #main-content to force the main content to start on
+ a new line.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 4f8139372d712cbeb3a3a1bb9be9b10bc3b0c2d9
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 10:57:56 2013 -0400
+
+ TPAC expert search: wrap labelled fields consistently
+
+ Use a new class "nonbreaking-wrapper" with display:inline-block to keep
+ label + input fields together, rather than the inline "whitespace:
+ no-wrap" which did not work on Chrome (and oddly enough forced the value
+ field to the next line).
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+4 0 Open-ILS/src/templates/opac/css/style.css.tt2
+10 6 Open-ILS/src/templates/opac/parts/advanced/expert.tt2
+
+commit 16fde03781c4efc9dc2d1f64819515603f24d9ed
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 10:51:36 2013 -0400
+
+ TPAC: Prevent IE compatibility view
+
+ Windows XP has IE8, and it can handle the CSS we have in the TPAC.
+ However, the "compatibility view" button, if clicked, actually results
+ in horribly broken rendering (contrary to what one would expect).
+
+ Adding this <meta> tag prevents the compatibility view button from
+ displaying and should improve the experience for users.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/parts/base.tt2
+
+commit 64776b44b39a60aed9e67ee1aa418df9e8677ece
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 09:53:34 2013 -0400
+
+ TPAC: Clear line for initial advanced search tab
+
+ The initial advanced search tab was being rendered right beside the tabs
+ instead of underneath them; fix in the same way we fixed the numeric and
+ expert tabs previously.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+4 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit b1df6a60b40c6341874b0631cb381935bf98286b
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Tue Sep 24 07:32:28 2013 -0400
+
+ Restore fines, checkout, and holds tabs
+
+ These display well as tabs since there are only two tabs to display. Probably
+ inadvisable to replace these tabs with menus as we did in other places because
+ there are already menus on these screens to perform actions on selected
+ checkouts/holds.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 7 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 3314f282e94f058e05e21eba0278822b00955cba
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 01:55:37 2013 -0400
+
+ TPAC: Streamline facet display
+
+ Rather than including a DIV containing only a non-breaking space to
+ clear the lines of the facets, just use CSS to clear each facet and set
+ a bottom margin appropriately.
+
+ Also, take advantage of wide screens by allowing facets to display
+ more broadly rather than being limited to a 10% width of the screen.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+11 4 Open-ILS/src/templates/opac/css/style.css.tt2
+0 2 Open-ILS/src/templates/opac/parts/result/facets.tt2
+
+commit 3f746a756a063924447e1ceb8ab5621b6f2cb8a5
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 01:29:19 2013 -0400
+
+ TPAC: Advanced search - add line break
+
+ The header and form for numeric search and expert search were being
+ displayed inline with the tabs on the advanced search page; push those
+ down where they should be.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit f89d938f4e9f0cfeebe693b3844c153d2cce405c
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 01:15:39 2013 -0400
+
+ TPAC: Draw a border under the result header bar
+
+ Particularly needed in mobile mode, where the background has been set to
+ inherit, draw a bottom border to separate the result header actions from
+ the pagination controls.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 984ca33e5eb48e275069c092e27ed82f3552259d
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 01:11:36 2013 -0400
+
+ TPAC: Enable search bar elements to wrap gracefully
+
+ As the browser window narrows, stack the search bar elements vertically
+ as needed.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 6748df6b22cd194b775fbf4a14a1184e284ea726
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 01:07:00 2013 -0400
+
+ TPAC: Define result header padding by contents
+
+ Rather than defining padding for the result header bar and then defining
+ margins for the contained labels and buttons, rely strictly on the
+ buttons and labels to position themselves.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+2 9 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit debabf1c411689c2e00b429c4ea7b6c16d90a383
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 00:46:27 2013 -0400
+
+ TPAC: Make result label text consistent size
+
+ The text on the result header buttons was all 100%, while the text
+ labels for the sort and limit to available widgets for some reason were
+ set to a smaller font size, despite appearing on the same line.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit af892c5075c8c910ac50b74a9c85b46c3e77bacf
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 00:43:50 2013 -0400
+
+ TPAC: Make result button text consistent
+
+ There's no good reason for the result buttons to have underlined text
+ when most other buttons in the Web UI do not have underlined text.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 86ad330855587f6421dc328b37c57cdd3aa207f6
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 00:36:59 2013 -0400
+
+ TPAC: Remove wide bar under results options header
+
+ The hard-coded <br class="clear-both"> adds a full em of empty vertical
+ space to the full TPAC with no usability gain. Remove it.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 1 Open-ILS/src/templates/opac/results.tt2
+
+commit dd3183bae26885baa10f61cbfc842774b1f78984
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 00:33:12 2013 -0400
+
+ TPAC: Saner search button CSS
+
+ Gradients and text shadows begone.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+9 8 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 90d5a0e12b5d55efe4f6d212b71740b9fca11b5e
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Sep 23 23:03:05 2013 -0400
+
+ Mobile TPAC: Cleaner Refine/Return to hits behaviour
+
+ Have the Refine results / Return to results button be the target ID, so
+ that clicking the link leaves the opposite action at the top of the page
+ (giving users a quick exit path back to where they came from).
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+2 2 Open-ILS/src/templates/opac/parts/result/table.tt2
+
+commit 0cf1a5e5b228553e39a19d68c3b945e4b21c29c6
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Sep 23 22:55:04 2013 -0400
+
+ TPAC: Consistent results paginator font size
+
+ It is weird to have two different font sizes appearing on the same line
+ in the regular TPAC, and it introduces slight inconsistency for the left
+ padding of the results pagination in mobile mode.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 5 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 48316e8c2f5ea328ac79c24fb5b45dbd38fe0a41
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Sep 23 22:44:18 2013 -0400
+
+ TPAC: Avoid paginator HTML rather than hiding it
+
+ Rather than generating HTML and then hiding it via CSS, just don't
+ generate the HTML at all. In this case, avoid generating the Previous /
+ Next links in those cases where we're on either page one or the last page
+ of results respectively.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 5 Open-ILS/src/templates/opac/css/style.css.tt2
+8 8 Open-ILS/src/templates/opac/parts/result/paginate.tt2
+
+commit 07ae504ad135b1eec1445b647e1067082628e62b
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Sep 23 22:33:09 2013 -0400
+
+ TPAC: Align results pagination in mobile mode
+
+ The results summary and results paginator had been using hard-coded
+ pixel values for the padding-left value; amusingly, they were different
+ values. Now that the paginator is part of the CSS stylesheet, switch to
+ using a standard 1 em so that we can also respond to the chosen font
+ size of both the stylesheet and the user's preference.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+2 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 480602d8e706a38d390113614127f870582ce565
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Sep 23 22:29:23 2013 -0400
+
+ TPAC: Reduce vertical space in results paginator
+
+ An unnecessary span element with inline CSS results in additional blank
+ vertical space being generated for searches with only one page of
+ results. Avoid creating the span (which would normally contain the list
+ of pages), move the CSS to the style sheet, and use ems rather than
+ hard-coded px values for the padding to adjust relative to the font
+ size.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+4 1 Open-ILS/src/templates/opac/css/style.css.tt2
+9 7 Open-ILS/src/templates/opac/parts/result/paginate.tt2
+
+commit ce5504d8e64433f6e948920092c5c96cf0558634
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Sep 23 15:16:16 2013 -0400
+
+ Mobile TPAC: Show Advanced Search button in results header
+
+ Now that the advanced search UI is reasonably mobile-friendly, make it
+ visible. At the same time, make the wrapping behaviour more friendly by
+ giving a little bit of vertical margin between wrapped buttons (because
+ adding "Advanced Search" is almost guaranteed to cause wrapping).
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+4 6 Open-ILS/src/templates/opac/css/style.css.tt2
+2 2 Open-ILS/src/templates/opac/results.tt2
+
+commit 8d4c855c239390de9e3e3c39f2087bafd47863d2
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Sep 23 15:02:04 2013 -0400
+
+ TPAC: More responsive search result header buttons
+
+ Rather than having a specific height of 40px, which is crazy, remove the
+ specific height. This enables the buttons contained in the search result
+ header to wrap without overlapping the bottom border in strange
+ patterns.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+2 4 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 582f68c0f6dca59c57330d4a7f0013ac3e9df182
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Sep 23 14:59:04 2013 -0400
+
+ Mobile TPAC: Better styling for facet/results buttons
+
+ Adopt the OPAC button style and move the buttons into the search bar to
+ consolidate result-specific actions into a single contextual area.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 5 Open-ILS/src/templates/opac/css/style.css.tt2
+6 2 Open-ILS/src/templates/opac/parts/result/table.tt2
+2 0 Open-ILS/src/templates/opac/results.tt2
+
+commit 7419645aabd19dbe9b9dac2d6292fa7afdd02c1e
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Sep 23 14:16:01 2013 -0400
+
+ TPAC: Remove "Dynamic catalog" link from footer
+
+ The TPAC _is_ the dynamic catalog as of 2.3. It no longer has a need to
+ link to itself.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 1 Open-ILS/src/templates/opac/parts/footer.tt2
+
+commit db6b04817c899816e9be887c8bbc13a782614c28
+Author: Ben Shum <bshum at biblio.org>
+Date: Fri Sep 20 17:48:40 2013 -0400
+
+ Hide searchbar from myopac and other non-search related pages
+
+ Ugly hack to add the mobile_hide div class around the searchbar.tt2 includes.
+
+ Eventually should add some smarter options in searchbar.tt2 for displaying or not
+ in various interfaces.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+2 0 Open-ILS/src/templates/opac/mylist.tt2
+2 0 Open-ILS/src/templates/opac/parts/myopac/base.tt2
+2 0 Open-ILS/src/templates/opac/password_reset.tt2
+2 0 Open-ILS/src/templates/opac/sms_cn.tt2
+
+commit f6360ccdd1652b04299eea00018fa372a8f74a8d
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Fri Sep 20 15:09:13 2013 -0400
+
+ Replace prefs tabs with select menu in mobile view
+
+ There are too many account preference tabs to display cleanly on a small
+ screen resolution, so let's replace them with a select menu for
+ navigation. At the same time, we remove hardcoded values used for the
+ navigation tabs so that we do not need to maintain links/labels for the
+ menus in two different places.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+3 3 Open-ILS/src/templates/opac/css/style.css.tt2
+1 1 Open-ILS/src/templates/opac/myopac/prefs.tt2
+1 1 Open-ILS/src/templates/opac/myopac/prefs_my_lists.tt2
+1 1 Open-ILS/src/templates/opac/myopac/prefs_notify.tt2
+1 1 Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
+33 54 Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
+
+commit b471e6105bff194ddf26619f32bbcae10553867b
+Author: Bill Ott <bott at grpl.org>
+Date: Fri Sep 20 09:13:05 2013 -0400
+
+ Reactive tables for myopac circ and holds.
+
+ Initial stab at trying to restructure the table data to fit into a vertical table'ish design.
+ Also took a machete to the nth display:none portions of the previous style so we could see all
+ the glory that needed to be restructured.
+
+ Signed-off-by: Bill Ott <bott at grpl.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+77 38 Open-ILS/src/templates/opac/css/style.css.tt2
+1 1 Open-ILS/src/templates/opac/myopac/circs.tt2
+
+commit 08beb255d5d247e29ead4e68fb41cb8db750369f
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Fri Sep 20 00:52:28 2013 -0400
+
+ Disabled option in account menu
+
+ Instead of hiding the active page in the My Account select box navigation,
+ let's disable it so that the menu remains consistent from page to page.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 2 Open-ILS/src/templates/opac/parts/myopac/base.tt2
+
+commit 851c9a909c010d530926f8222dd52b5843858abc
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Sep 19 20:28:32 2013 -0400
+
+ Restore facet-first loading, add breakpoint for results
+
+ Facet first loading should be faster on slow servers, so do that rather
+ than loading them after the results and forcing a page render when we
+ dump them into place on wide screens.
+
+ Also add an 800px breakpoint to prevent results from getting pushed
+ underneath the facets; at 800px, we go into "hide facets" mode instead.
+ This gets picked up by the 600px breakpoint, so it's all good.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+13 13 Open-ILS/src/templates/opac/css/style.css.tt2
+5 15 Open-ILS/src/templates/opac/parts/result/table.tt2
+
+commit ecd0b786e24811cf1e1b75929f11e396ce4d1301
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Sep 19 14:57:58 2013 -0400
+
+ Show/hide facets & search results in mobile mode
+
+ Use CSS + a bit of JavaScript to show/hide facets and results, and
+ anchor the page accordingly.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+13 4 Open-ILS/src/templates/opac/css/style.css.tt2
+28 22 Open-ILS/src/templates/opac/parts/result/table.tt2
+
+commit e72b728646e4023dbf6d7fd4ce035aa24d50481d
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Sep 19 11:45:44 2013 -0400
+
+ Mobile: group advanced search rows with a border
+
+ We want advanced search rows to wrap on mobile, but also want to group
+ the elements in some way. This adds a simple border on the bottom of
+ each row to suggest that things are together.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+6 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 2cf503ac745b1a4e73d9c396da932f491aecca65
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Sep 19 11:11:22 2013 -0400
+
+ Bump up the default font size, use consistent font sizes
+
+ opac/parts/css/fonts.tt2 defines all of the font sizes we should be
+ using for consistency throughout the TPAC. There was a need felt to bump
+ up the default font size in the mobile UI from 12px to 12pt, which was
+ matched by a number of sites who had also bumped the normal UI up to
+ 14px or 15px. Rather than having a weird font-size jump when you narrow
+ a browser window to < 600px, keep the same base font size... but bump it
+ up.
+
+ Also, replace hardcoded 100% etc font sizes with the templated font
+ sizes for consistency.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+7 10 Open-ILS/src/templates/opac/css/style.css.tt2
+5 5 Open-ILS/src/templates/opac/parts/css/fonts.tt2
+
+commit 5511067ce20b1588ba7a521ebe590000ccc0badc
+Author: Ben Shum <bshum at biblio.org>
+Date: Thu Sep 19 10:59:30 2013 -0400
+
+ Change CSS for dash identity
+
+ Set to float:left; for the dash identity so that the buttons are in order:
+ "My account" then "Logout"
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit bea813fb7a078dcbf53dccfc1da70a1ae1d8de95
+Author: Garry Collum <gcollum at gmail.com>
+Date: Thu Sep 19 10:24:56 2013 -0400
+
+ Additional CSS changes for copy details for mobile web.
+
+ Adds fix for background color for bibs with linked items.
+
+ Signed-off-by: Garry Collum <gcollum at gmail.com>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+6 3 Open-ILS/src/templates/opac/css/style.css.tt2
+2 2 Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+
+commit 4a1c5dd97e1df30181f086ef115ad0889a03c1e8
+Author: Bill Ott <bott at grpl.org>
+Date: Thu Sep 19 10:18:16 2013 -0400
+
+ Fix up the advanced search tabs advanced, numeric, expert
+ Signed-off-by: Bill Ott <bott at grpl.org>
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+12 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit b22d9ed1bf1d062de25b06baeea28ed76265d50d
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Sep 19 10:38:40 2013 -0400
+
+ Respect adv_break with clear: both
+
+ This keeps the old behaviour, in all ways, but rather than using a specific
+ / arbitrary pixel width it uses clear:both to start a new line for a new
+ adv_break.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/css/style.css.tt2
+1 1 Open-ILS/src/templates/opac/parts/config.tt2
+
+commit 2acd47d3b0d77edf6f245027e49fd14c5e1b938c
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Sep 19 10:02:45 2013 -0400
+
+ More responsive advanced search
+
+ By default, rather than having blocks of search filters with an explicit
+ width of 800px or 850px, just have one line of filters that wraps
+ according to the width of the page (truly responsive).
+
+ Also move all inline styles into style.css so we can more easily
+ manipulate them based on media queries. And notice silly styles that can
+ be easily swapped out with clean styles.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+16 6 Open-ILS/src/templates/opac/css/style.css.tt2
+9 10 Open-ILS/src/templates/opac/parts/advanced/search.tt2
+1 1 Open-ILS/src/templates/opac/parts/config.tt2
+
+commit 803eb2577fa106d81635c74190199a6d0ae6ef35
+Author: Ben Shum <bshum at biblio.org>
+Date: Wed Sep 18 23:56:00 2013 -0400
+
+ Resize advanced search filters to allow more space by default
+
+ By default, the space allotted was perfect at 800px which worked in
+ Chrome browser just fine. But viewing in Firefox rendered the elements
+ slightly larger and wrapped some filters instead of displaying four
+ in a row as expected.
+
+ Increase the adv_search_filters from 800px to 850px to allow for more
+ space.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 7dc6cf72acecabebc9da5f2b7b2d739d6136e9eb
+Author: Ben Shum <bshum at biblio.org>
+Date: Wed Sep 18 22:03:19 2013 -0400
+
+ Add new span for myopac buttons
+
+ Based on direction from Kathy Lussier:
+
+ 1) Add a new span for the myopac buttons to keep them grouped
+ 2) Hide an unnecessary extra dash divider from the myopac dashboard identity
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+7 0 Open-ILS/src/templates/opac/css/style.css.tt2
+2 0 Open-ILS/src/templates/opac/parts/topnav.tt2
+
+commit b8e8f9144e968570ca33bc47537b0e2f389942e9
+Author: Ben Shum <bshum at biblio.org>
+Date: Wed Sep 18 17:57:00 2013 -0400
+
+ Some CSS tweaks
+
+ 1) Remove the login height to prevent problems with larger fonts at entry
+ 2) Add some top and bottom padding between search results
+ 3) Make the titles larger by default in search results
+ 4) Add some right padding to the results block
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+10 1 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 555d80d2f4ec80c11e911b6c1879a4ad6ada5d2e
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Wed Sep 18 17:53:55 2013 -0400
+
+ Tweak My Account buttons
+
+ Tweak the padding and margins for My Account buttons so that they fit on
+ one line for small screens. Also fits well for users with very, very long
+ names.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+6 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit bea06cf704f0d3da797dc0c7fbce3ab4604eb11a
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 17:35:29 2013 -0400
+
+ Keep label + input together in search bar
+
+ The better for breaking in a sane way on a non-mobile screen.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+4 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit a663723d592ef63e95181f18b1c136c5b1e73661
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 17:23:46 2013 -0400
+
+ Restore missing format selector from search bar
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/css/style.css.tt2
+11 0 Open-ILS/src/templates/opac/parts/searchbar.tt2
+
+commit 73b4d7d88539a3c741495682b763f4d9f142ccbc
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 11:20:13 2013 -0400
+
+ Changes to CSS to make the table in shelf browse to display in a block for mobile tpac.
+
+ Signed-off-by: Garry Collum <gcollum at gmail.com>
+
+ Conflicts:
+ Open-ILS/src/templates/opac/css/style.css.tt2
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+7 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 4a946473b83b28ce78cfdd2e88a8ebe3c107ab5a
+Author: Ben Shum <bshum at biblio.org>
+Date: Wed Sep 18 16:46:07 2013 -0400
+
+ My account menu CSS tweaking
+
+ Remove duplicate acct_tabs entry now that we plan to hide entirely.
+
+ Remove unnecessary font resizing.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+4 9 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 694d31353870553bc8d89cf1a828436fe64ee88b
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 17:13:38 2013 -0400
+
+ Refactor searchbar into non-sentence form
+
+ A search bar that does not use a sentence is easier to translate and has
+ the additional advantage of breaking up into a simpler mobile display.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 9 Open-ILS/src/templates/opac/css/style.css.tt2
+12 12 Open-ILS/src/templates/opac/parts/searchbar.tt2
+0 1 Open-ILS/web/css/skin/default/opac/semiauto.css
+
+commit 30e6c139d88f5585ce89b484064ca6e486aa98b1
+Author: Garry Collum <gcollum at gmail.com>
+Date: Wed Sep 18 15:52:52 2013 -0400
+
+ Improve rdetail_status table display for copy info.
+
+ Signed-off-by: Garry Collum <gcollum at gmail.com>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+13 2 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 1db928e0faa39634fc9453206ab5a2dd9eeaf931
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Wed Sep 18 15:17:58 2013 -0400
+
+ Replace My account tabs with dropdown
+
+ The my account tabs were crowded on a small screen, so we switch it to a
+ dropdown navigation menu. Many thanks to Dan Pearl for his help!
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+12 2 Open-ILS/src/templates/opac/css/style.css.tt2
+13 1 Open-ILS/src/templates/opac/parts/myopac/base.tt2
+
+commit 29f55b22a9113a134dfcb5a3461eb74e4c96fc05
+Author: Bill Ott <bott at grpl.org>
+Date: Wed Sep 18 14:55:40 2013 -0400
+
+ Various mobile style and display changes.
+
+ Try to reduce the size of the search bar and search type option links.
+ Remove completely from login page (problem or make user rely on back button?)
+ Introduce mobile_hide class for cheap/easy method to alter pieces for mobile.
+
+ Signed-off-by: Bill Ott <bott at grpl.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/advanced.tt2
+5 4 Open-ILS/src/templates/opac/browse.tt2
+18 7 Open-ILS/src/templates/opac/css/style.css.tt2
+3 1 Open-ILS/src/templates/opac/login.tt2
+1 1 Open-ILS/src/templates/opac/parts/searchbar.tt2
+
+commit 5d4c42799d1e1884d119bd506eb1d552ac6a2f5e
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 14:19:49 2013 -0400
+
+ Electronic resources must be cleanly displayed
+
+ In MOPAC view, electronic resource URIs were overlapping the rdetail
+ actions. Clear 'em out.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+6 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit d1689d088e62192a6a1210f96923b4bbc6a06c2d
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 13:55:40 2013 -0400
+
+ Improve rdetail action formatting when no cover art
+
+ When there is no cover art, the format label gets the actions hung oddly
+ to the right in the record detail view. Just wrap the whole block in a
+ div and float that instead.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 5 Open-ILS/src/templates/opac/css/style.css.tt2
+40 38 Open-ILS/src/templates/opac/parts/record/summary.tt2
+
+commit 19fa3682679c04f2fe645cf584b5a7fbe503c0be
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 13:36:15 2013 -0400
+
+ Set explicit width for result metadata in main view
+
+ We were getting ragged edges for search results with titles longer than
+ the "# of # available copies..." statement and the placement of the
+ place hold action buttons, so set an explicit width, and then deset that
+ in mobile mode.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+4 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 7adb8c4c13429c5ab64ba77f7e926ede6bbc8e8b
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 13:13:41 2013 -0400
+
+ Minor fix for non-existent pubdates in search results
+
+ If you do not have a pubdate, it is better etter to have nothing follow
+ the format label than "()".
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+8 4 Open-ILS/src/templates/opac/parts/result/table.tt2
+
+commit d6c5604bd2213fa87bb15da765d534e8461bdf95
+Author: Bill Ott <bott at grpl.org>
+Date: Wed Sep 18 11:26:42 2013 -0400
+
+ Allow the advanced search rows to wrap on smaller displays.
+ Signed-off-by: Bill Ott <bott at grpl.org>
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/parts/advanced/global_row.tt2
+
+commit 33e2d1841dc47baa483b0a28303a549a4f0520f6
+Author: Bill Ott <bott at grpl.org>
+Date: Wed Sep 18 11:12:20 2013 -0400
+
+ Clean-up of expert and numeric forms.
+
+ Again, toward the mobilization of advanced searches. Allow the forms to resize happily.
+
+ Signed-off-by: Bill Ott <bott at grpl.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+2 0 Open-ILS/src/templates/opac/css/style.css.tt2
+10 6 Open-ILS/src/templates/opac/parts/advanced/expert.tt2
+8 16 Open-ILS/src/templates/opac/parts/advanced/numeric.tt2
+
+commit a0a0d9a0c4eec6d608c041bfb5797f1eff6d6146
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 10:57:52 2013 -0400
+
+ Make record actions available in mobile record details
+
+ Use the format label approach and push the actions beside the cover art
+ (if any) so that users can do actions like place hold in a mobile UI.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+15 16 Open-ILS/src/templates/opac/css/style.css.tt2
+20 21 Open-ILS/src/templates/opac/parts/record/summary.tt2
+
+commit 4c4b103b36245acd2be41aed0baa7ec8ce83b457
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 10:14:25 2013 -0400
+
+ Result actions use width when available
+
+ Float the actions to the right side when enough width is available,
+ otherwise push them under the result metadata in width-constrained
+ viewports.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 0 Open-ILS/src/templates/opac/css/style.css.tt2
+2 1 Open-ILS/src/templates/opac/parts/result/table.tt2
+
+commit c4812509a9d0aa0e797535257ab8e27d907eca06
+Author: Garry Collum <gcollum at gmail.com>
+Date: Tue Sep 17 15:14:00 2013 -0400
+
+ Tpac links for search the catalog, advanced search, and browse the catalog have inconsistent styles.
+
+ Added labels and classes to the said links for greater configurability.
+
+ Signed-off-by: Garry Collum <gcollum at gmail.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+2 2 Open-ILS/src/templates/opac/advanced.tt2
+2 2 Open-ILS/src/templates/opac/browse.tt2
+8 0 Open-ILS/src/templates/opac/css/style.css.tt2
+2 2 Open-ILS/src/templates/opac/parts/searchbar.tt2
+
+commit 817d269e129b1e0a0d32b9cdafb5473bac97d031
+Author: Bill Ott <bott at grpl.org>
+Date: Wed Sep 18 07:31:58 2013 -0400
+
+ De-table the advanced search to allow for mobile resizing.
+
+ A first stab at allowing the advanced search page to resize for mobile use.
+ Much of the style included was borrowed from Jason Boyer. Critical changes
+ occur in the adv_search_xxx type id's in the non-mobile style.
+
+ to-do: See if there's any hope for the search rows. Not sure what can be
+ done to make them fit any better.
+
+ Signed-off-by: Bill Ott <bott at grpl.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+ Conflicts:
+ Open-ILS/src/templates/opac/css/style.css.tt2
+ Open-ILS/src/templates/opac/parts/advanced/search.tt2
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+38 3 Open-ILS/src/templates/opac/css/style.css.tt2
+35 28 Open-ILS/src/templates/opac/parts/advanced/search.tt2
+
+commit c6e95b7c2ce5810e15a48192750e87282e3028c6
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 09:35:47 2013 -0400
+
+ Move search result "actions" below result metadata
+
+ Rather than the tabular layout, add the place hold / add to my list
+ actions underneath the record metadata for each result. This results in
+ a narrower required width and enables us to actually display the actions
+ in mobile mode.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+7 26 Open-ILS/src/templates/opac/css/style.css.tt2
+2 3 Open-ILS/src/templates/opac/parts/result/table.tt2
+
+commit 8068d338916e5fe33c02150667351bff4958ec96
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Sep 18 09:09:20 2013 -0400
+
+ Just use a format label in results + pubdate
+
+ Rather than having the format icon, which requires either hovering (not
+ generally available in mobile) or guessing what the strange symbol
+ means, just use the plain text format label.
+
+ In addition, move the brief pubdate from beside the author name to
+ beside the format label. This avoids confusion if the author name
+ already has birth or death dates beside it, like "Scott, Dan 1972-
+ 2006". He's not dead yet!
+
+ As a bonus, this enables us to remove one table cell from the search
+ results.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+16 21 Open-ILS/src/templates/opac/parts/result/table.tt2
+
+commit 4903341c669fa968d27d42031a3c988b35513ca0
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 17 15:16:49 2013 -0400
+
+ Facets after results, then DOMinate them into place
+
+ We can use a media query in JavaScript to detect a given width and then
+ drop the facets into their left-hand column if needed; if the browser
+ window resizes, then potentially put the facets back on the bottom.
+
+ Also add a rudimentary "Refine these results" link at the top of the
+ page that is only visible when the facets are at the bottom to
+ facilitate navigation.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+21 4 Open-ILS/src/templates/opac/css/style.css.tt2
+25 6 Open-ILS/src/templates/opac/parts/result/table.tt2
+
+commit e9de4a0583a72f50d9c5deeb019f94a5290c6fcf
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 17 18:36:04 2013 -0400
+
+ Remove extra div layer around password hint include
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/parts/login/form.tt2
+2 2 Open-ILS/src/templates/opac/parts/login/password_hint.tt2
+
+commit 7491d0168983c7abcd5448cfd9541dbcc3453874
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 17 17:44:50 2013 -0400
+
+ More tweaks to the form page
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/css/style.css.tt2
+1 1 Open-ILS/src/templates/opac/parts/login/form.tt2
+
+commit 05239d02340f06fe0dd64276dbd80ea715fa9de7
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 17 14:43:59 2013 -0400
+
+ Change form.tt2 from table to div
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+32 43 Open-ILS/src/templates/opac/parts/login/form.tt2
+
+commit f0dba97f96cbdb5cbd069427eaf53181790ef999
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 17 13:53:08 2013 -0400
+
+ Add meta viewport tag
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/parts/base.tt2
+
+commit c001b1d8bcb8ad142e2742859aeae99b6581169b
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Sep 17 13:43:21 2013 -0400
+
+ Add initial Indiana CSS changes
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+242 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit c722724ded1e30bd72c905652e04caf802d87e06
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Sep 24 11:08:53 2013 -0400
+
+ TPAC: Revert colspan/rowspan advanced search config option
+
+ We're no longer going to be using a table layout, so colspan and rowspan
+ will not be useful going forward.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 3 Open-ILS/src/templates/opac/parts/advanced/search.tt2
+0 1 Open-ILS/src/templates/opac/parts/config.tt2
+
+commit 188537250069e7dd8c9624f674e03eadfd6d8db7
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Fri Aug 16 09:06:44 2013 -0400
+
+ LP 1212456 Release Notes
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+40 0 docs/RELEASE_NOTES_NEXT/Client/customize-items-out.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Client/customize-items-out.txt
+
+commit 5ef27d774bd41a2357c303c75015cfc4815b4609
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Sep 23 17:48:03 2013 -0400
+
+ Stamping 'Items Out' config settings
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+66 0 Open-ILS/src/sql/Pg/upgrade/0834.data.yaous-items-out-by-stop-fines.sql
+0 66 Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous-items-out-by-stop-fines.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0834.data.yaous-items-out-by-stop-fines.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous-items-out-by-stop-fines.sql
+
+commit a0ee19f899f038594fea496c2032b9fbeaffa63d
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Aug 14 14:00:59 2013 -0400
+
+ LP 1212456 customize items out display
+
+ Control when lost, longoverdue, and claimsreturn'ed items display in the
+ top vs bottom list in the items out interface. Also, control when such
+ circs should be hidden when checked in, regardless of whether the
+ transaction is still open (from fines, etc.).
+
+ ui.circ.items_out.lost
+ ui.circ.items_out.longoverdue
+ ui.circ.items_out.claimsreturned
+
+ The values for the settings are bit flags.
+
+ 1 = show in top list
+ 2 = show in bottom list
+ 4 = hide when checked in
+
+ The magic numbers for admins to enter are:
+
+ 1 = top list, then bottom list (if xact is open)
+ 2 = bottom list, then bottom list (if xact is open)
+ 5 = top list, hide when checked in
+ 6 = bottom list, hide when checked in
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+ Conflicts:
+
+ Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+63 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+66 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous-items-out-by-stop-fines.sql
+1 1 Open-ILS/web/opac/locale/en-US/lang.dtd
+100 19 Open-ILS/xul/staff_client/server/patron/items.js
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.yaous-items-out-by-stop-fines.sql
+
+commit 6eb667c865fe1c9557771a8975a749294b259092
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Thu Aug 29 11:00:42 2013 +0300
+
+ Add missing dojo nls files for FlattenerGrid and PCrudFilterPane to the i18n toolchain.
+ Add the missing POT files to git so "make newpo" will work.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+10 0 build/i18n/Makefile
+28 0 build/i18n/po/FlattenerGrid.js/FlattenerGrid.js.pot
+117 0 build/i18n/po/PCrudFilterPane.js/PCrudFilterPane.js.pot
+ create mode 100644 build/i18n/po/FlattenerGrid.js/FlattenerGrid.js.pot
+ create mode 100644 build/i18n/po/PCrudFilterPane.js/PCrudFilterPane.js.pot
+
+commit 1b1a28a710c9fab86fc11f4b6477f9e54cf469df
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Sep 3 18:13:48 2013 +0300
+
+ New advanced search filter size/layout options
+
+ Allow setting the heights of the advanced search select boxes in
+ config.tt2. Also provide colspan and rowspan for adjusting the layout
+ of the filter boxes.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 3 Open-ILS/src/templates/opac/parts/advanced/search.tt2
+1 0 Open-ILS/src/templates/opac/parts/coded_value_selector.tt2
+7 0 Open-ILS/src/templates/opac/parts/config.tt2
+1 0 Open-ILS/src/templates/opac/parts/filter_group_selector.tt2
+
+commit ada002e0a67402431c59b0a3d0569710d8f83b70
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Sep 23 11:12:34 2013 -0400
+
+ Stamping 0833 : self-reg timeout
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+26 0 Open-ILS/src/sql/Pg/upgrade/0833.data.self-reg-timeout.sql
+0 24 Open-ILS/src/sql/Pg/upgrade/XXXX.data.self-reg-timeout.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0833.data.self-reg-timeout.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.self-reg-timeout.sql
+
+commit 1276203d893bd02a530ac75b8a47bed48d24ae27
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Sep 11 14:19:07 2013 -0400
+
+ LP#1218597 pending patron row-date IDL label change
+
+ Change "Row Date" to "Create Date" as the row_date label in the IDL.
+ This is more consistent with other like fields viewed in the staff
+ client.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+
+1 1 Open-ILS/examples/fm_IDL.xml
+
+commit b720d32e0e7b7667c7c22dc805e1d9cb23919c76
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Fri Sep 6 16:17:08 2013 -0400
+
+ LP#1218597 Load pending patron via double-click
+
+ Double-click on a row in the pending patrons list in the staff client
+ loads the pending patron into the patron registration UI in a new tab,
+ same as clicking the existing Load button.
+
+ phasefx++ for implementation suggestions.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+
+4 1 Open-ILS/xul/staff_client/server/patron/staged.js
+
+commit 2b134c9ecd6bf53fae4a41f4e7079be3b5defb1b
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Aug 28 15:51:15 2013 -0400
+
+ LP#1218597 TPAC honors opac.username_regex setting
+
+ If a value for requested username is entered and the org unit setting
+ "opac.username_regex" has a value, the regex will be enforced just like
+ the other .regex org unit settings in use in self-reg.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+
+5 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Register.pm
+
+commit f579796ba830f516deefb7fcfb79740abdcce837
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Aug 28 13:41:21 2013 -0400
+
+ LP#1218597 tpac self-reg refresh page for privacy
+
+ Adding a new org unit setting "opac.self_register.timeout" /
+ "Patron Self-Reg. Display Timeout" for determning how long the self-reg
+ page will remain open before reloading to the home page. The goal is to
+ protect the privacy of those who enter values but fail to submit the
+ form.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+ Conflicts:
+
+ Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+
+4 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Register.pm
+21 2 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+24 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.self-reg-timeout.sql
+4 0 Open-ILS/src/templates/opac/register.tt2
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.self-reg-timeout.sql
+
+commit a70787e38083db57b3ff80922fb1c56ebbf617f3
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Aug 28 13:27:52 2013 -0400
+
+ LP#1218597 TPAC self-reg DoB date format example message
+
+ Provide an example DoB date format message. Since the message may need
+ translating, it is provided as a template string and not an org unit
+ setting. Note, however, that the Dojo widget inside the patron
+ registration UI, where self-reg data ultimately goes, requires
+ incoming/default date values to be in ISO8601 format. It will not
+ accept locale-shaped dates.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+
+7 0 Open-ILS/src/templates/opac/register.tt2
+
+commit 243dca2a38ff9b6358f5dbd240c61dc14d0b5e4c
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Sep 23 10:51:03 2013 -0400
+
+ Repair Vandelay async startup data retrieval
+
+ Increment the number of items retrieved at startup to ensure the UI
+ waits for all async requests to return before continuing with page
+ rendering.
+
+ The counter should have been updated with this commit, which adds bucket
+ retrieval to the startup sequence.
+
+ 59cc4b9524bfcf9a56f54c5ed5a3d56a7d1b86e6
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/web/js/ui/default/vandelay/vandelay.js
+
+commit 96f23b77b3ebbcef9a2c52f23abb9ced1e0b1d88
+Author: Chris Sharp <csharp at georgialibraries.org>
+Date: Tue Sep 17 13:55:29 2013 -0400
+
+ Fix typo in Makefile.ubuntu-precise.
+
+ Makefile.ubuntu precise was lacking a "install_postgres_server"
+ target. This updates that file.
+
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/extras/install/Makefile.ubuntu-precise
+
+commit 0165ac323f6257c3bd77eb1a7b3a36930d39c2de
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Tue Sep 17 14:53:47 2013 -0400
+
+ Number upgrade script for serial alert notes
+
+ (and fix trivial omission in XUL from that same work)
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+14 0 Open-ILS/src/sql/Pg/upgrade/0832.schema.serial_note_alerts.sql
+0 14 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial_note_alerts.sql
+1 0 Open-ILS/xul/staff_client/server/serial/serctrl_main.xul
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0832.schema.serial_note_alerts.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial_note_alerts.sql
+
+commit 7b104fe93b79e57e3f49bfd36ec4926792947a47
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Tue Sep 17 08:20:17 2013 -0400
+
+ Release notes for Serial alert notes
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+9 0 docs/RELEASE_NOTES_NEXT/Serials/serial-alert-notes.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Serials/serial-alert-notes.txt
+
+commit 471bb8b53bb46da3978ff1390fba547ba4c8e8ca
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Tue Sep 10 18:33:23 2013 -0400
+
+ Serials: alert notes when receiving
+
+ This commit adds the ability to flag serial notes as receive-time
+ alerts, and also adds the interface widgets necessary to check for
+ and see these alerts in the serial control receiving interface.
+
+ notes.xul was modified extensively to allow for an arbitrary pile of
+ notes to be displayed, rather than just displaying the notes for a
+ single object (which it still can do).
+
+ As it stands, the notes are compiled locally from already retrieved
+ objects, but it would also be reasonable to add a middle-layer
+ function to do roughly the same thing. Depending on how this is done
+ it could require a fair amount of logic duplication, so it might be
+ better done as part of a larger interface/back-end combined
+ refactoring.
+
+ This commit also tidies up a few other minor things in
+ manage_items.js, including adding automatic refresh when notes are
+ added/edited/deleted, and also removing a duplicate function.
+
+ Alerting the notes in the batch-receive interface is still TODO, but
+ should be fairly simple to add once this commit is in place.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+3 0 Open-ILS/examples/fm_IDL.xml
+3 0 Open-ILS/src/sql/Pg/210.schema.serials.sql
+14 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial_note_alerts.sql
+2 0 Open-ILS/xul/staff_client/server/locale/en-US/serial.properties
+177 26 Open-ILS/xul/staff_client/server/serial/manage_items.js
+4 1 Open-ILS/xul/staff_client/server/serial/manage_items.xul
+94 21 Open-ILS/xul/staff_client/server/serial/notes.xul
+- - Open-ILS/xul/staff_client/server/skin/media/images/bell.png
+- - Open-ILS/xul/staff_client/server/skin/media/images/bell_disabled.png
+3 0 Open-ILS/xul/staff_client/server/skin/media/images/licenses.txt
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.serial_note_alerts.sql
+ create mode 100644 Open-ILS/xul/staff_client/server/skin/media/images/bell.png
+ create mode 100644 Open-ILS/xul/staff_client/server/skin/media/images/bell_disabled.png
+ create mode 100644 Open-ILS/xul/staff_client/server/skin/media/images/licenses.txt
+
+commit ab37336715cb7d84ed0c30b1cd2e9e6b85933774
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Fri Aug 30 11:22:27 2013 -0400
+
+ Have TPAC put user input at the end in all cases
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+16 15 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+
+commit 8b23255595364dcce3fb0b9dbef64f10959ad234
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Mon Sep 16 16:50:53 2013 -0400
+
+ Move list delete check from onclick to onsubmit
+
+ Cause Brendan Eich says it's better :)
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+2 4 Open-ILS/src/templates/opac/myopac/lists.tt2
+
+commit 8c04afc9314039b3ec78082d25e18f6155ff28ff
+Author: Kyle Tomita <ktomita at catalystitservices.com>
+Date: Fri May 24 11:52:49 2013 -0700
+
+ LP1164674 - OPAC - Too easy to delete a list
+
+ Added an onClick action to prompt for confirmation before
+ deleting a list.
+
+ Signed-off-by: Kyle Tomita <ktomita at catalystitservices.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+3 1 Open-ILS/src/templates/opac/myopac/lists.tt2
+
+commit 2943a99cacc7662d0a195bfe0aad2a0bb7228e5e
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Wed Sep 11 11:46:07 2013 +0300
+
+ Browse catalog shortcut links should clear the search query
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/templates/opac/browse.tt2
+
+commit a457813d632916c0d79ec38ffe4ddf2662f91002
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Sep 6 16:36:47 2013 -0400
+
+ 'Opportunistic' Acq In-process Copy Overlay
+
+ It is both normal and common to overlay brief acquisitions bib
+ records with more complete records, and it is simple to create
+ copies as part of the overlay process, but there is no *simple* way
+ to have the imported copies overlay the acq copies.
+
+ This code builds off the existing copy overlay code (which matches
+ and overlays using specified IDs), but uses broader matching criteria.
+ By selecting the new option, "Auto Overlay In-process Acquisitions
+ Copies", the system will potentially overlay copies which:
+ * have associated lineitem details (that is, they were created
+ by the acquisitions process), and
+ * that lineitem detail has the same owning_lib as the incoming
+ copy's owning_lib
+ * the current copy associated with that lineitem detail is "In
+ process"
+
+ Also, fix two small bugs, one which prevented overlay using the
+ 'Available' status (change 'if $val' to 'if defined $val', since
+ 'Available' is '0'), and another which prevented item overlay when
+ selecting the match record manually (as_imported was null in the DB).
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+38 3 Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm
+7 0 Open-ILS/src/templates/vandelay/inc/queue.tt2
+7 0 Open-ILS/src/templates/vandelay/inc/upload.tt2
+8 0 Open-ILS/web/js/ui/default/vandelay/vandelay.js
+
+commit 823c90a959026b2e5f1ba4b4593305547ab8321c
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Mon Sep 16 12:47:46 2013 -0400
+
+ Stamping long overdue penalty upgrade script
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+550 0 Open-ILS/src/sql/Pg/upgrade/0831.schema.long-overdue-penalty.sql
+0 550 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.long-overdue-penalty.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0831.schema.long-overdue-penalty.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.long-overdue-penalty.sql
+
+commit d031ed107483e22acb18592ab46299dabcb5ce08
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Thu Aug 8 16:47:28 2013 -0400
+
+ LP1210291 Long Overdue Standing Penalty
+
+ Adds a new PATRON_EXCEEDS_LONGOVERDUE_COUNT patron standing penalty.
+ It behaves the same as the PATRON_EXCEEDS_LOST_COUNT penalty for
+ long-overdue circulations.
+
+ Release notes included.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+ Conflicts [resolved, normal seed data order stuff]:
+ Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+68 1 Open-ILS/src/sql/Pg/100.circ_matrix.sql
+15 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+550 0 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.long-overdue-penalty.sql
+10 0 docs/RELEASE_NOTES_NEXT/Circulation/long-overdue-penalty.txt
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.long-overdue-penalty.sql
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/long-overdue-penalty.txt
+
+commit f24a756e107ca19ac9cce053a5bb2afa8984b497
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Thu Aug 8 10:41:39 2013 +0300
+
+ Add Finnish bib tooltips to marc editor.
+ Original translations from The Finnish National Library (http://www.kansalliskirjasto.fi/extra/marc21/)
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+2 2 Open-ILS/xul/staff_client/server/cat/marcedit.js
+9908 0 Open-ILS/xul/staff_client/server/locale/fi-FI/marcedit-tooltips.xml
+ create mode 100644 Open-ILS/xul/staff_client/server/locale/fi-FI/marcedit-tooltips.xml
+
+commit fc831adcb200d4b6a20c0b2b71ea7fd3c6ce1dca
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Sep 13 12:59:59 2013 -0400
+
+ Tweaks to 'my lists' paging code
+
+ 1) Don't set and refetch the 'my lists' settings if nothing changed.
+ (minor nit)
+
+ 2) Get the count through the same code where we get the bookbag data.
+
+ For #2, I am concerned with the current duplication of logic. At best
+ we are doing things twice, and at worst we end up counting a set which
+ is slightly different than our actual bookbag search results.
+
+ In the updated code, I think the count accuracy is subject to
+ search/superpage limit settings, so lists are effectively limited by
+ the search settings. If that is a valid concern, we can beef up the
+ settings for this query.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+27 65 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+
+commit 4b472cb269ddd85fc395a3e0d62583a9c1da9401
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Aug 20 09:33:49 2013 -0400
+
+ LP#1206649 un-cancel received lineitems / copies
+
+ Clear the cancel reason when a canceled lineitem is marked as received.
+ With items, clear the cancel reason and re-generate fund debits if they
+ were removed during cancelation (because the keep_debits flag in the
+ cancel reason was set to false).
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+15 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+
+commit 081880142353b99a4e90d7fbb9e9407dabffb9a8
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Aug 14 09:44:45 2013 -0400
+
+ Billing UI style lost and longoverdue circulations
+
+ When a LOST or LONGOVERDUE circulation, which has not yet been returned,
+ appears in the patron's list of billed transactions, style them
+ differently from other not-yet-returned items.
+
+ Similar to regular not-yet-returned items, display a helpful message to
+ staff indicating what colors map to what types of circulations.
+
+ The default colors are maroon for LOST and organge for LONGOVERDUE.
+
+ To change the colors, a change to circ.css (for the style) and lang.dtd
+ (for the hint) are required.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+2 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+18 3 Open-ILS/xul/staff_client/server/patron/bill2.js
+8 1 Open-ILS/xul/staff_client/server/patron/bill2.xul
+31 0 Open-ILS/xul/staff_client/server/skin/circ.css
+
+commit 1e248d8d849a050f205a39e8f1e2bbef5db5beba
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Thu Aug 22 17:19:52 2013 -0400
+
+ Inter-authority linking script
+
+ Modeled after authority_control_fields.pl.in, but different. The script
+ has POD which you can consult for more information.
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+5 0 Open-ILS/src/Makefile.am
+295 0 Open-ILS/src/support-scripts/authority_authority_linker.pl.in
+ create mode 100755 Open-ILS/src/support-scripts/authority_authority_linker.pl.in
+
+commit 1ade5922c3b35c69621c083337808e5e9a8c20d2
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Sep 13 16:35:31 2013 -0400
+
+ Stamping upgrade for 'my list' lists-per-page
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+28 0 Open-ILS/src/sql/Pg/upgrade/0830.data.my_list_lists_per_page_setting.sql
+0 29 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_lists_per_page_for_my_list.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0830.data.my_list_lists_per_page_setting.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_lists_per_page_for_my_list.sql
+
+commit 09cf487b30cc458a2975e0c6b7d3a13addbcc65e
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Sep 13 16:30:55 2013 -0400
+
+ Trivial changes to configurable bookbag paging
+
+ 1) use class for highlight styling of current page
+ 2) correct minor logic error ('<=' should be '<')
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+4 4 Open-ILS/src/templates/opac/myopac/lists.tt2
+
+commit eb647e5354db7d76f7fec3c75b0493913fc93466
+Author: Kyle Tomita <ktomita at catalystitservices.com>
+Date: Wed Apr 3 17:07:51 2013 -0700
+
+ LP1164197 - Add page number navigation to my lists and setting for number of lists per page
+
+ Added a user setting for the number of lists per page.
+ Added code for page number navigation.
+
+ Signed-off-by: Kyle Tomita <ktomita at catalystitservices.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+18 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+19 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+29 0 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_lists_per_page_for_my_list.sql
+33 2 Open-ILS/src/templates/opac/myopac/lists.tt2
+20 0 Open-ILS/src/templates/opac/myopac/prefs_my_lists.tt2
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_lists_per_page_for_my_list.sql
+
+commit 33584305c66c9343e64246174cb2b38b53b6db5d
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Sep 13 12:41:11 2013 -0400
+
+ Trivial changes to 'my list' paging code
+
+ 1) Remove unneeded comment
+ 2) un-CamelCase variables
+ 3) Add 'my list' paginator selection to stylesheet
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+7 11 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+1 0 Open-ILS/src/templates/opac/css/style.css.tt2
+25 25 Open-ILS/src/templates/opac/myopac/lists.tt2
+
+commit 1e2e429cd084ac32fab4dd1e4c05ba2ec12b12f4
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Sep 13 14:34:11 2013 -0400
+
+ Stamping upgrade for 'my list' items per page
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+28 0 Open-ILS/src/sql/Pg/upgrade/0829.data.my_list_items_per_page_setting.sql
+0 28 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_items_per_page_of_a_my_list.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0829.data.my_list_items_per_page_setting.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_items_per_page_of_a_my_list.sql
+
+commit 17af956614f25c7cdb9b7ad03444bf6fa61248a9
+Author: Kyle Tomita <ktomita at catalystitservices.com>
+Date: Wed Apr 3 14:37:41 2013 -0700
+
+ LP1160596 - Add pagination for items in My Lists
+
+ Added pagination with page numbers when viewing the items in
+ a list. Also made the number of list items per page a user
+ setting, per the suggestions of Pasi Kallinen and Jason
+ Stephenson.
+
+ The setting is located in, Account Preferences -> My Lists Preferences
+
+ Update: Added i18n part to allow for translation. Removed hard-coded
+ bre.source.
+
+ Signed-off-by: Kyle Tomita <ktomita at catalystitservices.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+120 5 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+19 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+28 0 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_items_per_page_of_a_my_list.sql
+56 1 Open-ILS/src/templates/opac/myopac/lists.tt2
+45 0 Open-ILS/src/templates/opac/myopac/prefs_my_lists.tt2
+23 1 Open-ILS/src/templates/opac/parts/myopac/prefs_base.tt2
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_items_per_page_of_a_my_list.sql
+ create mode 100644 Open-ILS/src/templates/opac/myopac/prefs_my_lists.tt2
+
+commit 33206c48b22e811eda7e4902d9e593b5343260a0
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Fri Aug 30 16:49:58 2013 -0400
+
+ LP#856688 OUS to disable org unit as hold pickup lib
+
+ YAOUS that removes an org unit from consideration as a hold pickup
+ library. This setting only affects the OPAC display and does not
+ otherwise affect the display of the org unit in the OPAC. (In other
+ words, it's not the same thing as actor.org_unit.opac_visible). It also
+ has no affect on hold targeting / capturing.
+
+ [LFW: Numbered upgrade script.]
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+19 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+22 0 Open-ILS/src/sql/Pg/upgrade/0828.data.org-not-pickup.sql
+2 1 Open-ILS/src/templates/opac/myopac/holds/edit.tt2
+5 0 Open-ILS/src/templates/opac/parts/org_selector.tt2
+3 1 Open-ILS/src/templates/opac/parts/place_hold.tt2
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0828.data.org-not-pickup.sql
+
+commit 777798d9e99977c35604e99f14f20217276af32a
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Jun 11 09:57:19 2013 +0300
+
+ Allow translation of acq.cancel_reason texts.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+2 2 Open-ILS/examples/fm_IDL.xml
+26 15 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit 75817fabba07f84ca7f12f282b328f02a1f7be10
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Thu Sep 12 13:58:14 2013 -0400
+
+ Stamping upgrade script for repeatable events
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+8 0 Open-ILS/src/sql/Pg/upgrade/0827.schema.action_trigger.event_definition.repeat_delay.sql
+0 8 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action_trigger.event_definition.repeat_delay.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0827.schema.action_trigger.event_definition.repeat_delay.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action_trigger.event_definition.repeat_delay.sql
+
+commit 085fb6c9d84d3d114e004d860f75cf08f32a3e5d
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Thu Sep 5 16:48:38 2013 -0400
+
+ Release notes for Action Trigger Event Repeatability
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+12 0 docs/RELEASE_NOTES_NEXT/Administration/trigger_event_repeatability.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/trigger_event_repeatability.txt
+
+commit 86db7176873b007313f25879779a7ff853e51298
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Mon Aug 5 09:57:04 2013 -0400
+
+ Allow action trigger events to be repeated
+
+ Currently, there is no way to repeat an event (action/trigger) when a
+ real-world event occurs more than once for the same target. This only
+ matters for targets that are persistent (such as a library card)
+ combined with events that can reoccur (such as expiration, if the
+ expiration can be removed). To address this, we add a new field to the
+ action_trigger.event_definition table that sets the amount of time
+ after which the event is allowed to repeat.
+
+ This commit adds the new field to the IDL, database schema and template
+ files and also provides the simple db upgrade script. It is worth noting
+ that we chose to base the repeatability on the start_time of the previous
+ event, which is more predictable than complete_time (which could be null
+ if the event fails).
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 0 Open-ILS/examples/fm_IDL.xml
+5 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger.pm
+1 0 Open-ILS/src/sql/Pg/400.schema.action_trigger.sql
+8 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action_trigger.event_definition.repeat_delay.sql
+1 1 Open-ILS/src/templates/conify/global/action_trigger/event_definition.tt2
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action_trigger.event_definition.repeat_delay.sql
+
+commit 5d546cc4f21c9ea9431f4530af28fa5e6ad631c6
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Thu Sep 12 13:48:47 2013 -0400
+
+ Stamping P.V. SUPA upgrade scripts
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+17 0 Open-ILS/src/sql/Pg/upgrade/0826.data.server_addon_perms.sql
+0 17 Open-ILS/src/sql/Pg/upgrade/XXXX.data.server_addon_perms.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0826.data.server_addon_perms.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.server_addon_perms.sql
+
+commit c31c7ab58ab6b99dc451b54301200c0fb58e1b92
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Tue Dec 11 20:02:38 2012 -0500
+
+ P.V. SUPA GoodStuff integration
+
+ This impliments a "Server Add-ons" module for integrating P.V. Supa's RFID
+ product known as GoodStuff with the Evergreen staff client.
+
+ To activate it, you should add the identifier "pv_supa_goodstuff" (without the
+ quotes) to the list managed by the Admin->Workstation Administration->Server
+ Add-ons menu action within the staff client. You will need the
+ ADMIN_SERVER_ADDON_FOR_WORKSTATION permission to do this.
+
+ After doing this and clicking the Update Active Add-Ons button, the interface
+ will refresh and show a GoodStuff tab in the Add-on Preferences section. Within
+ this tab you will have the option of specifying the hostname and port for the
+ GoodStuff hardware. There is also an "Enabled" setting that needs to be checked.
+
+ Currently three interfaces have been integrated:
+ * Circulation -> Check In Items
+ * Circulation -> Check Out Items (where you scan the patron barcode)
+ * Circulation -> Check Out Items (where you scan the item barcodes)
+
+ Each interface gets an RFID checkbox if the "Enabled" preference has been set,
+ that can activate/deactivate the functionality on a per interface basis. The
+ checkbox states persist (i.e. are sticky).
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+802 0 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff.js
+46 0 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff_config_overlay.xul
+52 0 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff_tests/pv_supa_goodstuff_test1.expect
+144 0 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff_tests/pv_supa_goodstuff_test2.expect
+109 0 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff_tests/pv_supa_goodstuff_test3.expect
+23 0 Open-ILS/xul/staff_client/server/locale/en-US/addon/pv_supa_goodstuff.properties
+1 0 Open-ILS/xul/staff_client/server/skin/addon/pv_supa_goodstuff.css
+26 0 docs/RELEASE_NOTES_NEXT/pv_supa_goodstuff.txt
+ create mode 100644 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff.js
+ create mode 100644 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff_config_overlay.xul
+ create mode 100755 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff_tests/pv_supa_goodstuff_test1.expect
+ create mode 100755 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff_tests/pv_supa_goodstuff_test2.expect
+ create mode 100755 Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff_tests/pv_supa_goodstuff_test3.expect
+ create mode 100644 Open-ILS/xul/staff_client/server/locale/en-US/addon/pv_supa_goodstuff.properties
+ create mode 100644 Open-ILS/xul/staff_client/server/skin/addon/pv_supa_goodstuff.css
+ create mode 100644 docs/RELEASE_NOTES_NEXT/pv_supa_goodstuff.txt
+
+commit 8095a2efaa6ce9c264c531a46dc3983012686457
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Fri Dec 21 00:19:37 2012 -0500
+
+ JSAN module autoloader for "add-ons"
+
+ This adds a "Server Add-ons" menu entry under Admin -> Workstation
+ Administration in the staff client. Choosing this allows you to edit or set a
+ list of identifiers that correspond to JSAN-style modules found in
+ /server/addons/, and is meant mainly for activating 3rd party modules within the
+ staff client on a per-workstation basis. You need the
+ ADMIN_SERVER_ADDON_FOR_WORKSTATION permission to use it.
+
+ Configuration options for activated add-ons may also show up in this interface.
+
+ More technical details:
+
+ This Server Add-ons list is stored as a JSON array in the Mozilla preference
+ 'oils.addon.autoload.list'.
+
+ We also add an addon.autoloader module that gets called in most XUL interfaces
+ via the util_overlay file. This autoloader will loop through the modules
+ specified in 'oils.addon.autoload.list' and instantiate each, storing a
+ reference to each of the newly created objects in a data structure in
+ window.oils_autoloaded.
+
+ So, as an example, let's say there is a module: /xul/server/addon/uber_scan.js
+ And we have the identifier 'uber_scan' in our Server Add-ons list. Then, on
+ every page load of a XUL interface using the stock util overlay, we will
+ effectively call:
+
+ new addon.uber_scan();
+
+ Causing the code in the module to execute. It is up to the module to determine
+ whether it needs to do anything within a given interface.
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+ Conflicts [permission numbering]:
+ Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+3 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+17 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.server_addon_perms.sql
+1 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+15 0 Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
+2 1 Open-ILS/xul/staff_client/chrome/content/main/constants.js
+10 0 Open-ILS/xul/staff_client/chrome/content/main/menu.js
+4 0 Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
+83 0 Open-ILS/xul/staff_client/server/addon/addons.js
+55 0 Open-ILS/xul/staff_client/server/addon/addons.xul
+78 0 Open-ILS/xul/staff_client/server/addon/autoloader.js
+6 0 Open-ILS/xul/staff_client/server/locale/en-US/addon/addons.properties
+12 0 docs/RELEASE_NOTES_NEXT/xul_server_addons.txt
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.server_addon_perms.sql
+ create mode 100644 Open-ILS/xul/staff_client/server/addon/addons.js
+ create mode 100644 Open-ILS/xul/staff_client/server/addon/addons.xul
+ create mode 100644 Open-ILS/xul/staff_client/server/addon/autoloader.js
+ create mode 100644 Open-ILS/xul/staff_client/server/locale/en-US/addon/addons.properties
+ create mode 100644 docs/RELEASE_NOTES_NEXT/xul_server_addons.txt
+
+commit 6de0fc1489856c74af2b0a5f55bb841aec74834d
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Mon Dec 10 06:30:33 2012 -0500
+
+ internal: JSAN socket library
+
+ Leverages Mozilla's nsISocketTransportService, nsIScriptableInputStream, and
+ nsIInputStreamPump XPCOM, and the NetUtils javascript module.
+
+ Usage example:
+
+ Install netcat on a server and as root do: nc -l -p 5000
+
+ Then, in the staff client, load Admin -> For Developers -> Javascript Shell
+
+ Enter:
+
+ JSAN.use('util.socket');
+ var s = new util.socket('server hostname or IP address here', 5000);
+ s.write('hello\n');
+
+ On the server, reply with world<enter>
+
+ Back in the javascript shell, use
+
+ s.read();
+
+ This is geared to help with implementing future functionality, but shouldn't
+ result in any end-user visible changes by itself.
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+157 0 Open-ILS/xul/staff_client/chrome/content/util/socket.js
+ create mode 100644 Open-ILS/xul/staff_client/chrome/content/util/socket.js
+
+commit 35bbeaea9a5dfc812c82c19061d96a9c514e2b7d
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Dec 20 17:17:24 2012 -0500
+
+ internal: an alternative to default_focus
+
+ Interfaces can now set event listeners on their window for 'tab_focus' instead
+ of defining a single default_focus function.
+
+ We also include a change to browser.js so that embedded interfaces also get
+ their default_focus function called (and a tab_focus event sent).
+
+ This is geared to help future functionality, but shouldn't produce any end-user
+ visible changes by itself.
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+8 0 Open-ILS/xul/staff_client/chrome/content/main/menu.js
+11 0 Open-ILS/xul/staff_client/chrome/content/util/browser.js
+
+commit 62e7f75f9e68f0ee01dba56c3c5c2f841b7f8ae8
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Dec 20 16:10:57 2012 -0500
+
+ internal: default_focus not called
+
+ Minor bug. Was being called in an else clause dependent on some help context
+ logic for new tabs, but should be called for every new tab. Shouldn't result
+ in any end-user visible change, but if interfaces wrapped in browser.js were
+ to have a default_focus function, then this could come into play.
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+2 1 Open-ILS/xul/staff_client/chrome/content/main/menu.js
+
+commit 07b1be03657ff1a447b5e3e0f12a138bd2546791
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Wed Dec 26 06:33:47 2012 -0500
+
+ internal: allow checkout ui to set statusbar
+
+ Minor bug fix and geared toward future functionality
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+2 1 Open-ILS/xul/staff_client/server/patron/display.js
+
+commit 2e447f31f3cd379b8323d646be7e10333153f498
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Sep 11 13:49:07 2013 -0400
+
+ LP#1084758 store staff client tpac (etc) zoom pref
+
+ Staff client pages loaded via browser.xul which have a name (via
+ internal XUL URL param) now have the ability to store and load a per-
+ page zoom value preference. This includes (at minimum) the embedded
+ TPAC.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+34 0 Open-ILS/xul/staff_client/chrome/content/util/browser.js
+3 3 Open-ILS/xul/staff_client/chrome/content/util/browser.xul
+
+commit 8f3ced2f524541486ca463c11146dab63547543b
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Tue May 8 10:56:08 2012 -0400
+
+ Add Zoom support to browser views
+
+ Currently tied to CTRL with +/-/0 like Firefox uses.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+10 0 Open-ILS/xul/staff_client/chrome/content/util/browser.xul
+10 0 Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
+
+commit dc7ec6cfb60d66150ad43d4157a63ea739667217
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Sep 3 16:15:21 2013 -0400
+
+ LP#1220387 silence deprecation warning in Normalizer
+
+ Avoid the following error:
+
+ UNIVERSAL->import is deprecated and will be removed in a future perl at
+ Open-ILS/src/perlmods/lib/OpenILS/Utils/Normalize.pm line 6
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+2 2 Open-ILS/src/perlmods/lib/OpenILS/Utils/Normalize.pm
+
+commit 46a7817d1339487bacf6f056be1a8507a7bca9bf
+Author: Ben Shum <bshum at biblio.org>
+Date: Fri Sep 6 23:20:16 2013 -0400
+
+ Stamping upgrade script for biblio A/T title variable fix
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+18 0 Open-ILS/src/sql/Pg/upgrade/0825.data.bre_format.sql
+0 18 Open-ILS/src/sql/Pg/upgrade/XXXX.data.bre_format.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0825.data.bre_format.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.bre_format.sql
+
+commit 160d864cff8c1018c694609721afd378963b7b0d
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Thu May 23 13:24:04 2013 -0700
+
+ LP1183553 (continued) - Fix applied filters
+
+ The filter dialog kept the previous filter around and then joined the
+ new one with it. This repairs that issue and applies the new filter
+ options on subsequent loading.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
+
+commit c06c26252f4d592bd7dc86437f68901981700635
+Author: Steven Chan <schan at sitka.bclibraries.ca>
+Date: Thu May 23 13:24:04 2013 -0700
+
+ LP1183553 - Default filter option for configuration screens
+
+ In the staff client, the AutoGrid widget is used to render configuration
+ lists, and by default, the setting 'showLoadFilter' is turned off. It
+ seems more useful to turn it on by default so that any configuration
+ screen can use it unless its template sets it off.
+
+ Signed-off-by: Steven Chan <schan at sitka.bclibraries.ca>
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
+
+commit a9ea03bc8c51a6177612feffe1658c3b406154f9
+Author: Ben Shum <bshum at biblio.org>
+Date: Thu Aug 29 14:58:20 2013 -0400
+
+ Fix some bad break syntax
+
+ Change </br> to a more appropriate <br/>
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+5 5 Open-ILS/src/templates/circ/selfcheck/banner.tt2
+1 1 Open-ILS/src/templates/opac/password_reset.tt2
+
+commit 64a503f12cd1094636818d4dd5725d73905517bd
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Tue Sep 3 14:30:22 2013 -0400
+
+ add src/Pg/live_t/
+
+ for tests that assume stock test data
+
+ Moving 0824.item_import_defaults.pg from t/ to live_t/
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+113 0 Open-ILS/src/sql/Pg/live_t/0824.item_import_defaults.pg
+1 0 Open-ILS/src/sql/Pg/live_t/README
+0 113 Open-ILS/src/sql/Pg/t/0824.item_import_defaults.pg
+ create mode 100644 Open-ILS/src/sql/Pg/live_t/0824.item_import_defaults.pg
+ create mode 100644 Open-ILS/src/sql/Pg/live_t/README
+ delete mode 100644 Open-ILS/src/sql/Pg/t/0824.item_import_defaults.pg
+
+commit 0fe3737ad1c291834dd9fff49f1661e576a3ae73
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Tue Sep 3 11:45:25 2013 -0400
+
+ PgTAP tests for 0824
+
+ As promised at the August 2013 dev meeting, I'll be adding PgTAP tests
+ for any database work that I create, and where possible for any that
+ I commit for others.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+113 0 Open-ILS/src/sql/Pg/t/0824.item_import_defaults.pg
+ create mode 100644 Open-ILS/src/sql/Pg/t/0824.item_import_defaults.pg
+
+commit 2f2fccbbcf9fa0df01999c1543bcb14bf3c1b77b
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Fri Aug 30 09:32:02 2013 -0400
+
+ Stamping upgrade script for Vandelay item import defaults
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+491 0 Open-ILS/src/sql/Pg/upgrade/0824.schema.vandelay-item-import-defaults.sql
+0 491 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.vandelay-item-import-defaults.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0824.schema.vandelay-item-import-defaults.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.vandelay-item-import-defaults.sql
+
+commit db143bff957ca82507d5a977d3f4728e0dfc864a
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Thu Aug 8 09:16:19 2013 -0400
+
+ LP1209291 vandelay item defaults release notes
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+21 0 docs/RELEASE_NOTES_NEXT/Cataloging/vandelay-item-import-defaults.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Cataloging/vandelay-item-import-defaults.txt
+
+commit 0b8e167739f5722524063de5bd9380a8118fb793
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Aug 7 12:05:30 2013 -0400
+
+ LP1209291 vandelay item import defaults
+
+ Via org settings, support auto-generation of call numbers and barcodes
+ for items imported via Vandelay's Item Import interface. Support
+ settings for applying a local prefix string to auto-generated call
+ numbers and barcodes. For both, the prefix defaults to "VAN".
+
+ Similarly, support default copy location and circ modifiers.
+
+ The new org unit settings:
+
+ vandelay.item.barcode.auto
+ vandelay.item.barcode.prefix
+ vandelay.item.call_number.auto
+ vandelay.item.call_number.prefix
+ vandelay.item.copy_location.default
+ vandelay.item.circ_modifier.default
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+69 2 Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm
+85 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+43 2 Open-ILS/src/sql/Pg/999.functions.global.sql
+491 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.vandelay-item-import-defaults.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.vandelay-item-import-defaults.sql
+
+commit ad0da8c8fed4699e8a881d0e1e85cba1742e64bf
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Sun Aug 25 00:41:37 2013 -0400
+
+ Schema.org authors: relate properties to the right context
+
+ While the approach of using the existing <a href> to launch a new search
+ based on the author name was workable, it may have been confusing for
+ schema.org processors such as Google Rich Snippets who expected that URI
+ to identify a resource for the author, not a set of search results.
+
+ Using @resource / @about attribute pairing, and wrapping the whole type
+ in an extra <span> element, enables us to avoid associating the
+ properties within the <a href> with the implicitly chained type.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+11 7 Open-ILS/src/templates/opac/parts/record/authors.tt2
+
+commit 21bc07079d265b90c5e0a780718810ac3b384b4d
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Aug 22 18:30:34 2013 -0400
+
+ Schema.org: relate offers to record explicitly
+
+ Although schema.org defines the nested child elements as implicit
+ relationships that should be good enough for the Offer-to-Product
+ relationship, defining that relationship explicitly can't hurt.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/templates/opac/parts/record/body.tt2
+2 0 Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
+1 0 Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+
+commit c3cfcf3c2943a3a9c5cf417d72cd6dbcb72809be
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Aug 20 12:45:44 2013 -0400
+
+ Map the bound-with relationship in schema.org
+
+ We don't know what type the target record is, so fall back to Product
+ and just point at it. At least this way schema.org processors will know
+ that the target bib is related to the current bib.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+8 2 Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+
+commit 1f55d0e4764e06d9b6170ef4977cd26a9431214c
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Sun Aug 25 00:40:46 2013 -0400
+
+ Add structured data for holdings via http://schema.org/Offer
+
+ Map library name to Offer/seller, shelving location to
+ Offer/availableAtOrFrom, call number to Offer/sku, barcode to
+ Offer/serialNumber, copy status to Offer/availability, and ISBN-13 to
+ gtin13. Use the additionalType of Product to give these offers an
+ obvious relationship.
+
+ Surface copy counts as AggregateOffer instances.
+
+ Cut over to RDFa Lite instead of microdata for schema.org, as RDFa Lite
+ is more easily extensible with other vocabularies, and is as accepted as
+ microdata by schema.org processors.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+1 1 Open-ILS/src/templates/opac/parts/ac_google_books.tt2
+21 1 Open-ILS/src/templates/opac/parts/misc_util.tt2
+8 8 Open-ILS/src/templates/opac/parts/record/authors.tt2
+1 1 Open-ILS/src/templates/opac/parts/record/body.tt2
+1 1 Open-ILS/src/templates/opac/parts/record/contents.tt2
+7 2 Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
+16 8 Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+1 1 Open-ILS/src/templates/opac/parts/record/subjects.tt2
+13 7 Open-ILS/src/templates/opac/parts/record/summary.tt2
+
+commit 3613e273d1d0d399e35389a009affc7d31b83f79
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Aug 23 19:33:58 2013 -0400
+
+ Stamping upgrade for patron self-reg
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+102 0 Open-ILS/src/sql/Pg/upgrade/0823.schema.patron-self-reg.sql
+0 100 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.patron-self-reg.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0823.schema.patron-self-reg.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.patron-self-reg.sql
+
+commit 7df7e939c02a61bba1c87bfd8bc9b417adb8828a
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Aug 23 19:25:06 2013 -0400
+
+ Trivial changes
+
+ -Fix (conform) whitespace in IDL
+ -Fix "county" typo in settings label
+ -Restore mysteriously absent "Bottom Link 2" :)
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 5 Open-ILS/examples/fm_IDL.xml
+1 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+1 1 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.patron-self-reg.sql
+2 1 Open-ILS/src/templates/opac/parts/footer.tt2
+
+commit cb2ad9df75ec15d6587dc0b27dc5b409f6b2d49e
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Aug 6 12:08:00 2013 -0400
+
+ LP1207396 Patron Self-Register Release Notes
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+53 0 docs/RELEASE_NOTES_NEXT/OPAC/patron_self_reg.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/patron_self_reg.txt
+
+commit 5981733f695d4b2ac8c17e5c229184b2f77fa88e
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Aug 6 13:52:24 2013 -0400
+
+ LP1207396 pending patron reg show requestor
+
+ Show a link to the requesting user, when present, for pending patrons in
+ the staff client patron registration form.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+6 0 Open-ILS/src/templates/actor/user/register.tt2
+1 0 Open-ILS/web/css/skin/default/register.css
+2 1 Open-ILS/web/js/dojo/openils/actor/nls/register.js
+34 0 Open-ILS/web/js/ui/default/actor/user/register.js
+
+commit a14e0b45a3f084e17c5d2817553d4acf67999fb0
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Aug 6 09:31:11 2013 -0400
+
+ LP1207396 TPAC org_selector supports org filter
+
+ When building and org unit selector via the build_org_selector MARCO,
+ the caller can now pass in a "valid_org_list" array which contains org
+ unit IDs. When such a list is provided, any org units in the selector
+ which are not in the list are marke as disabled.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+9 1 Open-ILS/src/templates/opac/parts/org_selector.tt2
+
+commit 6dd7c5dfc73bf5ebbc52caac578ce4309161a05d
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Thu Aug 1 16:52:18 2013 -0400
+
+ LP1207396 Patron self-registration web form
+
+ Web form for allowing patrons to submit thier own library registration
+ requests. The form collects various bits of user data and creates a
+ pending user account, which has no privileges. These pending accounts
+ must be approved and completed by staff from the staff client "Pending
+ Patrons" action in the Cirulation menu.
+
+ Control of whether to show a field, treat a field as required, show
+ example text, and validate the field format is managed with existing org
+ unit settings.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+2 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+242 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Register.pm
+17 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+25 0 Open-ILS/src/templates/opac/css/style.css.tt2
+6 1 Open-ILS/src/templates/opac/parts/footer.tt2
+7 0 Open-ILS/src/templates/opac/parts/org_selector.tt2
+177 0 Open-ILS/src/templates/opac/register.tt2
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Register.pm
+ create mode 100644 Open-ILS/src/templates/opac/register.tt2
+
+commit 4a3a7193dbe5388b5672f29108c59dedeee65cc4
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Aug 6 10:10:19 2013 -0400
+
+ LP1207396 user stage allows username selection
+
+ The caller may now pass a value for username. If unset, it still falls
+ back to using a uuid. If the username clashes with an existing staged
+ username, a USERNAME_EXISTS event is returned.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+5 1 Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/Stage.pm
+
+commit 26b04ccb853a4edd71bd820231061d4eeec16f53
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Aug 6 11:09:45 2013 -0400
+
+ LP1207396 purge old pending users
+
+ Script to delete pending user accounts based on the interval defined in
+ the opac.pending_user_expire_interval org unit setting.
+
+ Add /openils/bin/purge_pending_users.srfsh to opensrf's CRON.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+3 0 Open-ILS/examples/crontab.example
+24 0 Open-ILS/src/sql/Pg/015.schema.staging.sql
+25 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.patron-self-reg.sql
+7 0 Open-ILS/src/support-scripts/purge_pending_users.srfsh
+ create mode 100755 Open-ILS/src/support-scripts/purge_pending_users.srfsh
+
+commit 97b3335282973d0577a521d1415b079ec88671ff
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Thu Aug 1 13:30:52 2013 -0400
+
+ LP1207396 DB / IDL for patron self-reg
+
+ Updating pending addr tables to track requesting user and address county.
+
+ Adding org settings:
+
+ * opac.allow_pending_user -- allow self-registration
+ * opac.pending_user_expire_interval - delete pending user interval
+ * ui.patron.edit.aua.county.require - indicate if county is required
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+6 0 Open-ILS/examples/fm_IDL.xml
+6 4 Open-ILS/src/sql/Pg/015.schema.staging.sql
+54 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+75 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.patron-self-reg.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.patron-self-reg.sql
+
+commit f9a2646c51ad3b71c3af0dd422dd0ab32bd5f363
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Fri Aug 23 10:35:12 2013 -0400
+
+ LP#1182519 Stamping DB upgrade 0822
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+31 0 Open-ILS/src/sql/Pg/upgrade/0822.schema.per-hold-behind-desk.sql
+0 31 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.per-hold-behind-desk.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0822.schema.per-hold-behind-desk.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.per-hold-behind-desk.sql
+
+commit 54bc2edb1e4bfceaba08e9526389aebd60dbf830
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue May 21 11:59:36 2013 -0400
+
+ LP1182519 Per-Hold Behind Desk Value
+
+ The true/false value for behind_desk is now stored directly on the hold
+ object for more accurate tracking of the location of captured holds.
+ If configured, patrons can now set their preferred value for behind the
+ desk holds.
+
+ * DB/IDL changes to support the new column
+ * API support for loading the setting from the patron for cases when no
+ value is provided by the caller.
+ * Staff client grid column definition for the Behind Desk field
+ * Hold counts in the staff client now show total, available, and
+ behind-desk (at the workstation).
+ * Printed hold receipt now uses the behind_desk value on the hold to
+ decide if a hold is behind the desk.
+ * Release notes
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+ Conflicts:
+
+ Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+
+ Resolved 2 conflicts in Actor.pm sub hold_request_count
+ Retained the parameters as:
+ my( $self, $client, $authtoken, $user_id, $ctx_org) = @;
+
+ And retained:
+
+ my @ready = grep { .... } @$holds code.
+
+ Signed-off-by: Garry Collum <gcollum at gmail.com>
+
+3 0 Open-ILS/examples/fm_IDL.xml
+16 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+28 10 Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+26 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+22 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+2 1 Open-ILS/src/sql/Pg/090.schema.action.sql
+31 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.per-hold-behind-desk.sql
+10 0 Open-ILS/src/templates/opac/myopac/prefs_settings.tt2
+1 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+30 19 Open-ILS/xul/staff_client/server/circ/util.js
+1 0 Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+4 0 Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
+30 5 Open-ILS/xul/staff_client/server/patron/summary.js
+5 0 Open-ILS/xul/staff_client/server/patron/summary_overlay.xul
+32 0 docs/RELEASE_NOTES_NEXT/Circulation/per-hold-behind-desk.txt
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.per-hold-behind-desk.sql
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/per-hold-behind-desk.txt
+
+commit 347e376ee8e2ce9967ddd446376721f0e637340a
+Author: Ben Shum <bshum at biblio.org>
+Date: Thu Aug 22 12:16:39 2013 -0400
+
+ Add placeholder file for 0821 upgrade script
+
+ 0821 was added as a backport fix for 2.3 and 2.4, but not master.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+10 0 Open-ILS/src/sql/Pg/upgrade/0821.function.browse-normalize-timing.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0821.function.browse-normalize-timing.sql
+
+commit 43fd9c1e17aad99b58e241e1df5bc1c24656f505
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Fri Jul 12 14:43:57 2013 -0400
+
+ Repair remaining Authority Fixed Field editor entries
+
+ The "Item" fixed field is only valid for MFHD records, so we remove
+ that entirely from AUTH records. The "GeoSubd" fixed field is
+ spelled "GeoDiv" everywhere, so we align that naming so that it can
+ be saved.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/web/js/dojo/MARC/FixedFields.js
+1 1 Open-ILS/xul/staff_client/server/cat/marcedit.xul
+
+commit eda67ed4588d0a07a91896b90337bdbc8cc4c8f1
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Jul 11 13:04:53 2013 -0400
+
+ Remove JSPAC-oriented PasswordReset.pm interface
+
+ A native TPAC interface for resetting passwords arrived some time ago,
+ and the i18n for PasswordReset.pm predated the more standardized
+ approach taken by TPAC. So... kill the JSPAC interface and save
+ ourselves a little bit of Apache overhead in the process.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+0 1 Open-ILS/examples/apache/eg.conf.in
+0 1 Open-ILS/examples/apache/eg_startup.in
+0 15 Open-ILS/examples/apache/eg_vhost.conf.in
+0 1 Open-ILS/examples/apache_24/eg.conf.in
+0 15 Open-ILS/examples/apache_24/eg_vhost.conf.in
+0 1 Open-ILS/src/perlmods/MANIFEST
+0 219 Open-ILS/src/perlmods/lib/OpenILS/WWW/PasswordReset.pm
+1 2 Open-ILS/src/perlmods/t/15-OpenILS-WWW.t
+0 33 Open-ILS/src/templates/password-reset/request-form.tt2
+0 17 Open-ILS/src/templates/password-reset/reset-form.tt2
+0 15 Open-ILS/src/templates/password-reset/strings.en-US
+0 15 Open-ILS/src/templates/password-reset/strings.fr-CA
+ delete mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/PasswordReset.pm
+ delete mode 100644 Open-ILS/src/templates/password-reset/request-form.tt2
+ delete mode 100644 Open-ILS/src/templates/password-reset/reset-form.tt2
+ delete mode 100644 Open-ILS/src/templates/password-reset/strings.en-US
+ delete mode 100644 Open-ILS/src/templates/password-reset/strings.fr-CA
+
+commit b7f13bf99487c79d65300267e82c297d95796d86
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Aug 1 12:34:21 2013 -0400
+
+ silence some unitialized warnings
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+2 2 Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm
+
+commit e5a3ee75ff36d3ace32b6b432e4458432f9d578f
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Aug 21 11:57:40 2013 -0400
+
+ Make C unit tests more robust
+
+ Adding -I at abs_top_srcdir@/Open-ILS/include will pull in the source tree
+ header files, so that the C unit tests can run before Evergreen has been
+ installed (and thus will be a valid test of the source header files
+ instead of relying on the installed versions that might be different).
+
+ Build c-apps before recursing into c-apps/tests:
+ This ensures that the required libraries are built before the C unit
+ tests are built, thus preventing "make check" on a just-configured
+ source tree from failing due to missing dependencies.
+
+ Also, link to the source tree directories first rather than last, to
+ ensure that we pull in the correct source (if possible). And remove the
+ cargo-cultish $(TMP) linking/including.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+1 1 Open-ILS/src/c-apps/Makefile.am
+3 3 Open-ILS/src/c-apps/tests/Makefile.am
+
+commit 82d65eccd0c40ab9e832a6a196b11608aa9520a4
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Mon Jun 10 08:42:18 2013 +0300
+
+ Move HTML tags out of translatable strings in toolkit templates.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+1 1 Open-ILS/src/templates/acq/common/claim_dialog.tt2
+2 2 Open-ILS/src/templates/acq/common/li_table.tt2
+1 2 Open-ILS/src/templates/acq/financial/claim_eligible.tt2
+16 16 Open-ILS/src/templates/acq/fund/list.tt2
+1 2 Open-ILS/src/templates/acq/picklist/from_bib.tt2
+1 2 Open-ILS/src/templates/acq/search/unified.tt2
+12 8 Open-ILS/src/templates/conify/global/acq/edi_account.tt2
+2 2 Open-ILS/src/templates/kpac/getit.tt2
+8 16 Open-ILS/src/templates/kpac/getit_results.tt2
+1 3 Open-ILS/src/templates/kpac/parts/paginate.tt2
+4 4 Open-ILS/src/templates/opac/myopac/lists.tt2
+2 2 Open-ILS/src/templates/opac/myopac/update_email.tt2
+3 3 Open-ILS/src/templates/opac/myopac/update_password.tt2
+3 6 Open-ILS/src/templates/opac/myopac/update_username.tt2
+2 2 Open-ILS/src/templates/opac/parts/login/form.tt2
+8 8 Open-ILS/src/templates/opac/parts/myopac/main_refund_policy.tt2
+3 3 Open-ILS/src/templates/opac/parts/myopac/prefs_hints.tt2
+1 1 Open-ILS/src/templates/opac/parts/pref_lib_display.tt2
+22 16 Open-ILS/src/templates/opac/parts/result/lowhits.tt2
+6 6 Open-ILS/src/templates/opac/parts/result/paginate.tt2
+6 7 Open-ILS/src/templates/serial/subscription.tt2
+1 1 Open-ILS/web/js/dojo/openils/acq/nls/acq.js
+1 1 Open-ILS/web/js/dojo/openils/actor/nls/register.js
+5 5 Open-ILS/web/js/dojo/openils/circ/nls/selfcheck.js
+2 2 Open-ILS/web/js/ui/default/acq/financial/list_funds.js
+3 3 Open-ILS/web/js/ui/default/actor/user/register.js
+5 5 Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
+6 6 Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
+6 6 Open-ILS/xul/staff_client/server/patron/display.js
+
+commit 11639547a6d21bb92009a237473ff7b660d3d59c
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Jul 12 17:20:07 2013 -0400
+
+ Move exchange_rate seed data to 950 file
+
+ Since currency_type is a foreign key of acq.exchange_rate, if we move
+ currency_type to the seed data file, exchange rate must follow.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+0 3 Open-ILS/src/sql/Pg/200.schema.acq.sql
+3 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit 64e473dbbf8d45447256a860801a2a9a6868468a
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Jun 11 11:53:42 2013 +0300
+
+ Move acq.currency_code entries and wrap for i18n
+
+ Fix LP#1107834 by moving the acq.currency_code entries into
+ 950.data.seed-values.sql and wrapping the texts with oils_i18n_gettext.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+0 5 Open-ILS/src/sql/Pg/200.schema.acq.sql
+5 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit 3e7cbfa71cef994682bdf73b281298aa448bb388
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Tue Aug 20 13:02:23 2013 -0400
+
+ Fedora: remove source installs for packaged dependencies
+
+ The Perl MARC packages, Library::CallNumber::LC, and libdbi / libdbd
+ drivers have been available as packages on Fedora since Fedora 18 (which
+ is now the oldest supported Fedora version), so don't install these from
+ source.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+6 27 Open-ILS/src/extras/install/Makefile.fedora
+
+commit 2f8bd75e12a59241637ca739ba1d0c9908c80fc6
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Aug 19 11:23:14 2013 -0400
+
+ LP 1190279 Modularize Makefile.install fedora target
+
+ make -f Makefile.install fedora
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+147 0 Open-ILS/src/extras/install/Makefile.fedora
+ create mode 100644 Open-ILS/src/extras/install/Makefile.fedora
+
+commit 8b90537c05c4febdb02dc4fcc3a5ddd818e7d9e8
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Aug 19 12:16:43 2013 -0400
+
+ LP 1190279 libtest-warn-perl for ubuntu targets
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+1 0 Open-ILS/src/extras/install/Makefile.ubuntu-lucid
+1 0 Open-ILS/src/extras/install/Makefile.ubuntu-precise
+
+commit f97334dcc9439fbab0f73a9aeed1ef0001da3fc2
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Jul 9 11:43:47 2013 -0400
+
+ LP 1190279 Modularize Makefile.install misc. repairs
+
+ apply missing install_libdbi for wheezy/squeeze
+
+ Added libtest-warn-perl prereq for wheezy/squeeze
+
+ per-distro makefile improvments
+
+ install soap-lite as a deb before CPAN runs.
+ Business::OnlinePayment::PayPal fails otherwise.
+
+ by default, use apt-get as the APT tool, since all debian distros have
+ this
+
+ move 'install_yaz' directly into Makefile.ubuntu-lucid, since that's
+ the only OS which uses it.
+
+ Squeeze also needs an updated yaz; Yaz-related repairs
+
+ give debians and lucid libbz2-dev; precise has it already
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+0 11 Open-ILS/src/extras/install/Makefile.common
+1 2 Open-ILS/src/extras/install/Makefile.debian
+14 1 Open-ILS/src/extras/install/Makefile.debian-squeeze
+4 0 Open-ILS/src/extras/install/Makefile.debian-wheezy
+13 3 Open-ILS/src/extras/install/Makefile.ubuntu-lucid
+1 0 Open-ILS/src/extras/install/Makefile.ubuntu-precise
+
+commit a3c338f9417611e9116616472ca7ce3bec0ca75b
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Jul 8 15:43:57 2013 -0400
+
+ LP 1190279 Installer makefiles OS targets for PG server
+
+ Instead of requesting install_pgsql_server_debs_91,
+ install_pgsql_server_backport_debs_91, etc. when installing the
+ postgres server, simply give each OS type its own postgres install
+ target.
+
+ make -f Makefile.install postgres-server-debian-wheezy
+ make -f Makefile.install postgres-server-debian-squeeze
+ make -f Makefile.install postgres-server-ubuntu-lucid
+ make -f Makefile.install postgres-server-ubuntu-precise
+ make -f Makefile.install postgres-server-fedora
+
+ Let the OS module decide what and how to install the postgres server.
+
+ Changes are reflected in docs/installation/server_installation.txt
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+11 0 Open-ILS/src/extras/Makefile.install
+3 2 Open-ILS/src/extras/install/Makefile.debian-squeeze
+1 1 Open-ILS/src/extras/install/Makefile.debian-wheezy
+14 11 docs/installation/server_installation.txt
+
+commit c4f884b453f72b336ee9652f475e940b2d265ebd
+Author: Chris Sharp <csharp at georgialibraries.org>
+Date: Thu Jun 13 07:56:45 2013 -0400
+
+ LP 1190279 Ubuntu install targets
+
+ Ubuntu 10.04 comes with Yaz 3.0.52.
+
+ This installs version 4.2.32 from source.
+
+ Adding per-distro makefiles for Ubuntu 10.04 and 12.04.
+
+ Correcting minor typo
+
+ SimpleServer installation expects yaz to already be installed
+
+ Ubuntu 12.04 does not like libparent-perl
+
+ Removing librose-uri-perl from the debs list since it is not in the 12.04 repo
+
+ Adding libbz2-dev to the deb list
+
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+11 0 Open-ILS/src/extras/install/Makefile.common
+113 0 Open-ILS/src/extras/install/Makefile.ubuntu-lucid
+101 0 Open-ILS/src/extras/install/Makefile.ubuntu-precise
+ create mode 100644 Open-ILS/src/extras/install/Makefile.ubuntu-lucid
+ create mode 100644 Open-ILS/src/extras/install/Makefile.ubuntu-precise
+
+commit a9558065ad54fd17891dbc444d7ade8059cd9a85
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Jun 12 11:18:46 2013 -0400
+
+ LP 1190279 Modularize Makefile.install
+
+ Create per-distro installer Makefiles for easier maintenance and
+ per-distro tweaks.
+
+ Included in this commit are installer Makefiles for debian wheezy and
+ squeeze.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+32 482 Open-ILS/src/extras/Makefile.install
+35 0 Open-ILS/src/extras/install/Makefile.common
+57 0 Open-ILS/src/extras/install/Makefile.debian
+114 0 Open-ILS/src/extras/install/Makefile.debian-squeeze
+96 0 Open-ILS/src/extras/install/Makefile.debian-wheezy
+ create mode 100644 Open-ILS/src/extras/install/Makefile.common
+ create mode 100644 Open-ILS/src/extras/install/Makefile.debian
+ create mode 100644 Open-ILS/src/extras/install/Makefile.debian-squeeze
+ create mode 100644 Open-ILS/src/extras/install/Makefile.debian-wheezy
+
+commit 68f2881ebfe5aaac9b0497b052e08d9a425fda88
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Mon Jul 1 08:36:48 2013 +0300
+
+ Read the zip code lookup file in UTF8 mode.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+2 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Zips.pm
+
+commit 59dadd1a4ce3a213e0a2367ef0ce2f0accdd480b
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Tue Jun 11 13:22:33 2013 -0400
+
+ Fix Lp bug 965656 WRT back dated checkins with fines.
+
+ * Move _check_open_xact from OpenILS::Application::Circ::Money
+ to OpenILS::Application::AppUtils so it can be called from
+ wherever.
+
+ * Modify OpenILS::Application::Circ::Money to use check_open_xact
+ from OpenILS::Application::AppUtils.
+
+ * Modify finish_fines_and_voiding in OpenILS::Application::Circ::Circulate
+ to use check_open_xact instead of reopen_xact.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+ Conflicts:
+ Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+
+42 0 Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+2 2 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+3 42 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm
+
+commit 4a171d1b07ad533ceb44a0cef4193b2f9ec315ad
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Jul 15 14:36:30 2013 -0400
+
+ Improved copy table CSS/markup for conjoined bibs
+
+ Let the library name column wrap now that it may potentially contain
+ stupidly long title/author combos. Also, associate the table cells with
+ their corresponding headers for improved accessibility.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+7 2 Open-ILS/src/templates/opac/css/style.css.tt2
+7 7 Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+
+commit b77db8b7e553087f962f791c169d7a4d3fac7c6f
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Jul 15 11:28:21 2013 -0400
+
+ Conjoined items / foreign items display in TPAC
+
+ Foreign items now appear at the top of the copy table, no matter what
+ copy page you are on. See "The two violin concertos" in the Concerto
+ data set for an example; the foreign bib is linked, with a label for the
+ designated peer type.
+
+ The parent bib record displays all of the child records in the copy table
+ underneath the pertinent copy; each title / author entry links to the
+ child bib display, naturally. See "Violin concerto no. 2 ; Six duos
+ (from 44 Duos)" in the Concerto data set for an example.
+
+ We escape all of the text retrieved from the database to avoid XSS
+ (thanks for the heads-up from Pasi Kallinen).
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+ Now with HTML escaping for safety
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+6 2 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+4 0 Open-ILS/src/templates/opac/css/style.css.tt2
+26 17 Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+
+commit 30b75ceadeeb86f50ac874000e1ca38ebed725db
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Jul 15 09:11:53 2013 -0400
+
+ Whitespace and timelog entries
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+20 16 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+21 20 Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+
+commit 8c896e9524a452464042594719f1c1e34eba016e
+Author: Bill Ott <bott at grpl.org>
+Date: Wed May 22 20:11:07 2013 -0400
+
+ Expose conjoined bibs in TPAC
+
+ This initial work is based on the GRPL need to handle eReader bib/copy display.
+ The "joined" titles will display a copy record with a call_number link back to
+ the "master" bib, where the master will display a set of links to individual
+ titles from each "copy".
+
+ TODO: consider peer_type when determining whether or not to display
+
+ Signed-off-by: Bill Ott <bott at grpl.org>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+25 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+6 0 Open-ILS/src/templates/opac/parts/misc_util.tt2
+27 0 Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+
+commit e788d63a6c80f237590a3b999ad4a9eb3ef72275
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Mon Jul 15 11:22:57 2013 +0300
+
+ Fix LP#1160770 by marking default toolbar names as translatable.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+3 3 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit 6c0e430e5d90173de675e671230481f2ad3f5516
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Aug 13 14:39:00 2013 -0400
+
+ LP 1084732 TPAC copy location selector
+
+ Copy location filter selector for the TPAC advanced search interface.
+ The behavior is the same as the analogous JSPAC feature. The interface
+ components are hidden by default, so non-JS browsers will be none the
+ wiser.
+
+ A number of small tweaks to related code were needed and are included in
+ this commit:
+
+ 1. Make copy locations field_safe in the IDL so they can be retrieved
+ and parsed without the IDL
+ 2. Insert a (full) hash-based org unit tree as inline JS at the bottom
+ of js.tt2 so JS will have access to the whole tree without having to
+ load the IDL to understand it.
+ 3. Fix a bug in openils.CGI : decodeURIComponent parameter names
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/examples/fm_IDL.xml
+11 2 Open-ILS/src/templates/opac/parts/advanced/search.tt2
+2 1 Open-ILS/src/templates/opac/parts/config.tt2
+19 0 Open-ILS/src/templates/opac/parts/js.tt2
+1 0 Open-ILS/web/js/dojo/openils/CGI.js
+107 0 Open-ILS/web/js/ui/default/opac/copyloc.js
+ create mode 100644 Open-ILS/web/js/ui/default/opac/copyloc.js
+
+commit f83911089625e4db6ddd3e3ffb6d2e8c21ede8a1
+Author: Galen Charlton <gmc at esilibrary.com>
+Date: Fri Feb 22 14:00:55 2013 -0500
+
+ LP#1131889: sort TPac copy list by normalized call number
+
+ ... as opposed to the literal call number label. E.g., this
+ patch would make LC call number "AE5 .E363 1975 v.10" sort
+ after "AE5 .E363 1975 v.9" rather than after "AE5 .E363 1975 v.1"
+
+ Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+
+commit 3c6a6d4d227a40a4409e8a57bcb7ac882e6b3615
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Tue Aug 20 10:03:34 2013 -0400
+
+ Fix typo in release notes file name for acq-style-cancelled-delayed.
+
+ Rename acq-style-cancelled-delayted.txt to acq-style-cancelled-dealyed.txt.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+11 0 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-style-cancelled-delayed.txt
+0 11 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-style-cancelled-delayted.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-style-cancelled-delayed.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-style-cancelled-delayted.txt
+
+commit b2e84c0c72b8e3099c1fe3dc687065e18f50d7e2
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Dec 26 16:43:20 2012 -0500
+
+ ACQ delayed lineitems style release notes
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+11 0 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-style-cancelled-delayted.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-style-cancelled-delayted.txt
+
+commit 203c122803bcdab667c413ec624d3b12320c9d03
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Dec 11 10:26:30 2012 -0500
+
+ Improve styling for 'delayed' lineitems in PO UI
+
+ When a lineitem is cancelled, but "keep_debits" is true, the lineitem is
+ in effect delayed instead of truly cancelled. Make it more obvious in
+ the UI the difference between delayed and truly cancelled lineitems by
+ applying a row styling for delayed items (similar to other status row
+ styling) and always show the cancel reason (label) in the lineitem
+ display in the PO, next to the non-title attributes.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+1 0 Open-ILS/src/templates/acq/common/li_table.tt2
+1 0 Open-ILS/web/css/skin/default/acq.css
+1 0 Open-ILS/web/css/theme/default/acq.css
+10 0 Open-ILS/web/js/ui/default/acq/common/li_table.js
+
+commit cdec380cf70ef29750490f4618b1826d69f3bbc5
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Fri Aug 16 10:32:42 2013 -0400
+
+ DB numbering for patron duplication check depth setting
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+22 0 Open-ILS/src/sql/Pg/upgrade/0818.data.duplicate_patron_check_depth_ou_setting.sql
+0 22 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0818.data.duplicate_patron_check_depth_ou_setting.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
+
+commit 96f91f2fec04e21774fc6982a16b2b1999c8ee07
+Author: Kyle Tomita <ktomita at catalystitservices.com>
+Date: Fri May 31 11:33:59 2013 -0700
+
+ LP1185524 - Duplicate patron checking in the user editor is limited to workstation OU
+
+ Added a new library setting opac.duplicate_patron_check_use_consortium.
+ When true, the duplicate check will use the consortium (1) as the OU.
+ When false or not set, the duplicate check will use the workstation OU.
+
+ The setting is checked in subroutine that creates the search request and
+ sets the OU accordingly.
+
+ [LFW: Signing off but following with material changes next commit.]
+
+ Signed-off-by: Kyle Tomita <ktomita at catalystitservices.com>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
+
+3 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+12 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+24 0 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_setting_for_selecting_consortium_as_search_ou_for_duplicate_patron_check.sql
+
+commit 85c1d6333400942419f8741ed0af6b720c95fb0c
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Fri Jun 28 09:44:44 2013 +0300
+
+ Use uri_escape_utf8 instead of uri_escape
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+5 5 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+1 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Container.pm
+
+commit 76708bcc596980d74ed2825d1ba12b3692b35dba
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Fri Jun 7 19:33:46 2013 +0300
+
+ Finish i18n support for config.usr_setting_type
+
+ Add the missing oils_i18n_gettext markers to config.usr_setting_type
+ inserts.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+36 9 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit 51654a5c4e801a96feff82da4bd41f945e99461b
+Author: Dan Scott <dan at coffeecode.net>
+Date: Tue Feb 19 21:06:05 2013 -0500
+
+ Flag cust & oust name/description fields as translatable
+
+ Setting type names and descriptions should be translatable, a simple
+ oils_persist:i18n attribute will do the trick.
+
+ Signed-off-by: Dan Scott <dan at coffeecode.net>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+5 5 Open-ILS/examples/fm_IDL.xml
+
+commit 1d7b2ffb0fc3f76dfb92f918419334afb2c418b7
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Fri Aug 9 16:03:47 2013 -0400
+
+ Stamping upgrade script for long overdue status -- LP 1169193.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+283 0 Open-ILS/src/sql/Pg/upgrade/0817.data.long-overdue.sql
+0 283 Open-ILS/src/sql/Pg/upgrade/XXXX.data.long-overdue.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0817.data.long-overdue.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.long-overdue.sql
+
+commit 3dcdcf427477cd875bb40c1ab88746bb053b3c22
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon May 6 11:01:52 2013 -0400
+
+ LP 1169193 Support L/O xact close on paid
+
+ Middle-layer support for the org unit setting "Leave transaction
+ open when long overdue balance equals zero". It behaves the same
+ as "Leave transaction open when lost balance equals zero", but for
+ long-overdue circs.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+15 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm
+
+commit 91e7fe44a8ca68b126715b767dd0cdb361edf2e3
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Fri Apr 26 12:59:33 2013 -0400
+
+ LP 1169193 Bypass longoverdue w/ default A/T runner
+
+ Avoid processing LONGOVERDUE circulations in the default
+ action_trigger_runner.pl filter.
+
+ When no custom filters are used, the script will provide it's own
+ default filter for circulation-based hooks. This change ensure that
+ when the default filter is in use, the script will not attempt to
+ process longoverdue circulations, since they have already been processed
+ (which is how they became longoverdue in the first place).
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/support-scripts/action_trigger_runner.pl
+
+commit 5d842e5791092ece4647ede0ab288744447bdf16
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Apr 24 14:09:12 2013 -0400
+
+ LP 1169193 long-overdue release notes
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+92 0 docs/RELEASE_NOTES_NEXT/Circulation/long-overdue.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/long-overdue.txt
+
+commit ceb56824e7ca2031366580b2d41397bdcc8102d4
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Apr 24 11:05:02 2013 -0400
+
+ LP 1169193 transit_slip macro for copy status
+
+ Adds support for a new 'transit_slip' receipt template macro called
+ "transit_copy_status", which displays the stored status of the
+ in-transit copy (i.e. the status the copy will be placed in once it
+ arrives at the transit destination). This is useful, in particular, for
+ lost or long-overdue items which are not "immediately available" upon
+ checkin.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+27 2 Open-ILS/xul/staff_client/server/circ/util.js
+1 0 Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+
+commit 69573105e2498ebc34f3de26882af95268d46c28
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Apr 22 13:05:14 2013 -0400
+
+ LP 1169193 long-overdue item checkin
+
+ Checkin of long-overdue items now goes through a very simimlar process
+ as check-in of Lost items. Staff can control how long after the due
+ date (and potentially other date-related fields) the item may be
+ returned for a configurable set of refunds and/or reinstatement of
+ overdue fines. All settings are controlled by a series of new org unit
+ settings specifically related to long-overdue processing.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+3 1 Open-ILS/src/extras/ils_events.xml
+159 38 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+1 0 Open-ILS/src/perlmods/lib/OpenILS/Const.pm
+1 0 Open-ILS/xul/staff_client/server/circ/checkin.js
+3 0 Open-ILS/xul/staff_client/server/circ/util.js
+
+commit 18f672d40658964f85657713c743acafe22f3633
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Apr 17 10:31:04 2013 -0400
+
+ LP 1169193 long-overdue automated processing
+
+ Middle layer components for marking circulations long overdue. The
+ automation is controlled with an Action/Trigger event definition
+ (sample included in seed data), which uses a new MarkItemLongOverdue
+ reactor. The reactor makes use of a new util function (AssetCommon.pm)
+ for doing the actual work and looking up the relevant org unit settings.
+
+ Inluded is a new PatronNotInCollections Validator, which can be used to
+ avoid marking circulations long overdue for patrons that are in
+ collections processing.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/examples/action_trigger_filters.json.example
+58 14 Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm
+60 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/MarkItemLongOverdue.pm
+27 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/MarkItemLongOverdue.pm
+
+commit feb1c3f2044add1cf6a262824f7e2082a372253c
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Apr 15 11:44:26 2013 -0400
+
+ LP 1169193 long-overdue SQL seed data
+
+ Seed data for managing long-overdue circulations.
+
+ * new copy status
+ * new billing types
+ * new org settings
+ * new permissions
+ * sample action/trigger event definitions
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+248 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+283 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.long-overdue.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.long-overdue.sql
+
+commit e071eb91a40d3871bc0e0a078b88cfdde7ba3b5e
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Aug 9 15:16:09 2013 -0400
+
+ Finish stamping for bib record browser
+
+ Sorry for the noise...
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+1 1 Open-ILS/src/sql/Pg/upgrade/0815.schema.config-metabib-interauthority.sql
+1 1 Open-ILS/src/sql/Pg/upgrade/0816.schema.bib-auth-browse.sql
+
+commit c7bad82a66554251b8a0f636e629fe98680b7765
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Aug 9 15:12:58 2013 -0400
+
+ Stamping upgrade scripts for bib record browser
+
+ LP #1177810
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+129 0 Open-ILS/src/sql/Pg/upgrade/0815.schema.config-metabib-interauthority.sql
+7507 0 Open-ILS/src/sql/Pg/upgrade/0816.schema.bib-auth-browse.sql
+0 129 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config-metabib-interauthority.sql
+0 7507 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0815.schema.config-metabib-interauthority.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0816.schema.bib-auth-browse.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config-metabib-interauthority.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql
+
+commit 32ec20b71540b1230ecc15f1aec95059e044499e
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Thu Aug 8 10:27:10 2013 -0400
+
+ Fix problem where basic search bar was flush with left edge of page
+
+ Reported by Ben Shum.
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/templates/opac/css/style.css.tt2
+
+commit 256b4d24240332ae3fd2a5cc14b1709c90f18d05
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Fri Jul 26 09:48:59 2013 -0400
+
+ Fix issues with multiple divs having the search-wrapper id.
+
+ Basically, remove the extra <div> from all the files that INCLUDE
+ searchbar.tt2, and leave the <div> that searchar.tt2 uses alone.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+1 3 Open-ILS/src/templates/opac/cnbrowse.tt2
+1 3 Open-ILS/src/templates/opac/home.tt2
+1 3 Open-ILS/src/templates/opac/login.tt2
+1 3 Open-ILS/src/templates/opac/mylist.tt2
+1 3 Open-ILS/src/templates/opac/parts/myopac/base.tt2
+1 3 Open-ILS/src/templates/opac/password_reset.tt2
+1 3 Open-ILS/src/templates/opac/place_hold.tt2
+1 3 Open-ILS/src/templates/opac/record.tt2
+1 3 Open-ILS/src/templates/opac/record/email.tt2
+1 3 Open-ILS/src/templates/opac/results.tt2
+1 3 Open-ILS/src/templates/opac/sms_cn.tt2
+1 3 Open-ILS/src/templates/opac/temp_warn.tt2
+
+commit cfc828d832ecee92478466cd2f4e174c2f4b5c3c
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Mon Jul 22 10:14:51 2013 -0400
+
+ OPAC Browse: bugfixes squashed together from LP #1177810
+
+ In specific:
+ OPAC Browse: go back from numbered to bulleted results
+ OPAC Browse: Avoid showing tracing if linked authorities have no bibs
+ OPAC Browse: Replace English pager with customizable pager
+ OPAC Browse: Extra small bit of documentation about author headings
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+13 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm
+14 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+10 0 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql
+5 6 Open-ILS/src/templates/opac/browse.tt2
+0 8 Open-ILS/src/templates/opac/parts/config.tt2
+19 8 docs/RELEASE_NOTES_NEXT/OPAC/BibAuthBrowse.txt
+
+commit 6990fd819c0dae385c3cc7a40d39a0ebed91086c
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Fri Jul 19 12:35:31 2013 -0400
+
+ Break up expensive queries, match index to quals
+
+ First, we order browse queries over MBE by (sort_value, value) so we
+ want to match the unique index to that.
+
+ We're only going to use the first few rows of the cursors we build from
+ the back/forward MBE paging queries, and the embedded GROUP BY defeats
+ the planners desire to use an index for ordering the rows. So, instead,
+ we use a simpler core query and gather aggregate data as a secondary,
+ index-capable query for each MBE row.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+22 23 Open-ILS/src/sql/Pg/030.schema.metabib.sql
+22 24 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql
+
+commit c0dea517395c733b77e8eb219d2c3f43f6098d42
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Thu Jun 13 16:22:13 2013 -0400
+
+ OPAC Browse: some squashed commits from LP #1177810
+
+ Namely:
+ OPAC Browse: Various interface improvements
+ OPAC Browse: Put best-matched browse entry in middle of result set
+ OPAC Browse: Don't try to build hyperlinks from 680 ‡a
+ OPAC Browse: add a CSS class to the best-matching result when not paging
+ Remove unwanted space before question makr in "Did you mean" message
+ OPAC Browse: Fix browse interface's use of hits-per-page user setting
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+54 108 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm
+121 60 Open-ILS/src/sql/Pg/030.schema.metabib.sql
+121 59 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql
+29 33 Open-ILS/src/templates/opac/browse.tt2
+4 1 Open-ILS/src/templates/opac/css/style.css.tt2
+9 5 Open-ILS/src/templates/opac/parts/qtype_selector.tt2
+
+commit 9d37f6890ce6b591d62972ce3e341cecf7c45535
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Fri Jun 7 10:31:30 2013 -0400
+
+ Fix problem with YYYY.schema.bib-auth-browse.sql.
+
+ Disable ALL triggers on authority.control_set_authority_field before
+ altering and updating the table to avoid an error related to altering
+ a table with pending trigger events.
+
+ The triggers are enabled again after the updates and alters are done.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+8 0 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql
+
+commit e710ecbee519d374bcf69b0c535c3f83814c782b
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Wed Apr 24 10:46:27 2013 -0400
+
+ Bib record browser with 'see also', etc from linked authority headings
+
+ This feature provides a patron-oriented OPAC interface for browsing
+ bibliographic records.
+
+ Users choose to browse by Author, Title, Subject, or Series. They then
+ enter a browse term, and the nearest match from a left-anchored search
+ on the headings extracted for browse purposes will be displayed in a
+ typical backwards/forwards paging display. Headings link to search
+ results pages showing the related records. If the browse heading is
+ linked to any authority records, and if any *other* authority records
+ point to those with "See also" or other non-main entry headings, those
+ alternative headings are displayed a linked to a search results page
+ showing related bib records related to the alternate heading.
+
+ The counts of holdings displayed next to headings from bibliographic
+ records are subject to the same visiibility tests as search. This means
+ that the org unit (and copy location group) dropdown on the browse
+ interface affects counds, and it further means that whether or not
+ you're looking at the browse interface through the staff client makes a
+ difference.
+
+ This builds on the two previous commits that provide inter-authority
+ linking and the linking of metabib.browse_entry rows to authority
+ records.
+
+ This also contains, in squashed form, these commits that resulted from
+ collaboration on LP #1177810:
+
+ Two bugfixes to OPAC Browse: non-filing indicators, leading-article warning
+ Fix paste-o encountered in Bib browse upgrade script
+ OPAC Browse: fix 0-9 link in paging shortcuts; padding issues
+ OPAC Browse: Improve authority code to show more headings
+ OPAC Browse: Fix authority counting
+ Extensions to our MODS32 stylesheet to capture all possible NFI in fields
+ OPAC Browse: i18n improvement for short terms
+ OPAC Browser: Display Public General Notes from authorities when possible
+ OPAC Browse: Build browse entry sort_value column separately from value
+ OPAC Browse: We don't want role/relator info in browse headings
+ OPAC Browse: Better display of tracings from authorities
+ OPAC Browse: Pick up authority links from 650 fields
+ OPAC Browse: Show authority tracings only when inter-authority links exist
+ OPAC Browse: use superpage concept for performance; fix other counting bug
+ OPAC Browse: Fix broken authority reference link
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+14 0 Open-ILS/examples/fm_IDL.xml
+17 0 Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+8 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
+2 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+424 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm
+17 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+2 0 Open-ILS/src/sql/Pg/002.schema.config.sql
+1 0 Open-ILS/src/sql/Pg/011.schema.authority.sql
+286 14 Open-ILS/src/sql/Pg/030.schema.metabib.sql
+119 81 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+228 57 Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql
+1 1 Open-ILS/src/sql/Pg/999.functions.global.sql
+1 1 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config-metabib-interauthority.sql
+605 61 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql
+5 3 Open-ILS/src/templates/opac/advanced.tt2
+174 0 Open-ILS/src/templates/opac/browse.tt2
+39 4 Open-ILS/src/templates/opac/css/style.css.tt2
+9 0 Open-ILS/src/templates/opac/parts/config.tt2
+7 6 Open-ILS/src/templates/opac/parts/qtype_selector.tt2
+4 4 Open-ILS/src/templates/opac/parts/searchbar.tt2
+0 1 Open-ILS/web/css/skin/default/opac/semiauto.css
+45 0 docs/RELEASE_NOTES_NEXT/OPAC/BibAuthBrowse.txt
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm
+ create mode 100644 Open-ILS/src/templates/opac/browse.tt2
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/BibAuthBrowse.txt
+
+commit d2f4cac923668ff05854ffc9720cafe514b9b71c
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Thu Mar 28 18:02:32 2013 -0400
+
+ Link browse entries to authority record when possible
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+25 3 Open-ILS/src/sql/Pg/030.schema.metabib.sql
+22 0 Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql
+16 16 Open-ILS/src/sql/Pg/954.data.MODS33-xsl.sql
+6885 0 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib-auth-browse.sql
+
+commit 3eb616e56c82a5106e14f5a446f1d875015db7f0
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Fri Mar 22 17:11:50 2013 -0400
+
+ Inter-authority linking
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 0 Open-ILS/examples/fm_IDL.xml
+14 1 Open-ILS/src/sql/Pg/011.schema.authority.sql
+4 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+67 0 Open-ILS/src/sql/Pg/999.functions.global.sql
+129 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config-metabib-interauthority.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.config-metabib-interauthority.sql
+
+commit de357eac00a21080ad2ebb1b361568bffe123049
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Mon Aug 5 16:40:02 2013 -0400
+
+ Fix org unit setting names for this example test
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+6 6 Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.pg
+
+commit c22418f9a1adf9af2734bd76d97d6acf938750d3
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Aug 6 12:20:33 2013 -0400
+
+ Add release note for checkout trimming whitespaces from beginning and end of barcodes
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+6 0 docs/RELEASE_NOTES_NEXT/Circulation/trim-whitespace-checkout.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/trim-whitespace-checkout.txt
+
+commit 4eb066033edea348660a0e54a45cdec8528804dc
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Jul 2 19:36:53 2013 +0300
+
+ Trim whitespace from beginning and end of the barcode in checkout.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+2 2 Open-ILS/xul/staff_client/server/circ/checkout.js
+
+commit 5fe3ec70460bdd75af7bccd2967ccb62dd475c81
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Aug 6 12:13:15 2013 -0400
+
+ Stamping upgrade script for "delate" typo
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+9 0 Open-ILS/src/sql/Pg/upgrade/0814.data.fix-delate-typo.sql
+0 9 Open-ILS/src/sql/Pg/upgrade/XXXX.data.fix-delate-typo.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0814.data.fix-delate-typo.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.fix-delate-typo.sql
+
+commit 63195f57eeef5d7bcd3f7cb86e2d66408a65e944
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Mon Jul 15 10:01:57 2013 +0300
+
+ Fix typo "delate" in permission descriptions.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+9 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.fix-delate-typo.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.fix-delate-typo.sql
+
+commit 72e2f9378361f990636e025d96b43e80a7967f50
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Thu Aug 1 15:27:18 2013 -0400
+
+ Stamping upgrade script for LP1204273.
+
+ Repair org unit settings for making state not required
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+29 0 Open-ILS/src/sql/Pg/upgrade/0813.data.state-field-settings-fix.sql
+0 29 Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0813.data.state-field-settings-fix.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql
+
+commit d2ef1684cc4b71bc7714edb7a5dfdac19739fabc
+Author: Ben Shum <bshum at biblio.org>
+Date: Mon Jul 22 15:10:37 2013 -0400
+
+ LP1204273 - Repair org unit settings for making state not required
+
+ As noted by tsbere in IRC, the org unit settings were using "au" instead of "aua"
+ which led to issues applying the settings and making the addresses require the
+ state field.
+
+ Also, change the constraint for field_name on actor.org_unit_setting_type_log to
+ be "DEFERRABLE INITIALLY DEFERRED" to be more flexible and consistent with other
+ parts of the database relating to org unit setting names.
+
+ And, the table auditor.actor_usr_address_history needs to be updated so that
+ state can be NULL there as well.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+9 9 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+29 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql
+3 3 Open-ILS/web/js/ui/default/actor/user/register.js
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.state-field-settings-fix.sql
+
+commit d6ec45265c0d1b4b1b9444d3525e0e7e13b646f7
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Mon Jul 22 19:03:24 2013 -0400
+
+ make-pgtap-tests.pl
+
+ For seeding a baseline set of pgTAP tests for Evergreen. By default, assumes
+ PostgreSQL is running on localhost at port 5432 with a database name of
+ "evergreen", and with an "evergreen" user configured with password "evergreen".
+
+ Command-line options for tweaking these are
+
+ -db_name=? -db_host=? -db_port=? -db_user=? -db_pw=?
+
+ Make sure to install pgTAP (probably best do it from source for all the
+ assertion functions we're using) for the database you want to run the tests
+ against.
+
+ I did the following for my test environment:
+
+ git clone git://github.com/theory/pgtap.git
+ cd pgtap
+ make
+ make installcheck
+ sudo make install
+
+ Then in my Evergreen database with psql, I did:
+
+ CREATE EXTENSION pgtap;
+
+ I also installed a CPAN module to get pg_prove:
+
+ sudo cpan TAP::Parser::SourceHandler::pgTAP
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+589 0 Open-ILS/src/sql/Pg/make-pgtap-tests.pl
+ create mode 100755 Open-ILS/src/sql/Pg/make-pgtap-tests.pl
+
+commit 7e8eec68388a661c68970622bccc07711b80fe47
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Mon Jun 24 16:07:44 2013 -0400
+
+ Use the .pg extension
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+47 0 Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.pg
+0 47 Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.s
+67 0 Open-ILS/src/sql/Pg/t/dewey.pg
+0 67 Open-ILS/src/sql/Pg/t/dewey.s
+52 0 Open-ILS/src/sql/Pg/t/schema.pg
+0 52 Open-ILS/src/sql/Pg/t/schema.s
+35 0 Open-ILS/src/sql/Pg/t/versions.pg
+0 35 Open-ILS/src/sql/Pg/t/versions.s
+ create mode 100644 Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.pg
+ delete mode 100644 Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.s
+ create mode 100644 Open-ILS/src/sql/Pg/t/dewey.pg
+ delete mode 100644 Open-ILS/src/sql/Pg/t/dewey.s
+ create mode 100644 Open-ILS/src/sql/Pg/t/schema.pg
+ delete mode 100644 Open-ILS/src/sql/Pg/t/schema.s
+ create mode 100644 Open-ILS/src/sql/Pg/t/versions.pg
+ delete mode 100644 Open-ILS/src/sql/Pg/t/versions.s
+
+commit bd4d76518cd3ce3476d5ea39bd584aaba2a8b69e
+Author: Galen Charlton <gmc at esilibrary.com>
+Date: Fri Apr 12 02:41:47 2013 -0400
+
+ add regression test for LP#1155329
+
+ Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+22 0 Open-ILS/src/sql/Pg/t/regress/lp1155329_use_id_for_tcn.pg
+ create mode 100644 Open-ILS/src/sql/Pg/t/regress/lp1155329_use_id_for_tcn.pg
+
+commit 97983b6660718a9420ba245a13945efe064c03ce
+Author: Galen Charlton <gmc at esilibrary.com>
+Date: Fri Apr 12 02:21:09 2013 -0400
+
+ use .pg extension for pgTAP test cases
+
+ That way, pg_prove --recurse t/ will DWIM.
+
+ Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+44 0 Open-ILS/src/sql/Pg/t/naco_normalize.pg
+0 44 Open-ILS/src/sql/Pg/t/naco_normalize.sql
+ create mode 100644 Open-ILS/src/sql/Pg/t/naco_normalize.pg
+ delete mode 100644 Open-ILS/src/sql/Pg/t/naco_normalize.sql
+
+commit bb98f3fd2887468ada6b3cee7cdccd05b809c545
+Author: Galen Charlton <gmc at esilibrary.com>
+Date: Wed Apr 10 20:18:10 2013 -0400
+
+ start adding pgTAP test cases
+
+ pgTAP is a PostgreSQL unit testing framework; about which
+ more can be found at http://pgtap.org/
+
+ This commit introduces the first pgTAP test case, which exercises
+ the NACO normalization functions.
+
+ To run the tests, install pgTAP, create an Evergreen database that
+ contains (for now) just the seed data, and from the top of the
+ source tree run
+
+ pg_prove -vr -U evergreen Open-ILS/src/sql/Pg/t/*
+
+ Replace '-U evergreen' with the psql command-line switches
+ needed to access your database.
+
+ To install pgTAP on a Debian Wheezy system, you can do:
+
+ Then, to load the pgTAP extension into the database, run
+
+ psql> CREATE EXTENSION pgtap;
+
+ Signed-off-by: Galen Charlton <gmc at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+44 0 Open-ILS/src/sql/Pg/t/naco_normalize.sql
+ create mode 100644 Open-ILS/src/sql/Pg/t/naco_normalize.sql
+
+commit c36c86e4bf1e8be3a613a267e7462ff3c080c45d
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Mon Jun 24 15:36:10 2013 -0400
+
+ pgTAP examples
+
+ These specific ones do not assume stock test data such as the concerto bibs, and
+ I think such tests should go elsewhere. You need to install pgTAP. I did the
+ following for my test environment:
+
+ git clone git://github.com/theory/pgtap.git
+ cd pgtap
+ make
+ make installcheck
+ sudo make install
+
+ Then in my Evergreen database with psql, I did:
+
+ CREATE EXTENSION pgtap;
+
+ I also installed a CPAN module to get pg_prove:
+
+ sudo cpan TAP::Parser::SourceHandler::pgTAP
+
+ You can use psql to run a given test like so:
+
+ opensrf at dev141:~/git/Evergreen/Open-ILS/src/sql/Pg/t (pgtap)$ psql -d evergreen -f 0799.state_field_required_toggle.s
+ 1..4
+ ok 1 - actor.usr_address.state does not have the NOT NULL constraint
+ ok 2 - ui.patron.edit.au.state.require exists
+ ok 3 - ui.patron.edit.au.state.show exists
+ ok 4 - ui.patron.edit.au.state.suggest exists
+
+ Or you can use pg_prove on all or some of them:
+
+ opensrf at dev141:~/git/Evergreen/Open-ILS/src/sql/Pg/t (pgtap)$ pg_prove -d evergreen *.s
+ 0799.state_field_required_toggle.s .. ok
+ dewey.s ............................. 1/6
+ # Failed (TODO) test 6: "testing prefix plus decimal"
+ # 'YR_DVD_800_100000000000000'
+ # <
+ # 'YR_000000000000000_DVD_900'
+ dewey.s ............................. ok
+ schema.s ............................ ok
+ versions.s .......................... ok
+ All tests successful.
+ Files=4, Tests=39, 0 wallclock secs ( 0.05 usr 0.03 sys + 0.13 cusr 0.07 csys = 0.28 CPU)
+ Result: PASS
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+47 0 Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.s
+1 0 Open-ILS/src/sql/Pg/t/README
+67 0 Open-ILS/src/sql/Pg/t/dewey.s
+52 0 Open-ILS/src/sql/Pg/t/schema.s
+35 0 Open-ILS/src/sql/Pg/t/versions.s
+ create mode 100644 Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.s
+ create mode 100644 Open-ILS/src/sql/Pg/t/README
+ create mode 100644 Open-ILS/src/sql/Pg/t/dewey.s
+ create mode 100644 Open-ILS/src/sql/Pg/t/schema.s
+ create mode 100644 Open-ILS/src/sql/Pg/t/versions.s
+
+commit 33b6b485aff2b89312b9f6c3cb7f39e4857e2551
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Tue Jun 25 16:54:45 2013 -0400
+
+ C unit test examples for Evergreen
+
+ Building off of Kevin Beswick's work in OpenSRF
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+2 0 Open-ILS/src/c-apps/Makefile.am
+21 0 Open-ILS/src/c-apps/tests/Makefile.am
+46 0 Open-ILS/src/c-apps/tests/check_idl.c
+46 0 Open-ILS/src/c-apps/tests/check_util.c
+15 0 Open-ILS/src/c-apps/tests/testsuite.c
+4 0 Open-ILS/src/c-apps/tests/testsuite.h
+1 0 configure.ac
+ create mode 100644 Open-ILS/src/c-apps/tests/Makefile.am
+ create mode 100644 Open-ILS/src/c-apps/tests/check_idl.c
+ create mode 100644 Open-ILS/src/c-apps/tests/check_util.c
+ create mode 100644 Open-ILS/src/c-apps/tests/testsuite.c
+ create mode 100644 Open-ILS/src/c-apps/tests/testsuite.h
+
+commit ace3d994af1b375180fcafc533f12d32a20bc352
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Tue Jun 25 17:02:37 2013 -0400
+
+ The check library for Debian and Fedora
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+3 0 Open-ILS/src/extras/Makefile.install
+
+commit 11f04eaa4a97e78d8c8c11a63fff221e4935a13d
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Jun 13 15:45:11 2013 -0400
+
+ Test for an MFHD warning in 14-OpenILS-Utils.t
+
+ Specifically "Cannot compress without pattern data, returning original holdings"
+
+ I also added Test::Warn to Makefile.install for Debian and Fedora.
+
+ --
+ Bill moved the @comp_holdings variable declaration outside of the
+ warning_like block to avoid a new warning:
+
+ Name "main::comp_holdings" used only once: possible typo at
+ t/14-OpenILS-Utils.t line 42.
+ ---
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+2 0 Open-ILS/src/extras/Makefile.install
+8 2 Open-ILS/src/perlmods/t/14-OpenILS-Utils.t
+
+commit e4559139d5dd6dcf311c32a8bc9f0a73d5f774ce
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Jun 13 14:40:45 2013 -0400
+
+ Eliminate a warning in Z3950.pm
+
+ Noticed in 06-OpenILS-Application-Search.t:
+ Odd number of elements in anonymous hash at /usr/local/share/perl/5.10.1/OpenILS/Application/Search/Z3950.pm line 532.
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm
+
+commit dae5f2a1f1057ed4fdd83ca1b861ca2864fe6b45
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Wed Jul 24 10:02:08 2013 -0400
+
+ Fix error on deleted hold in transit
+
+ May be caused by purging holds combined with "Checkout fills related hold"
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+14 7 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+
+commit 14956259a3c5f23c2255de3f0c33533555f4d80d
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Mon Jun 17 13:30:59 2013 +0300
+
+ Fix transposed acq invoice receive table column titles
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/templates/acq/invoice/receive.tt2
+
+commit d0604dbdddfe41faa8444aac66900edf34f4af32
+Author: Dan Scott <dan at coffeecode.net>
+Date: Mon Jul 22 10:55:14 2013 -0400
+
+ Wrap upgrade script for TPAC library name links
+
+ Signed-off-by: Dan Scott <dan at coffeecode.net>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+23 0 Open-ILS/src/sql/Pg/upgrade/0812.data.add_library_info_url_OUS.sql
+0 11 Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0812.data.add_library_info_url_OUS.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql
+
+commit 256229c024871954a9e0c082e5e02396c8b4aef1
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Mon Jul 8 14:06:48 2013 -0400
+
+ Support linking to library info from copy display
+
+ If the "Library information URL" library setting has a value, then the
+ copy display section of the TPAC and KPAC will turn the library name
+ for that branch into a link to the given URL. This supports the patron
+ goal of quickly finding branch information such as hours of operation,
+ directions, and contact information.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Dan Scott <dan at coffeecode.net>
+
+9 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+11 0 Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql
+9 1 Open-ILS/src/templates/kpac/parts/copy_table.tt2
+5 3 Open-ILS/src/templates/opac/parts/misc_util.tt2
+4 1 Open-ILS/src/templates/opac/parts/record/copy_table.tt2
+8 1 Open-ILS/src/templates/opac/parts/result/table.tt2
+14 0 docs/RELEASE_NOTES_NEXT/OPAC/link_library_names.txt
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_library_info_url_OUS.sql
+ create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/link_library_names.txt
+
+commit bc9ea5cafd18ea612bc9ccd271f2a64bd08656d2
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Wed Jul 17 13:25:29 2013 -0400
+
+ Stamping upgrade script for authority labeling fix
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+10 0 Open-ILS/src/sql/Pg/upgrade/0810.data.authority_4xx_fields.sql
+0 10 Open-ILS/src/sql/Pg/upgrade/XXXX.data.authority_4xx_fields.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0810.data.authority_4xx_fields.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.authority_4xx_fields.sql
+
+commit ae25f788e275d75d58dd0f0c91ba96d9ddf844ed
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Fri Jul 12 13:11:57 2013 -0400
+
+ Implement a concurrent-run cache for result rendering a la initial search queue compression
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+70 14 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+
+commit 153a840b78bd224351bfe779d6720eb04958d892
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Jul 16 18:33:32 2013 +0300
+
+ Fix untranslatable strings in the selfcheck interface.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+4 0 Open-ILS/web/js/dojo/openils/circ/nls/selfcheck.js
+4 4 Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
+
+commit b137ced2eb64640d0dd144122da415c9a9d95b45
+Author: Michael Peters <mrpeters at library.in.gov>
+Date: Wed Aug 22 08:25:25 2012 -0400
+
+ Initial selfcheck styling enhancements
+
+ * Convert action links to buttons for increased clarity
+ * Convert dashed fieldsets to gradient backed bubbles for depth
+ * Color line-item table headers to distinguish from actual line-items
+ * Color logo background for increased contrast
+ * Larger input box
+ * Background on prompts to distinguish from logo background
+
+ Signed-off-by: Michael Peters <mrpeters at library.in.gov>
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+ Conflicts:
+ Open-ILS/src/templates/circ/selfcheck/main.tt2
+ Open-ILS/src/templates/circ/selfcheck/summary.tt2
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+6 1 Open-ILS/src/templates/circ/selfcheck/banner.tt2
+1 1 Open-ILS/src/templates/circ/selfcheck/main.tt2
+6 6 Open-ILS/src/templates/circ/selfcheck/summary.tt2
+99 14 Open-ILS/web/css/skin/default/selfcheck.css
+- - Open-ILS/web/images/self_eg_logo.png
+ create mode 100644 Open-ILS/web/images/self_eg_logo.png
+
+commit 335f8899ef9bd807823796d977f31bd3cc8b6ba6
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Jul 2 09:13:40 2013 +0300
+
+ Move action.hold_request_cancel_cause inserts for i18n
+
+ Move action.hold_request_cancel_cause inserts to 950.data.seed-values.sql
+ so they're picked up for translation.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+0 8 Open-ILS/src/sql/Pg/090.schema.action.sql
+11 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit e5ab813eecef8c7b832200885ad15c8a6b9f7409
+Author: Ben Shum <bshum at biblio.org>
+Date: Fri Jul 12 16:44:44 2013 -0400
+
+ Add release note for Print Single Item Receipt
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+7 0 docs/RELEASE_NOTES_NEXT/Circulation/print-single-receipt.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/print-single-receipt.txt
+
+commit e7814461d7747e679c2b44d8ae33d71efd5e8fd0
+Author: edoceo <code at edoceo.com>
+Date: Thu Apr 25 10:52:43 2013 -0700
+
+ Adds the option to print a single item from the Items Out.
+ A new button and right-click option are created.
+
+ Signed-off-by: edoceo <code at edoceo.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+33 0 Open-ILS/xul/staff_client/server/patron/items.js
+8 0 Open-ILS/xul/staff_client/server/patron/items_overlay.xul
+
+commit 1c5edfe9546ab79685f1024e3b3e924ab75fecda
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Thu Jun 27 11:23:11 2013 +0300
+
+ Add missing character set definitions to data URIs.
+ Also use encodeURIComponent() instead of escape() so the UTF-8 characters stay intact.
+ Also, fix the print macro help popup window size.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+2 2 Open-ILS/web/opac/common/js/utils.js
+1 1 Open-ILS/xul/staff_client/chrome/content/auth/controller.js
+1 1 Open-ILS/xul/staff_client/chrome/content/util/error.js
+5 5 Open-ILS/xul/staff_client/chrome/content/util/print.js
+1 1 Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js
+2 2 Open-ILS/xul/staff_client/server/cat/marc_view.xul
+4 4 Open-ILS/xul/staff_client/server/circ/print_list_template_editor.js
+4 4 Open-ILS/xul/staff_client/server/patron/display.js
+
+commit 73f71659fa2d1dd6bcbc726cd24d9563e9df52d4
+Author: Ben Shum <bshum at biblio.org>
+Date: Fri Jul 12 15:36:06 2013 -0400
+
+ Stamping upgrade script for making state not required in org unit address
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+8 0 Open-ILS/src/sql/Pg/upgrade/0809.schema.org-addr-state-null.sql
+0 5 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org-addr-state-null.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0809.schema.org-addr-state-null.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org-addr-state-null.sql
+
+commit 85bba93741c8292bcab30c301b18e6fa79640c2a
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Mon Jun 10 10:32:41 2013 +0300
+
+ Do not explicitly require the state field in org unit addresses.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/sql/Pg/005.schema.actors.sql
+5 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org-addr-state-null.sql
+4 4 Open-ILS/web/conify/global/actor/org_unit.html
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.org-addr-state-null.sql
+
+commit 82e6978f5b33909c2cbb646c1dd36086e7ae7254
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Jul 12 14:29:30 2013 -0400
+
+ Whitespace-only changes to Fieldmapper.pm
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+12 12 Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm
+
+commit e3089098b4b27022597f7514af44108d4b3f5021
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Mon Mar 19 18:35:52 2012 -0400
+
+ Teach Fieldmapper (Perl) to record and expose field datatype
+
+ We record most everything from the IDL, but until now we skipped datatype
+ because it's generally not useful in perl. But, there might be uses. So
+ now we record it, and expose it through the class and instance FieldDatatype
+ method. Also added is a more general FieldInfo method, which returns a hash
+ containing field attributes, including but not limited to:
+
+ * virtual [1|0]
+ * required [1|0]
+ * position [array position for internal implementation]
+ * datatype [bool|float|id|int|interval|link|money|number|org_unit|text|timestamp]
+ * validate [regexp]
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+18 0 Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm
+
+commit 213dcee877b95aa3987de4d93e83012d24d5d93c
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Fri Jul 12 12:28:58 2013 -0400
+
+ fix editing think-o in release note
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+1 1 docs/RELEASE_NOTES_NEXT/Client/user-setting-defaults.txt
+
+commit b6d0ee7f0eeed0c65270a13aba0627f2e7c83cdd
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Fri Jul 12 12:21:47 2013 -0400
+
+ upgrde scrpt/release note for Usr Setting Defaults
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+9 0 Open-ILS/src/sql/Pg/upgrade/0807.usr_setting_default.sql
+0 2 Open-ILS/src/sql/Pg/upgrade/XXXX.usr_setting_default.sql
+4 0 docs/RELEASE_NOTES_NEXT/Client/user-setting-defaults.txt
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0807.usr_setting_default.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.usr_setting_default.sql
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Client/user-setting-defaults.txt
+
+commit 959bcf1f3ff5d33a610686a363337cb75b3a1365
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Fri Jul 12 12:16:10 2013 -0400
+
+ match surrounding whitespace
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+1 1 Open-ILS/examples/fm_IDL.xml
+
+commit 6d77e5d64b180f5f78627547418757ecb2d7e4e5
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Tue Oct 2 16:47:42 2012 -0400
+
+ User Setting Registration Defaults
+
+ Add a new reg_default value for user setting types. On patron registration
+ the value (if any) is used as a default for the patron.
+
+ Only applicable to those settings editable via the patron editor.
+
+ Intended use cases:
+
+ 1 - Hold Notification Type Default other than phone:email
+ 2 - A/T user settings defaulting to "on" at registration
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+1 0 Open-ILS/examples/fm_IDL.xml
+1 0 Open-ILS/src/sql/Pg/002.schema.config.sql
+2 0 Open-ILS/src/sql/Pg/upgrade/XXXX.usr_setting_default.sql
+8 0 Open-ILS/web/js/ui/default/actor/user/register.js
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.usr_setting_default.sql
+
+commit 64475ab576d6bc7ee4fd27e0255c0d30ba369c1f
+Author: Remington Steed <rjs7 at calvin.edu>
+Date: Mon Jul 8 11:35:45 2013 -0400
+
+ Staff client index: Add tooltips, restore spacing
+
+ This commit adds to Pasi's improvements of the staff client index (or
+ portal) page by adding a tooltip message to all of the "open in a new
+ tab" icons, using the already translatable alt text of the icon. Also,
+ this commit restores the original padding on the rows, which was changed
+ when border-collapse was previously added.
+
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+15 1 Open-ILS/xul/staff_client/server/index.xhtml
+
+commit ed3880a0229fb1440130cc8de163133c55fe3495
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Jul 2 10:57:19 2013 +0300
+
+ Make staff client index more user friendly
+
+ by letting the user click on a bigger area instead of trying to hit
+ the exact location of the text, and making the entry hilighted.
+ Also simplify the html a bit.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+67 100 Open-ILS/xul/staff_client/server/index.xhtml
+
+commit 1ac7a24188fe435586da0d373ce461dab9ef1af8
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Thu Jul 11 13:14:04 2013 -0400
+
+ LP833820 repair ACQ options passing thinko
+
+ Ensure zero_copy_activate option is passed down to
+ create_lineitem_debits with new no-asset-activation code. Thanks to Dan
+ Wells for spotting this.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+3 2 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+
+commit 94313130f81553691967bcd8c50c17b361a8e301
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Wed Jul 10 21:49:16 2013 -0400
+
+ Release notes entry for PO activation without loading items.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+5 0 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-po-activation-sans-assets.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Acquisitions/acq-po-activation-sans-assets.txt
+
+commit bc9b805468865055184eb1f2232855a21e224124
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Nov 27 15:26:48 2012 -0500
+
+ Support PO activation w/o loading items
+
+ Allow for the activation of purchase orders without requiring that bibs
+ and items be loaded. (Currently, if bibs and items are not manually
+ loaded, they are loaded during PO activation).
+
+ Adds a new link next to the existing PO Activate link for "Activate
+ Withoug Loading Items". Apart from the fact that there are no
+ underlying bibs/copies, such a PO behaves the same as any other PO.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+ Conflicts:
+ Open-ILS/src/templates/acq/po/view.tt2
+ Open-ILS/web/js/ui/default/acq/po/view_po.js
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+
+13 8 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+9 1 Open-ILS/src/templates/acq/po/view.tt2
+1 0 Open-ILS/web/js/dojo/openils/acq/nls/acq.js
+19 6 Open-ILS/web/js/ui/default/acq/po/view_po.js
+
+commit 357b6ca85f240b249f393cc24c44dbbccba75acd
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Thu Jul 11 13:09:11 2013 -0400
+
+ Stamping hold-cancel-via-sip upgrade script
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+9 0 Open-ILS/src/sql/Pg/upgrade/0806.data.hold_cancel_via_sip.sql
+0 9 Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_cancel_via_sip.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0806.data.hold_cancel_via_sip.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_cancel_via_sip.sql
+
+commit 2deb25817573b3761b8644e120794dd3c63f7877
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Thu Jul 11 12:31:37 2013 -0400
+
+ Unbreaking wrong-direction conflict resolution from previous commit
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+2 2 Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
+
+commit 47879808611511f8db11b5f3d6831151543531bd
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Nov 27 10:42:58 2012 -0500
+
+ SIP hold cancellation support
+
+ Implement a subset of SIP message pair 15/16 for holds cancellation.
+
+ 1. New oils_sip.xml configuration option "msg64_hold_datatype". This
+ is similar to msg64_summary_datatype, but affacts holds instead of
+ circulations. When set to 'barcode', holds information will be
+ delivered as a set of copy barcodes instead of title strings for patron
+ info requests. With barcodes, SIP clients can both find the title
+ strings for display (via item info requests) and make subseqent
+ hold-related action requests, like holds cancellation.
+
+ --
+ Copies are not an ideal identifier for holds, but SIP has a limited
+ vocabulary. With copies we can (99% of the time) work to and from hold
+ requests to find a reasonable data set to work on. If a patron has
+ multiple holds for the same item and wants to cancel a specific one of
+ those holds, the user should use the catalog instead of SIP.
+ --
+
+ 2. When receiving a message 15 of with a cancellation action, find the
+ newest open hold that matches the provided copy barcode and cancel the
+ hold.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+11 0 Open-ILS/examples/oils_sip.xml.example
+54 57 Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
+146 37 Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
+73 0 Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Hold.pm
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Hold.pm
+
+commit a4450ce1500cb83f995d8811dcf7f03e7a6374c2
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Nov 28 10:44:14 2012 -0500
+
+ New "patron via SIP" hold cancellation reason
+
+ Seed data and upgrade script.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 0 Open-ILS/src/sql/Pg/090.schema.action.sql
+9 0 Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_cancel_via_sip.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_cancel_via_sip.sql
+
+commit f9a57897338dd2568c5057d0ff0ed37ffe40ba57
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Mon May 27 13:01:52 2013 +0300
+
+ LP1182393: 'Service' in circ offline checkout columns is untranslatable
+
+ Move that string into the common message catalog as
+ staff.checkout_column_label_service
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/xul/staff_client/server/circ/util.js
+1 0 Open-ILS/xul/staff_client/server/locale/en-US/common.properties
+
+commit 78ef108791fd2ec1050aab057464f5fbbd175feb
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Thu Jun 13 11:59:12 2013 +0300
+
+ Use the phrase "Add Search Row" in both advanced and expert search.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/templates/opac/parts/advanced/expert.tt2
+
+commit 6a25b321280371818281ea180cdbf4e90509acc2
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Jul 11 10:41:32 2013 -0400
+
+ Maintenance message: avoid Unicode corruption, support KPAC
+
+ By shifting from an Apache config environment variable to a config.tt2
+ variable, we gain the advantage of more robust Unicode support as well
+ as the ability to turn maintenance messages on or off without requiring
+ a reload of Apache.
+
+ However, we do lose the convenience of per-vhost maintenance messages;
+ sites requiring this functionality can use the ctx.hostname variable to
+ provide conditional per-host messages.
+
+ This also adds support for displaying the maintenance message in the
+ KPAC.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+0 3 Open-ILS/examples/apache/eg.conf.in
+0 2 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+3 0 Open-ILS/src/templates/kpac/parts/base.tt2
+5 0 Open-ILS/src/templates/opac/parts/config.tt2
+3 5 Open-ILS/src/templates/opac/parts/topnav.tt2
+7 0 Open-ILS/web/css/skin/default/kpac/style.css
+
+commit 70d25de2bdd7837f3740769495655b9922e6397c
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Thu May 24 12:37:33 2012 -0400
+
+ SIP2: Return slightly more hold info
+
+ We don't have a normal hold queue, but if there is a hold we can call that
+ the hold queue. So return the ID of the hold that was captured.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/src/perlmods/lib/OpenILS/SIP/Item.pm
+
+commit 4e030f77264f7f7a11029a4390bc4ec990d65829
+Author: James Fournie <jfournie at sitka.bclibraries.ca>
+Date: Fri Feb 22 17:28:29 2013 -0800
+
+ Server maintenance message via Apache config
+
+ This adds a custom maintenance message which you can issue in your
+ Apache config by setting the environment variable "MAINTENANCE_MESSAGE"
+ and restarting/reloading Apache. This message appears in the TPAC for
+ both staff and patrons in the form of a red banner across the top of the
+ screen.
+
+ Signed-off-by: James Fournie <jfournie at sitka.bclibraries.ca>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+3 0 Open-ILS/examples/apache/eg.conf.in
+2 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+9 1 Open-ILS/src/templates/opac/css/style.css.tt2
+5 0 Open-ILS/src/templates/opac/parts/topnav.tt2
+6 0 Open-ILS/web/opac/skin/default/xml/home/index_body.xml
+
+commit 117a66a7c6e11764665314817beb617e5596f3fe
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Jul 10 21:03:38 2013 -0400
+
+ Revert 56a63f03 and try again
+
+ I totally screwed up this commit by committing old versions of files
+ instead of the deltas against current master. Reverting, then will apply
+ the correct commit.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+0 154 Open-ILS/examples/apache/eg.conf
+0 2 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+45 16 Open-ILS/src/templates/opac/css/style.css.tt2
+1 6 Open-ILS/src/templates/opac/parts/topnav.tt2
+ delete mode 100644 Open-ILS/examples/apache/eg.conf
+
+commit 56a63f03c5f057fa06e1b093fdc35906e3ac4176
+Author: James Fournie <jfournie at sitka.bclibraries.ca>
+Date: Wed Jul 10 20:41:51 2013 -0400
+
+ Server maintenance message via Apache config
+
+ This adds a custom maintenance message which you can issue in your
+ Apache config by setting the environment variable "MAINTENANCE_MESSAGE"
+ and restarting/reloading Apache. This message appears in the TPAC for
+ both staff and patrons in the form of a red banner across the top of the
+ screen.
+
+ Signed-off-by: James Fournie <jfournie at sitka.bclibraries.ca>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+154 0 Open-ILS/examples/apache/eg.conf
+2 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+16 45 Open-ILS/src/templates/opac/css/style.css.tt2
+6 1 Open-ILS/src/templates/opac/parts/topnav.tt2
+ create mode 100644 Open-ILS/examples/apache/eg.conf
+
+commit 6bf2e8f997c28fb4c26a0565ff8ce1cb7cc36341
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Wed Jul 10 12:44:33 2013 -0400
+
+ Stamping upgrade script for Desk Renewal Circ Lib
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+18 0 Open-ILS/src/sql/Pg/upgrade/0805.schema.desk_renewal_reuse_circ_lib.sql
+0 18 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.desk_renewal_reuse_circ_lib.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0805.schema.desk_renewal_reuse_circ_lib.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.desk_renewal_reuse_circ_lib.sql
+
+commit 931dcde1977afa8aa442cdb8c3e18eba937d25b7
+Author: Ben Shum <bshum at biblio.org>
+Date: Mon Feb 11 12:16:10 2013 -0500
+
+ Desk Renewal at original circ library
+
+ In the same spirit as OPAC Renewal at the original circ library, include a
+ new setting to allow the same for Desk Renewals.
+
+ See 8823e4060bbc825c859327b018c5f8cb29b9ac2a and related.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+15 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+12 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+18 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.desk_renewal_reuse_circ_lib.sql
+8 0 docs/RELEASE_NOTES_NEXT/Circulation/desk-renewal-at-original-circ-lib.txt
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.desk_renewal_reuse_circ_lib.sql
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/desk-renewal-at-original-circ-lib.txt
+
+commit c260a675d60119edb9d23d0dd86213e81d681df9
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Wed Jul 10 10:53:41 2013 -0400
+
+ Stamping upgrade script for empty seed description
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+9 0 Open-ILS/src/sql/Pg/upgrade/0803.data.fill_empty_description.sql
+0 9 Open-ILS/src/sql/Pg/upgrade/XXXX.data.fill_empty_description.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0803.data.fill_empty_description.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.fill_empty_description.sql
+
+commit a1344fa35bd6690e8b9495e54dfa4b1e157cab12
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Fri Aug 17 13:57:08 2012 -0400
+
+ Simplified pull list: More name options
+
+ Because sometimes you don't want the alias to override the entire name.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+28 1 Open-ILS/examples/fm_IDL.xml
+
+commit 8a1598e34dfea1c61c8ffa1c8f676b0e8099339a
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Fri Jun 28 10:22:59 2013 +0300
+
+ Don't let pref_ou repeat in staff recent searches list
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+
+commit d2a8ca3104453778b80c40395b991e0c8b348b5c
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Fri Jun 7 09:25:56 2013 -0400
+
+ Modify default logging of SIP2 in oils_ctl.sh.
+
+ Change the default of OILS_SIP_ERR_LOG from /dev/null to
+ LOCALSTATEDIR/log/oils_sip.log to mirror what is done with the
+ Z39.50 log.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/examples/oils_ctl.sh
+
+commit f0f70c455756d1666328cc1028a04036c7d1d6d7
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Jun 11 12:29:29 2013 +0300
+
+ Fix LP#1108668 by marking the internet access level column contents as translatable in fm_IDL.xml
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/examples/fm_IDL.xml
+
+commit 4cfa942dab61505927d2ebb996ec3a385fc96064
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Tue Jul 9 11:46:31 2013 -0400
+
+ Stamping upgrade script for file-order authority subfields
+
+ And fixing a small typo.
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+170 0 Open-ILS/src/sql/Pg/upgrade/0802.function.authority-sf-file-order.sql
+0 170 Open-ILS/src/sql/Pg/upgrade/XXXX.function.authority-sf-file-order.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0802.function.authority-sf-file-order.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.function.authority-sf-file-order.sql
+
+commit 333c1b847552f1682ba856c9608e2e0b3db40fdf
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Tue Jul 9 10:09:39 2013 -0400
+
+ Upgrade script for file-order authority subfields
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+170 0 Open-ILS/src/sql/Pg/upgrade/XXXX.function.authority-sf-file-order.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.function.authority-sf-file-order.sql
+
+commit 4307f5d7377906100b7fbc55f3f2344e778d0c59
+Author: Mike Rylander <mrylander at gmail.com>
+Date: Tue Jun 25 10:03:36 2013 -0400
+
+ Preserve record order of subfields for authority heading extraction
+
+ When extracting headings from authority records we currently read the
+ subfields of a tag in configuration order. We should, instead, read
+ them in record order, to preserve the desired sorting properties that
+ the cataloger has encoded in the record.
+
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+ Signed-off-by: Yamil Suarez <yamil at yamil.com>
+
+43 33 Open-ILS/src/sql/Pg/011.schema.authority.sql
+
+commit f6c06a2e370281680d35f3094f09b05a6ca0d56b
+Author: Michael Peters <mrpeters at library.in.gov>
+Date: Thu Apr 5 10:23:32 2012 -0400
+
+ LP#973666: Print Purchase Order does not print PO Name
+
+ Printing a PO from the menu option "Actions-->Print Purchase Order"
+ generates a document that displays the PO #, but not the PO Name. It
+ was suggested that it would be helpful if the print document
+ displayed the PO Name instead of, or in addition to, the PO #. This
+ commit adds the PO Name in the default template for new installs,
+ but does not affect upgrades.
+
+ Signed-off-by: Michael Peters <mrpeters at library.in.gov>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit ab37833ff9df7fa13e86e41fb160232bdee51793
+Author: Ben Shum <bshum at biblio.org>
+Date: Mon Jul 8 10:33:12 2013 -0400
+
+ Stamping upgrade script for user barcode regex setting
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+16 0 Open-ILS/src/sql/Pg/upgrade/0801.check_barcode_regex.sql
+0 10 Open-ILS/src/sql/Pg/upgrade/XXXX.check_barcode_regex.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0801.check_barcode_regex.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.check_barcode_regex.sql
+
+commit 47bfda2570939d9560e1c3aac330feb1e2e735d5
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Tue Jan 31 16:50:21 2012 -0500
+
+ Add registration/edit time barcode restrictions
+
+ In the quest to not let staff put bad data into the system (losing battle,
+ but hey, gotta keep trying, right?), add a barcode regex specifically for
+ patron registration.
+
+ This intentionally does *not* check the opac "is this a barcode?" value.
+
+ Use cases for not checking that value include, but are not limited to:
+
+ Special "barcodes" for staff accounts. Specific OUs may have a barcode
+ regex of ".*" to ensure they can use anything for these accounts.
+
+ Different prefixes per library - To prevent libraries from using another
+ library's prefix, but still detect all of them as barcodes.
+
+ Special case "this is a barcode" checks for the opac, like legacy barcodes
+ that should no longer be assigned to new patrons, or on edits.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+9 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+10 0 Open-ILS/src/sql/Pg/upgrade/XXXX.check_barcode_regex.sql
+19 0 Open-ILS/web/js/ui/default/actor/user/register.js
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.check_barcode_regex.sql
+
+commit 7f1ae7e5d686e9f4d6ee62b9d22aa88ac3eb116d
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Wed Jun 26 23:01:36 2013 -0400
+
+ Sign off on apostrophe upgrade script
+
+ Also had to quote the \qecho commands to prevent them from being
+ executed instead of simply set to STDOUT.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+ Conflicts:
+ Open-ILS/src/sql/Pg/002.schema.config.sql
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+202 0 Open-ILS/src/sql/Pg/upgrade/0800.function.apostrophe-search.sql
+0 202 Open-ILS/src/sql/Pg/upgrade/XXXX.function.apostrophe-search.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0800.function.apostrophe-search.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.function.apostrophe-search.sql
+
+commit 79eb7d97debfa8e4292f3f3170fe862ddd09f8ca
+Author: Kathy Lussier <klussier at masslnc.org>
+Date: Fri Apr 12 16:40:34 2013 -0700
+
+ Generate Password Label
+
+ The "Reset" label for the button that generates random passwords can be
+ confusing for staff. Changes the label to "Generate Password" to let
+ people know what the button does.
+
+ Signed-off-by: Kathy Lussier <klussier at masslnc.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/web/js/dojo/openils/actor/nls/register.js
+
+commit 14354b693ca19511e4d5465ca3e344308c85c235
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Jun 14 14:21:10 2013 -0400
+
+ Post-2.5-m1 whitespace fixup
+
+ This is an attempt at an automated whitespace cleanup for the m1
+ milestone of version 2.5. It was created using the following
+ commands (run from Open-ILS/src/perlmods/lib):
+
+ find . -name "*.pm" \
+ -exec sh -c 'sed "/<</s/\t/ /g" < {} \
+ | expand -t 4 > {}.fixed ; \
+ cp --no-preserve=mode,ownership {}.fixed {}; \
+ rm {}.fixed' \;
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+ Signed-off-by: Remington Steed <rjs7 at calvin.edu>
+
+7 7 Open-ILS/src/perlmods/lib/OpenILS/Application.pm
+6 6 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Claims.pm
+3 3 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/EDI.pm
+77 77 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm
+9 9 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Invoice.pm
+6 6 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Lineitem.pm
+55 55 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm
+27 27 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Picklist.pm
+18 18 Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Provider.pm
+1108 1108 Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
+93 93 Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/ClosedDates.pm
+251 251 Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/Container.pm
+12 12 Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/Stage.pm
+74 74 Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/UserGroups.pm
+833 833 Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+250 250 Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm
+15 15 Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AuthCommon.pm
+23 23 Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm
+202 202 Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/BibCommon.pm
+174 174 Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Merge.pm
+643 643 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm
+10 10 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm
+40 40 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+53 53 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CopyLocations.pm
+237 237 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/HoldNotify.pm
+3 3 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+116 116 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/NonCat.pm
+267 267 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/ScriptBuilder.pm
+431 431 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/StatCat.pm
+226 226 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Survey.pm
+233 233 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Transit.pm
+16 16 Open-ILS/src/perlmods/lib/OpenILS/Application/Penalty.pm
+1 1 Open-ILS/src/perlmods/lib/OpenILS/Application/PermaCrud.pm
+28 28 Open-ILS/src/perlmods/lib/OpenILS/Application/Proxy.pm
+351 351 Open-ILS/src/perlmods/lib/OpenILS/Application/Reporter.pm
+22 22 Open-ILS/src/perlmods/lib/OpenILS/Application/Search.pm
+41 41 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/AddedContent.pm
+212 212 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Authority.pm
+598 598 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
+52 52 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/CNBrowse.pm
+56 56 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Serial.pm
+39 39 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Zips.pm
+51 51 Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm
+109 109 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage.pm
+704 704 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm
+28 28 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/action.pm
+15 15 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm
+6 6 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm
+4 4 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/authority.pm
+3 3 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm
+2 2 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/booking.pm
+2 2 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/metabib.pm
+9 9 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/money.pm
+1 1 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/permission.pm
+6 6 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/serial.pm
+206 206 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg.pm
+27 27 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/cdbi.pm
+728 728 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm
+83 83 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/fts.pm
+367 367 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/storage.pm
+157 157 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/FTS.pm
+643 643 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher.pm
+1488 1488 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
+533 533 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm
+509 509 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/asset.pm
+205 205 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/authority.pm
+406 406 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/biblio.pm
+51 51 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/config.pm
+2423 2423 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
+230 230 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/money.pm
+67 67 Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/permission.pm
+2260 2260 Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm
+1 1 Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm
+2 2 Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/AstCall.pm
+2 2 Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm
+2 2 Open-ILS/src/perlmods/lib/OpenILS/Const.pm
+36 36 Open-ILS/src/perlmods/lib/OpenILS/Event.pm
+3 3 Open-ILS/src/perlmods/lib/OpenILS/Perm.pm
+99 99 Open-ILS/src/perlmods/lib/OpenILS/Reporter/Proxy.pm
+575 575 Open-ILS/src/perlmods/lib/OpenILS/Reporter/SQLBuilder.pm
+20 20 Open-ILS/src/perlmods/lib/OpenILS/SIP/Item.pm
+19 19 Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction.pm
+5 5 Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Checkout.pm
+23 23 Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Renew.pm
+13 13 Open-ILS/src/perlmods/lib/OpenILS/Template/Plugin/WebSession.pm
+19 19 Open-ILS/src/perlmods/lib/OpenILS/Template/Plugin/WebUtils.pm
+313 313 Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm
+16 16 Open-ILS/src/perlmods/lib/OpenILS/Utils/Configure.pm
+278 278 Open-ILS/src/perlmods/lib/OpenILS/Utils/Editor.pm
+283 283 Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm
+25 25 Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm
+7 7 Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Date.pm
+370 370 Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm
+7 7 Open-ILS/src/perlmods/lib/OpenILS/Utils/Normalize.pm
+47 47 Open-ILS/src/perlmods/lib/OpenILS/Utils/OfflineStore.pm
+127 127 Open-ILS/src/perlmods/lib/OpenILS/Utils/PermitHold.pm
+15 15 Open-ILS/src/perlmods/lib/OpenILS/Utils/RemoteAccount.pm
+469 469 Open-ILS/src/perlmods/lib/OpenILS/Utils/ScriptRunner.pm
+321 321 Open-ILS/src/perlmods/lib/OpenILS/Utils/SpiderMonkey.pm
+71 71 Open-ILS/src/perlmods/lib/OpenILS/Utils/ZClient.pm
+46 46 Open-ILS/src/perlmods/lib/OpenILS/WWW/BadDebt.pm
+6 6 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+1 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm
+236 236 Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm
+1 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/PasswordReset.pm
+113 113 Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy.pm
+22 22 Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy/Authen.pm
+25 25 Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm
+86 86 Open-ILS/src/perlmods/lib/OpenILS/WWW/Reporter.pm
+476 476 Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat/Feed.pm
+19 19 Open-ILS/src/perlmods/lib/OpenILS/WWW/Vandelay.pm
+34 34 Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm
+5 5 Open-ILS/src/perlmods/lib/Template/Plugin/ResolverResolver.pm
+
+commit dd0ad7d8045bae6a1c3a2ca2f067fd350da05f87
+Author: Ben Shum <bshum at biblio.org>
+Date: Fri Jun 7 16:21:07 2013 -0400
+
+ Stamping upgrade script for making state not required
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+69 0 Open-ILS/src/sql/Pg/upgrade/0799.state_field_required_toggle.sql
+0 69 Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0799.state_field_required_toggle.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
+
+commit a9d5cd96f2e4cc6684002538733fcc960e2ec75c
+Author: Ben Shum <bshum at biblio.org>
+Date: Wed Jun 5 00:40:53 2013 -0400
+
+ LP1079041 - making state not required (continued)
+
+ The last commit did not add the default YAOUS to the seed data. Also, some
+ wording tweaks to bring the content in line with the existing entries for
+ consistency.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+27 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+7 7 Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
+
+commit 2fd3e8a20e73f78bb1f997fbdd120dea4f24a3b8
+Author: Michael Peters <mrpeters at library.in.gov>
+Date: Thu Nov 15 12:49:05 2012 -0500
+
+ Make the "state" field in registration a togglable YAOUS
+
+ Some countries do not use "State" therefore we need to create
+ a YAOUS to make it non-required/displaying. This also requires
+ that we no longer force a "not null" on state in actor.usr_address.
+
+ Signed-off-by: Michael Peters <mrpeters at library.in.gov>
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/sql/Pg/005.schema.actors.sql
+69 0 Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
+1 1 Open-ILS/src/templates/actor/user/register_table.tt2
+4 1 Open-ILS/web/js/ui/default/actor/user/register.js
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.state_field_required_toggle.sql
+
+commit d4d42526de97ce1aba91d76de0f2dfad5ee3711b
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Jun 7 15:58:55 2013 -0400
+
+ Stamping upgrade script for purge circs fixes
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+212 0 Open-ILS/src/sql/Pg/upgrade/0798.function.purge_circulations_updates.sql
+0 207 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_circulations_updates.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0798.function.purge_circulations_updates.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_circulations_updates.sql
+
+commit e70c9cd218aa7148bd3be6736f3be463abf12942
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Mon Mar 25 09:10:40 2013 -0400
+
+ Add srfsh script to call action.purge_circulations().
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/Makefile.am
+7 0 Open-ILS/src/support-scripts/purge_circulations.srfsh
+ create mode 100755 Open-ILS/src/support-scripts/purge_circulations.srfsh
+
+commit b370f8417c3ff48cba5577fa9cb04dbda3d24127
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Wed Sep 19 11:30:40 2012 -0400
+
+ Return count purged
+
+ Because postgres dislikes functions that don't return.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+2 0 Open-ILS/src/sql/Pg/090.schema.action.sql
+2 0 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_circulations_updates.sql
+
+commit c399232c4f82d59f53c275056d3b0ae0b5c3d309
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Mon Sep 10 12:14:09 2012 -0400
+
+ Fix rentention typo
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+1 1 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_circulations_updates.sql
+
+commit 867448d6007877096441160812e60b0bf8646718
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Mon Jun 18 13:45:21 2012 -0400
+
+ Purge Circulations: Unwrapped Upgrade Script
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+205 0 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_circulations_updates.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_circulations_updates.sql
+
+commit 6ae718ec5e6541857d62c8e5f02e11817ebbc36a
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Mon Jun 18 13:29:58 2012 -0400
+
+ Purge Circulations: Allow global age as forced min
+
+ This allows a library to keep all circs in the last Y interval, regardless
+ of user settings that may otherwise cause an earlier purging.
+
+ Another global flag that defaults to off controls this behavior.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+7 1 Open-ILS/src/sql/Pg/090.schema.action.sql
+8 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit e9c7e761b49bcde12e1719c6644cb810cbbf1722
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Mon Jun 18 13:19:18 2012 -0400
+
+ Purge Circulations: Remove extra delete loop
+
+ A trigger on action.circulation purges upwards through the circ chain. Thus
+ we don't need to do the loop ourselves.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 4 Open-ILS/src/sql/Pg/090.schema.action.sql
+
+commit 8f324450421997cb5619d7ba00e38d423ad466d8
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Mon Jun 18 13:07:56 2012 -0400
+
+ Purge Circulations: Better selection logic
+
+ This attempts two things:
+
+ 1 - Keep the number of circs the library wants based on the most recent
+ circulations, regardless of user prefs and such.
+
+ This is accomplished by changing the circ fetching query to use a
+ window function in a subquery so we can filter on it easily.
+
+ This also allowed removal of the purge position counter.
+
+ 2 - Allow removal of circs that are between kept circs if they meet all
+ other removal criteria.
+
+ This is accomplished by using CONTINUE instead of EXIT in the loop.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+12 13 Open-ILS/src/sql/Pg/090.schema.action.sql
+
+commit 9b352b2b69fdbdabf24b07ec7f4d8d474330e205
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Mon Jun 18 13:00:30 2012 -0400
+
+ Purge Circulations: Support last xact_finished use
+
+ Based on a new (off by default) global flag change between the xact_finish
+ on the last circ in the chain and the most recent one.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+11 2 Open-ILS/src/sql/Pg/090.schema.action.sql
+10 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+
+commit 98d1254a4f36390cca3d0eeef5c402d191c25678
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Mon Jun 18 12:52:04 2012 -0400
+
+ Purge Circulations: Skip partially complete chains
+
+ Billings in earlier portions of the chain may leave them open. Thus, look
+ for any circulations in the chain with a null xact_finish.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+3 1 Open-ILS/src/sql/Pg/090.schema.action.sql
+
+commit f9e98718eb532c5e536f5a9a15b8d9c080b53343
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Mon Jun 18 12:49:39 2012 -0400
+
+ Circ Chain Functions should take BIGINTs
+
+ Because INTEGER isn't suitable for circ IDs.
+
+ This only requires editing the input definitions.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+2 2 Open-ILS/src/sql/Pg/090.schema.action.sql
+
+commit cc0ef7448c8a92f1715dd1726aead4409a8b0e08
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Jun 7 15:31:37 2013 -0400
+
+ Stamping upgrade script for purge holds functionality
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+372 0 Open-ILS/src/sql/Pg/upgrade/0797.schema.action.purge_holds.sql
+0 368 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action.purge_holds.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0797.schema.action.purge_holds.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action.purge_holds.sql
+
+commit eb4fc15d55d1a74a9fafe24a033955a6a757a2c6
+Author: Jason Stephenson <jason at sigio.com>
+Date: Wed Apr 10 17:29:28 2013 -0400
+
+ Update the purge_holds.txt release notes.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+3 1 docs/RELEASE_NOTES_NEXT/purge_holds.txt
+
+commit 246fff2d71f640954194f999af0a59f06a416e9a
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Thu Apr 4 11:30:25 2013 -0400
+
+ Add table, view and trigger for "aging" hold requests on delete.
+
+ This creates the action.aged_hold_request table, the
+ action.all_hold_request view, the action.age_hold_on_delete
+ function, and the action_hold_request_aging_tgr on action.hold_request.
+
+ Add fieldmapper entries for action.all_hold_request view and
+ action.aged_hold_request table.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+117 0 Open-ILS/examples/fm_IDL.xml
+204 0 Open-ILS/src/sql/Pg/090.schema.action.sql
+0 163 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_holds.sql
+368 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action.purge_holds.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_holds.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action.purge_holds.sql
+
+commit dc40c1c748cfbb0c4b14d94b5fe72825cb110a08
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Mon Apr 1 16:59:59 2013 -0400
+
+ Add a purge_holds.srfsh script so it can be run from cron.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 0 Open-ILS/src/Makefile.am
+7 0 Open-ILS/src/support-scripts/purge_holds.srfsh
+ create mode 100755 Open-ILS/src/support-scripts/purge_holds.srfsh
+
+commit 765aea78207f879e81eeb9f3d7614699399e585f
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Tue Apr 2 10:18:55 2013 -0400
+
+ Fix typo in purge holds function
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/sql/Pg/090.schema.action.sql
+1 1 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_holds.sql
+
+commit d43e92f682f6e06a61d508944cf340093168e77a
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Wed Feb 13 16:08:01 2013 -0500
+
+ Release notes for Purge Holds routine
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+7 0 docs/RELEASE_NOTES_NEXT/purge_holds.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/purge_holds.txt
+
+commit 86995bbb791f3ba0771e92921f756f6680a22571
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Wed Feb 13 15:41:44 2013 -0500
+
+ Fix seed values and upgrade script
+
+ enabled and label were out of order.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+1 1 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+1 1 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_holds.sql
+
+commit 0771f7c6ea249a336ec7e68bd6e1949311ce3856
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Thu Jun 21 09:55:05 2012 -0400
+
+ Make user visible holds based on fill/cancel time
+
+ Instead of request time. That way holds don't vanish after filling when
+ keeping history was turned on after hold placement.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+2 2 Open-ILS/src/sql/Pg/090.schema.action.sql
+63 0 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_holds.sql
+
+commit 1523a8b6c8512cac58d8ecbe5a5456265eb6fcf3
+Author: Thomas Berezansky <tsbere at mvlc.org>
+Date: Thu Jun 21 09:44:11 2012 -0400
+
+ Add purge_holds DB function
+
+ This allows removing of holds based on patron and library preferences.
+
+ Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+
+59 0 Open-ILS/src/sql/Pg/090.schema.action.sql
+39 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+100 0 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_holds.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.purge_holds.sql
+
+commit 288c1d1c5f23e991bbaf74c42ed4fba7ef5c1151
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Jun 7 15:07:30 2013 -0400
+
+ We still don't support Z30.59 or Z39.59
+
+ Actually, just fix a few typos :)
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/templates/opac/myopac/lists.tt2
+1 1 Open-ILS/web/opac/locale/en-US/lang.dtd
+1 1 docs/RELEASE_NOTES_NEXT/z39_batch_search_queue.txt
+
+commit d7376fdf678deeb4932388fb78ec4066de16b338
+Author: Dan Wells <dbw2 at calvin.edu>
+Date: Fri Jun 7 14:57:48 2013 -0400
+
+ Stamping upgrade script for batch z39.50 search, match, overlay
+
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+107 0 Open-ILS/src/sql/Pg/upgrade/0795.schema.z39-batch-fetch-overlay.sql
+136 0 Open-ILS/src/sql/Pg/upgrade/0796.schema.vandelay_bucket_match.sql
+0 107 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql
+0 136 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.vandelay_bucket_match.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0795.schema.z39-batch-fetch-overlay.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0796.schema.vandelay_bucket_match.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.vandelay_bucket_match.sql
+
+commit e047b415d433b41b42348f7093e2f9afab89f050
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Mar 5 09:20:43 2013 -0500
+
+ Z39.50 Batch Search/Overlay : SQL / IDL
+
+ Copied some missing pieces from the upgrade scripts into the seed schema
+ / data files.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+35 0 Open-ILS/src/sql/Pg/002.schema.config.sql
+1 0 Open-ILS/src/sql/Pg/012.schema.vandelay.sql
+1 0 Open-ILS/src/sql/Pg/800.fkeys.sql
+7 2 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql
+2 1 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.vandelay_bucket_match.sql
+
+commit 3bb8ff29f2c1d9c1e536035903b47d0d8a2bb53a
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Feb 25 11:37:28 2013 -0500
+
+ Z39.50 Batch Search/Overlay Release Notes
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+89 0 docs/RELEASE_NOTES_NEXT/z39_batch_search_queue.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/z39_batch_search_queue.txt
+
+commit 20fd7bb9d558ae75a6bd1ccde77865fc3e318fce
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Feb 25 13:17:59 2013 -0500
+
+ Z39.50 Batch Search/Overlay TPAC my-list entry point
+
+ Similar to the staff client bucket UI, this adds a button which allows
+ staff to access the batch Z39 search-and-queue operation directly from
+ the TPAC my-lists UI.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+7 0 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+21 0 Open-ILS/src/templates/opac/myopac/lists.tt2
+
+commit 91d11f40825fc18f743f950294feeac276eec570
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Feb 25 10:37:11 2013 -0500
+
+ Z39.50 Batch Search/Overlay Z-Index Admin UI
+
+ Admin -> Server Admin -> Z-Index Field Maps
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+118 0 Open-ILS/src/templates/conify/global/config/z3950_index_field_map.tt2
+1 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+4 0 Open-ILS/xul/staff_client/chrome/content/main/menu.js
+4 0 Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
+ create mode 100644 Open-ILS/src/templates/conify/global/config/z3950_index_field_map.tt2
+
+commit a422aa3f6b5837c7730b513780524ffe2571c0ac
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Feb 25 10:36:54 2013 -0500
+
+ Z39.50 Batch Search/Overlay minor IDL repairs
+
+ Added some missing reporter:selector attributes and repaired an invalid
+ link class.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+3 3 Open-ILS/examples/fm_IDL.xml
+
+commit 3c656e65e787a5b1d2569a69c8aff5354f9f5223
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Feb 18 10:41:01 2013 -0500
+
+ Z39.50 Batch Search/Overlay Z-Search UI
+
+ Adds a new "Find Z39.50 Matches" option to Cataloging -> Manage Record
+ Buckets. When selected, the user chooses the Z39 fields, the Z39
+ sources, the destination queue, and the queue match set. The user then
+ submits the search. Basic progress info is reported to the user.
+ Once complete, the user can open the destination queue, from which
+ regular vandelay import, etc. actions may be performed on the newly
+ found records.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+12 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+236 0 Open-ILS/xul/staff_client/server/cat/bucketz39_dialog.js
+35 0 Open-ILS/xul/staff_client/server/cat/bucketz39_dialog.xul
+97 0 Open-ILS/xul/staff_client/server/cat/bucketz39_dialog_overlay.xul
+25 0 Open-ILS/xul/staff_client/server/cat/record_buckets.js
+3 0 Open-ILS/xul/staff_client/server/cat/record_buckets_overlay.xul
+5 0 Open-ILS/xul/staff_client/server/skin/bucketz39.css
+ create mode 100644 Open-ILS/xul/staff_client/server/cat/bucketz39_dialog.js
+ create mode 100644 Open-ILS/xul/staff_client/server/cat/bucketz39_dialog.xul
+ create mode 100644 Open-ILS/xul/staff_client/server/cat/bucketz39_dialog_overlay.xul
+ create mode 100644 Open-ILS/xul/staff_client/server/skin/bucketz39.css
+
+commit 9dff75bd1173f2f9806087752f75cae3b5108a91
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Feb 13 14:07:29 2013 -0500
+
+ Z39.50 Batch Search/Overlay Seed Data
+
+ Org unit setting seed data:
+ * cat.z3950.batch.max_parallel
+ * cat.z3950.batch.max_parallel
+
+ Stock / sample seed data entries for config.z3950_index_field_map, with
+ room added for future stock data.
+
+ Vandelay bib attribute seed data for Z39.50 source (901z), which is
+ stamped during the Z39.50 batch search-and-queue operation.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+7 2 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm
+58 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+50 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql
+
+commit 437aa283e1f7dd121268ee362db87ebd05a58235
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Feb 13 12:16:24 2013 -0500
+
+ Vandelay : sort queued records by matches
+
+ Sort queued records by their matches (based on the first match) so that
+ like records are grouped in the queue interface.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+20 5 Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm
+
+commit 59cc4b9524bfcf9a56f54c5ed5a3d56a7d1b86e6
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Thu Jan 31 12:37:44 2013 -0500
+
+ Vandelay record bucket-limited matching
+
+ Provides the option to link record buckets to vandelay queues. When
+ linked, vandelay imports where a match set is specified will limit
+ matches to records within the selected bucket.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+2 0 Open-ILS/examples/fm_IDL.xml
+2 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Vandelay.pm
+16 4 Open-ILS/src/sql/Pg/012.schema.vandelay.sql
+0 1 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql
+135 0 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.vandelay_bucket_match.sql
+5 0 Open-ILS/src/templates/vandelay/inc/upload.tt2
+42 5 Open-ILS/web/js/ui/default/vandelay/vandelay.js
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/YYYY.schema.vandelay_bucket_match.sql
+
+commit 446284353bb7f6072198af09a0ff8b9379f2a481
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Jan 30 17:44:30 2013 -0500
+
+ Z39.50 Batch Search/Overlay API
+
+ New API for performing Z39.50 queries for a set of bib records across a
+ set of Z39 sources. Searches are performed in parallel (up to a
+ configurable maximum number of active searches and maximum results) and
+ results are stored in a vandelay MARC Import/Export queue.
+
+ Search fields and values are determined by Z39 index field maps. At
+ search time, the caller provides a set of field maps to use for the
+ search. Search values for each bib record are found by following the
+ index maps to the indexed values in metabib.*_field_entry or
+ metabib.record_attr.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+374 1 Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm
+
+commit 832e9b0bc783d12babf6dd0f310a7e7fb8f78fc9
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Wed Jan 30 15:08:47 2013 -0500
+
+ Z39.50 Batch Search/Overlay : SQL / IDL
+
+ * DB table for Z39.50 index field maps, which link Z39 search fields to
+ indexed bib data via metabib fields and record attributes (svf)
+
+ * Seed data for Z39.50 batch search org unit settings
+ ** cat.z3950.batch.max_parallel
+ ** cat.z3950.batch.max_results
+
+ * Stock seed data for config.z3950_index_field_map entries
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+28 0 Open-ILS/examples/fm_IDL.xml
+53 0 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.z39-batch-fetch-overlay.sql
+
+commit 418bbfa33aecb0bdbc118d2162ae6b7e3c2b8d8b
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Fri Apr 5 13:28:08 2013 -0400
+
+ Repair SIP start/end list ranges
+
+ SIP supports paging of certain lists (holds, fines, etc.) by allowing
+ the SIP client to provide start and end points for lists. This patch
+ repairs how Evgreen extracts the list ranges from arrays.
+
+ When using Perl array ranges, the array variable should be accessed via
+ '@' and not '$'. Prior to this change, all ranged lists resulted in
+ returning the first item in the list instead of the full range.
+
+ This change affects lists of holds, overdues, fines, and charges.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jeff Godin <jgodin at tadl.org>
+
+4 4 Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
+
+commit 9eb947d7266e01c3eb9c42ef001bb76b2c85282e
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Jan 7 09:35:55 2013 -0500
+
+ SIP renew-all; reset renewal statuses
+
+ Reset the list of renewed and unrenewed items for each instance of the
+ RenewAll transactions. Otherwise, items from previous transactions will
+ bleed into the current transaction.
+
+ While we're in there, fix a couple of tabs.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+7 5 Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm
+
+commit 2c964ef481c4613a187268ec8b5800a2dac889dd
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Mon Nov 26 14:51:27 2012 -0500
+
+ SIP RenewAll
+
+ Adds SIP plugin support for SIP message types 65/66 (Renew All). When
+ requested, the plugin performs a renewal on all items currently checked
+ out for the user.
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Mike Rylander <mrylander at gmail.com>
+
+1 1 Open-ILS/examples/oils_sip.xml.example
+23 0 Open-ILS/src/perlmods/lib/OpenILS/SIP.pm
+5 2 Open-ILS/src/perlmods/lib/OpenILS/SIP/Item.pm
+3 2 Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
+0 2 Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Renew.pm
+69 0 Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm
+ create mode 100644 Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm
+
+commit 3a0dd23027cf94d0149ae637eef765f736205f75
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Fri Jun 7 09:42:57 2013 -0400
+
+ LP1040147 Return wrong-shelf holds in clearable list
+
+ 1. Change the staff client "View Shelf-Expired Holds" action label to
+ "View Clearable Holds".
+
+ 2. When "View Clearable Holds" is selected, display both shelf-expired
+ and wrong-shelf holds.
+
+ New API calls:
+
+ open-ils.circ.captured_holds.expired_on_shelf_or_wrong_shelf.retrieve
+ open-ils.circ.captured_holds.id_list.expired_on_shelf_or_wrong_shelf.retrieve
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+35 0 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+1 1 Open-ILS/xul/staff_client/chrome/content/main/constants.js
+
+commit 221ed45e9c93587b1e6461597f3932de4ee818f3
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Jun 6 19:00:45 2013 -0400
+
+ change checkbox label in Browse Hold Shelf
+
+ from View Shelf-Expired Holds to View Clearable Holds
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+1 1 Open-ILS/web/opac/locale/en-US/lang.dtd
+
+commit 0759846a2dd381db698ffd04b873129655f869b9
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Jun 6 17:49:46 2013 -0400
+
+ add Current Shelf Library column to xul interfaces
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+
+31 0 Open-ILS/xul/staff_client/server/circ/util.js
+1 0 Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+1 0 Open-ILS/xul/staff_client/server/locale/en-US/common.properties
+
+commit aea4764fea34c1f1ba3bd617b811dde2404a87a1
+Author: Bill Erickson <berick at esilibrary.com>
+Date: Tue Aug 21 17:19:54 2012 -0400
+
+ Include Wrong-Shelf holds in clear-shelf results
+
+ Include non-expired, Wrong-Shelf holds in the results list of the "Clear
+ Shelf-Expired Holds" process. ("Wrong-Shelf" holds are those whose
+ pickup lib was changed while the hold was on the holds shelf). The idea
+ behind this option is that branches may use the clear-shelf process as a
+ general shelf management report beyond just holds that have expired.
+ I.e. tell me everything I need to remove from the shelf.
+
+ This change includes a label change for the clear-shelf menu options:
+
+ "Clear Shelf-Expired Holds" -> "Clear Holds Shelf"
+
+ Signed-off-by: Bill Erickson <berick at esilibrary.com>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+38 1 Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+2 2 Open-ILS/web/opac/locale/en-US/lang.dtd
+1 0 Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+
+commit c9eaeb57d803a448bd763f915acca2db1901915f
+Author: Angela Kilsdonk <akilsdonk at esilibrary.com>
+Date: Fri Jun 7 10:04:27 2013 -0400
+
+ Asciidoc edit for My Lists documentation
+
+ Change to asciidoc structure in opac/my_lists.txt
+
+ Signed-off-by: Angela Kilsdonk <akilsdonk at esilibrary.com>
+
+2 2 docs/opac/my_lists.txt
+
+commit e9531be98f5f72775da475388660840b19a0e565
+Author: Ben Shum <bshum at biblio.org>
+Date: Thu Jun 6 20:14:08 2013 -0400
+
+ Remove unnecessary TPAC toggle strings on staff client splash page
+
+ Accidentally reintroduced with commit ad86ef5d3c689c9b514cc09bfc93e7f451461dc7,
+ we can skip adding back TPAC toggle strings to the index.xhtml file since that
+ toggle action has been removed from the page.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+0 2 Open-ILS/xul/staff_client/server/index.xhtml
+
+commit 3e10372c3a3e7eb3928affdc790277b164c8c45a
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Jun 6 17:39:24 2013 -0400
+
+ lp1183525 Edit Item Attributes pop-up dimensions
+
+ Took Steven Chan's patch from the launchpad bug and added "stickiness" to the
+ window dimensions. So by default, it'll come up maximized, but once adjusted,
+ it will stay adjusted.
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+2 0 Open-ILS/xul/staff_client/server/cat/copy_editor.xul
+
+commit fd91f3a20da530e73fa639952576b91575cfc7fe
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Thu May 2 15:00:31 2013 -0400
+
+ "Return to record" after submission of phone number on SMS page fixed
+
+ Before this, it only worked on the page load *before* form submission.
+ There's probably a more elegant solution that doesn't involve keeping
+ track of URIs, but this seems to me to work.
+
+ Problem relayed to me by Dale Rigney at Equinox, who helped reproduce
+ the issue and test a fix.
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+1 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/SMS.pm
+
+commit 8c4192c71b361acd852f04866f8e5936e3d9be42
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Thu Jun 6 16:47:13 2013 -0400
+
+ fix copy/paste error
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+1 1 Open-ILS/xul/staff_client/chrome/content/main/main.xul
+
+commit 109e8e0d584d57e3b1185681df723746899b439a
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Wed Mar 20 01:21:28 2013 +0200
+
+ Allow translating more strings in xul-files.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+175 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+3 3 Open-ILS/xul/staff_client/chrome/content/main/main.xul
+1 1 Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
+1 1 Open-ILS/xul/staff_client/chrome/content/util/browser.xul
+2 2 Open-ILS/xul/staff_client/chrome/content/util/list_clipboard.xul
+1 1 Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul
+8 5 Open-ILS/xul/staff_client/server/OpenILS/symbol_overlay.xul
+4 4 Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul
+3 3 Open-ILS/xul/staff_client/server/cat/bibs_abreast.xul
+1 1 Open-ILS/xul/staff_client/server/patron/bill_summary_overlay.xul
+5 5 Open-ILS/xul/staff_client/server/serial/manage_dists.xul
+23 23 Open-ILS/xul/staff_client/server/serial/manage_subs.xul
+1 1 Open-ILS/xul/staff_client/server/serial/pattern_wizard.xul
+95 98 Open-ILS/xul/staff_client/server/serial/pattern_wizard_overlay.xul
+1 1 Open-ILS/xul/staff_client/server/serial/sbsum_editor.xul
+1 1 Open-ILS/xul/staff_client/server/serial/scap_editor.xul
+3 3 Open-ILS/xul/staff_client/server/serial/sdist2_editor.xul
+3 3 Open-ILS/xul/staff_client/server/serial/sdist_editor.xul
+5 5 Open-ILS/xul/staff_client/server/serial/select_aou.xul
+5 5 Open-ILS/xul/staff_client/server/serial/select_unit.xul
+8 8 Open-ILS/xul/staff_client/server/serial/serctrl_main.xul
+1 1 Open-ILS/xul/staff_client/server/serial/sisum_editor.xul
+3 3 Open-ILS/xul/staff_client/server/serial/sitem_editor.xul
+1 1 Open-ILS/xul/staff_client/server/serial/sssum_editor.xul
+1 1 Open-ILS/xul/staff_client/server/serial/sstr_editor.xul
+
+commit 8f03641c4e31c4dffb4432d1ae06cae928ab07a6
+Author: Steven Callender <stevecallender at esilibrary.com>
+Date: Mon Mar 11 15:48:57 2013 -0400
+
+ Add the copy number to the list of data being pulled for access by the TPAC.
+
+ Signed-off-by: Steven Callender <stevecallender at esilibrary.com>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+3 2 Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm
+
+commit ad86ef5d3c689c9b514cc09bfc93e7f451461dc7
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Thu Mar 7 12:17:09 2013 +0200
+
+ Allow translating the staff client tab names
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+11 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+36 14 Open-ILS/xul/staff_client/server/index.xhtml
+
+commit 96c877ea56afaf59927859eb63ad4ddd2172d0db
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Jun 6 14:01:07 2013 -0400
+
+ Fix Latin-1 encoding that broke doc output
+
+ asciidoc only expects and can only handle utf-8 encoding :)
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+3 8 docs/opac/my_lists.txt
+
+commit f5727683ea8cabd74bb2ccf8e6e41429ef1b9889
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Thu Mar 21 12:01:24 2013 +0200
+
+ Improve the db-seed-i18n.py -script to actually grab all strings.
+
+ Previously the script could only handle oils_i18n_gettext -markers
+ if the marker and it's parameters were all on one line.
+
+ Now it also correctly parses the postgres E'' escaped strings, and
+ removes sql string concatenations.
+
+ Also adds test cases.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+40 34 build/i18n/scripts/db-seed-i18n.py
+158 0 build/i18n/tests/data/sql2pot.pot
+116 0 build/i18n/tests/data/sqlsource.sql
+
+commit d51fa3aa9886981ab7f6c5d10bc18e17f425aa5f
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Jun 6 12:13:36 2013 -0400
+
+ Add new POT files to git so "make newpo" will work
+
+ Running "make newpo" errored out because the po subdirectories didn't
+ exist for the newly added POT files. This will also enable translators
+ to access the strings in Launchpad.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+108 0 build/i18n/po/URLVerify.js/URLVerify.js.pot
+73 0 build/i18n/po/match_set.js/match_set.js.pot
+36 0 build/i18n/po/serial.js/serial.js.pot
+24 0 build/i18n/po/vandelay.js/vandelay.js.pot
+ create mode 100644 build/i18n/po/URLVerify.js/URLVerify.js.pot
+ create mode 100644 build/i18n/po/match_set.js/match_set.js.pot
+ create mode 100644 build/i18n/po/serial.js/serial.js.pot
+ create mode 100644 build/i18n/po/vandelay.js/vandelay.js.pot
+
+commit 9b5a19f1e3284ae359a73d8543a48b3676654e81
+Author: Pasi Kallinen <pasi.kallinen at pttk.fi>
+Date: Tue Jun 4 12:01:32 2013 +0300
+
+ Add missing dojo nls files to the i18n toolchain, and fix one of the files so they be built.
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+2 2 Open-ILS/web/js/dojo/openils/vandelay/nls/vandelay.js
+26 0 build/i18n/Makefile
+
+commit 3b828afbe3dab8f764a7378b65ade1e190be5d56
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Jun 6 09:40:59 2013 -0400
+
+ Fedora RPM for bzip2 headers is bzip2-devel
+
+ There was an attempt to add the right RPM for the bzip2 headers in
+ Makefile.install, but that failed on Fedora 19. Swap in bzip2-devel
+ instead to correct that.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+2 2 Open-ILS/src/extras/Makefile.install
+
+commit dcf9cb39d3243ea3a59035c150d521cf5816b9c8
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Mon Oct 22 18:02:23 2012 -0400
+
+ TPAC: First part of locg param can be branch shortname
+
+ Addresses LP #1020625. You can use the locg param, which can set an
+ an OU for search context (and which has other implications related to
+ location/scope) by shortname now.
+
+ As long as your shortnames are something that work in an HTTP query
+ string, don't contain colons, and as long as you don't have numeric
+ shortnames for any orgs that would mask orgs with the sames numbers
+ as an ID (but that would be a lousy setup anyway), this should work.
+
+ Now case insensitive per recommendation by Michael Peters. In the
+ event that you have org units with names that are the same except
+ for case (probably a bad practice), the locg parameter will simply
+ fail to set your context, rather than try to guess which org unit
+ you meant.
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+ Conflicts:
+ Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+
+34 1 Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+2 1 Open-ILS/src/templates/opac/parts/misc_util.tt2
+
+commit e103aadbf620e75933a3de80c901a5f91d98f5e8
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Jun 4 23:17:17 2013 -0400
+
+ Move lost items modification release notes
+
+ Moved to the Circulation category and small changes to the formatting for
+ conversion.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+14 0 docs/RELEASE_NOTES_NEXT/Circulation/lost_items_modifications.txt
+0 14 docs/RELEASE_NOTES_NEXT/lost_items_modifications.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/lost_items_modifications.txt
+ delete mode 100644 docs/RELEASE_NOTES_NEXT/lost_items_modifications.txt
+
+commit c13dc8a6b5247c89a874ad92ecaa04974409389c
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Jun 4 23:38:25 2013 -0400
+
+ Stamping upgrade script for lost items blocking
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/src/sql/Pg/002.schema.config.sql
+483 0 Open-ILS/src/sql/Pg/upgrade/0794.add_option_for_including_lost_in_items_out_and_patron_blocking_by_lost.sql
+0 483 Open-ILS/src/sql/Pg/upgrade/XXXX.add_option_for_including_lost_in_items_out_and_patron_blocking_by_lost.sql
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/0794.add_option_for_including_lost_in_items_out_and_patron_blocking_by_lost.sql
+ delete mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_option_for_including_lost_in_items_out_and_patron_blocking_by_lost.sql
+
+commit d4918fa6a9b433b35dcc1c186902a7235fb928fd
+Author: Kyle Tomita <ktomita at catalystitservices.com>
+Date: Thu Mar 14 15:01:14 2013 -0700
+
+ Patron Blocking by lost items and include lost as items out
+
+ This feature has two main parts, patron blocking by number
+ of lost items and include lost items as items out. A group penalty
+ threshold will be added for lost items. This will restrict patrons
+ who have lost too many items. The inclusion of lost items as items
+ out will be an optional setting, like claimed returned items. This
+ will allow libraries to set what type of item statuses count toward
+ the total items out.
+
+ Signed-off-by: Kyle Tomita <ktomita at catalystitservices.com>
+ Signed-off-by: Justin Douma <jdouma at catalystitservices.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+3 4 Open-ILS/src/extras/ils_events.xml
+81 1 Open-ILS/src/sql/Pg/100.circ_matrix.sql
+17 0 Open-ILS/src/sql/Pg/950.data.seed-values.sql
+483 0 Open-ILS/src/sql/Pg/upgrade/XXXX.add_option_for_including_lost_in_items_out_and_patron_blocking_by_lost.sql
+2 0 Open-ILS/web/opac/locale/en-US/lang.dtd
+9 0 Open-ILS/xul/staff_client/server/circ/checkout.js
+3 0 Open-ILS/xul/staff_client/server/circ/util.js
+3 0 Open-ILS/xul/staff_client/server/patron/display.js
+2 0 Open-ILS/xul/staff_client/server/patron/display_horiz_overlay.xul
+2 0 Open-ILS/xul/staff_client/server/patron/display_overlay.xul
+3 0 Open-ILS/xul/staff_client/server/patron/summary.js
+13 0 Open-ILS/xul/staff_client/server/patron/util.js
+12 0 Open-ILS/xul/staff_client/server/skin/patron_display.css
+14 0 docs/RELEASE_NOTES_NEXT/lost_items_modifications.txt
+ create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.add_option_for_including_lost_in_items_out_and_patron_blocking_by_lost.sql
+ create mode 100644 docs/RELEASE_NOTES_NEXT/lost_items_modifications.txt
+
+commit 2060027f71755fbdf284470e68acc0bac40cbb15
+Author: Ben Shum <bshum at biblio.org>
+Date: Tue Jun 4 22:57:00 2013 -0400
+
+ Added release note for standalone mode shortcuts
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+5 0 docs/RELEASE_NOTES_NEXT/Client/standalone-mode-shortcut.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Client/standalone-mode-shortcut.txt
+
+commit b55da928a94aa3976d02fed6c1603dd1d237b260
+Author: Pranjal Prabhash <pranjal.prabhash at gmail.com>
+Date: Mon Apr 9 10:55:08 2012 -0400
+
+ Standalone Mode Staff Client Shortcuts
+
+ This commit addresses LP#955283, which requested the creation
+ of a Windows shortcut for Evergreen's standalone staff client
+ mode.
+
+ Signed-off-by: Pranjal Prabhash <pranjal.prabhash at gmail.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+3 0 Open-ILS/xul/staff_client/windowssetup.nsi
+
+commit 4ad49105a58fc4241737718feb4b9aae57eced7f
+Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+Date: Fri May 10 12:32:51 2013 -0400
+
+ When delivering MARC21 via SuperCat, OpenSearch, offer filename w/ extension
+
+ If you want a record feed in MARC21, without this commit a web browser
+ just suggests "marc21" as the filename for saving to your local system.
+
+ Although many consumers of these feeds will be custom scripts and other
+ non-interactive software components that won't care about filename, for
+ the web browser case it's helpful if the server suggests a filename that
+ ends in .mrc.
+
+ So here we go.
+
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+62 8 Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
+
+commit cb89d0ee2d52acf584123c75291accaf1ad3d349
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Fri May 31 12:27:13 2013 -0400
+
+ Fix reference to image that broke epub build
+
+ The path pointing to the desired image was incorrect, which resulted in
+ a broken epub build and probably just a missing image in other formats.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+2 2 docs/admin/Org_Unit_Proximity_Adjustments.txt
+
+commit 0f6ec1ea2c6d7aba2bf790de87bf8f187921b994
+Author: Jason Etheridge <jason at esilibrary.com>
+Date: Mon Apr 2 17:07:55 2012 -0400
+
+ don't let function keys lock the MARC editor
+
+ lock = put the interface into a state where it prompts with an unsaved data
+ warning before closing the interface
+
+ Signed-off-by: Jason Etheridge <jason at esilibrary.com>
+
+ Conflicts:
+ Open-ILS/xul/staff_client/server/cat/marcedit.js
+ Open-ILS/xul/staff_client/server/cat/marcedit.xul
+
+ Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>
+ Signed-off-by: Dan Wells <dbw2 at calvin.edu>
+
+43 1 Open-ILS/xul/staff_client/server/cat/marcedit.js
+68 68 Open-ILS/xul/staff_client/server/cat/marcedit.xul
+
+commit 7c6ecb3a940bcb7a3b50650be7f44a202d93e438
+Author: Ben Shum <bshum at biblio.org>
+Date: Wed May 29 18:06:09 2013 -0400
+
+ Change autoconf required version for libmar's configure.ac
+
+ Having it set to 2.68 (current for Ubuntu Precise) broke autoreconf for other
+ distributions. Notably Debian Squeeze/Wheezy have 2.67 and Ubuntu Lucid has
+ 2.65 for their autoconf version.
+
+ Set a minimum requirement of 2.61 that we use in the existing options.
+
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 1 Open-ILS/xul/staff_client/external/libmar/configure.ac
+
+commit 78e19fd3f4c8baa6d003ee230d18bf0c34e9f00b
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Tue Mar 26 11:01:50 2013 -0400
+
+ Add new dependency on libbz2-dev(el).
+
+ Our own mar tools add a build dependency on libbz2. The easiest way to
+ make sure this is there seems to be to install libbz2-dev(el).
+
+ Also, update the release notes to reflect the new dependency.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+4 2 Open-ILS/src/extras/Makefile.install
+6 3 docs/RELEASE_NOTES_NEXT/Administration/new-updates-tools.txt
+
+commit fc5182a90f625a21ce5a4668dcd3c6130477e202
+Author: Jason Stephenson <jstephenson at mvlc.org>
+Date: Wed Mar 20 10:45:03 2013 -0400
+
+ Add release notes for the new updates tools.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+26 0 docs/RELEASE_NOTES_NEXT/Administration/new-updates-tools.txt
+ create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/new-updates-tools.txt
+
+commit 8819aa61378fee8c58d2b307f802d24cc7a8acc9
+Author: Jason Stephenson <jason at sigio.com>
+Date: Tue Mar 19 08:38:31 2013 -0400
+
+ Fix segmentation fault in mbsdiff and fix crc by linking with libbz2.
+
+ Doh! I typed memcpy when I really wanted memset.
+
+ This does not actually introduce any new dependencies. Evergreen
+ updates/installation already requires bzip2. If bzip2 is present,
+ then libbz2 is present. We don't need libbz2 headers, just the
+ library itself for a single data structure used in crc32 calculation.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/xul/staff_client/external/libmar/configure.ac
+1 1 Open-ILS/xul/staff_client/external/libmar/tool/bsdiff.c
+2 2 Open-ILS/xul/staff_client/external/libmar/tool/crc32.c
+
+commit a698dc48c5d3a01515127b131e9506dda6c74137
+Author: Jason Stephenson <jason at sigio.com>
+Date: Mon Mar 18 20:03:42 2013 -0400
+
+ Add libmar to build update tools to the repo.
+
+ This adds code from Mozilla to build a command line mar program and the
+ libmar library that it uses. This code is now dual-licensed under the
+ MPL 2.0 and GPL v2 or later.
+
+ We also add our own version of mbsdiff using a modified version of Colin
+ Percival's FreeBSD-licensed bsdiff program. We also copy the crc32 code
+ from Mozilla's updater.
+
+ Add libmar as "subpackage" in cofigure.ac.
+
+ Add AC_CONFIG_SUBDIRS macro call for Open-ILS/xul/staff_client/external/
+ libmar so that our update tools will get configured and built when
+ Evergreen is built.
+
+ Modify make_updates.sh for our update tools.
+
+ Instead of downloading mar and mbsdiff from Mozilla.org's servers,
+ we check if they exist in Open-ILS/xul/staff_client/external/libmar/tool
+ and if not we build them. They should be there already.
+
+ Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
+ Signed-off-by: Ben Shum <bshum at biblio.org>
+
+1 0 Open-ILS/xul/staff_client/external/libmar/Makefile.am
+11 0 Open-ILS/xul/staff_client/external/libmar/README
+49 0 Open-ILS/xul/staff_client/external/libmar/configure.ac
+2 0 Open-ILS/xul/staff_client/external/libmar/src/Makefile.am
+169 0 Open-ILS/xul/staff_client/external/libmar/src/mar.h
+94 0 Open-ILS/xul/staff_client/external/libmar/src/mar_cmdline.h
+416 0 Open-ILS/xul/staff_client/external/libmar/src/mar_create.c
+102 0 Open-ILS/xul/staff_client/external/libmar/src/mar_extract.c
+88 0 Open-ILS/xul/staff_client/external/libmar/src/mar_private.h
+581 0 Open-ILS/xul/staff_client/external/libmar/src/mar_read.c
+5 0 Open-ILS/xul/staff_client/external/libmar/tool/Makefile.am
+393 0 Open-ILS/xul/staff_client/external/libmar/tool/bsdiff.c
+22 0 Open-ILS/xul/staff_client/external/libmar/tool/crc32.c
+179 0 Open-ILS/xul/staff_client/external/libmar/tool/mar.c
+6 5 Open-ILS/xul/staff_client/external/make_updates.sh
+1 0 configure.ac
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/Makefile.am
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/README
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/configure.ac
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/src/Makefile.am
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/src/mar.h
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/src/mar_cmdline.h
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/src/mar_create.c
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/src/mar_extract.c
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/src/mar_private.h
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/src/mar_read.c
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/tool/Makefile.am
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/tool/bsdiff.c
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/tool/crc32.c
+ create mode 100644 Open-ILS/xul/staff_client/external/libmar/tool/mar.c
+
+commit 927f436d9b6674b6cf2a6c9ee77bbc71db9aad10
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu Apr 11 06:43:10 2013 -0700
+
+ Test dataset: authority records for concerto
+
+ Add a handful of authority records to match a subset of the Concerto
+ bib records. When the --load-all or --load-concerto options are passed
+ to eg_db_config, these authority records will be loaded. Running
+ "authority_control_fields -s 1 -e 100" will then generate 19 links from
+ Concerto bibs to corresponding authority records.
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+ Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
+
+76 0 Open-ILS/tests/datasets/sql/auth_concerto.sql
+3 0 Open-ILS/tests/datasets/sql/load_all.sql
+3 0 Open-ILS/tests/datasets/sql/load_concerto.sql
+ create mode 100644 Open-ILS/tests/datasets/sql/auth_concerto.sql
+
+commit 445d8b184e562dcb72f28ce8dcfbded30067e418
+Author: Dan Scott <dscott at laurentian.ca>
+Date: Thu May 23 12:09:55 2013 -0400
+
+ Avoid additional whitespace in password messages
+
+ Trivial enhancements to avoid extra linefeeds in generated HTML, as well
+ as including a linefeed at the end of the new password_reset_msg.tt2
+ file. Good old DOS vs. UNIX :)
+
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+2 2 Open-ILS/src/templates/opac/myopac/update_password.tt2
+1 1 Open-ILS/src/templates/opac/password_reset.tt2
+1 1 Open-ILS/src/templates/opac/password_reset_msg.tt2
+
+commit 97d1c4f8010f1b040f860fe2a207bea1631a87f5
+Author: Melissa Lefebvre <mlefebvre at biblio.org>
+Date: Fri May 10 15:19:09 2013 -0400
+
+ TPAC - Password Messages
+
+ In jspac a message appeared when the patron went to change their
+ password stating the requirements. This same message is missing
+ in TPAC. The wording from jspac has been added to a separate
+ file, update_password_msg.tt2, that can later be easily edited
+ and the original update_password.tt2 has been edited with an
+ INCLUDE statement pointing to the newly created file.
+
+ Also improved is the message when requesting a forgotten password.
+ Patrons are unaware that a valid email address needs to be in
+ their record until after they try to send a reset. Text has been
+ added to a new file, password_reset_msg.tt2, to explain the need
+ for an email address. Password_reset.tt2 has been edited with
+ an INCLUDE statement pointing to the newly created file.
+
+ Style.css.tt2 was also updated to remove extra padding on
+ #account-update-email table to raise the table on
+ update_password.tt2. This value is also used on
+ update_username.tt2 and update_email.tt2 without considerable
+ impact to the look of those pages.
+
+ Signed-off-by: Melissa Lefebvre <mlefebvre at biblio.org>
+ Signed-off-by: Dan Scott <dscott at laurentian.ca>
+
+7 1 Open-ILS/src/templates/opac/css/style.css.tt2
+2 0 Open-ILS/src/templates/opac/myopac/update_password.tt2
+3 0 Open-ILS/src/templates/opac/myopac/update_password_msg.tt2
+1 0 Open-ILS/src/templates/opac/password_reset.tt2
+3 0 Open-ILS/src/templates/opac/password_reset_msg.tt2
+ create mode 100644 Open-ILS/src/templates/opac/myopac/update_password_msg.tt2
+ create mode 100644 Open-ILS/src/templates/opac/password_reset_msg.tt2
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application.pm
index d750216..10eb2dc 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application.pm
@@ -7,7 +7,7 @@ use OpenILS::Utils::Fieldmapper;
sub ils_version {
# version format is "x-y-z", for example "2-0-0" for Evergreen 2.0.0
# For branches, format is "x-y"
- return "HEAD";
+ return "2-5-0";
}
__PACKAGE__->register_method(
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 069ff96..601de44 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -92,6 +92,7 @@ CREATE TRIGGER no_overlapping_deps
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0847', :eg_version); -- eeevil/dbwells
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.5.0', :eg_version);
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/2.4.3-2.5.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/2.4.3-2.5.0-upgrade-db.sql
new file mode 100644
index 0000000..ac803a3
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/version-upgrade/2.4.3-2.5.0-upgrade-db.sql
@@ -0,0 +1,16035 @@
+--Upgrade Script for 2.4.3 to 2.5.0
+\set eg_version '''2.5.0'''
+BEGIN;
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('2.5.0', :eg_version);
+
+SELECT evergreen.upgrade_deps_block_check('0794', :eg_version);
+
+INSERT INTO config.standing_penalty (id,name,label,block_list,staff_alert)
+ VALUES (5,'PATRON_EXCEEDS_LOST_COUNT',oils_i18n_gettext(5, 'Patron exceeds max lost item threshold', 'csp', 'label'),'CIRC|FULFILL|HOLD|CAPTURE|RENEW', TRUE);
+
+INSERT INTO config.org_unit_setting_type ( name, grp, label, description, datatype ) VALUES (
+ 'circ.tally_lost', 'circ',
+ oils_i18n_gettext(
+ 'circ.tally_lost',
+ 'Include Lost circulations in lump sum tallies in Patron Display.',
+ 'coust',
+ 'label'),
+ oils_i18n_gettext(
+ 'circ.tally_lost',
+ 'In the Patron Display interface, the number of total active circulations for a given patron is presented in the Summary sidebar and underneath the Items Out navigation button. This setting will include Lost circulations as counting toward these tallies.',
+ 'coust',
+ 'description'),
+ 'bool'
+);
+
+-- Function: actor.calculate_system_penalties(integer, integer)
+-- DROP FUNCTION actor.calculate_system_penalties(integer, integer);
+
+CREATE OR REPLACE FUNCTION actor.calculate_system_penalties(match_user integer, context_org integer)
+ RETURNS SETOF actor.usr_standing_penalty AS
+$BODY$
+DECLARE
+ user_object actor.usr%ROWTYPE;
+ new_sp_row actor.usr_standing_penalty%ROWTYPE;
+ existing_sp_row actor.usr_standing_penalty%ROWTYPE;
+ collections_fines permission.grp_penalty_threshold%ROWTYPE;
+ max_fines permission.grp_penalty_threshold%ROWTYPE;
+ max_overdue permission.grp_penalty_threshold%ROWTYPE;
+ max_items_out permission.grp_penalty_threshold%ROWTYPE;
+ max_lost permission.grp_penalty_threshold%ROWTYPE;
+ tmp_grp INT;
+ items_overdue INT;
+ items_out INT;
+ items_lost INT;
+ context_org_list INT[];
+ current_fines NUMERIC(8,2) := 0.0;
+ tmp_fines NUMERIC(8,2);
+ tmp_groc RECORD;
+ tmp_circ RECORD;
+ tmp_org actor.org_unit%ROWTYPE;
+ tmp_penalty config.standing_penalty%ROWTYPE;
+ tmp_depth INTEGER;
+BEGIN
+ SELECT INTO user_object * FROM actor.usr WHERE id = match_user;
+
+ -- Max fines
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has a high fine balance
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+ SELECT * INTO max_fines FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 1 AND org_unit = tmp_org.id;
+
+ IF max_fines.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL THEN
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_fines.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 1;
+
+ SELECT INTO context_org_list ARRAY_ACCUM(id) FROM actor.org_unit_full_path( max_fines.org_unit );
+
+ SELECT SUM(f.balance_owed) INTO current_fines
+ FROM money.materialized_billable_xact_summary f
+ JOIN (
+ SELECT r.id
+ FROM booking.reservation r
+ WHERE r.usr = match_user
+ AND r.pickup_lib IN (SELECT * FROM unnest(context_org_list))
+ AND xact_finish IS NULL
+ UNION ALL
+ SELECT g.id
+ FROM money.grocery g
+ WHERE g.usr = match_user
+ AND g.billing_location IN (SELECT * FROM unnest(context_org_list))
+ AND xact_finish IS NULL
+ UNION ALL
+ SELECT circ.id
+ FROM action.circulation circ
+ WHERE circ.usr = match_user
+ AND circ.circ_lib IN (SELECT * FROM unnest(context_org_list))
+ AND xact_finish IS NULL ) l USING (id);
+
+ IF current_fines >= max_fines.threshold THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_fines.org_unit;
+ new_sp_row.standing_penalty := 1;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+ -- Start over for max overdue
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has too many overdue items
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+
+ SELECT * INTO max_overdue FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 2 AND org_unit = tmp_org.id;
+
+ IF max_overdue.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_overdue.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_overdue.threshold IS NOT NULL THEN
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_overdue.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 2;
+
+ SELECT INTO items_overdue COUNT(*)
+ FROM action.circulation circ
+ JOIN actor.org_unit_full_path( max_overdue.org_unit ) fp ON (circ.circ_lib = fp.id)
+ WHERE circ.usr = match_user
+ AND circ.checkin_time IS NULL
+ AND circ.due_date < NOW()
+ AND (circ.stop_fines = 'MAXFINES' OR circ.stop_fines IS NULL);
+
+ IF items_overdue >= max_overdue.threshold::INT THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_overdue.org_unit;
+ new_sp_row.standing_penalty := 2;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+ -- Start over for max out
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has too many checked out items
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+ SELECT * INTO max_items_out FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 3 AND org_unit = tmp_org.id;
+
+ IF max_items_out.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_items_out.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ -- Fail if the user has too many items checked out
+ IF max_items_out.threshold IS NOT NULL THEN
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_items_out.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 3;
+ SELECT INTO items_out COUNT(*)
+ FROM action.circulation circ
+ JOIN actor.org_unit_full_path( max_items_out.org_unit ) fp ON (circ.circ_lib = fp.id)
+ WHERE circ.usr = match_user
+ AND circ.checkin_time IS NULL
+ AND (circ.stop_fines IN (
+ SELECT 'MAXFINES'::TEXT
+ UNION ALL
+ SELECT 'LONGOVERDUE'::TEXT
+ UNION ALL
+ SELECT 'LOST'::TEXT
+ WHERE 'true' ILIKE
+ (
+ SELECT CASE
+ WHEN (SELECT value FROM actor.org_unit_ancestor_setting('circ.tally_lost', circ.circ_lib)) ILIKE 'true' THEN 'true'
+ ELSE 'false'
+ END
+ )
+ UNION ALL
+ SELECT 'CLAIMSRETURNED'::TEXT
+ WHERE 'false' ILIKE
+ (
+ SELECT CASE
+ WHEN (SELECT value FROM actor.org_unit_ancestor_setting('circ.do_not_tally_claims_returned', circ.circ_lib)) ILIKE 'true' THEN 'true'
+ ELSE 'false'
+ END
+ )
+ ) OR circ.stop_fines IS NULL)
+ AND xact_finish IS NULL;
+
+ IF items_out >= max_items_out.threshold::INT THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_items_out.org_unit;
+ new_sp_row.standing_penalty := 3;
+ RETURN NEXT new_sp_row;
+ END IF;
+END IF;
+
+ -- Start over for max lost
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has too many lost items
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+ SELECT * INTO max_lost FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 5 AND org_unit = tmp_org.id;
+ IF max_lost.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_lost.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_lost.threshold IS NOT NULL THEN
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_lost.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 5;
+
+ SELECT INTO items_lost COUNT(*)
+ FROM action.circulation circ
+ JOIN actor.org_unit_full_path( max_lost.org_unit ) fp ON (circ.circ_lib = fp.id)
+ WHERE circ.usr = match_user
+ AND circ.checkin_time IS NULL
+ AND (circ.stop_fines = 'LOST')
+ AND xact_finish IS NULL;
+
+ IF items_lost >= max_lost.threshold::INT AND 0 < max_lost.threshold::INT THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_lost.org_unit;
+ new_sp_row.standing_penalty := 5;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+ -- Start over for collections warning
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has a collections-level fine balance
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+ SELECT * INTO max_fines FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 4 AND org_unit = tmp_org.id;
+ IF max_fines.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL THEN
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_fines.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 4;
+
+ SELECT INTO context_org_list ARRAY_ACCUM(id) FROM actor.org_unit_full_path( max_fines.org_unit );
+
+ SELECT SUM(f.balance_owed) INTO current_fines
+ FROM money.materialized_billable_xact_summary f
+ JOIN (
+ SELECT r.id
+ FROM booking.reservation r
+ WHERE r.usr = match_user
+ AND r.pickup_lib IN (SELECT * FROM unnest(context_org_list))
+ AND r.xact_finish IS NULL
+ UNION ALL
+ SELECT g.id
+ FROM money.grocery g
+ WHERE g.usr = match_user
+ AND g.billing_location IN (SELECT * FROM unnest(context_org_list))
+ AND g.xact_finish IS NULL
+ UNION ALL
+ SELECT circ.id
+ FROM action.circulation circ
+ WHERE circ.usr = match_user
+ AND circ.circ_lib IN (SELECT * FROM unnest(context_org_list))
+ AND circ.xact_finish IS NULL ) l USING (id);
+
+ IF current_fines >= max_fines.threshold THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_fines.org_unit;
+ new_sp_row.standing_penalty := 4;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+ -- Start over for in collections
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Remove the in-collections penalty if the user has paid down enough
+ -- This penalty is different, because this code is not responsible for creating
+ -- new in-collections penalties, only for removing them
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+ SELECT * INTO max_fines FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 30 AND org_unit = tmp_org.id;
+
+ IF max_fines.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL THEN
+
+ SELECT INTO context_org_list ARRAY_ACCUM(id) FROM actor.org_unit_full_path( max_fines.org_unit );
+
+ -- first, see if the user had paid down to the threshold
+ SELECT SUM(f.balance_owed) INTO current_fines
+ FROM money.materialized_billable_xact_summary f
+ JOIN (
+ SELECT r.id
+ FROM booking.reservation r
+ WHERE r.usr = match_user
+ AND r.pickup_lib IN (SELECT * FROM unnest(context_org_list))
+ AND r.xact_finish IS NULL
+ UNION ALL
+ SELECT g.id
+ FROM money.grocery g
+ WHERE g.usr = match_user
+ AND g.billing_location IN (SELECT * FROM unnest(context_org_list))
+ AND g.xact_finish IS NULL
+ UNION ALL
+ SELECT circ.id
+ FROM action.circulation circ
+ WHERE circ.usr = match_user
+ AND circ.circ_lib IN (SELECT * FROM unnest(context_org_list))
+ AND circ.xact_finish IS NULL ) l USING (id);
+
+ IF current_fines IS NULL OR current_fines <= max_fines.threshold THEN
+ -- patron has paid down enough
+
+ SELECT INTO tmp_penalty * FROM config.standing_penalty WHERE id = 30;
+
+ IF tmp_penalty.org_depth IS NOT NULL THEN
+
+ -- since this code is not responsible for applying the penalty, it can't
+ -- guarantee the current context org will match the org at which the penalty
+ --- was applied. search up the org tree until we hit the configured penalty depth
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+ SELECT INTO tmp_depth depth FROM actor.org_unit_type WHERE id = tmp_org.ou_type;
+
+ WHILE tmp_depth >= tmp_penalty.org_depth LOOP
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = tmp_org.id
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 30;
+
+ IF tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+ SELECT INTO tmp_depth depth FROM actor.org_unit_type WHERE id = tmp_org.ou_type;
+ END LOOP;
+
+ ELSE
+
+ -- no penalty depth is defined, look for exact matches
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_fines.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 30;
+ END IF;
+
+ END IF;
+
+ END IF;
+
+ RETURN;
+END;
+$BODY$
+ LANGUAGE plpgsql VOLATILE
+ COST 100
+ ROWS 1000;
+
+
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0795', :eg_version); -- berick/dbwells
+
+CREATE OR REPLACE FUNCTION
+ evergreen.z3950_attr_name_is_valid(TEXT) RETURNS BOOLEAN AS $func$
+ SELECT EXISTS (SELECT 1 FROM config.z3950_attr WHERE name = $1);
+$func$ LANGUAGE SQL STRICT IMMUTABLE;
+
+COMMENT ON FUNCTION evergreen.z3950_attr_name_is_valid(TEXT) IS $$
+Results in TRUE if there exists at least one config.z3950_attr
+with the provided name. Used by config.z3950_index_field_map
+to verify z3950_attr_type maps.
+$$;
+
+CREATE TABLE config.z3950_index_field_map (
+ id SERIAL PRIMARY KEY,
+ label TEXT NOT NULL, -- i18n
+ metabib_field INTEGER REFERENCES config.metabib_field(id),
+ record_attr TEXT REFERENCES config.record_attr_definition(name),
+ z3950_attr INTEGER REFERENCES config.z3950_attr(id),
+ z3950_attr_type TEXT,-- REFERENCES config.z3950_attr(name)
+ CONSTRAINT metabib_field_or_record_attr CHECK (
+ metabib_field IS NOT NULL OR
+ record_attr IS NOT NULL
+ ),
+ CONSTRAINT attr_or_attr_type CHECK (
+ z3950_attr IS NOT NULL OR
+ z3950_attr_type IS NOT NULL
+ ),
+ -- ensure the selected z3950_attr_type refers to a valid attr name
+ CONSTRAINT valid_z3950_attr_type CHECK (
+ z3950_attr_type IS NULL OR
+ evergreen.z3950_attr_name_is_valid(z3950_attr_type)
+ )
+);
+
+-- seed data
+
+INSERT INTO config.z3950_index_field_map
+ (id, label, metabib_field, z3950_attr_type) VALUES
+(1, oils_i18n_gettext(1, 'Title', 'czifm', 'label'), 5, 'title'),
+(2, oils_i18n_gettext(2, 'Author', 'czifm', 'label'), 8, 'author'),
+(3, oils_i18n_gettext(3, 'ISBN', 'czifm', 'label'), 18, 'isbn'),
+(4, oils_i18n_gettext(4, 'ISSN', 'czifm', 'label'), 19, 'issn'),
+(5, oils_i18n_gettext(5, 'LCCN', 'czifm', 'label'), 30, 'lccn');
+
+INSERT INTO config.z3950_index_field_map
+ (id, label, record_attr, z3950_attr_type) VALUES
+(6, oils_i18n_gettext(6, 'Pubdate', 'czifm', 'label'),'pubdate', 'pubdate'),
+(7, oils_i18n_gettext(7, 'Item Type', 'czifm', 'label'),'item_type', 'item_type');
+
+
+-- let's leave room for more stock mappings
+SELECT SETVAL('config.z3950_index_field_map_id_seq'::TEXT, 1000);
+
+INSERT INTO config.org_unit_setting_type
+ (name, grp, label, description, datatype)
+ VALUES (
+ 'cat.z3950.batch.max_parallel',
+ 'cat',
+ oils_i18n_gettext(
+ 'cat.z3950.batch.max_parallel',
+ 'Maximum Parallel Z39.50 Batch Searches',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'cat.z3950.batch.max_parallel',
+ 'The maximum number of Z39.50 searches that can be in-flight at any given time when performing batch Z39.50 searches',
+ 'coust',
+ 'description'
+ ),
+ 'integer'
+ );
+
+INSERT INTO config.org_unit_setting_type
+ (name, grp, label, description, datatype)
+ VALUES (
+ 'cat.z3950.batch.max_results',
+ 'cat',
+ oils_i18n_gettext(
+ 'cat.z3950.batch.max_results',
+ 'Maximum Z39.50 Batch Search Results',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'cat.z3950.batch.max_results',
+ 'The maximum number of search results to retrieve and queue for each record + Z39 source during batch Z39.50 searches',
+ 'coust',
+ 'description'
+ ),
+ 'integer'
+ );
+
+INSERT INTO vandelay.bib_attr_definition (id, code, description, xpath)
+ VALUES (
+ 16,
+ 'zsource',
+ oils_i18n_gettext(16, 'Z39.50 Source', 'vqbrad', 'description'),
+ '//*[@tag="901"]/*[@code="z"]'
+ );
+
+
+
+
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0796', :eg_version); -- berick/dbwells
+
+ALTER TABLE vandelay.bib_queue ADD COLUMN match_bucket
+ INTEGER REFERENCES container.biblio_record_entry_bucket(id)
+ ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED;
+
+CREATE OR REPLACE FUNCTION vandelay.match_bib_record() RETURNS TRIGGER AS $func$
+DECLARE
+ incoming_existing_id TEXT;
+ test_result vandelay.match_set_test_result%ROWTYPE;
+ tmp_rec BIGINT;
+ match_set INT;
+ match_bucket INT;
+BEGIN
+ IF TG_OP IN ('INSERT','UPDATE') AND NEW.imported_as IS NOT NULL THEN
+ RETURN NEW;
+ END IF;
+
+ DELETE FROM vandelay.bib_match WHERE queued_record = NEW.id;
+
+ SELECT q.match_set INTO match_set FROM vandelay.bib_queue q WHERE q.id = NEW.queue;
+
+ IF match_set IS NOT NULL THEN
+ NEW.quality := vandelay.measure_record_quality( NEW.marc, match_set );
+ END IF;
+
+ -- Perfect matches on 901$c exit early with a match with high quality.
+ incoming_existing_id :=
+ oils_xpath_string('//*[@tag="901"]/*[@code="c"][1]', NEW.marc);
+
+ IF incoming_existing_id IS NOT NULL AND incoming_existing_id != '' THEN
+ SELECT id INTO tmp_rec FROM biblio.record_entry WHERE id = incoming_existing_id::bigint;
+ IF tmp_rec IS NOT NULL THEN
+ INSERT INTO vandelay.bib_match (queued_record, eg_record, match_score, quality)
+ SELECT
+ NEW.id,
+ b.id,
+ 9999,
+ -- note: no match_set means quality==0
+ vandelay.measure_record_quality( b.marc, match_set )
+ FROM biblio.record_entry b
+ WHERE id = incoming_existing_id::bigint;
+ END IF;
+ END IF;
+
+ IF match_set IS NULL THEN
+ RETURN NEW;
+ END IF;
+
+ SELECT q.match_bucket INTO match_bucket FROM vandelay.bib_queue q WHERE q.id = NEW.queue;
+
+ FOR test_result IN SELECT * FROM
+ vandelay.match_set_test_marcxml(match_set, NEW.marc, match_bucket) LOOP
+
+ INSERT INTO vandelay.bib_match ( queued_record, eg_record, match_score, quality )
+ SELECT
+ NEW.id,
+ test_result.record,
+ test_result.quality,
+ vandelay.measure_record_quality( b.marc, match_set )
+ FROM biblio.record_entry b
+ WHERE id = test_result.record;
+
+ END LOOP;
+
+ RETURN NEW;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+
+DROP FUNCTION IF EXISTS vandelay.match_set_test_marcxml(INTEGER, TEXT);
+
+CREATE OR REPLACE FUNCTION vandelay.match_set_test_marcxml(
+ match_set_id INTEGER, record_xml TEXT, bucket_id INTEGER
+) RETURNS SETOF vandelay.match_set_test_result AS $$
+DECLARE
+ tags_rstore HSTORE;
+ svf_rstore HSTORE;
+ coal TEXT;
+ joins TEXT;
+ query_ TEXT;
+ wq TEXT;
+ qvalue INTEGER;
+ rec RECORD;
+BEGIN
+ tags_rstore := vandelay.flatten_marc_hstore(record_xml);
+ svf_rstore := vandelay.extract_rec_attrs(record_xml);
+
+ CREATE TEMPORARY TABLE _vandelay_tmp_qrows (q INTEGER);
+ CREATE TEMPORARY TABLE _vandelay_tmp_jrows (j TEXT);
+
+ -- generate the where clause and return that directly (into wq), and as
+ -- a side-effect, populate the _vandelay_tmp_[qj]rows tables.
+ wq := vandelay.get_expr_from_match_set(match_set_id, tags_rstore);
+
+ query_ := 'SELECT DISTINCT(record), ';
+
+ -- qrows table is for the quality bits we add to the SELECT clause
+ SELECT ARRAY_TO_STRING(
+ ARRAY_ACCUM('COALESCE(n' || q::TEXT || '.quality, 0)'), ' + '
+ ) INTO coal FROM _vandelay_tmp_qrows;
+
+ -- our query string so far is the SELECT clause and the inital FROM.
+ -- no JOINs yet nor the WHERE clause
+ query_ := query_ || coal || ' AS quality ' || E'\n';
+
+ -- jrows table is for the joins we must make (and the real text conditions)
+ SELECT ARRAY_TO_STRING(ARRAY_ACCUM(j), E'\n') INTO joins
+ FROM _vandelay_tmp_jrows;
+
+ -- add those joins and the where clause to our query.
+ query_ := query_ || joins || E'\n';
+
+ -- join the record bucket
+ IF bucket_id IS NOT NULL THEN
+ query_ := query_ || 'JOIN container.biblio_record_entry_bucket_item ' ||
+ 'brebi ON (brebi.target_biblio_record_entry = record ' ||
+ 'AND brebi.bucket = ' || bucket_id || E')\n';
+ END IF;
+
+ query_ := query_ || 'JOIN biblio.record_entry bre ON (bre.id = record) ' || 'WHERE ' || wq || ' AND not bre.deleted';
+
+ -- this will return rows of record,quality
+ FOR rec IN EXECUTE query_ USING tags_rstore, svf_rstore LOOP
+ RETURN NEXT rec;
+ END LOOP;
+
+ DROP TABLE _vandelay_tmp_qrows;
+ DROP TABLE _vandelay_tmp_jrows;
+ RETURN;
+END;
+$$ LANGUAGE PLPGSQL;
+
+
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0797', :eg_version); -- tsbere/Dyrcona/dbwells
+
+-- New global flags for the purge function
+INSERT INTO config.global_flag (name, label, enabled)
+ VALUES (
+ 'history.hold.retention_age',
+ oils_i18n_gettext('history.hold.retention_age', 'Historical Hold Retention Age', 'cgf', 'label'),
+ TRUE
+ ),(
+ 'history.hold.retention_age_fulfilled',
+ oils_i18n_gettext('history.hold.retention_age_fulfilled', 'Historical Hold Retention Age - Fulfilled', 'cgf', 'label'),
+ FALSE
+ ),(
+ 'history.hold.retention_age_canceled',
+ oils_i18n_gettext('history.hold.retention_age_canceled', 'Historical Hold Retention Age - Canceled (Default)', 'cgf', 'label'),
+ FALSE
+ ),(
+ 'history.hold.retention_age_canceled_1',
+ oils_i18n_gettext('history.hold.retention_age_canceled_1', 'Historical Hold Retention Age - Canceled (Untarged expiration)', 'cgf', 'label'),
+ FALSE
+ ),(
+ 'history.hold.retention_age_canceled_2',
+ oils_i18n_gettext('history.hold.retention_age_canceled_2', 'Historical Hold Retention Age - Canceled (Hold Shelf expiration)', 'cgf', 'label'),
+ FALSE
+ ),(
+ 'history.hold.retention_age_canceled_3',
+ oils_i18n_gettext('history.hold.retention_age_canceled_3', 'Historical Hold Retention Age - Canceled (Patron via phone)', 'cgf', 'label'),
+ TRUE
+ ),(
+ 'history.hold.retention_age_canceled_4',
+ oils_i18n_gettext('history.hold.retention_age_canceled_4', 'Historical Hold Retention Age - Canceled (Patron in person)', 'cgf', 'label'),
+ TRUE
+ ),(
+ 'history.hold.retention_age_canceled_5',
+ oils_i18n_gettext('history.hold.retention_age_canceled_5', 'Historical Hold Retention Age - Canceled (Staff forced)', 'cgf', 'label'),
+ TRUE
+ ),(
+ 'history.hold.retention_age_canceled_6',
+ oils_i18n_gettext('history.hold.retention_age_canceled_6', 'Historical Hold Retention Age - Canceled (Patron via OPAC)', 'cgf', 'label'),
+ FALSE
+ );
+
+CREATE OR REPLACE FUNCTION action.purge_holds() RETURNS INT AS $func$
+DECLARE
+ current_hold RECORD;
+ purged_holds INT;
+ cgf_d INTERVAL;
+ cgf_f INTERVAL;
+ cgf_c INTERVAL;
+ prev_usr INT;
+ user_start TIMESTAMPTZ;
+ user_age INTERVAL;
+ user_count INT;
+BEGIN
+ purged_holds := 0;
+ SELECT INTO cgf_d value::INTERVAL FROM config.global_flag WHERE name = 'history.hold.retention_age' AND enabled;
+ SELECT INTO cgf_f value::INTERVAL FROM config.global_flag WHERE name = 'history.hold.retention_age_fulfilled' AND enabled;
+ SELECT INTO cgf_c value::INTERVAL FROM config.global_flag WHERE name = 'history.hold.retention_age_canceled' AND enabled;
+ FOR current_hold IN
+ SELECT
+ rank() OVER (PARTITION BY usr ORDER BY COALESCE(fulfillment_time, cancel_time) DESC),
+ cgf_cs.value::INTERVAL as cgf_cs,
+ ahr.*
+ FROM
+ action.hold_request ahr
+ LEFT JOIN config.global_flag cgf_cs ON (ahr.cancel_cause IS NOT NULL AND cgf_cs.name = 'history.hold.retention_age_canceled_' || ahr.cancel_cause AND cgf_cs.enabled)
+ WHERE
+ (fulfillment_time IS NOT NULL OR cancel_time IS NOT NULL)
+ LOOP
+ IF prev_usr IS NULL OR prev_usr != current_hold.usr THEN
+ prev_usr := current_hold.usr;
+ SELECT INTO user_start oils_json_to_text(value)::TIMESTAMPTZ FROM actor.usr_setting WHERE usr = prev_usr AND name = 'history.hold.retention_start';
+ SELECT INTO user_age oils_json_to_text(value)::INTERVAL FROM actor.usr_setting WHERE usr = prev_usr AND name = 'history.hold.retention_age';
+ SELECT INTO user_count oils_json_to_text(value)::INT FROM actor.usr_setting WHERE usr = prev_usr AND name = 'history.hold.retention_count';
+ IF user_start IS NOT NULL THEN
+ user_age := LEAST(user_age, AGE(NOW(), user_start));
+ END IF;
+ IF user_count IS NULL THEN
+ user_count := 1000; -- Assumption based on the user visible holds routine
+ END IF;
+ END IF;
+ -- Library keep age trumps user keep anything, for purposes of being able to hold on to things when staff canceled and such.
+ IF current_hold.fulfillment_time IS NOT NULL AND current_hold.fulfillment_time > NOW() - COALESCE(cgf_f, cgf_d) THEN
+ CONTINUE;
+ END IF;
+ IF current_hold.cancel_time IS NOT NULL AND current_hold.cancel_time > NOW() - COALESCE(current_hold.cgf_cs, cgf_c, cgf_d) THEN
+ CONTINUE;
+ END IF;
+
+ -- User keep age needs combining with count. If too old AND within the count, keep!
+ IF user_start IS NOT NULL AND COALESCE(current_hold.fulfillment_time, current_hold.cancel_time) > NOW() - user_age AND current_hold.rank <= user_count THEN
+ CONTINUE;
+ END IF;
+
+ -- All checks should have passed, delete!
+ DELETE FROM action.hold_request WHERE id = current_hold.id;
+ purged_holds := purged_holds + 1;
+ END LOOP;
+ RETURN purged_holds;
+END;
+$func$ LANGUAGE plpgsql;
+
+CREATE OR REPLACE FUNCTION action.usr_visible_holds (usr_id INT) RETURNS SETOF action.hold_request AS $func$
+DECLARE
+ h action.hold_request%ROWTYPE;
+ view_age INTERVAL;
+ view_count INT;
+ usr_view_count actor.usr_setting%ROWTYPE;
+ usr_view_age actor.usr_setting%ROWTYPE;
+ usr_view_start actor.usr_setting%ROWTYPE;
+BEGIN
+ SELECT * INTO usr_view_count FROM actor.usr_setting WHERE usr = usr_id AND name = 'history.hold.retention_count';
+ SELECT * INTO usr_view_age FROM actor.usr_setting WHERE usr = usr_id AND name = 'history.hold.retention_age';
+ SELECT * INTO usr_view_start FROM actor.usr_setting WHERE usr = usr_id AND name = 'history.hold.retention_start';
+
+ FOR h IN
+ SELECT *
+ FROM action.hold_request
+ WHERE usr = usr_id
+ AND fulfillment_time IS NULL
+ AND cancel_time IS NULL
+ ORDER BY request_time DESC
+ LOOP
+ RETURN NEXT h;
+ END LOOP;
+
+ IF usr_view_start.value IS NULL THEN
+ RETURN;
+ END IF;
+
+ IF usr_view_age.value IS NOT NULL THEN
+ -- User opted in and supplied a retention age
+ IF oils_json_to_text(usr_view_age.value)::INTERVAL > AGE(NOW(), oils_json_to_text(usr_view_start.value)::TIMESTAMPTZ) THEN
+ view_age := AGE(NOW(), oils_json_to_text(usr_view_start.value)::TIMESTAMPTZ);
+ ELSE
+ view_age := oils_json_to_text(usr_view_age.value)::INTERVAL;
+ END IF;
+ ELSE
+ -- User opted in
+ view_age := AGE(NOW(), oils_json_to_text(usr_view_start.value)::TIMESTAMPTZ);
+ END IF;
+
+ IF usr_view_count.value IS NOT NULL THEN
+ view_count := oils_json_to_text(usr_view_count.value)::INT;
+ ELSE
+ view_count := 1000;
+ END IF;
+
+ -- show some fulfilled/canceled holds
+ FOR h IN
+ SELECT *
+ FROM action.hold_request
+ WHERE usr = usr_id
+ AND ( fulfillment_time IS NOT NULL OR cancel_time IS NOT NULL )
+ AND COALESCE(fulfillment_time, cancel_time) > NOW() - view_age
+ ORDER BY COALESCE(fulfillment_time, cancel_time) DESC
+ LIMIT view_count
+ LOOP
+ RETURN NEXT h;
+ END LOOP;
+
+ RETURN;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+CREATE TABLE action.aged_hold_request (
+ usr_post_code TEXT,
+ usr_home_ou INT NOT NULL,
+ usr_profile INT NOT NULL,
+ usr_birth_year INT,
+ staff_placed BOOLEAN NOT NULL,
+ LIKE action.hold_request
+);
+ALTER TABLE action.aged_hold_request
+ ADD PRIMARY KEY (id),
+ DROP COLUMN usr,
+ DROP COLUMN requestor,
+ DROP COLUMN sms_carrier,
+ ALTER COLUMN phone_notify TYPE BOOLEAN
+ USING CASE WHEN phone_notify IS NULL OR phone_notify = '' THEN FALSE ELSE TRUE END,
+ ALTER COLUMN sms_notify TYPE BOOLEAN
+ USING CASE WHEN sms_notify IS NULL OR sms_notify = '' THEN FALSE ELSE TRUE END,
+ ALTER COLUMN phone_notify SET NOT NULL,
+ ALTER COLUMN sms_notify SET NOT NULL;
+CREATE INDEX aged_hold_request_target_idx ON action.aged_hold_request (target);
+CREATE INDEX aged_hold_request_pickup_lib_idx ON action.aged_hold_request (pickup_lib);
+CREATE INDEX aged_hold_request_current_copy_idx ON action.aged_hold_request (current_copy);
+CREATE INDEX aged_hold_request_fulfillment_staff_idx ON action.aged_hold_request ( fulfillment_staff );
+
+CREATE OR REPLACE VIEW action.all_hold_request AS
+ SELECT DISTINCT
+ COALESCE(a.post_code, b.post_code) AS usr_post_code,
+ p.home_ou AS usr_home_ou,
+ p.profile AS usr_profile,
+ EXTRACT(YEAR FROM p.dob)::INT AS usr_birth_year,
+ CAST(ahr.requestor <> ahr.usr AS BOOLEAN) AS staff_placed,
+ ahr.id,
+ ahr.request_time,
+ ahr.capture_time,
+ ahr.fulfillment_time,
+ ahr.checkin_time,
+ ahr.return_time,
+ ahr.prev_check_time,
+ ahr.expire_time,
+ ahr.cancel_time,
+ ahr.cancel_cause,
+ ahr.cancel_note,
+ ahr.target,
+ ahr.current_copy,
+ ahr.fulfillment_staff,
+ ahr.fulfillment_lib,
+ ahr.request_lib,
+ ahr.selection_ou,
+ ahr.selection_depth,
+ ahr.pickup_lib,
+ ahr.hold_type,
+ ahr.holdable_formats,
+ CASE
+ WHEN ahr.phone_notify IS NULL THEN FALSE
+ WHEN ahr.phone_notify = '' THEN FALSE
+ ELSE TRUE
+ END AS phone_notify,
+ ahr.email_notify,
+ CASE
+ WHEN ahr.sms_notify IS NULL THEN FALSE
+ WHEN ahr.sms_notify = '' THEN FALSE
+ ELSE TRUE
+ END AS sms_notify,
+ ahr.frozen,
+ ahr.thaw_date,
+ ahr.shelf_time,
+ ahr.cut_in_line,
+ ahr.mint_condition,
+ ahr.shelf_expire_time,
+ ahr.current_shelf_lib
+ FROM action.hold_request ahr
+ JOIN actor.usr p ON (ahr.usr = p.id)
+ LEFT JOIN actor.usr_address a ON (p.mailing_address = a.id)
+ LEFT JOIN actor.usr_address b ON (p.billing_address = b.id)
+ UNION ALL
+ SELECT
+ usr_post_code,
+ usr_home_ou,
+ usr_profile,
+ usr_birth_year,
+ staff_placed,
+ id,
+ request_time,
+ capture_time,
+ fulfillment_time,
+ checkin_time,
+ return_time,
+ prev_check_time,
+ expire_time,
+ cancel_time,
+ cancel_cause,
+ cancel_note,
+ target,
+ current_copy,
+ fulfillment_staff,
+ fulfillment_lib,
+ request_lib,
+ selection_ou,
+ selection_depth,
+ pickup_lib,
+ hold_type,
+ holdable_formats,
+ phone_notify,
+ email_notify,
+ sms_notify,
+ frozen,
+ thaw_date,
+ shelf_time,
+ cut_in_line,
+ mint_condition,
+ shelf_expire_time,
+ current_shelf_lib
+ FROM action.aged_hold_request;
+
+CREATE OR REPLACE FUNCTION action.age_hold_on_delete () RETURNS TRIGGER AS $$
+DECLARE
+BEGIN
+ -- Archive a copy of the old row to action.aged_hold_request
+
+ INSERT INTO action.aged_hold_request
+ (usr_post_code,
+ usr_home_ou,
+ usr_profile,
+ usr_birth_year,
+ staff_placed,
+ id,
+ request_time,
+ capture_time,
+ fulfillment_time,
+ checkin_time,
+ return_time,
+ prev_check_time,
+ expire_time,
+ cancel_time,
+ cancel_cause,
+ cancel_note,
+ target,
+ current_copy,
+ fulfillment_staff,
+ fulfillment_lib,
+ request_lib,
+ selection_ou,
+ selection_depth,
+ pickup_lib,
+ hold_type,
+ holdable_formats,
+ phone_notify,
+ email_notify,
+ sms_notify,
+ frozen,
+ thaw_date,
+ shelf_time,
+ cut_in_line,
+ mint_condition,
+ shelf_expire_time,
+ current_shelf_lib)
+ SELECT
+ usr_post_code,
+ usr_home_ou,
+ usr_profile,
+ usr_birth_year,
+ staff_placed,
+ id,
+ request_time,
+ capture_time,
+ fulfillment_time,
+ checkin_time,
+ return_time,
+ prev_check_time,
+ expire_time,
+ cancel_time,
+ cancel_cause,
+ cancel_note,
+ target,
+ current_copy,
+ fulfillment_staff,
+ fulfillment_lib,
+ request_lib,
+ selection_ou,
+ selection_depth,
+ pickup_lib,
+ hold_type,
+ holdable_formats,
+ phone_notify,
+ email_notify,
+ sms_notify,
+ frozen,
+ thaw_date,
+ shelf_time,
+ cut_in_line,
+ mint_condition,
+ shelf_expire_time,
+ current_shelf_lib
+ FROM action.all_hold_request WHERE id = OLD.id;
+
+ RETURN OLD;
+END;
+$$ LANGUAGE 'plpgsql';
+
+CREATE TRIGGER action_hold_request_aging_tgr
+ BEFORE DELETE ON action.hold_request
+ FOR EACH ROW
+ EXECUTE PROCEDURE action.age_hold_on_delete ();
+
+
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0798', :eg_version); -- tsbere/Dyrcona/dbwells
+
+INSERT INTO config.global_flag (name, label)
+ VALUES (
+ 'history.circ.retention_uses_last_finished',
+ oils_i18n_gettext(
+ 'history.circ.retention_uses_last_finished',
+ 'Historical Circulations use most recent xact_finish date instead of last circ''s.',
+ 'cgf',
+ 'label'
+ )
+ ),(
+ 'history.circ.retention_age_is_min',
+ oils_i18n_gettext(
+ 'history.circ.retention_age_is_min',
+ 'Historical Circulations are kept for global retention age at a minimum, regardless of user preferences.',
+ 'cgf',
+ 'label'
+ )
+ );
+
+
+-- Drop old variants
+DROP FUNCTION IF EXISTS action.circ_chain(INTEGER);
+DROP FUNCTION IF EXISTS action.summarize_circ_chain(INTEGER);
+
+CREATE OR REPLACE FUNCTION action.circ_chain ( ctx_circ_id BIGINT ) RETURNS SETOF action.circulation AS $$
+DECLARE
+ tmp_circ action.circulation%ROWTYPE;
+ circ_0 action.circulation%ROWTYPE;
+BEGIN
+
+ SELECT INTO tmp_circ * FROM action.circulation WHERE id = ctx_circ_id;
+
+ IF tmp_circ IS NULL THEN
+ RETURN NEXT tmp_circ;
+ END IF;
+ circ_0 := tmp_circ;
+
+ -- find the front of the chain
+ WHILE TRUE LOOP
+ SELECT INTO tmp_circ * FROM action.circulation WHERE id = tmp_circ.parent_circ;
+ IF tmp_circ IS NULL THEN
+ EXIT;
+ END IF;
+ circ_0 := tmp_circ;
+ END LOOP;
+
+ -- now send the circs to the caller, oldest to newest
+ tmp_circ := circ_0;
+ WHILE TRUE LOOP
+ IF tmp_circ IS NULL THEN
+ EXIT;
+ END IF;
+ RETURN NEXT tmp_circ;
+ SELECT INTO tmp_circ * FROM action.circulation WHERE parent_circ = tmp_circ.id;
+ END LOOP;
+
+END;
+$$ LANGUAGE 'plpgsql';
+
+CREATE OR REPLACE FUNCTION action.summarize_circ_chain ( ctx_circ_id BIGINT ) RETURNS action.circ_chain_summary AS $$
+
+DECLARE
+
+ -- first circ in the chain
+ circ_0 action.circulation%ROWTYPE;
+
+ -- last circ in the chain
+ circ_n action.circulation%ROWTYPE;
+
+ -- circ chain under construction
+ chain action.circ_chain_summary;
+ tmp_circ action.circulation%ROWTYPE;
+
+BEGIN
+
+ chain.num_circs := 0;
+ FOR tmp_circ IN SELECT * FROM action.circ_chain(ctx_circ_id) LOOP
+
+ IF chain.num_circs = 0 THEN
+ circ_0 := tmp_circ;
+ END IF;
+
+ chain.num_circs := chain.num_circs + 1;
+ circ_n := tmp_circ;
+ END LOOP;
+
+ chain.start_time := circ_0.xact_start;
+ chain.last_stop_fines := circ_n.stop_fines;
+ chain.last_stop_fines_time := circ_n.stop_fines_time;
+ chain.last_checkin_time := circ_n.checkin_time;
+ chain.last_checkin_scan_time := circ_n.checkin_scan_time;
+ SELECT INTO chain.checkout_workstation name FROM actor.workstation WHERE id = circ_0.workstation;
+ SELECT INTO chain.last_checkin_workstation name FROM actor.workstation WHERE id = circ_n.checkin_workstation;
+
+ IF chain.num_circs > 1 THEN
+ chain.last_renewal_time := circ_n.xact_start;
+ SELECT INTO chain.last_renewal_workstation name FROM actor.workstation WHERE id = circ_n.workstation;
+ END IF;
+
+ RETURN chain;
+
+END;
+$$ LANGUAGE 'plpgsql';
+
+CREATE OR REPLACE FUNCTION action.purge_circulations () RETURNS INT AS $func$
+DECLARE
+ usr_keep_age actor.usr_setting%ROWTYPE;
+ usr_keep_start actor.usr_setting%ROWTYPE;
+ org_keep_age INTERVAL;
+ org_use_last BOOL = false;
+ org_age_is_min BOOL = false;
+ org_keep_count INT;
+
+ keep_age INTERVAL;
+
+ target_acp RECORD;
+ circ_chain_head action.circulation%ROWTYPE;
+ circ_chain_tail action.circulation%ROWTYPE;
+
+ count_purged INT;
+ num_incomplete INT;
+
+ last_finished TIMESTAMP WITH TIME ZONE;
+BEGIN
+
+ count_purged := 0;
+
+ SELECT value::INTERVAL INTO org_keep_age FROM config.global_flag WHERE name = 'history.circ.retention_age' AND enabled;
+
+ SELECT value::INT INTO org_keep_count FROM config.global_flag WHERE name = 'history.circ.retention_count' AND enabled;
+ IF org_keep_count IS NULL THEN
+ RETURN count_purged; -- Gimme a count to keep, or I keep them all, forever
+ END IF;
+
+ SELECT enabled INTO org_use_last FROM config.global_flag WHERE name = 'history.circ.retention_uses_last_finished';
+ SELECT enabled INTO org_age_is_min FROM config.global_flag WHERE name = 'history.circ.retention_age_is_min';
+
+ -- First, find copies with more than keep_count non-renewal circs
+ FOR target_acp IN
+ SELECT target_copy,
+ COUNT(*) AS total_real_circs
+ FROM action.circulation
+ WHERE parent_circ IS NULL
+ AND xact_finish IS NOT NULL
+ GROUP BY target_copy
+ HAVING COUNT(*) > org_keep_count
+ LOOP
+ -- And, for those, select circs that are finished and older than keep_age
+ FOR circ_chain_head IN
+ -- For reference, the subquery uses a window function to order the circs newest to oldest and number them
+ -- The outer query then uses that information to skip the most recent set the library wants to keep
+ -- End result is we don't care what order they come out in, as they are all potentials for deletion.
+ SELECT ac.* FROM action.circulation ac JOIN (
+ SELECT rank() OVER (ORDER BY xact_start DESC), ac.id
+ FROM action.circulation ac
+ WHERE ac.target_copy = target_acp.target_copy
+ AND ac.parent_circ IS NULL
+ ORDER BY ac.xact_start ) ranked USING (id)
+ WHERE ranked.rank > org_keep_count
+ LOOP
+
+ SELECT * INTO circ_chain_tail FROM action.circ_chain(circ_chain_head.id) ORDER BY xact_start DESC LIMIT 1;
+ SELECT COUNT(CASE WHEN xact_finish IS NULL THEN 1 ELSE NULL END), MAX(xact_finish) INTO num_incomplete, last_finished FROM action.circ_chain(circ_chain_head.id);
+ CONTINUE WHEN circ_chain_tail.xact_finish IS NULL OR num_incomplete > 0;
+
+ IF NOT org_use_last THEN
+ last_finished := circ_chain_tail.xact_finish;
+ END IF;
+
+ -- Now get the user settings, if any, to block purging if the user wants to keep more circs
+ usr_keep_age.value := NULL;
+ SELECT * INTO usr_keep_age FROM actor.usr_setting WHERE usr = circ_chain_head.usr AND name = 'history.circ.retention_age';
+
+ usr_keep_start.value := NULL;
+ SELECT * INTO usr_keep_start FROM actor.usr_setting WHERE usr = circ_chain_head.usr AND name = 'history.circ.retention_start';
+
+ IF usr_keep_age.value IS NOT NULL AND usr_keep_start.value IS NOT NULL THEN
+ IF oils_json_to_text(usr_keep_age.value)::INTERVAL > AGE(NOW(), oils_json_to_text(usr_keep_start.value)::TIMESTAMPTZ) THEN
+ keep_age := AGE(NOW(), oils_json_to_text(usr_keep_start.value)::TIMESTAMPTZ);
+ ELSE
+ keep_age := oils_json_to_text(usr_keep_age.value)::INTERVAL;
+ END IF;
+ ELSIF usr_keep_start.value IS NOT NULL THEN
+ keep_age := AGE(NOW(), oils_json_to_text(usr_keep_start.value)::TIMESTAMPTZ);
+ ELSE
+ keep_age := COALESCE( org_keep_age, '2000 years'::INTERVAL );
+ END IF;
+
+ IF org_age_is_min THEN
+ keep_age := GREATEST( keep_age, org_keep_age );
+ END IF;
+
+ CONTINUE WHEN AGE(NOW(), last_finished) < keep_age;
+
+ -- We've passed the purging tests, purge the circ chain starting at the end
+ -- A trigger should auto-purge the rest of the chain.
+ DELETE FROM action.circulation WHERE id = circ_chain_tail.id;
+
+ count_purged := count_purged + 1;
+
+ END LOOP;
+ END LOOP;
+
+ return count_purged;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+
+SELECT evergreen.upgrade_deps_block_check('0799', :eg_version);
+
+-- allow state to be null
+ALTER TABLE actor.usr_address ALTER COLUMN state DROP NOT NULL;
+
+-- create new YAOUS
+INSERT into config.org_unit_setting_type
+ (name, grp, label, description, datatype)
+ VALUES (
+ 'ui.patron.edit.au.state.require',
+ 'gui',
+ oils_i18n_gettext(
+ 'ui.patron.edit.au.state.require',
+ 'Require State field on patron registration',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ui.patron.edit.au.state.require',
+ 'The State field will be required on the patron registration screen.',
+ 'coust',
+ 'description'
+ ),
+ 'bool'
+ );
+
+INSERT into config.org_unit_setting_type
+ (name, grp, label, description, datatype)
+ VALUES (
+ 'ui.patron.edit.au.state.show',
+ 'gui',
+ oils_i18n_gettext(
+ 'ui.patron.edit.au.state.show',
+ 'Show State field on patron registration',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ui.patron.edit.au.state.show',
+ 'The State field will be shown on the patron registration screen. Showing a field makes it appear with required fields even when not required. If the field is required this setting is ignored.',
+ 'coust',
+ 'description'
+ ),
+ 'bool'
+ );
+
+INSERT into config.org_unit_setting_type
+ (name, grp, label, description, datatype)
+ VALUES (
+ 'ui.patron.edit.au.state.suggest',
+ 'gui',
+ oils_i18n_gettext(
+ 'ui.patron.edit.au.state.suggest',
+ 'Suggest State field on patron registration',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ui.patron.edit.au.state.suggest',
+ 'The State field will be suggested on the patron registration screen. Suggesting a field makes it appear when suggested fields are shown. If the field is shown or required this setting is ignored.',
+ 'coust',
+ 'description'
+ ),
+ 'bool'
+ );
+
+
+SELECT evergreen.upgrade_deps_block_check('0801', :eg_version);
+
+INSERT into config.org_unit_setting_type
+( name, grp, label, description, datatype, fm_class ) VALUES
+( 'ui.patron.edit.ac.barcode.regex', 'gui',
+ oils_i18n_gettext('ui.patron.edit.ac.barcode.regex',
+ 'Regex for barcodes on patron registration',
+ 'coust', 'label'),
+ oils_i18n_gettext('ui.patron.edit.ac.barcode.regex',
+ 'The Regular Expression for validation on barcodes in patron registration.',
+ 'coust', 'description'),
+ 'string', null);
+
+
+SELECT evergreen.upgrade_deps_block_check('0802', :eg_version);
+
+CREATE OR REPLACE FUNCTION authority.normalize_heading( marcxml TEXT, no_thesaurus BOOL ) RETURNS TEXT AS $func$
+DECLARE
+ acsaf authority.control_set_authority_field%ROWTYPE;
+ tag_used TEXT;
+ nfi_used TEXT;
+ sf TEXT;
+ sf_node TEXT;
+ tag_node TEXT;
+ thes_code TEXT;
+ cset INT;
+ heading_text TEXT;
+ tmp_text TEXT;
+ first_sf BOOL;
+ auth_id INT DEFAULT COALESCE(NULLIF(oils_xpath_string('//*[@tag="901"]/*[local-name()="subfield" and @code="c"]', marcxml), ''), '0')::INT;
+BEGIN
+ SELECT control_set INTO cset FROM authority.record_entry WHERE id = auth_id;
+
+ IF cset IS NULL THEN
+ SELECT control_set INTO cset
+ FROM authority.control_set_authority_field
+ WHERE tag IN ( SELECT UNNEST(XPATH('//*[starts-with(@tag,"1")]/@tag',marcxml::XML)::TEXT[]))
+ LIMIT 1;
+ END IF;
+
+ thes_code := vandelay.marc21_extract_fixed_field(marcxml,'Subj');
+ IF thes_code IS NULL THEN
+ thes_code := '|';
+ ELSIF thes_code = 'z' THEN
+ thes_code := COALESCE( oils_xpath_string('//*[@tag="040"]/*[@code="f"][1]', marcxml), '' );
+ END IF;
+
+ heading_text := '';
+ FOR acsaf IN SELECT * FROM authority.control_set_authority_field WHERE control_set = cset AND main_entry IS NULL LOOP
+ tag_used := acsaf.tag;
+ nfi_used := acsaf.nfi;
+ first_sf := TRUE;
+
+ FOR tag_node IN SELECT unnest(oils_xpath('//*[@tag="'||tag_used||'"]',marcxml)) LOOP
+ FOR sf_node IN SELECT unnest(oils_xpath('//*[contains("'||acsaf.sf_list||'", at code)]',tag_node)) LOOP
+
+ tmp_text := oils_xpath_string('.', sf_node);
+ sf := oils_xpath_string('./@code', sf_node);
+
+ IF first_sf AND tmp_text IS NOT NULL AND nfi_used IS NOT NULL THEN
+
+ tmp_text := SUBSTRING(
+ tmp_text FROM
+ COALESCE(
+ NULLIF(
+ REGEXP_REPLACE(
+ oils_xpath_string('./@ind'||nfi_used, tag_node),
+ $$\D+$$,
+ '',
+ 'g'
+ ),
+ ''
+ )::INT,
+ 0
+ ) + 1
+ );
+
+ END IF;
+
+ first_sf := FALSE;
+
+ IF tmp_text IS NOT NULL AND tmp_text <> '' THEN
+ heading_text := heading_text || E'\u2021' || sf || ' ' || tmp_text;
+ END IF;
+ END LOOP;
+
+ EXIT WHEN heading_text <> '';
+ END LOOP;
+
+ EXIT WHEN heading_text <> '';
+ END LOOP;
+
+ IF heading_text <> '' THEN
+ IF no_thesaurus IS TRUE THEN
+ heading_text := tag_used || ' ' || public.naco_normalize(heading_text);
+ ELSE
+ heading_text := tag_used || '_' || COALESCE(nfi_used,'-') || '_' || thes_code || ' ' || public.naco_normalize(heading_text);
+ END IF;
+ ELSE
+ heading_text := 'NOHEADING_' || thes_code || ' ' || MD5(marcxml);
+ END IF;
+
+ RETURN heading_text;
+END;
+$func$ LANGUAGE PLPGSQL IMMUTABLE;
+
+CREATE OR REPLACE FUNCTION authority.simple_heading_set( marcxml TEXT ) RETURNS SETOF authority.simple_heading AS $func$
+DECLARE
+ res authority.simple_heading%ROWTYPE;
+ acsaf authority.control_set_authority_field%ROWTYPE;
+ tag_used TEXT;
+ nfi_used TEXT;
+ sf TEXT;
+ cset INT;
+ heading_text TEXT;
+ sort_text TEXT;
+ tmp_text TEXT;
+ tmp_xml TEXT;
+ first_sf BOOL;
+ auth_id INT DEFAULT oils_xpath_string('//*[@tag="901"]/*[local-name()="subfield" and @code="c"]', marcxml)::INT;
+BEGIN
+
+ res.record := auth_id;
+
+ SELECT control_set INTO cset
+ FROM authority.control_set_authority_field
+ WHERE tag IN ( SELECT UNNEST(XPATH('//*[starts-with(@tag,"1")]/@tag',marcxml::XML)::TEXT[]) )
+ LIMIT 1;
+
+ FOR acsaf IN SELECT * FROM authority.control_set_authority_field WHERE control_set = cset LOOP
+
+ res.atag := acsaf.id;
+ tag_used := acsaf.tag;
+ nfi_used := acsaf.nfi;
+
+ FOR tmp_xml IN SELECT UNNEST(XPATH('//*[@tag="'||tag_used||'"]', marcxml::XML)) LOOP
+
+ heading_text := public.naco_normalize(
+ COALESCE(
+ oils_xpath_string('//*[contains("'||acsaf.sf_list||'", at code)]',tmp_xml::TEXT, ' '),
+ ''
+ )
+ );
+
+ IF nfi_used IS NOT NULL THEN
+
+ sort_text := SUBSTRING(
+ heading_text FROM
+ COALESCE(
+ NULLIF(
+ REGEXP_REPLACE(
+ oils_xpath_string('./@ind'||nfi_used, tmp_xml::TEXT),
+ $$\D+$$,
+ '',
+ 'g'
+ ),
+ ''
+ )::INT,
+ 0
+ ) + 1
+ );
+
+ ELSE
+ sort_text := heading_text;
+ END IF;
+
+ IF heading_text IS NOT NULL AND heading_text <> '' THEN
+ res.value := heading_text;
+ res.sort_value := sort_text;
+ RETURN NEXT res;
+ END IF;
+
+ END LOOP;
+
+ END LOOP;
+
+ RETURN;
+END;
+$func$ LANGUAGE PLPGSQL IMMUTABLE;
+
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0805', :eg_version);
+
+INSERT INTO config.global_flag (name, label, enabled)
+ VALUES (
+ 'circ.desk_renewal.use_original_circ_lib',
+ oils_i18n_gettext(
+ 'circ.desk_renewal.use_original_circ_lib',
+ 'Circ: Use original circulation library on desk renewal instead of user home library',
+ 'cgf',
+ 'label'
+ ),
+ FALSE
+ );
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0806', :eg_version);
+
+INSERT INTO action.hold_request_cancel_cause (id,label)
+ VALUES (7,'Patron via SIP');
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0807', :eg_version);
+
+ALTER TABLE config.usr_setting_type
+ ADD COLUMN reg_default TEXT;
+
+
+SELECT evergreen.upgrade_deps_block_check('0809', :eg_version);
+
+ALTER TABLE actor.org_address ALTER COLUMN state DROP NOT NULL;
+
+
+-- Evergreen DB patch 0812.data.add_library_info_url_OUS.sql
+--
+-- Adds YAOUS for enabling information links from the TPAC to a library URL
+--
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0812', :eg_version);
+
+-- FIXME: add/check SQL statements to perform the upgrade
+INSERT into config.org_unit_setting_type
+( name, grp, label, description, datatype, fm_class ) VALUES
+( 'lib.info_url', 'lib',
+ oils_i18n_gettext('lib.info_url',
+ 'Library information URL (such as "http://example.com/about.html")',
+ 'coust', 'label'),
+ oils_i18n_gettext('lib.info_url',
+ 'URL for information on this library, such as contact information, hours of operation, and directions. If set, the library name in the copy details section links to that URL. Use a complete URL, such as "http://example.com/hours.html".',
+ 'coust', 'description'),
+ 'string', null)
+;
+
+
+SELECT evergreen.upgrade_deps_block_check('0813', :eg_version);
+
+-- Don't require state in the auditor tracking for user addresses
+
+ALTER TABLE auditor.actor_usr_address_history ALTER COLUMN state DROP NOT NULL;
+
+-- Change constraint on actor.org_unit_setting_log to be deferrable initially
+
+ALTER TABLE config.org_unit_setting_type_log
+ DROP CONSTRAINT org_unit_setting_type_log_field_name_fkey,
+ ADD CONSTRAINT org_unit_setting_type_log_field_name_fkey FOREIGN KEY (field_name)
+ REFERENCES config.org_unit_setting_type (name) MATCH SIMPLE
+ ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED;
+
+-- Fix names in the org unit setting configuration
+
+UPDATE config.org_unit_setting_type SET name = overlay(name placing 'aua' from 16 for 2) where name like 'ui.patron.edit.au.state.%';
+
+-- Fix names if they have already been set in the editor
+
+UPDATE actor.org_unit_setting SET name = overlay(name placing 'aua' from 16 for 2) where name like 'ui.patron.edit.au.state.%';
+
+-- and the logs too
+
+UPDATE config.org_unit_setting_type_log SET field_name = overlay(field_name placing 'aua' from 16 for 2) where field_name like 'ui.patron.edit.au.state.%';
+
+
+SELECT evergreen.upgrade_deps_block_check('0814', :eg_version);
+
+UPDATE permission.perm_list
+SET description = 'Allow a user to delete a provider'
+WHERE code = 'DELETE_PROVIDER';
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0815', :eg_version);
+
+ALTER TABLE authority.control_set_authority_field
+ ADD COLUMN linking_subfield CHAR(1);
+
+UPDATE authority.control_set_authority_field
+ SET linking_subfield = '0' WHERE main_entry IS NOT NULL;
+
+CREATE TABLE authority.authority_linking (
+ id BIGSERIAL PRIMARY KEY,
+ source BIGINT REFERENCES authority.record_entry (id) NOT NULL,
+ target BIGINT REFERENCES authority.record_entry (id) NOT NULL,
+ field INT REFERENCES authority.control_set_authority_field (id) NOT NULL
+);
+
+-- Given an authority record's ID, control set ID (if known), and marc::XML,
+-- return all links to other authority records in the form of rows that
+-- can be inserted into authority.authority_linking.
+CREATE OR REPLACE FUNCTION authority.calculate_authority_linking(
+ rec_id BIGINT, rec_control_set INT, rec_marc_xml XML
+) RETURNS SETOF authority.authority_linking AS $func$
+DECLARE
+ acsaf authority.control_set_authority_field%ROWTYPE;
+ link TEXT;
+ aal authority.authority_linking%ROWTYPE;
+BEGIN
+ IF rec_control_set IS NULL THEN
+ -- No control_set on record? Guess at one
+ SELECT control_set INTO rec_control_set
+ FROM authority.control_set_authority_field
+ WHERE tag IN (
+ SELECT UNNEST(
+ XPATH('//*[starts-with(@tag,"1")]/@tag',rec_marc_xml::XML)::TEXT[]
+ )
+ ) LIMIT 1;
+
+ IF NOT FOUND THEN
+ RAISE WARNING 'Could not even guess at control set for authority record %', rec_id;
+ RETURN;
+ END IF;
+ END IF;
+
+ aal.source := rec_id;
+
+ FOR acsaf IN
+ SELECT * FROM authority.control_set_authority_field
+ WHERE control_set = rec_control_set
+ AND linking_subfield IS NOT NULL
+ AND main_entry IS NOT NULL
+ LOOP
+ link := SUBSTRING(
+ (XPATH('//*[@tag="' || acsaf.tag || '"]/*[@code="' ||
+ acsaf.linking_subfield || '"]/text()', rec_marc_xml))[1]::TEXT,
+ '\d+$'
+ );
+
+ -- Ignore links that are null, malformed, circular, or point to
+ -- non-existent authority records.
+ IF link IS NOT NULL AND link::BIGINT <> rec_id THEN
+ PERFORM * FROM authority.record_entry WHERE id = link::BIGINT;
+ IF FOUND THEN
+ aal.target := link::BIGINT;
+ aal.field := acsaf.id;
+ RETURN NEXT aal;
+ END IF;
+ END IF;
+ END LOOP;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+
+-- AFTER UPDATE OR INSERT trigger for authority.record_entry
+CREATE OR REPLACE FUNCTION authority.indexing_ingest_or_delete () RETURNS TRIGGER AS $func$
+BEGIN
+
+ IF NEW.deleted IS TRUE THEN -- If this authority is deleted
+ DELETE FROM authority.bib_linking WHERE authority = NEW.id; -- Avoid updating fields in bibs that are no longer visible
+ DELETE FROM authority.full_rec WHERE record = NEW.id; -- Avoid validating fields against deleted authority records
+ DELETE FROM authority.simple_heading WHERE record = NEW.id;
+ -- Should remove matching $0 from controlled fields at the same time?
+
+ -- XXX What do we about the actual linking subfields present in
+ -- authority records that target this one when this happens?
+ DELETE FROM authority.authority_linking
+ WHERE source = NEW.id OR target = NEW.id;
+
+ RETURN NEW; -- and we're done
+ END IF;
+
+ IF TG_OP = 'UPDATE' THEN -- re-ingest?
+ PERFORM * FROM config.internal_flag WHERE name = 'ingest.reingest.force_on_same_marc' AND enabled;
+
+ IF NOT FOUND AND OLD.marc = NEW.marc THEN -- don't do anything if the MARC didn't change
+ RETURN NEW;
+ END IF;
+
+ -- Propagate these updates to any linked bib records
+ PERFORM authority.propagate_changes(NEW.id) FROM authority.record_entry WHERE id = NEW.id;
+
+ DELETE FROM authority.simple_heading WHERE record = NEW.id;
+ DELETE FROM authority.authority_linking WHERE source = NEW.id;
+ END IF;
+
+ INSERT INTO authority.authority_linking (source, target, field)
+ SELECT source, target, field FROM authority.calculate_authority_linking(
+ NEW.id, NEW.control_set, NEW.marc::XML
+ );
+
+ INSERT INTO authority.simple_heading (record,atag,value,sort_value)
+ SELECT record, atag, value, sort_value FROM authority.simple_heading_set(NEW.marc);
+
+ -- Flatten and insert the afr data
+ PERFORM * FROM config.internal_flag WHERE name = 'ingest.disable_authority_full_rec' AND enabled;
+ IF NOT FOUND THEN
+ PERFORM authority.reingest_authority_full_rec(NEW.id);
+ PERFORM * FROM config.internal_flag WHERE name = 'ingest.disable_authority_rec_descriptor' AND enabled;
+ IF NOT FOUND THEN
+ PERFORM authority.reingest_authority_rec_descriptor(NEW.id);
+ END IF;
+ END IF;
+
+ RETURN NEW;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0816', :eg_version);
+
+-- To avoid problems with altering a table column after doing an
+-- update.
+ALTER TABLE authority.control_set_authority_field
+ DISABLE TRIGGER ALL;
+
+ALTER TABLE authority.control_set_authority_field
+ ADD COLUMN display_sf_list TEXT;
+
+UPDATE authority.control_set_authority_field
+ SET display_sf_list = REGEXP_REPLACE(sf_list, '[w254]', '', 'g');
+
+ALTER TABLE authority.control_set_authority_field
+ ALTER COLUMN display_sf_list SET NOT NULL;
+
+ALTER TABLE authority.control_set_authority_field
+ ENABLE TRIGGER ALL;
+
+ALTER TABLE metabib.browse_entry_def_map
+ ADD COLUMN authority BIGINT REFERENCES authority.record_entry (id)
+ ON DELETE SET NULL;
+
+ALTER TABLE config.metabib_field ADD COLUMN authority_xpath TEXT;
+ALTER TABLE config.metabib_field ADD COLUMN browse_sort_xpath TEXT;
+
+UPDATE config.metabib_field
+ SET authority_xpath = '//@xlink:href'
+ WHERE
+ format = 'mods32' AND
+ field_class IN ('subject','series','title','author') AND
+ browse_field IS TRUE;
+
+ALTER TYPE metabib.field_entry_template ADD ATTRIBUTE authority BIGINT;
+ALTER TYPE metabib.field_entry_template ADD ATTRIBUTE sort_value TEXT;
+
+CREATE OR REPLACE FUNCTION metabib.reingest_metabib_field_entries( bib_id BIGINT, skip_facet BOOL DEFAULT FALSE, skip_browse BOOL DEFAULT FALSE, skip_search BOOL DEFAULT FALSE ) RETURNS VOID AS $func$
+DECLARE
+ fclass RECORD;
+ ind_data metabib.field_entry_template%ROWTYPE;
+ mbe_row metabib.browse_entry%ROWTYPE;
+ mbe_id BIGINT;
+ b_skip_facet BOOL;
+ b_skip_browse BOOL;
+ b_skip_search BOOL;
+ value_prepped TEXT;
+BEGIN
+
+ SELECT COALESCE(NULLIF(skip_facet, FALSE), EXISTS (SELECT enabled FROM config.internal_flag WHERE name = 'ingest.skip_facet_indexing' AND enabled)) INTO b_skip_facet;
+ SELECT COALESCE(NULLIF(skip_browse, FALSE), EXISTS (SELECT enabled FROM config.internal_flag WHERE name = 'ingest.skip_browse_indexing' AND enabled)) INTO b_skip_browse;
+ SELECT COALESCE(NULLIF(skip_search, FALSE), EXISTS (SELECT enabled FROM config.internal_flag WHERE name = 'ingest.skip_search_indexing' AND enabled)) INTO b_skip_search;
+
+ PERFORM * FROM config.internal_flag WHERE name = 'ingest.assume_inserts_only' AND enabled;
+ IF NOT FOUND THEN
+ IF NOT b_skip_search THEN
+ FOR fclass IN SELECT * FROM config.metabib_class LOOP
+ -- RAISE NOTICE 'Emptying out %', fclass.name;
+ EXECUTE $$DELETE FROM metabib.$$ || fclass.name || $$_field_entry WHERE source = $$ || bib_id;
+ END LOOP;
+ END IF;
+ IF NOT b_skip_facet THEN
+ DELETE FROM metabib.facet_entry WHERE source = bib_id;
+ END IF;
+ IF NOT b_skip_browse THEN
+ DELETE FROM metabib.browse_entry_def_map WHERE source = bib_id;
+ END IF;
+ END IF;
+
+ FOR ind_data IN SELECT * FROM biblio.extract_metabib_field_entry( bib_id ) LOOP
+ IF ind_data.field < 0 THEN
+ ind_data.field = -1 * ind_data.field;
+ END IF;
+
+ IF ind_data.facet_field AND NOT b_skip_facet THEN
+ INSERT INTO metabib.facet_entry (field, source, value)
+ VALUES (ind_data.field, ind_data.source, ind_data.value);
+ END IF;
+
+ IF ind_data.browse_field AND NOT b_skip_browse THEN
+ -- A caveat about this SELECT: this should take care of replacing
+ -- old mbe rows when data changes, but not if normalization (by
+ -- which I mean specifically the output of
+ -- evergreen.oils_tsearch2()) changes. It may or may not be
+ -- expensive to add a comparison of index_vector to index_vector
+ -- to the WHERE clause below.
+
+ value_prepped := metabib.browse_normalize(ind_data.value, ind_data.field);
+ SELECT INTO mbe_row * FROM metabib.browse_entry
+ WHERE value = value_prepped AND sort_value = ind_data.sort_value;
+
+ IF FOUND THEN
+ mbe_id := mbe_row.id;
+ ELSE
+ INSERT INTO metabib.browse_entry
+ ( value, sort_value ) VALUES
+ ( value_prepped, ind_data.sort_value );
+
+ mbe_id := CURRVAL('metabib.browse_entry_id_seq'::REGCLASS);
+ END IF;
+
+ INSERT INTO metabib.browse_entry_def_map (entry, def, source, authority)
+ VALUES (mbe_id, ind_data.field, ind_data.source, ind_data.authority);
+ END IF;
+
+ IF ind_data.search_field AND NOT b_skip_search THEN
+ EXECUTE $$
+ INSERT INTO metabib.$$ || ind_data.field_class || $$_field_entry (field, source, value)
+ VALUES ($$ ||
+ quote_literal(ind_data.field) || $$, $$ ||
+ quote_literal(ind_data.source) || $$, $$ ||
+ quote_literal(ind_data.value) ||
+ $$);$$;
+ END IF;
+
+ END LOOP;
+
+ IF NOT b_skip_search THEN
+ PERFORM metabib.update_combined_index_vectors(bib_id);
+ END IF;
+
+ RETURN;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+
+CREATE OR REPLACE FUNCTION biblio.extract_metabib_field_entry ( rid BIGINT, default_joiner TEXT ) RETURNS SETOF metabib.field_entry_template AS $func$
+DECLARE
+ bib biblio.record_entry%ROWTYPE;
+ idx config.metabib_field%ROWTYPE;
+ xfrm config.xml_transform%ROWTYPE;
+ prev_xfrm TEXT;
+ transformed_xml TEXT;
+ xml_node TEXT;
+ xml_node_list TEXT[];
+ facet_text TEXT;
+ browse_text TEXT;
+ sort_value TEXT;
+ raw_text TEXT;
+ curr_text TEXT;
+ joiner TEXT := default_joiner; -- XXX will index defs supply a joiner?
+ authority_text TEXT;
+ authority_link BIGINT;
+ output_row metabib.field_entry_template%ROWTYPE;
+BEGIN
+
+ -- Get the record
+ SELECT INTO bib * FROM biblio.record_entry WHERE id = rid;
+
+ -- Loop over the indexing entries
+ FOR idx IN SELECT * FROM config.metabib_field ORDER BY format LOOP
+
+ SELECT INTO xfrm * from config.xml_transform WHERE name = idx.format;
+
+ -- See if we can skip the XSLT ... it's expensive
+ IF prev_xfrm IS NULL OR prev_xfrm <> xfrm.name THEN
+ -- Can't skip the transform
+ IF xfrm.xslt <> '---' THEN
+ transformed_xml := oils_xslt_process(bib.marc,xfrm.xslt);
+ ELSE
+ transformed_xml := bib.marc;
+ END IF;
+
+ prev_xfrm := xfrm.name;
+ END IF;
+
+ xml_node_list := oils_xpath( idx.xpath, transformed_xml, ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]] );
+
+ raw_text := NULL;
+ FOR xml_node IN SELECT x FROM unnest(xml_node_list) AS x LOOP
+ CONTINUE WHEN xml_node !~ E'^\\s*<';
+
+ curr_text := ARRAY_TO_STRING(
+ oils_xpath( '//text()',
+ REGEXP_REPLACE( -- This escapes all &s not followed by "amp;". Data ise returned from oils_xpath (above) in UTF-8, not entity encoded
+ REGEXP_REPLACE( -- This escapes embeded <s
+ xml_node,
+ $re$(>[^<]+)(<)([^>]+<)$re$,
+ E'\\1<\\3',
+ 'g'
+ ),
+ '&(?!amp;)',
+ '&',
+ 'g'
+ )
+ ),
+ ' '
+ );
+
+ CONTINUE WHEN curr_text IS NULL OR curr_text = '';
+
+ IF raw_text IS NOT NULL THEN
+ raw_text := raw_text || joiner;
+ END IF;
+
+ raw_text := COALESCE(raw_text,'') || curr_text;
+
+ -- autosuggest/metabib.browse_entry
+ IF idx.browse_field THEN
+
+ IF idx.browse_xpath IS NOT NULL AND idx.browse_xpath <> '' THEN
+ browse_text := oils_xpath_string( idx.browse_xpath, xml_node, joiner, ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]] );
+ ELSE
+ browse_text := curr_text;
+ END IF;
+
+ IF idx.browse_sort_xpath IS NOT NULL AND
+ idx.browse_sort_xpath <> '' THEN
+
+ sort_value := oils_xpath_string(
+ idx.browse_sort_xpath, xml_node, joiner,
+ ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]]
+ );
+ ELSE
+ sort_value := browse_text;
+ END IF;
+
+ output_row.field_class = idx.field_class;
+ output_row.field = idx.id;
+ output_row.source = rid;
+ output_row.value = BTRIM(REGEXP_REPLACE(browse_text, E'\\s+', ' ', 'g'));
+ output_row.sort_value :=
+ public.search_normalize(sort_value);
+
+ output_row.authority := NULL;
+
+ IF idx.authority_xpath IS NOT NULL AND idx.authority_xpath <> '' THEN
+ authority_text := oils_xpath_string(
+ idx.authority_xpath, xml_node, joiner,
+ ARRAY[
+ ARRAY[xfrm.prefix, xfrm.namespace_uri],
+ ARRAY['xlink','http://www.w3.org/1999/xlink']
+ ]
+ );
+
+ IF authority_text ~ '^\d+$' THEN
+ authority_link := authority_text::BIGINT;
+ PERFORM * FROM authority.record_entry WHERE id = authority_link;
+ IF FOUND THEN
+ output_row.authority := authority_link;
+ END IF;
+ END IF;
+
+ END IF;
+
+ output_row.browse_field = TRUE;
+ RETURN NEXT output_row;
+ output_row.browse_field = FALSE;
+ output_row.sort_value := NULL;
+ END IF;
+
+ -- insert raw node text for faceting
+ IF idx.facet_field THEN
+
+ IF idx.facet_xpath IS NOT NULL AND idx.facet_xpath <> '' THEN
+ facet_text := oils_xpath_string( idx.facet_xpath, xml_node, joiner, ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]] );
+ ELSE
+ facet_text := curr_text;
+ END IF;
+
+ output_row.field_class = idx.field_class;
+ output_row.field = -1 * idx.id;
+ output_row.source = rid;
+ output_row.value = BTRIM(REGEXP_REPLACE(facet_text, E'\\s+', ' ', 'g'));
+
+ output_row.facet_field = TRUE;
+ RETURN NEXT output_row;
+ output_row.facet_field = FALSE;
+ END IF;
+
+ END LOOP;
+
+ CONTINUE WHEN raw_text IS NULL OR raw_text = '';
+
+ -- insert combined node text for searching
+ IF idx.search_field THEN
+ output_row.field_class = idx.field_class;
+ output_row.field = idx.id;
+ output_row.source = rid;
+ output_row.value = BTRIM(REGEXP_REPLACE(raw_text, E'\\s+', ' ', 'g'));
+
+ output_row.search_field = TRUE;
+ RETURN NEXT output_row;
+ output_row.search_field = FALSE;
+ END IF;
+
+ END LOOP;
+
+END;
+
+$func$ LANGUAGE PLPGSQL;
+
+
+-- 953.data.MODS32-xsl.sql
+UPDATE config.xml_transform SET xslt=$$<?xml version="1.0" encoding="UTF-8"?>
+<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:output encoding="UTF-8" indent="yes" method="xml"/>
+<!--
+Revision 1.14 - Fixed template isValid and fields 010, 020, 022, 024, 028, and 037 to output additional identifier elements
+ with corresponding @type and @invalid eq 'yes' when subfields z or y (in the case of 022) exist in the MARCXML ::: 2007/01/04 17:35:20 cred
+
+Revision 1.13 - Changed order of output under cartographics to reflect schema 2006/11/28 tmee
+
+Revision 1.12 - Updated to reflect MODS 3.2 Mapping 2006/10/11 tmee
+
+Revision 1.11 - The attribute objectPart moved from <languageTerm> to <language>
+ 2006/04/08 jrad
+
+Revision 1.10 MODS 3.1 revisions to language and classification elements
+ (plus ability to find marc:collection embedded in wrapper elements such as SRU zs: wrappers)
+ 2006/02/06 ggar
+
+Revision 1.9 subfield $y was added to field 242 2004/09/02 10:57 jrad
+
+Revision 1.8 Subject chopPunctuation expanded and attribute fixes 2004/08/12 jrad
+
+Revision 1.7 2004/03/25 08:29 jrad
+
+Revision 1.6 various validation fixes 2004/02/20 ntra
+
+Revision 1.5 2003/10/02 16:18:58 ntra
+MODS2 to MODS3 updates, language unstacking and
+de-duping, chopPunctuation expanded
+
+Revision 1.3 2003/04/03 00:07:19 ntra
+Revision 1.3 Additional Changes not related to MODS Version 2.0 by ntra
+
+Revision 1.2 2003/03/24 19:37:42 ckeith
+Added Log Comment
+
+-->
+ <xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="//marc:collection">
+ <modsCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
+ <xsl:for-each select="//marc:collection/marc:record">
+ <mods version="3.2">
+ <xsl:call-template name="marcRecord"/>
+ </mods>
+ </xsl:for-each>
+ </modsCollection>
+ </xsl:when>
+ <xsl:otherwise>
+ <mods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
+ <xsl:for-each select="//marc:record">
+ <xsl:call-template name="marcRecord"/>
+ </xsl:for-each>
+ </mods>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="marcRecord">
+ <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="typeOf008">
+ <xsl:choose>
+ <xsl:when test="$leader6='a'">
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">SE</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$leader6='t'">BK</xsl:when>
+ <xsl:when test="$leader6='p'">MM</xsl:when>
+ <xsl:when test="$leader6='m'">CF</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
+ <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">MU</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="marc:datafield[@tag='245']">
+ <titleInfo>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='b']">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="beforeCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abfgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="$title"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop"/>
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="anyCodes">b</xsl:with-param>
+ <xsl:with-param name="afterCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <!-- A form of title that ignores non-filing characters; useful
+ for not converting "L'Oreal" into "L' Oreal" at index time -->
+ <titleNonfiling>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='b']">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="beforeCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abfgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <title>
+ <xsl:value-of select="$title"/>
+ </title>
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="anyCodes">b</xsl:with-param>
+ <xsl:with-param name="afterCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleNonfiling>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='210']">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='242']">
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <!-- 1/04 removed $h, b -->
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo type="translated">
+ <!--09/01/04 Added subfield $y-->
+ <xsl:for-each select="marc:subfield[@code='y']">
+ <xsl:attribute name="lang">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <!-- 1/04 fix -->
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <titleInfo type="translated-nfi">
+ <xsl:for-each select="marc:subfield[@code='y']">
+ <xsl:attribute name="lang">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='246']">
+ <titleInfo type="alternative">
+ <xsl:for-each select="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <!-- 1/04 removed $h, $b -->
+ <xsl:with-param name="codes">af</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='130']|marc:datafield[@tag='240']|marc:datafield[@tag='730'][@ind2!='2']">
+ <xsl:variable name="nfi">
+ <xsl:choose>
+ <xsl:when test="@tag='240'">
+ <xsl:value-of select="@ind2"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@ind1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="uri" />
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="(contains('adfklmor', at 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:variable>
+ <titleInfo type="uniform">
+ <title>
+ <xsl:value-of select="$titleChop"/>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <titleInfo type="uniform-nfi">
+ <xsl:choose>
+ <xsl:when test="$nfi>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1,$nfi)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop,$nfi+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop"/>
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='740'][@ind2!='2']">
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ah</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo type="alternative">
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <titleInfo type="alternative-nfi">
+ <xsl:choose>
+ <xsl:when test="@ind1>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind1)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind1+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='100']">
+ <name type="personal">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameABCDQ"/>
+ <xsl:call-template name="affiliation"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='110']">
+ <name type="corporate">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameABCDN"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='111']">
+ <name type="conference">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameACDEQ"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='700'][not(marc:subfield[@code='t'])]">
+ <name type="personal">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameABCDQ"/>
+ <xsl:call-template name="affiliation"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='710'][not(marc:subfield[@code='t'])]">
+ <name type="corporate">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameABCDN"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='711'][not(marc:subfield[@code='t'])]">
+ <name type="conference">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameACDEQ"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='720'][not(marc:subfield[@code='t'])]">
+ <name>
+ <xsl:if test="@ind1=1">
+ <xsl:attribute name="type">
+ <xsl:text>personal</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <namePart>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <typeOfResource>
+ <xsl:if test="$leader7='c'">
+ <xsl:attribute name="collection">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
+ <xsl:attribute name="manuscript">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
+ <xsl:when test="$leader6='i'">sound recording-nonmusical</xsl:when>
+ <xsl:when test="$leader6='j'">sound recording-musical</xsl:when>
+ <xsl:when test="$leader6='k'">still image</xsl:when>
+ <xsl:when test="$leader6='g'">moving image</xsl:when>
+ <xsl:when test="$leader6='r'">three dimensional object</xsl:when>
+ <xsl:when test="$leader6='m'">software, multimedia</xsl:when>
+ <xsl:when test="$leader6='p'">mixed material</xsl:when>
+ </xsl:choose>
+ </typeOfResource>
+ <xsl:if test="substring($controlField008,26,1)='d'">
+ <genre authority="marc">globe</genre>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag='007'][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
+ <genre authority="marc">remote sensing image</genre>
+ </xsl:if>
+ <xsl:if test="$typeOf008='MP'">
+ <xsl:variable name="controlField008-25" select="substring($controlField008,26,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-25='a' or $controlField008-25='b' or $controlField008-25='c' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
+ <genre authority="marc">map</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-25='e' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
+ <genre authority="marc">atlas</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='SE'">
+ <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-21='d'">
+ <genre authority="marc">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='l'">
+ <genre authority="marc">loose-leaf</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='m'">
+ <genre authority="marc">series</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='n'">
+ <genre authority="marc">newspaper</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='p'">
+ <genre authority="marc">periodical</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='w'">
+ <genre authority="marc">web site</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='BK' or $typeOf008='SE'">
+ <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="contains($controlField008-24,'a')">
+ <genre authority="marc">abstract or summary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'b')">
+ <genre authority="marc">bibliography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'c')">
+ <genre authority="marc">catalog</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'d')">
+ <genre authority="marc">dictionary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'e')">
+ <genre authority="marc">encyclopedia</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'f')">
+ <genre authority="marc">handbook</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'g')">
+ <genre authority="marc">legal article</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'i')">
+ <genre authority="marc">index</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'k')">
+ <genre authority="marc">discography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'l')">
+ <genre authority="marc">legislation</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'m')">
+ <genre authority="marc">theses</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'n')">
+ <genre authority="marc">survey of literature</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'o')">
+ <genre authority="marc">review</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'p')">
+ <genre authority="marc">programmed text</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'q')">
+ <genre authority="marc">filmography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'r')">
+ <genre authority="marc">directory</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'s')">
+ <genre authority="marc">statistics</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'t')">
+ <genre authority="marc">technical report</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'v')">
+ <genre authority="marc">legal case and case notes</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'w')">
+ <genre authority="marc">law report or digest</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'z')">
+ <genre authority="marc">treaty</genre>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-29='1'">
+ <genre authority="marc">conference publication</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='CF'">
+ <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-26='a'">
+ <genre authority="marc">numeric data</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='e'">
+ <genre authority="marc">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='f'">
+ <genre authority="marc">font</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='g'">
+ <genre authority="marc">game</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='BK'">
+ <xsl:if test="substring($controlField008,25,1)='j'">
+ <genre authority="marc">patent</genre>
+ </xsl:if>
+ <xsl:if test="substring($controlField008,31,1)='1'">
+ <genre authority="marc">festschrift</genre>
+ </xsl:if>
+ <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"></xsl:variable>
+ <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
+ <genre authority="marc">biography</genre>
+ </xsl:if>
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='e'">
+ <genre authority="marc">essay</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marc">drama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marc">comic strip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marc">fiction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='h'">
+ <genre authority="marc">humor, satire</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marc">letter</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marc">novel</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='j'">
+ <genre authority="marc">short story</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marc">speech</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='MU'">
+ <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"></xsl:variable>
+ <xsl:if test="contains($controlField008-30-31,'b')">
+ <genre authority="marc">biography</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'c')">
+ <genre authority="marc">conference publication</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'d')">
+ <genre authority="marc">drama</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'e')">
+ <genre authority="marc">essay</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'f')">
+ <genre authority="marc">fiction</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'o')">
+ <genre authority="marc">folktale</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'h')">
+ <genre authority="marc">history</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'k')">
+ <genre authority="marc">humor, satire</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'m')">
+ <genre authority="marc">memoir</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'p')">
+ <genre authority="marc">poetry</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'r')">
+ <genre authority="marc">rehearsal</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'g')">
+ <genre authority="marc">reporting</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'s')">
+ <genre authority="marc">sound</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'l')">
+ <genre authority="marc">speech</genre>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$typeOf008='VM'">
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='a'">
+ <genre authority="marc">art original</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='b'">
+ <genre authority="marc">kit</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marc">art reproduction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marc">diorama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marc">filmstrip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='g'">
+ <genre authority="marc">legal article</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marc">picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='k'">
+ <genre authority="marc">graphic</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marc">technical drawing</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='m'">
+ <genre authority="marc">motion picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='n'">
+ <genre authority="marc">chart</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='o'">
+ <genre authority="marc">flash card</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='p'">
+ <genre authority="marc">microscope slide</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
+ <genre authority="marc">model</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='r'">
+ <genre authority="marc">realia</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marc">slide</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='t'">
+ <genre authority="marc">transparency</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='v'">
+ <genre authority="marc">videorecording</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='w'">
+ <genre authority="marc">toy</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=655]">
+ <genre authority="marc">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abvxyz</xsl:with-param>
+ <xsl:with-param name="delimeter">-</xsl:with-param>
+ </xsl:call-template>
+ </genre>
+ </xsl:for-each>
+ <originInfo>
+ <xsl:variable name="MARCpublicationCode" select="normalize-space(substring($controlField008,16,3))"></xsl:variable>
+ <xsl:if test="translate($MARCpublicationCode,'|','')">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marccountry</xsl:attribute>
+ <xsl:value-of select="$MARCpublicationCode"/>
+ </placeTerm>
+ </place>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=044]/marc:subfield[@code='c']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">iso3166</xsl:attribute>
+ <xsl:value-of select="."/>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='a']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:call-template name="chopPunctuationFront">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='m']">
+ <dateValid point="start">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='n']">
+ <dateValid point="end">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='j']">
+ <dateModified>
+ <xsl:value-of select="."/>
+ </dateModified>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='b' or @code='c' or @code='g']">
+ <xsl:choose>
+ <xsl:when test="@code='b'">
+ <publisher>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </publisher>
+ </xsl:when>
+ <xsl:when test="@code='c'">
+ <dateIssued>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </dateIssued>
+ </xsl:when>
+ <xsl:when test="@code='g'">
+ <dateCreated>
+ <xsl:value-of select="."/>
+ </dateCreated>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:variable name="dataField260c">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="marc:datafield[@tag=260]/marc:subfield[@code='c']"></xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="controlField008-7-10" select="normalize-space(substring($controlField008, 8, 4))"></xsl:variable>
+ <xsl:variable name="controlField008-11-14" select="normalize-space(substring($controlField008, 12, 4))"></xsl:variable>
+ <xsl:variable name="controlField008-6" select="normalize-space(substring($controlField008, 7, 1))"></xsl:variable>
+ <xsl:if test="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">
+ <xsl:if test="$controlField008-7-10 and ($controlField008-7-10 != $dataField260c)">
+ <dateIssued encoding="marc">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start" qualifier="questionable">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end" qualifier="questionable">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='t'">
+ <xsl:if test="$controlField008-11-14">
+ <copyrightDate encoding="marc">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </copyrightDate>
+ </xsl:if>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=0 or @ind1=1]/marc:subfield[@code='a']">
+ <dateCaptured encoding="iso8601">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][1]">
+ <dateCaptured encoding="iso8601" point="start">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][2]">
+ <dateCaptured encoding="iso8601" point="end">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=250]/marc:subfield[@code='a']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+ <xsl:for-each select="marc:leader">
+ <issuance>
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">monographic</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">continuing</xsl:when>
+ </xsl:choose>
+ </issuance>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=310]|marc:datafield[@tag=321]">
+ <frequency>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </frequency>
+ </xsl:for-each>
+ </originInfo>
+ <xsl:variable name="controlField008-35-37" select="normalize-space(translate(substring($controlField008,36,3),'|#',''))"></xsl:variable>
+ <xsl:if test="$controlField008-35-37">
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($controlField008,36,3)"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=041]">
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='d' or @code='e' or @code='f' or @code='g' or @code='h']">
+ <xsl:variable name="langCodes" select="."/>
+ <xsl:choose>
+ <xsl:when test="../marc:subfield[@code='2']='rfc3066'">
+ <!-- not stacked but could be repeated -->
+ <xsl:call-template name="rfcLanguages">
+ <xsl:with-param name="nodeNum">
+ <xsl:value-of select="1"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:text></xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- iso -->
+ <xsl:variable name="allLanguages">
+ <xsl:copy-of select="$langCodes"></xsl:copy-of>
+ </xsl:variable>
+ <xsl:variable name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"></xsl:value-of>
+ </xsl:variable>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($allLanguages,4,string-length($allLanguages)-3)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:if test="$controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"></xsl:value-of>
+ </xsl:if>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:variable name="physicalDescription">
+ <!--3.2 change tmee 007/11 -->
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a']">
+ <digitalOrigin>reformatted digital</digitalOrigin>
+ </xsl:if>
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='b']">
+ <digitalOrigin>digitized microfilm</digitalOrigin>
+ </xsl:if>
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='d']">
+ <digitalOrigin>digitized other analog</digitalOrigin>
+ </xsl:if>
+ <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"></xsl:variable>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"></xsl:variable>
+ <xsl:variable name="check008-23">
+ <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">
+ <xsl:value-of select="true()"></xsl:value-of>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="check008-29">
+ <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
+ <xsl:value-of select="true()"></xsl:value-of>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
+ <form authority="marcform">braille</form>
+ </xsl:when>
+ <xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='SE') and ($controlField008-23=' ' or $controlField008='r'))">
+ <form authority="marcform">print</form>
+ </xsl:when>
+ <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
+ <form authority="marcform">electronic</form>
+ </xsl:when>
+ <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
+ <form authority="marcform">microfiche</form>
+ </xsl:when>
+ <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
+ <form authority="marcform">microfilm</form>
+ </xsl:when>
+ </xsl:choose>
+ <!-- 1/04 fix -->
+ <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
+ <form>
+ <xsl:value-of select="."></xsl:value-of>
+ </form>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
+ <xsl:choose>
+ <xsl:when test="substring(text(),14,1)='a'">
+ <reformattingQuality>access</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='p'">
+ <reformattingQuality>preservation</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='r'">
+ <reformattingQuality>replacement</reformattingQuality>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ <!--3.2 change tmee 007/01 -->
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='b']">
+ <form authority="smd">chip cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='c']">
+ <form authority="smd">computer optical disc cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
+ <form authority="smd">magnetic disc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='m']">
+ <form authority="smd">magneto-optical disc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='o']">
+ <form authority="smd">optical disc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
+ <form authority="smd">remote</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
+ <form authority="smd">tape cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='f']">
+ <form authority="smd">tape cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='h']">
+ <form authority="smd">tape reel</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='a']">
+ <form authority="smd">celestial globe</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='e']">
+ <form authority="smd">earth moon globe</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='b']">
+ <form authority="smd">planetary or lunar globe</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='c']">
+ <form authority="smd">terrestrial globe</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
+ <form authority="smd">kit</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
+ <form authority="smd">atlas</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='g']">
+ <form authority="smd">diagram</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
+ <form authority="smd">map</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
+ <form authority="smd">model</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='k']">
+ <form authority="smd">profile</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
+ <form authority="smd">remote-sensing image</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='s']">
+ <form authority="smd">section</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='y']">
+ <form authority="smd">view</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='a']">
+ <form authority="smd">aperture card</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='e']">
+ <form authority="smd">microfiche</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='f']">
+ <form authority="smd">microfiche cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='b']">
+ <form authority="smd">microfilm cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='c']">
+ <form authority="smd">microfilm cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='d']">
+ <form authority="smd">microfilm reel</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='g']">
+ <form authority="smd">microopaque</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='c']">
+ <form authority="smd">film cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='f']">
+ <form authority="smd">film cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='r']">
+ <form authority="smd">film reel</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='n']">
+ <form authority="smd">chart</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
+ <form authority="smd">collage</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='d']">
+ <form authority="smd">drawing</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='o']">
+ <form authority="smd">flash card</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='e']">
+ <form authority="smd">painting</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
+ <form authority="smd">photomechanical print</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='g']">
+ <form authority="smd">photonegative</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='h']">
+ <form authority="smd">photoprint</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='i']">
+ <form authority="smd">picture</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
+ <form authority="smd">print</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='l']">
+ <form authority="smd">technical drawing</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='q'][substring(text(),2,1)='q']">
+ <form authority="smd">notated music</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
+ <form authority="smd">filmslip</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='c']">
+ <form authority="smd">filmstrip cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='o']">
+ <form authority="smd">filmstrip roll</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='f']">
+ <form authority="smd">other filmstrip type</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='s']">
+ <form authority="smd">slide</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
+ <form authority="smd">transparency</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='r'][substring(text(),2,1)='r']">
+ <form authority="smd">remote-sensing image</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='e']">
+ <form authority="smd">cylinder</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='q']">
+ <form authority="smd">roll</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='g']">
+ <form authority="smd">sound cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='s']">
+ <form authority="smd">sound cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='d']">
+ <form authority="smd">sound disc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
+ <form authority="smd">sound-tape reel</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='i']">
+ <form authority="smd">sound-track film</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='w']">
+ <form authority="smd">wire recording</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='c']">
+ <form authority="smd">braille</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='b']">
+ <form authority="smd">combination</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='a']">
+ <form authority="smd">moon</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='d']">
+ <form authority="smd">tactile, with no writing system</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='c']">
+ <form authority="smd">braille</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='b']">
+ <form authority="smd">large print</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
+ <form authority="smd">regular print</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='d']">
+ <form authority="smd">text in looseleaf binder</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='c']">
+ <form authority="smd">videocartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='f']">
+ <form authority="smd">videocassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='d']">
+ <form authority="smd">videodisc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
+ <form authority="smd">videoreel</form>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
+ <internetMediaType>
+ <xsl:value-of select="."></xsl:value-of>
+ </internetMediaType>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=300]">
+ <extent>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abce</xsl:with-param>
+ </xsl:call-template>
+ </extent>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($physicalDescription))">
+ <physicalDescription>
+ <xsl:copy-of select="$physicalDescription"></xsl:copy-of>
+ </physicalDescription>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=520]">
+ <abstract>
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </abstract>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=505]">
+ <tableOfContents>
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">agrt</xsl:with-param>
+ </xsl:call-template>
+ </tableOfContents>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=521]">
+ <targetAudience>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </targetAudience>
+ </xsl:for-each>
+ <xsl:if test="$typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM'">
+ <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"></xsl:variable>
+ <xsl:choose>
+ <!-- 01/04 fix -->
+ <xsl:when test="$controlField008-22='d'">
+ <targetAudience authority="marctarget">adolescent</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='e'">
+ <targetAudience authority="marctarget">adult</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='g'">
+ <targetAudience authority="marctarget">general</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='b' or $controlField008-22='c' or $controlField008-22='j'">
+ <targetAudience authority="marctarget">juvenile</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='a'">
+ <targetAudience authority="marctarget">preschool</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='f'">
+ <targetAudience authority="marctarget">specialized</targetAudience>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=245]/marc:subfield[@code='c']">
+ <note type="statement of responsibility">
+ <xsl:value-of select="."></xsl:value-of>
+ </note>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=500]">
+ <note>
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ <xsl:call-template name="uri"></xsl:call-template>
+ </note>
+ </xsl:for-each>
+
+ <!--3.2 change tmee additional note fields-->
+
+ <xsl:for-each select="marc:datafield[@tag=506]">
+ <note type="restrictions">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=510]">
+ <note type="citation/reference">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+
+ <xsl:for-each select="marc:datafield[@tag=511]">
+ <note type="performers">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=518]">
+ <note type="venue">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=530]">
+ <note type="additional physical form">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=533]">
+ <note type="reproduction">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=534]">
+ <note type="original version">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=538]">
+ <note type="system details">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=583]">
+ <note type="action">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+
+
+
+
+ <xsl:for-each select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=507 or @tag=508 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
+ <note>
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=034][marc:subfield[@code='d' or @code='e' or @code='f' or @code='g']]">
+ <subject>
+ <cartographics>
+ <coordinates>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">defg</xsl:with-param>
+ </xsl:call-template>
+ </coordinates>
+ </cartographics>
+ </subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=043]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
+ <geographicCode>
+ <xsl:attribute name="authority">
+ <xsl:if test="@code='a'">
+ <xsl:text>marcgac</xsl:text>
+ </xsl:if>
+ <xsl:if test="@code='b'">
+ <xsl:value-of select="following-sibling::marc:subfield[@code=2]"></xsl:value-of>
+ </xsl:if>
+ <xsl:if test="@code='c'">
+ <xsl:text>iso3166</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:value-of select="self::marc:subfield"></xsl:value-of>
+ </geographicCode>
+ </xsl:for-each>
+ </subject>
+ </xsl:for-each>
+ <!-- tmee 2006/11/27 -->
+ <xsl:for-each select="marc:datafield[@tag=255]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
+ <cartographics>
+ <xsl:if test="@code='a'">
+ <scale>
+ <xsl:value-of select="."></xsl:value-of>
+ </scale>
+ </xsl:if>
+ <xsl:if test="@code='b'">
+ <projection>
+ <xsl:value-of select="."></xsl:value-of>
+ </projection>
+ </xsl:if>
+ <xsl:if test="@code='c'">
+ <coordinates>
+ <xsl:value-of select="."></xsl:value-of>
+ </coordinates>
+ </xsl:if>
+ </cartographics>
+ </xsl:for-each>
+ </subject>
+ </xsl:for-each>
+
+ <xsl:apply-templates select="marc:datafield[653 >= @tag and @tag >= 600]"></xsl:apply-templates>
+ <xsl:apply-templates select="marc:datafield[@tag=656]"></xsl:apply-templates>
+ <xsl:for-each select="marc:datafield[@tag=752]">
+ <subject>
+ <hierarchicalGeographic>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <country>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </country>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <state>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </state>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <county>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </county>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <city>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </city>
+ </xsl:for-each>
+ </hierarchicalGeographic>
+ </subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=045][marc:subfield[@code='b']]">
+ <subject>
+ <xsl:choose>
+ <xsl:when test="@ind1=2">
+ <temporal encoding="iso8601" point="start">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b'][1]"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ <temporal encoding="iso8601" point="end">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b'][2]"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=050]">
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <classification authority="lcc">
+ <xsl:if test="../marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="../marc:subfield[@code='3']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="preceding-sibling::marc:subfield[@code='a'][1]"></xsl:value-of>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="text()"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='a'][not(following-sibling::marc:subfield[@code='b'])]">
+ <classification authority="lcc">
+ <xsl:if test="../marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="../marc:subfield[@code='3']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="text()"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=082]">
+ <classification authority="ddc">
+ <xsl:if test="marc:subfield[@code='2']">
+ <xsl:attribute name="edition">
+ <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=080]">
+ <classification authority="udc">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abx</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=060]">
+ <classification authority="nlm">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=0]">
+ <classification authority="sudocs">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=1]">
+ <classification authority="candoc">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=086]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
+ </xsl:attribute>
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=084]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=440]">
+ <relatedItem type="series">
+ <xsl:variable name="titleChop">
+ <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>
+ </xsl:variable>
+ <titleInfo>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <titleInfo type="nfi">
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind2+1)"/>
+ </title>
+ <xsl:call-template name="part"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <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>
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=510]">
+ <relatedItem type="isReferencedBy">
+ <note>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcx3</xsl:with-param>
+ </xsl:call-template>
+ </note>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=534]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedTitle"></xsl:call-template>
+ <xsl:call-template name="relatedName"></xsl:call-template>
+ <xsl:if test="marc:subfield[@code='b' or @code='c']">
+ <originInfo>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <publisher>
+ <xsl:value-of select="."></xsl:value-of>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."></xsl:value-of>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ <xsl:for-each select="marc:subfield[@code='z']">
+ <identifier type="isbn">
+ <xsl:value-of select="."></xsl:value-of>
+ </identifier>
+ </xsl:for-each>
+ <xsl:call-template name="relatedNote"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"></xsl:call-template>
+ <xsl:call-template name="nameDate"></xsl:call-template>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=710][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:variable name="tempNamePart">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="normalize-space($tempNamePart)">
+ <namePart>
+ <xsl:value-of select="$tempNamePart"></xsl:value-of>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=711][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=730][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=740][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <titleInfo type="nfi">
+ <xsl:choose>
+ <xsl:when test="@ind1>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind1)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind1+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]">
+ <relatedItem type="series">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=777]|marc:datafield[@tag=787]">
+ <relatedItem>
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=775]">
+ <relatedItem type="otherVersion">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=770]|marc:datafield[@tag=774]">
+ <relatedItem type="constituent">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=772]|marc:datafield[@tag=773]">
+ <relatedItem type="host">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=776]">
+ <relatedItem type="otherFormat">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=780]">
+ <relatedItem type="preceding">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=785]">
+ <relatedItem type="succeeding">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=786]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=800]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"></xsl:call-template>
+ <xsl:call-template name="nameDate"></xsl:call-template>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=810]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=811]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='830']">
+ <relatedItem type="series">
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <titleInfo type="nfi">
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='856'][@ind2='2']/marc:subfield[@code='q']">
+ <relatedItem>
+ <internetMediaType>
+ <xsl:value-of select="."/>
+ </internetMediaType>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='020']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">isbn</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='a']">
+ <identifier type="isbn">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='024'][@ind1='0']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">isrc</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='a']">
+ <identifier type="isrc">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='024'][@ind1='2']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">ismn</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='a']">
+ <identifier type="ismn">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='024'][@ind1='4']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">sici</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="sici">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='022']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">issn</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="issn">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='010']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">lccn</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="lccn">
+ <xsl:value-of select="normalize-space(marc:subfield[@code='a'])"/>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='028']">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="@ind1='0'">issue number</xsl:when>
+ <xsl:when test="@ind1='1'">matrix number</xsl:when>
+ <xsl:when test="@ind1='2'">music plate</xsl:when>
+ <xsl:when test="@ind1='3'">music publisher</xsl:when>
+ <xsl:when test="@ind1='4'">videorecording identifier</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <!--<xsl:call-template name="isInvalid"/>--> <!-- no $z in 028 -->
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">
+ <xsl:choose>
+ <xsl:when test="@ind1='0'">ba</xsl:when>
+ <xsl:otherwise>ab</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='037']">
+ <identifier type="stock number">
+ <!--<xsl:call-template name="isInvalid"/>--> <!-- no $z in 037 -->
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='856'][marc:subfield[@code='u']]">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:doi') or starts-with(marc:subfield[@code='u'],'doi')">doi</xsl:when>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov')">hdl</xsl:when>
+ <xsl:otherwise>uri</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov') ">
+ <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="marc:subfield[@code='u']"></xsl:value-of>
+ </xsl:otherwise>
+ </xsl:choose>
+ </identifier>
+ <xsl:if test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl')">
+ <identifier type="hdl">
+ <xsl:if test="marc:subfield[@code='y' or @code='3' or @code='z']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"></xsl:value-of>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1=1]">
+ <identifier type="upc">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+ <!-- 1/04 fix added $y -->
+ <xsl:for-each select="marc:datafield[@tag=856][marc:subfield[@code='u']]">
+ <location>
+ <url>
+ <xsl:if test="marc:subfield[@code='y' or @code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='z' ]">
+ <xsl:attribute name="note">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="marc:subfield[@code='u']"></xsl:value-of>
+
+ </url>
+ </location>
+ </xsl:for-each>
+
+ <!-- 3.2 change tmee 856z -->
+
+
+ <xsl:for-each select="marc:datafield[@tag=852]">
+ <location>
+ <physicalLocation>
+ <xsl:call-template name="displayLabel"></xsl:call-template>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abje</xsl:with-param>
+ </xsl:call-template>
+ </physicalLocation>
+ </location>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=506]">
+ <accessCondition type="restrictionOnAccess">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=540]">
+ <accessCondition type="useAndReproduction">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcde35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+ <recordInfo>
+ <xsl:for-each select="marc:datafield[@tag=040]">
+ <recordContentSource authority="marcorg">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </recordContentSource>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=008]">
+ <recordCreationDate encoding="marc">
+ <xsl:value-of select="substring(.,1,6)"></xsl:value-of>
+ </recordCreationDate>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=005]">
+ <recordChangeDate encoding="iso8601">
+ <xsl:value-of select="."></xsl:value-of>
+ </recordChangeDate>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=001]">
+ <recordIdentifier>
+ <xsl:if test="../marc:controlfield[@tag=003]">
+ <xsl:attribute name="source">
+ <xsl:value-of select="../marc:controlfield[@tag=003]"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="."></xsl:value-of>
+ </recordIdentifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=040]/marc:subfield[@code='b']">
+ <languageOfCataloging>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="."></xsl:value-of>
+ </languageTerm>
+ </languageOfCataloging>
+ </xsl:for-each>
+ </recordInfo>
+ </xsl:template>
+ <xsl:template name="displayForm">
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <displayForm>
+ <xsl:value-of select="."></xsl:value-of>
+ </displayForm>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="affiliation">
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <affiliation>
+ <xsl:value-of select="."></xsl:value-of>
+ </affiliation>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="uri">
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:attribute>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='0']">
+ <xsl:choose>
+ <xsl:when test="contains(text(), ')')">
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="substring-after(text(), ')')"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="role">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <role>
+ <roleTerm type="text">
+ <xsl:value-of select="."></xsl:value-of>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."></xsl:value-of>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </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">fgkdlmor</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">fgkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partNumber"></xsl:with-param>
+ </xsl:call-template>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partName"></xsl:with-param>
+ </xsl:call-template>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedPart">
+ <xsl:if test="@tag=773">
+ <xsl:for-each select="marc:subfield[@code='g']">
+ <part>
+ <text>
+ <xsl:value-of select="."></xsl:value-of>
+ </text>
+ </part>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='q']">
+ <part>
+ <xsl:call-template name="parsePart"></xsl:call-template>
+ </part>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedPartNumName">
+ <xsl:variable name="partNumber">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">g</xsl:with-param>
+ <xsl:with-param name="anyCodes">g</xsl:with-param>
+ <xsl:with-param name="afterCodes">pst</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">fgkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:value-of select="$partNumber"></xsl:value-of>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:value-of select="$partName"></xsl:value-of>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedName">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <name>
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </name>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedForm">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <form>
+ <xsl:value-of select="."></xsl:value-of>
+ </form>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedExtent">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <extent>
+ <xsl:value-of select="."></xsl:value-of>
+ </extent>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedNote">
+ <xsl:for-each select="marc:subfield[@code='n']">
+ <note>
+ <xsl:value-of select="."></xsl:value-of>
+ </note>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedSubject">
+ <xsl:for-each select="marc:subfield[@code='j']">
+ <subject>
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </subject>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedIdentifierISSN">
+ <xsl:for-each select="marc:subfield[@code='x']">
+ <identifier type="issn">
+ <xsl:value-of select="."></xsl:value-of>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedIdentifierLocal">
+ <xsl:for-each select="marc:subfield[@code='w']">
+ <identifier type="local">
+ <xsl:value-of select="."></xsl:value-of>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedIdentifier">
+ <xsl:for-each select="marc:subfield[@code='o']">
+ <identifier>
+ <xsl:value-of select="."></xsl:value-of>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedItem76X-78X">
+ <xsl:call-template name="displayLabel"></xsl:call-template>
+ <xsl:call-template name="relatedTitle76X-78X"></xsl:call-template>
+ <xsl:call-template name="relatedName"></xsl:call-template>
+ <xsl:call-template name="relatedOriginInfo"></xsl:call-template>
+ <xsl:call-template name="relatedLanguage"></xsl:call-template>
+ <xsl:call-template name="relatedExtent"></xsl:call-template>
+ <xsl:call-template name="relatedNote"></xsl:call-template>
+ <xsl:call-template name="relatedSubject"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifier"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierLocal"></xsl:call-template>
+ <xsl:call-template name="relatedPart"></xsl:call-template>
+ </xsl:template>
+ <xsl:template name="subjectGeographicZ">
+ <geographic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </geographic>
+ </xsl:template>
+ <xsl:template name="subjectTemporalY">
+ <temporal>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </xsl:template>
+ <xsl:template name="subjectTopic">
+ <topic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </topic>
+ </xsl:template>
+ <!-- 3.2 change tmee 6xx $v genre -->
+ <xsl:template name="subjectGenre">
+ <genre>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </genre>
+ </xsl:template>
+
+ <xsl:template name="nameABCDN">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">cdn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="nameABCDQ">
+ <namePart>
+ <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>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"></xsl:call-template>
+ <xsl:call-template name="nameDate"></xsl:call-template>
+ </xsl:template>
+ <xsl:template name="nameACDEQ">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">acdeq</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:template>
+ <xsl:template name="constituentOrRelatedType">
+ <xsl:if test="@ind2=2">
+ <xsl:attribute name="type">constituent</xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedTitle">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedTitle76X-78X">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='p']">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='s']">
+ <titleInfo type="uniform">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedOriginInfo">
+ <xsl:if test="marc:subfield[@code='b' or @code='d'] or marc:subfield[@code='f']">
+ <originInfo>
+ <xsl:if test="@tag=775">
+ <xsl:for-each select="marc:subfield[@code='f']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marcgac</xsl:attribute>
+ <xsl:value-of select="."></xsl:value-of>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <publisher>
+ <xsl:value-of select="."></xsl:value-of>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."></xsl:value-of>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedLanguage">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="nameDate">
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <namePart type="date">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="subjectAuthority">
+ <xsl:if test="@ind2!=4">
+ <xsl:if test="@ind2!=' '">
+ <xsl:if test="@ind2!=8">
+ <xsl:if test="@ind2!=9">
+ <xsl:attribute name="authority">
+ <xsl:choose>
+ <xsl:when test="@ind2=0">lcsh</xsl:when>
+ <xsl:when test="@ind2=1">lcshac</xsl:when>
+ <xsl:when test="@ind2=2">mesh</xsl:when>
+ <!-- 1/04 fix -->
+ <xsl:when test="@ind2=3">nal</xsl:when>
+ <xsl:when test="@ind2=5">csh</xsl:when>
+ <xsl:when test="@ind2=6">rvm</xsl:when>
+ <xsl:when test="@ind2=7">
+ <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="subjectAnyOrder">
+ <xsl:for-each select="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">
+ <xsl:choose>
+ <xsl:when test="@code='v'">
+ <xsl:call-template name="subjectGenre"></xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@code='x'">
+ <xsl:call-template name="subjectTopic"></xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@code='y'">
+ <xsl:call-template name="subjectTemporalY"></xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@code='z'">
+ <xsl:call-template name="subjectGeographicZ"></xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="specialSubfieldSelect">
+ <xsl:param name="anyCodes"></xsl:param>
+ <xsl:param name="axis"></xsl:param>
+ <xsl:param name="beforeCodes"></xsl:param>
+ <xsl:param name="afterCodes"></xsl:param>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes, at code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes, at code) and preceding-sibling::marc:subfield[@code=$axis])">
+ <xsl:value-of select="text()"></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </xsl:template>
+
+ <!-- 3.2 change tmee 6xx $v genre -->
+ <xsl:template match="marc:datafield[@tag=600]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <name type="personal">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="termsOfAddress"></xsl:call-template>
+ <namePart>
+ <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:call-template>
+ </namePart>
+ <xsl:call-template name="nameDate"></xsl:call-template>
+ <xsl:call-template name="affiliation"></xsl:call-template>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=610]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <name type="corporate">
+ <xsl:call-template name="uri" />
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if test="marc:subfield[@code='c' or @code='d' or @code='n' or @code='p']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">cdnp</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=611]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <name type="conference">
+ <xsl:call-template name="uri" />
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdeqnp</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."></xsl:value-of>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=630]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfhklor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <titleInfo type="nfi">
+ <xsl:choose>
+ <xsl:when test="@ind1>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind1)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind1+1)"/>
+ </title>
+ <xsl:call-template name="part"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=650]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <topic>
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </topic>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=651]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <geographic>
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </geographic>
+ </xsl:for-each>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=653]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <topic>
+ <xsl:call-template name="uri" />
+ <xsl:value-of select="."></xsl:value-of>
+ </topic>
+ </xsl:for-each>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=656]">
+ <subject>
+ <xsl:if test="marc:subfield[@code=2]">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code=2]"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <occupation>
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </occupation>
+ </subject>
+ </xsl:template>
+ <xsl:template name="termsOfAddress">
+ <xsl:if test="marc:subfield[@code='b' or @code='c']">
+ <namePart type="termsOfAddress">
+ <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>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="displayLabel">
+ <xsl:if test="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='i']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='3']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="isInvalid">
+ <xsl:param name="type"/>
+ <xsl:if test="marc:subfield[@code='z'] or marc:subfield[@code='y']">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:value-of select="$type"/>
+ </xsl:attribute>
+ <xsl:attribute name="invalid">
+ <xsl:text>yes</xsl:text>
+ </xsl:attribute>
+ <xsl:if test="marc:subfield[@code='z']">
+ <xsl:value-of select="marc:subfield[@code='z']"/>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='y']">
+ <xsl:value-of select="marc:subfield[@code='y']"/>
+ </xsl:if>
+ </identifier>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="subtitle">
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b']"/>
+ <!--<xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">b</xsl:with-param>
+ </xsl:call-template>-->
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="script">
+ <xsl:param name="scriptCode"></xsl:param>
+ <xsl:attribute name="script">
+ <xsl:choose>
+ <xsl:when test="$scriptCode='(3'">Arabic</xsl:when>
+ <xsl:when test="$scriptCode='(B'">Latin</xsl:when>
+ <xsl:when test="$scriptCode='$1'">Chinese, Japanese, Korean</xsl:when>
+ <xsl:when test="$scriptCode='(N'">Cyrillic</xsl:when>
+ <xsl:when test="$scriptCode='(2'">Hebrew</xsl:when>
+ <xsl:when test="$scriptCode='(S'">Greek</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template name="parsePart">
+ <!-- assumes 773$q= 1:2:3<4
+ with up to 3 levels and one optional start page
+ -->
+ <xsl:variable name="level1">
+ <xsl:choose>
+ <xsl:when test="contains(text(),':')">
+ <!-- 1:2 -->
+ <xsl:value-of select="substring-before(text(),':')"></xsl:value-of>
+ </xsl:when>
+ <xsl:when test="not(contains(text(),':'))">
+ <!-- 1 or 1<3 -->
+ <xsl:if test="contains(text(),'<')">
+ <!-- 1<3 -->
+ <xsl:value-of select="substring-before(text(),'<')"></xsl:value-of>
+ </xsl:if>
+ <xsl:if test="not(contains(text(),'<'))">
+ <!-- 1 -->
+ <xsl:value-of select="text()"></xsl:value-of>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici2">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after(text(),$level1),':')">
+ <xsl:value-of select="substring(substring-after(text(),$level1),2)"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after(text(),$level1)"></xsl:value-of>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level2">
+ <xsl:choose>
+ <xsl:when test="contains($sici2,':')">
+ <!-- 2:3<4 -->
+ <xsl:value-of select="substring-before($sici2,':')"></xsl:value-of>
+ </xsl:when>
+ <xsl:when test="contains($sici2,'<')">
+ <!-- 1: 2<4 -->
+ <xsl:value-of select="substring-before($sici2,'<')"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici2"></xsl:value-of>
+ <!-- 1:2 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici3">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after($sici2,$level2),':')">
+ <xsl:value-of select="substring(substring-after($sici2,$level2),2)"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after($sici2,$level2)"></xsl:value-of>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level3">
+ <xsl:choose>
+ <xsl:when test="contains($sici3,'<')">
+ <!-- 2<4 -->
+ <xsl:value-of select="substring-before($sici3,'<')"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici3"></xsl:value-of>
+ <!-- 3 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="page">
+ <xsl:if test="contains(text(),'<')">
+ <xsl:value-of select="substring-after(text(),'<')"></xsl:value-of>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:if test="$level1">
+ <detail level="1">
+ <number>
+ <xsl:value-of select="$level1"></xsl:value-of>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level2">
+ <detail level="2">
+ <number>
+ <xsl:value-of select="$level2"></xsl:value-of>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level3">
+ <detail level="3">
+ <number>
+ <xsl:value-of select="$level3"></xsl:value-of>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$page">
+ <extent unit="page">
+ <start>
+ <xsl:value-of select="$page"></xsl:value-of>
+ </start>
+ </extent>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="getLanguage">
+ <xsl:param name="langString"></xsl:param>
+ <xsl:param name="controlField008-35-37"></xsl:param>
+ <xsl:variable name="length" select="string-length($langString)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$length=0"></xsl:when>
+ <xsl:when test="$controlField008-35-37=substring($langString,1,3)">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"></xsl:with-param>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"></xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($langString,1,3)"></xsl:value-of>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"></xsl:with-param>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"></xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="isoLanguage">
+ <xsl:param name="currentLanguage"></xsl:param>
+ <xsl:param name="usedLanguages"></xsl:param>
+ <xsl:param name="remainingLanguages"></xsl:param>
+ <xsl:choose>
+ <xsl:when test="string-length($currentLanguage)=0"></xsl:when>
+ <xsl:when test="not(contains($usedLanguages, $currentLanguage))">
+ <language>
+ <xsl:if test="@code!='a'">
+ <xsl:attribute name="objectPart">
+ <xsl:choose>
+ <xsl:when test="@code='b'">summary or subtitle</xsl:when>
+ <xsl:when test="@code='d'">sung or spoken text</xsl:when>
+ <xsl:when test="@code='e'">libretto</xsl:when>
+ <xsl:when test="@code='f'">table of contents</xsl:when>
+ <xsl:when test="@code='g'">accompanying material</xsl:when>
+ <xsl:when test="@code='h'">translation</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="$currentLanguage"></xsl:value-of>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="chopBrackets">
+ <xsl:param name="chopString"></xsl:param>
+ <xsl:variable name="string">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$chopString"></xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="substring($string, 1,1)='['">
+ <xsl:value-of select="substring($string,2, string-length($string)-2)"></xsl:value-of>
+ </xsl:if>
+ <xsl:if test="substring($string, 1,1)!='['">
+ <xsl:value-of select="$string"></xsl:value-of>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="rfcLanguages">
+ <xsl:param name="nodeNum"></xsl:param>
+ <xsl:param name="usedLanguages"></xsl:param>
+ <xsl:param name="controlField008-35-37"></xsl:param>
+ <xsl:variable name="currentLanguage" select="."></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="not($currentLanguage)"></xsl:when>
+ <xsl:when test="$currentLanguage!=$controlField008-35-37 and $currentLanguage!='rfc3066'">
+ <xsl:if test="not(contains($usedLanguages,$currentLanguage))">
+ <language>
+ <xsl:if test="@code!='a'">
+ <xsl:attribute name="objectPart">
+ <xsl:choose>
+ <xsl:when test="@code='b'">summary or subtitle</xsl:when>
+ <xsl:when test="@code='d'">sung or spoken text</xsl:when>
+ <xsl:when test="@code='e'">libretto</xsl:when>
+ <xsl:when test="@code='f'">table of contents</xsl:when>
+ <xsl:when test="@code='g'">accompanying material</xsl:when>
+ <xsl:when test="@code='h'">translation</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ <languageTerm authority="rfc3066" type="code">
+ <xsl:value-of select="$currentLanguage"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <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"/>
+ <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:stylesheet>$$ WHERE name = 'mods32';
+
+
+-- 954.data.MODS33-xsl.sql
+UPDATE config.xml_transform SET xslt=$$<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:output encoding="UTF-8" indent="yes" method="xml"/>
+
+ <xsl:variable name="ascii">
+ <xsl:text> !"#$%&'()*+,-./0123456789:;<=>?@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>
+
+ <!-- Evergreen specific: revert Revision 1.23, so we can have those authority xlink attributes back. -->
+
+ <!--MARC21slim2MODS3-3.xsl
+Revision 1.27 - Mapped 648 to <subject> 2009/03/13 tmee
+Revision 1.26 - Added subfield $s mapping for 130/240/730 2008/10/16 tmee
+Revision 1.25 - Mapped 040e to <descriptiveStandard> and Leader/18 to <descriptive standard>aacr2 2008/09/18 tmee
+Revision 1.24 - Mapped 852 subfields $h, $i, $j, $k, $l, $m, $t to <shelfLocation> and 852 subfield $u to <physicalLocation> with @xlink 2008/09/17 tmee
+Revision 1.23 - Commented out xlink/uri for subfield 0 for 130/240/730, 100/700, 110/710, 111/711 as these are currently unactionable 2008/09/17 tmee
+Revision 1.22 - Mapped 022 subfield $l to type "issn-l" subfield $m to output identifier element with corresponding @type and @invalid eq 'yes'2008/09/17 tmee
+Revision 1.21 - Mapped 856 ind2=1 or ind2=2 to <relatedItem><location><url> 2008/07/03 tmee
+Revision 1.20 - Added genre w/@auth="contents of 2" and type= "musical composition" 2008/07/01 tmee
+Revision 1.19 - Added genre offprint for 008/24+ BK code 2 2008/07/01 tmee
+Revision 1.18 - Added xlink/uri for subfield 0 for 130/240/730, 100/700, 110/710, 111/711 2008/06/26 tmee
+Revision 1.17 - Added mapping of 662 2008/05/14 tmee
+Revision 1.16 - Changed @authority from "marc" to "marcgt" for 007 and 008 codes mapped to a term in <genre> 2007/07/10 tmee
+Revision 1.15 - For field 630, moved call to part template outside title element 2007/07/10 tmee
+Revision 1.14 - Fixed template isValid and fields 010, 020, 022, 024, 028, and 037 to output additional identifier elements with corresponding @type and @invalid eq 'yes' when subfields z or y (in the case of 022) exist in the MARCXML ::: 2007/01/04 17:35:20 cred
+Revision 1.13 - Changed order of output under cartographics to reflect schema 2006/11/28 tmee
+Revision 1.12 - Updated to reflect MODS 3.2 Mapping 2006/10/11 tmee
+Revision 1.11 - The attribute objectPart moved from <languageTerm> to <language> 2006/04/08 jrad
+Revision 1.10 - MODS 3.1 revisions to language and classification elements (plus ability to find marc:collection embedded in wrapper elements such as SRU zs: wrappers) 2006/02/06 ggar
+Revision 1.9 - Subfield $y was added to field 242 2004/09/02 10:57 jrad
+Revision 1.8 - Subject chopPunctuation expanded and attribute fixes 2004/08/12 jrad
+Revision 1.7 - 2004/03/25 08:29 jrad
+Revision 1.6 - Various validation fixes 2004/02/20 ntra
+Revision 1.5 - MODS2 to MODS3 updates, language unstacking and de-duping, chopPunctuation expanded 2003/10/02 16:18:58 ntra
+Revision 1.3 - Additional Changes not related to MODS Version 2.0 by ntra
+Revision 1.2 - Added Log Comment 2003/03/24 19:37:42 ckeith
+-->
+ <xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="//marc:collection">
+ <modsCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
+ <xsl:for-each select="//marc:collection/marc:record">
+ <mods version="3.3">
+ <xsl:call-template name="marcRecord"/>
+ </mods>
+ </xsl:for-each>
+ </modsCollection>
+ </xsl:when>
+ <xsl:otherwise>
+ <mods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.3"
+ xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
+ <xsl:for-each select="//marc:record">
+ <xsl:call-template name="marcRecord"/>
+ </xsl:for-each>
+ </mods>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="marcRecord">
+ <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="typeOf008">
+ <xsl:choose>
+ <xsl:when test="$leader6='a'">
+ <xsl:choose>
+ <xsl:when
+ test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">SE</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$leader6='t'">BK</xsl:when>
+ <xsl:when test="$leader6='p'">MM</xsl:when>
+ <xsl:when test="$leader6='m'">CF</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
+ <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'"
+ >MU</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="marc:datafield[@tag='245']">
+ <titleInfo>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='b']">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="beforeCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abfgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="$title"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop"/>
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="anyCodes">b</xsl:with-param>
+ <xsl:with-param name="afterCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='210']">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='242']">
+ <titleInfo type="translated">
+ <!--09/01/04 Added subfield $y-->
+ <xsl:for-each select="marc:subfield[@code='y']">
+ <xsl:attribute name="lang">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <!-- 1/04 removed $h, b -->
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <!-- 1/04 fix -->
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='246']">
+ <titleInfo type="alternative">
+ <xsl:for-each select="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <!-- 1/04 removed $h, $b -->
+ <xsl:with-param name="codes">af</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each
+ select="marc:datafield[@tag='130']|marc:datafield[@tag='240']|marc:datafield[@tag='730'][@ind2!='2']">
+ <titleInfo type="uniform">
+ <title>
+ <xsl:call-template name="uri"/>
+
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if
+ test="(contains('adfklmors', at 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>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='740'][@ind2!='2']">
+ <titleInfo type="alternative">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ah</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='100']">
+ <name type="personal">
+
+ <xsl:call-template name="uri"/>
+
+ <xsl:call-template name="nameABCDQ"/>
+ <xsl:call-template name="affiliation"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='110']">
+ <name type="corporate">
+
+ <xsl:call-template name="uri"/>
+
+ <xsl:call-template name="nameABCDN"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='111']">
+ <name type="conference">
+
+ <xsl:call-template name="uri"/>
+
+ <xsl:call-template name="nameACDEQ"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='700'][not(marc:subfield[@code='t'])]">
+ <name type="personal">
+
+ <xsl:call-template name="uri"/>
+
+ <xsl:call-template name="nameABCDQ"/>
+ <xsl:call-template name="affiliation"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='710'][not(marc:subfield[@code='t'])]">
+ <name type="corporate">
+
+ <xsl:call-template name="uri"/>
+
+ <xsl:call-template name="nameABCDN"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='711'][not(marc:subfield[@code='t'])]">
+ <name type="conference">
+
+ <xsl:call-template name="uri"/>
+
+ <xsl:call-template name="nameACDEQ"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='720'][not(marc:subfield[@code='t'])]">
+ <name>
+ <xsl:if test="@ind1=1">
+ <xsl:attribute name="type">
+ <xsl:text>personal</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <namePart>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <typeOfResource>
+ <xsl:if test="$leader7='c'">
+ <xsl:attribute name="collection">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
+ <xsl:attribute name="manuscript">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
+ <xsl:when test="$leader6='i'">sound recording-nonmusical</xsl:when>
+ <xsl:when test="$leader6='j'">sound recording-musical</xsl:when>
+ <xsl:when test="$leader6='k'">still image</xsl:when>
+ <xsl:when test="$leader6='g'">moving image</xsl:when>
+ <xsl:when test="$leader6='r'">three dimensional object</xsl:when>
+ <xsl:when test="$leader6='m'">software, multimedia</xsl:when>
+ <xsl:when test="$leader6='p'">mixed material</xsl:when>
+ </xsl:choose>
+ </typeOfResource>
+ <xsl:if test="substring($controlField008,26,1)='d'">
+ <genre authority="marcgt">globe</genre>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag='007'][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
+ <genre authority="marcgt">remote-sensing image</genre>
+ </xsl:if>
+ <xsl:if test="$typeOf008='MP'">
+ <xsl:variable name="controlField008-25" select="substring($controlField008,26,1)"/>
+ <xsl:choose>
+ <xsl:when
+ test="$controlField008-25='a' or $controlField008-25='b' or $controlField008-25='c' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
+ <genre authority="marcgt">map</genre>
+ </xsl:when>
+ <xsl:when
+ test="$controlField008-25='e' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
+ <genre authority="marcgt">atlas</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='SE'">
+ <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-21='d'">
+ <genre authority="marcgt">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='l'">
+ <genre authority="marcgt">loose-leaf</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='m'">
+ <genre authority="marcgt">series</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='n'">
+ <genre authority="marcgt">newspaper</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='p'">
+ <genre authority="marcgt">periodical</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='w'">
+ <genre authority="marcgt">web site</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='BK' or $typeOf008='SE'">
+ <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>
+ <xsl:choose>
+ <xsl:when test="contains($controlField008-24,'a')">
+ <genre authority="marcgt">abstract or summary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'b')">
+ <genre authority="marcgt">bibliography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'c')">
+ <genre authority="marcgt">catalog</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'d')">
+ <genre authority="marcgt">dictionary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'e')">
+ <genre authority="marcgt">encyclopedia</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'f')">
+ <genre authority="marcgt">handbook</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'g')">
+ <genre authority="marcgt">legal article</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'i')">
+ <genre authority="marcgt">index</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'k')">
+ <genre authority="marcgt">discography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'l')">
+ <genre authority="marcgt">legislation</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'m')">
+ <genre authority="marcgt">theses</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'n')">
+ <genre authority="marcgt">survey of literature</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'o')">
+ <genre authority="marcgt">review</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'p')">
+ <genre authority="marcgt">programmed text</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'q')">
+ <genre authority="marcgt">filmography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'r')">
+ <genre authority="marcgt">directory</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'s')">
+ <genre authority="marcgt">statistics</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'t')">
+ <genre authority="marcgt">technical report</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'v')">
+ <genre authority="marcgt">legal case and case notes</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'w')">
+ <genre authority="marcgt">law report or digest</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'z')">
+ <genre authority="marcgt">treaty</genre>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-29='1'">
+ <genre authority="marcgt">conference publication</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='CF'">
+ <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-26='a'">
+ <genre authority="marcgt">numeric data</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='e'">
+ <genre authority="marcgt">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='f'">
+ <genre authority="marcgt">font</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='g'">
+ <genre authority="marcgt">game</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='BK'">
+ <xsl:if test="substring($controlField008,25,1)='j'">
+ <genre authority="marcgt">patent</genre>
+ </xsl:if>
+ <xsl:if test="substring($controlField008,25,1)='2'">
+ <genre authority="marcgt">offprint</genre>
+ </xsl:if>
+ <xsl:if test="substring($controlField008,31,1)='1'">
+ <genre authority="marcgt">festschrift</genre>
+ </xsl:if>
+ <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>
+ <xsl:if
+ test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
+ <genre authority="marcgt">biography</genre>
+ </xsl:if>
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='e'">
+ <genre authority="marcgt">essay</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marcgt">drama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marcgt">comic strip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marcgt">fiction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='h'">
+ <genre authority="marcgt">humor, satire</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marcgt">letter</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marcgt">novel</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='j'">
+ <genre authority="marcgt">short story</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marcgt">speech</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='MU'">
+ <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>
+ <xsl:if test="contains($controlField008-30-31,'b')">
+ <genre authority="marcgt">biography</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'c')">
+ <genre authority="marcgt">conference publication</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'d')">
+ <genre authority="marcgt">drama</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'e')">
+ <genre authority="marcgt">essay</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'f')">
+ <genre authority="marcgt">fiction</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'o')">
+ <genre authority="marcgt">folktale</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'h')">
+ <genre authority="marcgt">history</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'k')">
+ <genre authority="marcgt">humor, satire</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'m')">
+ <genre authority="marcgt">memoir</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'p')">
+ <genre authority="marcgt">poetry</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'r')">
+ <genre authority="marcgt">rehearsal</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'g')">
+ <genre authority="marcgt">reporting</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'s')">
+ <genre authority="marcgt">sound</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'l')">
+ <genre authority="marcgt">speech</genre>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$typeOf008='VM'">
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='a'">
+ <genre authority="marcgt">art original</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='b'">
+ <genre authority="marcgt">kit</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marcgt">art reproduction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marcgt">diorama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marcgt">filmstrip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='g'">
+ <genre authority="marcgt">legal article</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marcgt">picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='k'">
+ <genre authority="marcgt">graphic</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marcgt">technical drawing</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='m'">
+ <genre authority="marcgt">motion picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='n'">
+ <genre authority="marcgt">chart</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='o'">
+ <genre authority="marcgt">flash card</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='p'">
+ <genre authority="marcgt">microscope slide</genre>
+ </xsl:when>
+ <xsl:when
+ test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
+ <genre authority="marcgt">model</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='r'">
+ <genre authority="marcgt">realia</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marcgt">slide</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='t'">
+ <genre authority="marcgt">transparency</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='v'">
+ <genre authority="marcgt">videorecording</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='w'">
+ <genre authority="marcgt">toy</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+
+ <!-- 1.20 047 genre tmee-->
+
+ <xsl:for-each select="marc:datafield[@tag=047]">
+ <genre authority="marcgt">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdef</xsl:with-param>
+ <xsl:with-param name="delimeter">-</xsl:with-param>
+ </xsl:call-template>
+ </genre>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=655]">
+ <genre authority="marcgt">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abvxyz</xsl:with-param>
+ <xsl:with-param name="delimeter">-</xsl:with-param>
+ </xsl:call-template>
+ </genre>
+ </xsl:for-each>
+ <originInfo>
+ <xsl:variable name="MARCpublicationCode"
+ select="normalize-space(substring($controlField008,16,3))"/>
+ <xsl:if test="translate($MARCpublicationCode,'|','')">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marccountry</xsl:attribute>
+ <xsl:value-of select="$MARCpublicationCode"/>
+ </placeTerm>
+ </place>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=044]/marc:subfield[@code='c']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">iso3166</xsl:attribute>
+ <xsl:value-of select="."/>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='a']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:call-template name="chopPunctuationFront">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='m']">
+ <dateValid point="start">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='n']">
+ <dateValid point="end">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='j']">
+ <dateModified>
+ <xsl:value-of select="."/>
+ </dateModified>
+ </xsl:for-each>
+ <xsl:for-each
+ select="marc:datafield[@tag=260]/marc:subfield[@code='b' or @code='c' or @code='g']">
+ <xsl:choose>
+ <xsl:when test="@code='b'">
+ <publisher>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </publisher>
+ </xsl:when>
+ <xsl:when test="@code='c'">
+ <dateIssued>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </dateIssued>
+ </xsl:when>
+ <xsl:when test="@code='g'">
+ <dateCreated>
+ <xsl:value-of select="."/>
+ </dateCreated>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:variable name="dataField260c">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString"
+ select="marc:datafield[@tag=260]/marc:subfield[@code='c']"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="controlField008-7-10"
+ select="normalize-space(substring($controlField008, 8, 4))"/>
+ <xsl:variable name="controlField008-11-14"
+ select="normalize-space(substring($controlField008, 12, 4))"/>
+ <xsl:variable name="controlField008-6"
+ select="normalize-space(substring($controlField008, 7, 1))"/>
+ <xsl:if
+ test="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">
+ <xsl:if test="$controlField008-7-10 and ($controlField008-7-10 != $dataField260c)">
+ <dateIssued encoding="marc">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if
+ test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if
+ test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start" qualifier="questionable">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end" qualifier="questionable">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='t'">
+ <xsl:if test="$controlField008-11-14">
+ <copyrightDate encoding="marc">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </copyrightDate>
+ </xsl:if>
+ </xsl:if>
+ <xsl:for-each
+ select="marc:datafield[@tag=033][@ind1=0 or @ind1=1]/marc:subfield[@code='a']">
+ <dateCaptured encoding="iso8601">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][1]">
+ <dateCaptured encoding="iso8601" point="start">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][2]">
+ <dateCaptured encoding="iso8601" point="end">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=250]/marc:subfield[@code='a']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+ <xsl:for-each select="marc:leader">
+ <issuance>
+ <xsl:choose>
+ <xsl:when
+ test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'"
+ >monographic</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'"
+ >continuing</xsl:when>
+ </xsl:choose>
+ </issuance>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=310]|marc:datafield[@tag=321]">
+ <frequency>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </frequency>
+ </xsl:for-each>
+ </originInfo>
+ <xsl:variable name="controlField008-35-37"
+ select="normalize-space(translate(substring($controlField008,36,3),'|#',''))"/>
+ <xsl:if test="$controlField008-35-37">
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($controlField008,36,3)"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=041]">
+ <xsl:for-each
+ select="marc:subfield[@code='a' or @code='b' or @code='d' or @code='e' or @code='f' or @code='g' or @code='h']">
+ <xsl:variable name="langCodes" select="."/>
+ <xsl:choose>
+ <xsl:when test="../marc:subfield[@code='2']='rfc3066'">
+ <!-- not stacked but could be repeated -->
+ <xsl:call-template name="rfcLanguages">
+ <xsl:with-param name="nodeNum">
+ <xsl:value-of select="1"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:text/>
+ </xsl:with-param>
+ <xsl:with-param name="controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- iso -->
+ <xsl:variable name="allLanguages">
+ <xsl:copy-of select="$langCodes"/>
+ </xsl:variable>
+ <xsl:variable name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"/>
+ </xsl:variable>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of
+ select="substring($allLanguages,4,string-length($allLanguages)-3)"
+ />
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:if test="$controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"/>
+ </xsl:if>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:variable name="physicalDescription">
+ <!--3.2 change tmee 007/11 -->
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a']">
+ <digitalOrigin>reformatted digital</digitalOrigin>
+ </xsl:if>
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='b']">
+ <digitalOrigin>digitized microfilm</digitalOrigin>
+ </xsl:if>
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='d']">
+ <digitalOrigin>digitized other analog</digitalOrigin>
+ </xsl:if>
+ <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
+ <xsl:variable name="check008-23">
+ <xsl:if
+ test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">
+ <xsl:value-of select="true()"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="check008-29">
+ <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
+ <xsl:value-of select="true()"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when
+ test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
+ <form authority="marcform">braille</form>
+ </xsl:when>
+ <xsl:when
+ test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='SE') and ($controlField008-23=' ' or $controlField008='r'))">
+ <form authority="marcform">print</form>
+ </xsl:when>
+ <xsl:when
+ test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
+ <form authority="marcform">electronic</form>
+ </xsl:when>
+ <xsl:when
+ test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
+ <form authority="marcform">microfiche</form>
+ </xsl:when>
+ <xsl:when
+ test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
+ <form authority="marcform">microfilm</form>
+ </xsl:when>
+ </xsl:choose>
+ <!-- 1/04 fix -->
+ <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"
+ />
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"
+ />
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"
+ />
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"
+ />
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"
+ />
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"
+ />
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
+ <form>
+ <xsl:value-of select="."/>
+ </form>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
+ <xsl:choose>
+ <xsl:when test="substring(text(),14,1)='a'">
+ <reformattingQuality>access</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='p'">
+ <reformattingQuality>preservation</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='r'">
+ <reformattingQuality>replacement</reformattingQuality>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ <!--3.2 change tmee 007/01 -->
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='b']">
+ <form authority="smd">chip cartridge</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='c']">
+ <form authority="smd">computer optical disc cartridge</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
+ <form authority="smd">magnetic disc</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='m']">
+ <form authority="smd">magneto-optical disc</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='o']">
+ <form authority="smd">optical disc</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
+ <form authority="smd">remote</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
+ <form authority="smd">tape cartridge</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='f']">
+ <form authority="smd">tape cassette</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='h']">
+ <form authority="smd">tape reel</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='a']">
+ <form authority="smd">celestial globe</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='e']">
+ <form authority="smd">earth moon globe</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='b']">
+ <form authority="smd">planetary or lunar globe</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='c']">
+ <form authority="smd">terrestrial globe</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
+ <form authority="smd">kit</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
+ <form authority="smd">atlas</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='g']">
+ <form authority="smd">diagram</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
+ <form authority="smd">map</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
+ <form authority="smd">model</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='k']">
+ <form authority="smd">profile</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
+ <form authority="smd">remote-sensing image</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='s']">
+ <form authority="smd">section</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='y']">
+ <form authority="smd">view</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='a']">
+ <form authority="smd">aperture card</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='e']">
+ <form authority="smd">microfiche</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='f']">
+ <form authority="smd">microfiche cassette</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='b']">
+ <form authority="smd">microfilm cartridge</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='c']">
+ <form authority="smd">microfilm cassette</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='d']">
+ <form authority="smd">microfilm reel</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='g']">
+ <form authority="smd">microopaque</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='c']">
+ <form authority="smd">film cartridge</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='f']">
+ <form authority="smd">film cassette</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='r']">
+ <form authority="smd">film reel</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='n']">
+ <form authority="smd">chart</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
+ <form authority="smd">collage</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='d']">
+ <form authority="smd">drawing</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='o']">
+ <form authority="smd">flash card</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='e']">
+ <form authority="smd">painting</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
+ <form authority="smd">photomechanical print</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='g']">
+ <form authority="smd">photonegative</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='h']">
+ <form authority="smd">photoprint</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='i']">
+ <form authority="smd">picture</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
+ <form authority="smd">print</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='l']">
+ <form authority="smd">technical drawing</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='q'][substring(text(),2,1)='q']">
+ <form authority="smd">notated music</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
+ <form authority="smd">filmslip</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='c']">
+ <form authority="smd">filmstrip cartridge</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='o']">
+ <form authority="smd">filmstrip roll</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='f']">
+ <form authority="smd">other filmstrip type</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='s']">
+ <form authority="smd">slide</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
+ <form authority="smd">transparency</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='r'][substring(text(),2,1)='r']">
+ <form authority="smd">remote-sensing image</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='e']">
+ <form authority="smd">cylinder</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='q']">
+ <form authority="smd">roll</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='g']">
+ <form authority="smd">sound cartridge</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='s']">
+ <form authority="smd">sound cassette</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='d']">
+ <form authority="smd">sound disc</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
+ <form authority="smd">sound-tape reel</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='i']">
+ <form authority="smd">sound-track film</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='w']">
+ <form authority="smd">wire recording</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='c']">
+ <form authority="smd">braille</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='b']">
+ <form authority="smd">combination</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='a']">
+ <form authority="smd">moon</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='d']">
+ <form authority="smd">tactile, with no writing system</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='c']">
+ <form authority="smd">braille</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='b']">
+ <form authority="smd">large print</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
+ <form authority="smd">regular print</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='d']">
+ <form authority="smd">text in looseleaf binder</form>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='c']">
+ <form authority="smd">videocartridge</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='f']">
+ <form authority="smd">videocassette</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='d']">
+ <form authority="smd">videodisc</form>
+ </xsl:if>
+ <xsl:if
+ test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
+ <form authority="smd">videoreel</form>
+ </xsl:if>
+
+ <xsl:for-each
+ select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
+ <internetMediaType>
+ <xsl:value-of select="."/>
+ </internetMediaType>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=300]">
+ <extent>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abce</xsl:with-param>
+ </xsl:call-template>
+ </extent>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($physicalDescription))">
+ <physicalDescription>
+ <xsl:copy-of select="$physicalDescription"/>
+ </physicalDescription>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=520]">
+ <abstract>
+ <xsl:call-template name="uri"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </abstract>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=505]">
+ <tableOfContents>
+ <xsl:call-template name="uri"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">agrt</xsl:with-param>
+ </xsl:call-template>
+ </tableOfContents>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=521]">
+ <targetAudience>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </targetAudience>
+ </xsl:for-each>
+ <xsl:if test="$typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM'">
+ <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>
+ <xsl:choose>
+ <!-- 01/04 fix -->
+ <xsl:when test="$controlField008-22='d'">
+ <targetAudience authority="marctarget">adolescent</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='e'">
+ <targetAudience authority="marctarget">adult</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='g'">
+ <targetAudience authority="marctarget">general</targetAudience>
+ </xsl:when>
+ <xsl:when
+ test="$controlField008-22='b' or $controlField008-22='c' or $controlField008-22='j'">
+ <targetAudience authority="marctarget">juvenile</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='a'">
+ <targetAudience authority="marctarget">preschool</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='f'">
+ <targetAudience authority="marctarget">specialized</targetAudience>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=245]/marc:subfield[@code='c']">
+ <note type="statement of responsibility">
+ <xsl:value-of select="."/>
+ </note>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=500]">
+ <note>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ <xsl:call-template name="uri"/>
+ </note>
+ </xsl:for-each>
+
+ <!--3.2 change tmee additional note fields-->
+
+ <xsl:for-each select="marc:datafield[@tag=506]">
+ <note type="restrictions">
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=510]">
+ <note type="citation/reference">
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+
+
+ <xsl:for-each select="marc:datafield[@tag=511]">
+ <note type="performers">
+ <xsl:call-template name="uri"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </note>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=518]">
+ <note type="venue">
+ <xsl:call-template name="uri"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=530]">
+ <note type="additional physical form">
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=533]">
+ <note type="reproduction">
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=534]">
+ <note type="original version">
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=538]">
+ <note type="system details">
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=583]">
+ <note type="action">
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each
+ select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=507 or @tag=508 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
+ <note>
+ <xsl:call-template name="uri"/>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."/>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
+ </note>
+ </xsl:for-each>
+ <xsl:for-each
+ select="marc:datafield[@tag=034][marc:subfield[@code='d' or @code='e' or @code='f' or @code='g']]">
+ <subject>
+ <cartographics>
+ <coordinates>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">defg</xsl:with-param>
+ </xsl:call-template>
+ </coordinates>
+ </cartographics>
+ </subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=043]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
+ <geographicCode>
+ <xsl:attribute name="authority">
+ <xsl:if test="@code='a'">
+ <xsl:text>marcgac</xsl:text>
+ </xsl:if>
+ <xsl:if test="@code='b'">
+ <xsl:value-of select="following-sibling::marc:subfield[@code=2]"/>
+ </xsl:if>
+ <xsl:if test="@code='c'">
+ <xsl:text>iso3166</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:value-of select="self::marc:subfield"/>
+ </geographicCode>
+ </xsl:for-each>
+ </subject>
+ </xsl:for-each>
+ <!-- tmee 2006/11/27 -->
+ <xsl:for-each select="marc:datafield[@tag=255]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
+ <cartographics>
+ <xsl:if test="@code='a'">
+ <scale>
+ <xsl:value-of select="."/>
+ </scale>
+ </xsl:if>
+ <xsl:if test="@code='b'">
+ <projection>
+ <xsl:value-of select="."/>
+ </projection>
+ </xsl:if>
+ <xsl:if test="@code='c'">
+ <coordinates>
+ <xsl:value-of select="."/>
+ </coordinates>
+ </xsl:if>
+ </cartographics>
+ </xsl:for-each>
+ </subject>
+ </xsl:for-each>
+
+ <xsl:apply-templates select="marc:datafield[653 >= @tag and @tag >= 600]"/>
+ <xsl:apply-templates select="marc:datafield[@tag=656]"/>
+ <xsl:for-each select="marc:datafield[@tag=752 or @tag=662]">
+ <subject>
+ <hierarchicalGeographic>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <country>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </country>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <state>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </state>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <county>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </county>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <city>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </city>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <citySection>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </citySection>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='g']">
+ <region>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </region>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <extraterrestrialArea>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </extraterrestrialArea>
+ </xsl:for-each>
+ </hierarchicalGeographic>
+ </subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=045][marc:subfield[@code='b']]">
+ <subject>
+ <xsl:choose>
+ <xsl:when test="@ind1=2">
+ <temporal encoding="iso8601" point="start">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b'][1]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ <temporal encoding="iso8601" point="end">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b'][2]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </temporal>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=050]">
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <classification authority="lcc">
+ <xsl:if test="../marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="../marc:subfield[@code='3']"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="preceding-sibling::marc:subfield[@code='a'][1]"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="text()"/>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each
+ select="marc:subfield[@code='a'][not(following-sibling::marc:subfield[@code='b'])]">
+ <classification authority="lcc">
+ <xsl:if test="../marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="../marc:subfield[@code='3']"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="text()"/>
+ </classification>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=082]">
+ <classification authority="ddc">
+ <xsl:if test="marc:subfield[@code='2']">
+ <xsl:attribute name="edition">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=080]">
+ <classification authority="udc">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abx</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=060]">
+ <classification authority="nlm">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=0]">
+ <classification authority="sudocs">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=1]">
+ <classification authority="candoc">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=086]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=084]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=440]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <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>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <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>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=510]">
+ <relatedItem type="isReferencedBy">
+ <note>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcx3</xsl:with-param>
+ </xsl:call-template>
+ </note>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=534]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedTitle"/>
+ <xsl:call-template name="relatedName"/>
+ <xsl:if test="marc:subfield[@code='b' or @code='c']">
+ <originInfo>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <publisher>
+ <xsl:value-of select="."/>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ <xsl:for-each select="marc:subfield[@code='z']">
+ <identifier type="isbn">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ <xsl:call-template name="relatedNote"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=710][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:variable name="tempNamePart">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="normalize-space($tempNamePart)">
+ <namePart>
+ <xsl:value-of select="$tempNamePart"/>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=711][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=730][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=740][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]">
+ <relatedItem type="series">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each
+ select="marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=777]|marc:datafield[@tag=787]">
+ <relatedItem>
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=775]">
+ <relatedItem type="otherVersion">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=770]|marc:datafield[@tag=774]">
+ <relatedItem type="constituent">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=772]|marc:datafield[@tag=773]">
+ <relatedItem type="host">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=776]">
+ <relatedItem type="otherFormat">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=780]">
+ <relatedItem type="preceding">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=785]">
+ <relatedItem type="succeeding">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=786]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedItem76X-78X"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=800]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=810]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=811]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='830']">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='856'][@ind2='2']/marc:subfield[@code='q']">
+ <relatedItem>
+ <internetMediaType>
+ <xsl:value-of select="."/>
+ </internetMediaType>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='020']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">isbn</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='a']">
+ <identifier type="isbn">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='024'][@ind1='0']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">isrc</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='a']">
+ <identifier type="isrc">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='024'][@ind1='2']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">ismn</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='a']">
+ <identifier type="ismn">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='024'][@ind1='4']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">sici</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="sici">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='022']">
+ <xsl:if test="marc:subfield[@code='a']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">issn</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="issn">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='l']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">issn-l</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="issn-l">
+ <xsl:value-of select="marc:subfield[@code='l']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+
+
+
+ <xsl:for-each select="marc:datafield[@tag='010']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">lccn</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="lccn">
+ <xsl:value-of select="normalize-space(marc:subfield[@code='a'])"/>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='028']">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="@ind1='0'">issue number</xsl:when>
+ <xsl:when test="@ind1='1'">matrix number</xsl:when>
+ <xsl:when test="@ind1='2'">music plate</xsl:when>
+ <xsl:when test="@ind1='3'">music publisher</xsl:when>
+ <xsl:when test="@ind1='4'">videorecording identifier</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <!--<xsl:call-template name="isInvalid"/>-->
+ <!-- no $z in 028 -->
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">
+ <xsl:choose>
+ <xsl:when test="@ind1='0'">ba</xsl:when>
+ <xsl:otherwise>ab</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='037']">
+ <identifier type="stock number">
+ <!--<xsl:call-template name="isInvalid"/>-->
+ <!-- no $z in 037 -->
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='856'][marc:subfield[@code='u']]">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when
+ test="starts-with(marc:subfield[@code='u'],'urn:doi') or starts-with(marc:subfield[@code='u'],'doi')"
+ >doi</xsl:when>
+ <xsl:when
+ test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov')"
+ >hdl</xsl:when>
+ <xsl:otherwise>uri</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when
+ test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov') ">
+ <xsl:value-of
+ select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"
+ />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="marc:subfield[@code='u']"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </identifier>
+ <xsl:if
+ test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl')">
+ <identifier type="hdl">
+ <xsl:if test="marc:subfield[@code='y' or @code='3' or @code='z']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of
+ select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"
+ />
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1=1]">
+ <identifier type="upc">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+
+ <!-- 1/04 fix added $y -->
+
+ <!-- 1.21 tmee-->
+ <xsl:for-each select="marc:datafield[@tag=856][@ind2=1][marc:subfield[@code='u']]">
+ <relatedItem type="otherVersion">
+ <location>
+ <url>
+ <xsl:if test="marc:subfield[@code='y' or @code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='z' ]">
+ <xsl:attribute name="note">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="marc:subfield[@code='u']"/>
+ </url>
+ </location>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=856][@ind2=2][marc:subfield[@code='u']]">
+ <relatedItem>
+ <location>
+ <url>
+ <xsl:if test="marc:subfield[@code='y' or @code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='z' ]">
+ <xsl:attribute name="note">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="marc:subfield[@code='u']"/>
+ </url>
+ </location>
+ </relatedItem>
+ </xsl:for-each>
+
+ <!-- 3.2 change tmee 856z -->
+
+ <!-- 1.24 tmee -->
+ <xsl:for-each select="marc:datafield[@tag=852]">
+ <location>
+ <xsl:if test="marc:subfield[@code='a' or @code='b' or @code='e']">
+ <physicalLocation>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abe</xsl:with-param>
+ </xsl:call-template>
+ </physicalLocation>
+ </xsl:if>
+
+ <xsl:if test="marc:subfield[@code='u']">
+ <physicalLocation>
+ <xsl:call-template name="uri"/>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">u</xsl:with-param>
+ </xsl:call-template>
+ </physicalLocation>
+ </xsl:if>
+
+ <xsl:if
+ test="marc:subfield[@code='h' or @code='i' or @code='j' or @code='k' or @code='l' or @code='m' or @code='t']">
+ <shelfLocation>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">hijklmt</xsl:with-param>
+ </xsl:call-template>
+ </shelfLocation>
+ </xsl:if>
+ </location>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=506]">
+ <accessCondition type="restrictionOnAccess">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=540]">
+ <accessCondition type="useAndReproduction">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcde35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+
+ <recordInfo>
+ <!-- 1.25 tmee-->
+
+
+ <xsl:for-each select="marc:leader[substring($leader,19,1)='a']">
+ <descriptionStandard>aacr2</descriptionStandard>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=040]">
+ <xsl:if test="marc:subfield[@code='e']">
+ <descriptionStandard>
+ <xsl:value-of select="marc:subfield[@code='e']"/>
+ </descriptionStandard>
+ </xsl:if>
+ <recordContentSource authority="marcorg">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </recordContentSource>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=008]">
+ <recordCreationDate encoding="marc">
+ <xsl:value-of select="substring(.,1,6)"/>
+ </recordCreationDate>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:controlfield[@tag=005]">
+ <recordChangeDate encoding="iso8601">
+ <xsl:value-of select="."/>
+ </recordChangeDate>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=001]">
+ <recordIdentifier>
+ <xsl:if test="../marc:controlfield[@tag=003]">
+ <xsl:attribute name="source">
+ <xsl:value-of select="../marc:controlfield[@tag=003]"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </recordIdentifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=040]/marc:subfield[@code='b']">
+ <languageOfCataloging>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="."/>
+ </languageTerm>
+ </languageOfCataloging>
+ </xsl:for-each>
+ </recordInfo>
+ </xsl:template>
+ <xsl:template name="displayForm">
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <displayForm>
+ <xsl:value-of select="."/>
+ </displayForm>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="affiliation">
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <affiliation>
+ <xsl:value-of select="."/>
+ </affiliation>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="uri">
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='0']">
+ <xsl:choose>
+ <xsl:when test="contains(text(), ')')">
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="substring-after(text(), ')')"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="role">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <role>
+ <roleTerm type="text">
+ <xsl:value-of select="."/>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."/>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </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">fgkdlmor</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">fgkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partNumber"/>
+ </xsl:call-template>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partName"/>
+ </xsl:call-template>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedPart">
+ <xsl:if test="@tag=773">
+ <xsl:for-each select="marc:subfield[@code='g']">
+ <part>
+ <text>
+ <xsl:value-of select="."/>
+ </text>
+ </part>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='q']">
+ <part>
+ <xsl:call-template name="parsePart"/>
+ </part>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedPartNumName">
+ <xsl:variable name="partNumber">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">g</xsl:with-param>
+ <xsl:with-param name="anyCodes">g</xsl:with-param>
+ <xsl:with-param name="afterCodes">pst</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">fgkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:value-of select="$partNumber"/>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:value-of select="$partName"/>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedName">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <name>
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </name>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedForm">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <form>
+ <xsl:value-of select="."/>
+ </form>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedExtent">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <extent>
+ <xsl:value-of select="."/>
+ </extent>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedNote">
+ <xsl:for-each select="marc:subfield[@code='n']">
+ <note>
+ <xsl:value-of select="."/>
+ </note>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedSubject">
+ <xsl:for-each select="marc:subfield[@code='j']">
+ <subject>
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </temporal>
+ </subject>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedIdentifierISSN">
+ <xsl:for-each select="marc:subfield[@code='x']">
+ <identifier type="issn">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedIdentifierLocal">
+ <xsl:for-each select="marc:subfield[@code='w']">
+ <identifier type="local">
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedIdentifier">
+ <xsl:for-each select="marc:subfield[@code='o']">
+ <identifier>
+ <xsl:value-of select="."/>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedItem76X-78X">
+ <xsl:call-template name="displayLabel"/>
+ <xsl:call-template name="relatedTitle76X-78X"/>
+ <xsl:call-template name="relatedName"/>
+ <xsl:call-template name="relatedOriginInfo"/>
+ <xsl:call-template name="relatedLanguage"/>
+ <xsl:call-template name="relatedExtent"/>
+ <xsl:call-template name="relatedNote"/>
+ <xsl:call-template name="relatedSubject"/>
+ <xsl:call-template name="relatedIdentifier"/>
+ <xsl:call-template name="relatedIdentifierISSN"/>
+ <xsl:call-template name="relatedIdentifierLocal"/>
+ <xsl:call-template name="relatedPart"/>
+ </xsl:template>
+ <xsl:template name="subjectGeographicZ">
+ <geographic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </geographic>
+ </xsl:template>
+ <xsl:template name="subjectTemporalY">
+ <temporal>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </temporal>
+ </xsl:template>
+ <xsl:template name="subjectTopic">
+ <topic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </topic>
+ </xsl:template>
+ <!-- 3.2 change tmee 6xx $v genre -->
+ <xsl:template name="subjectGenre">
+ <genre>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </genre>
+ </xsl:template>
+
+ <xsl:template name="nameABCDN">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if
+ test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">cdn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="nameABCDQ">
+ <namePart>
+ <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>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"/>
+ <xsl:call-template name="nameDate"/>
+ </xsl:template>
+ <xsl:template name="nameACDEQ">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">acdeq</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:template>
+ <xsl:template name="constituentOrRelatedType">
+ <xsl:if test="@ind2=2">
+ <xsl:attribute name="type">constituent</xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedTitle">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedTitle76X-78X">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"/>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='p']">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"/>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='s']">
+ <titleInfo type="uniform">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"/>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedOriginInfo">
+ <xsl:if test="marc:subfield[@code='b' or @code='d'] or marc:subfield[@code='f']">
+ <originInfo>
+ <xsl:if test="@tag=775">
+ <xsl:for-each select="marc:subfield[@code='f']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marcgac</xsl:attribute>
+ <xsl:value-of select="."/>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <publisher>
+ <xsl:value-of select="."/>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedLanguage">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString">
+ <xsl:value-of select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="nameDate">
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <namePart type="date">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="subjectAuthority">
+ <xsl:if test="@ind2!=4">
+ <xsl:if test="@ind2!=' '">
+ <xsl:if test="@ind2!=8">
+ <xsl:if test="@ind2!=9">
+ <xsl:attribute name="authority">
+ <xsl:choose>
+ <xsl:when test="@ind2=0">lcsh</xsl:when>
+ <xsl:when test="@ind2=1">lcshac</xsl:when>
+ <xsl:when test="@ind2=2">mesh</xsl:when>
+ <!-- 1/04 fix -->
+ <xsl:when test="@ind2=3">nal</xsl:when>
+ <xsl:when test="@ind2=5">csh</xsl:when>
+ <xsl:when test="@ind2=6">rvm</xsl:when>
+ <xsl:when test="@ind2=7">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="subjectAnyOrder">
+ <xsl:for-each select="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">
+ <xsl:choose>
+ <xsl:when test="@code='v'">
+ <xsl:call-template name="subjectGenre"/>
+ </xsl:when>
+ <xsl:when test="@code='x'">
+ <xsl:call-template name="subjectTopic"/>
+ </xsl:when>
+ <xsl:when test="@code='y'">
+ <xsl:call-template name="subjectTemporalY"/>
+ </xsl:when>
+ <xsl:when test="@code='z'">
+ <xsl:call-template name="subjectGeographicZ"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </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, at code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes, at 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>
+
+ <!-- 3.2 change tmee 6xx $v genre -->
+ <xsl:template match="marc:datafield[@tag=600]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <name type="personal">
+ <xsl:call-template name="termsOfAddress"/>
+ <namePart>
+ <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:call-template>
+ </namePart>
+ <xsl:call-template name="nameDate"/>
+ <xsl:call-template name="affiliation"/>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=610]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."/>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if test="marc:subfield[@code='c' or @code='d' or @code='n' or @code='p']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">cdnp</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=611]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdeqnp</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."/>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=630]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfhklor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+ <!-- 1.27 648 tmee-->
+ <xsl:template match="marc:datafield[@tag=648]">
+ <subject>
+ <xsl:if test="marc:subfield[@code=2]">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code=2]"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="uri"/>
+
+ <xsl:call-template name="subjectAuthority"/>
+ <temporal>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ <xsl:call-template name="subjectAnyOrder"/>
+
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=650]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <topic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </topic>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=651]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"/>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <geographic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </geographic>
+ </xsl:for-each>
+ <xsl:call-template name="subjectAnyOrder"/>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=653]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <topic>
+ <xsl:value-of select="."/>
+ </topic>
+ </xsl:for-each>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=656]">
+ <subject>
+ <xsl:if test="marc:subfield[@code=2]">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code=2]"/>
+ </xsl:attribute>
+ </xsl:if>
+ <occupation>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </occupation>
+ </subject>
+ </xsl:template>
+ <xsl:template name="termsOfAddress">
+ <xsl:if test="marc:subfield[@code='b' or @code='c']">
+ <namePart type="termsOfAddress">
+ <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>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="displayLabel">
+ <xsl:if test="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='i']"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='3']"/>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="isInvalid">
+ <xsl:param name="type"/>
+ <xsl:if
+ test="marc:subfield[@code='z'] or marc:subfield[@code='y'] or marc:subfield[@code='m']">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:value-of select="$type"/>
+ </xsl:attribute>
+ <xsl:attribute name="invalid">
+ <xsl:text>yes</xsl:text>
+ </xsl:attribute>
+ <xsl:if test="marc:subfield[@code='z']">
+ <xsl:value-of select="marc:subfield[@code='z']"/>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='y']">
+ <xsl:value-of select="marc:subfield[@code='y']"/>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='m']">
+ <xsl:value-of select="marc:subfield[@code='m']"/>
+ </xsl:if>
+ </identifier>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="subtitle">
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b']"/>
+ <!--<xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">b</xsl:with-param>
+ </xsl:call-template>-->
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="script">
+ <xsl:param name="scriptCode"/>
+ <xsl:attribute name="script">
+ <xsl:choose>
+ <xsl:when test="$scriptCode='(3'">Arabic</xsl:when>
+ <xsl:when test="$scriptCode='(B'">Latin</xsl:when>
+ <xsl:when test="$scriptCode='$1'">Chinese, Japanese, Korean</xsl:when>
+ <xsl:when test="$scriptCode='(N'">Cyrillic</xsl:when>
+ <xsl:when test="$scriptCode='(2'">Hebrew</xsl:when>
+ <xsl:when test="$scriptCode='(S'">Greek</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template name="parsePart">
+ <!-- assumes 773$q= 1:2:3<4
+ with up to 3 levels and one optional start page
+ -->
+ <xsl:variable name="level1">
+ <xsl:choose>
+ <xsl:when test="contains(text(),':')">
+ <!-- 1:2 -->
+ <xsl:value-of select="substring-before(text(),':')"/>
+ </xsl:when>
+ <xsl:when test="not(contains(text(),':'))">
+ <!-- 1 or 1<3 -->
+ <xsl:if test="contains(text(),'<')">
+ <!-- 1<3 -->
+ <xsl:value-of select="substring-before(text(),'<')"/>
+ </xsl:if>
+ <xsl:if test="not(contains(text(),'<'))">
+ <!-- 1 -->
+ <xsl:value-of select="text()"/>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici2">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after(text(),$level1),':')">
+ <xsl:value-of select="substring(substring-after(text(),$level1),2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after(text(),$level1)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level2">
+ <xsl:choose>
+ <xsl:when test="contains($sici2,':')">
+ <!-- 2:3<4 -->
+ <xsl:value-of select="substring-before($sici2,':')"/>
+ </xsl:when>
+ <xsl:when test="contains($sici2,'<')">
+ <!-- 1: 2<4 -->
+ <xsl:value-of select="substring-before($sici2,'<')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici2"/>
+ <!-- 1:2 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici3">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after($sici2,$level2),':')">
+ <xsl:value-of select="substring(substring-after($sici2,$level2),2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after($sici2,$level2)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level3">
+ <xsl:choose>
+ <xsl:when test="contains($sici3,'<')">
+ <!-- 2<4 -->
+ <xsl:value-of select="substring-before($sici3,'<')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici3"/>
+ <!-- 3 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="page">
+ <xsl:if test="contains(text(),'<')">
+ <xsl:value-of select="substring-after(text(),'<')"/>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:if test="$level1">
+ <detail level="1">
+ <number>
+ <xsl:value-of select="$level1"/>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level2">
+ <detail level="2">
+ <number>
+ <xsl:value-of select="$level2"/>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level3">
+ <detail level="3">
+ <number>
+ <xsl:value-of select="$level3"/>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$page">
+ <extent unit="page">
+ <start>
+ <xsl:value-of select="$page"/>
+ </start>
+ </extent>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="getLanguage">
+ <xsl:param name="langString"/>
+ <xsl:param name="controlField008-35-37"/>
+ <xsl:variable name="length" select="string-length($langString)"/>
+ <xsl:choose>
+ <xsl:when test="$length=0"/>
+ <xsl:when test="$controlField008-35-37=substring($langString,1,3)">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"/>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($langString,1,3)"/>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"/>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="isoLanguage">
+ <xsl:param name="currentLanguage"/>
+ <xsl:param name="usedLanguages"/>
+ <xsl:param name="remainingLanguages"/>
+ <xsl:choose>
+ <xsl:when test="string-length($currentLanguage)=0"/>
+ <xsl:when test="not(contains($usedLanguages, $currentLanguage))">
+ <language>
+ <xsl:if test="@code!='a'">
+ <xsl:attribute name="objectPart">
+ <xsl:choose>
+ <xsl:when test="@code='b'">summary or subtitle</xsl:when>
+ <xsl:when test="@code='d'">sung or spoken text</xsl:when>
+ <xsl:when test="@code='e'">libretto</xsl:when>
+ <xsl:when test="@code='f'">table of contents</xsl:when>
+ <xsl:when test="@code='g'">accompanying material</xsl:when>
+ <xsl:when test="@code='h'">translation</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="$currentLanguage"/>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of
+ select="substring($remainingLanguages,4,string-length($remainingLanguages))"
+ />
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"/>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of
+ select="substring($remainingLanguages,4,string-length($remainingLanguages))"
+ />
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="chopBrackets">
+ <xsl:param name="chopString"/>
+ <xsl:variable name="string">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$chopString"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="substring($string, 1,1)='['">
+ <xsl:value-of select="substring($string,2, string-length($string)-2)"/>
+ </xsl:if>
+ <xsl:if test="substring($string, 1,1)!='['">
+ <xsl:value-of select="$string"/>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="rfcLanguages">
+ <xsl:param name="nodeNum"/>
+ <xsl:param name="usedLanguages"/>
+ <xsl:param name="controlField008-35-37"/>
+ <xsl:variable name="currentLanguage" select="."/>
+ <xsl:choose>
+ <xsl:when test="not($currentLanguage)"/>
+ <xsl:when
+ test="$currentLanguage!=$controlField008-35-37 and $currentLanguage!='rfc3066'">
+ <xsl:if test="not(contains($usedLanguages,$currentLanguage))">
+ <language>
+ <xsl:if test="@code!='a'">
+ <xsl:attribute name="objectPart">
+ <xsl:choose>
+ <xsl:when test="@code='b'">summary or subtitle</xsl:when>
+ <xsl:when test="@code='d'">sung or spoken text</xsl:when>
+ <xsl:when test="@code='e'">libretto</xsl:when>
+ <xsl:when test="@code='f'">table of contents</xsl:when>
+ <xsl:when test="@code='g'">accompanying material</xsl:when>
+ <xsl:when test="@code='h'">translation</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ <languageTerm authority="rfc3066" type="code">
+ <xsl:value-of select="$currentLanguage"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise> </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <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) > 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>$$ WHERE name = 'mods33';
+
+
+INSERT INTO config.global_flag (name, value, enabled, label) VALUES
+(
+ 'opac.browse.warnable_regexp_per_class',
+ '{"title": "^(a|the|an)\\s"}',
+ FALSE,
+ oils_i18n_gettext(
+ 'opac.browse.warnable_regexp_per_class',
+ 'Map of search classes to regular expressions to warn user about leading articles.',
+ 'cgf',
+ 'label'
+ )
+),
+(
+ 'opac.browse.holdings_visibility_test_limit',
+ '100',
+ TRUE,
+ oils_i18n_gettext(
+ 'opac.browse.holdings_visibility_test_limit',
+ 'Don''t look for more than this number of records with holdings when displaying browse headings with visible record counts.',
+ 'cgf',
+ 'label'
+ )
+);
+
+ALTER TABLE metabib.browse_entry DROP CONSTRAINT browse_entry_value_key;
+ALTER TABLE metabib.browse_entry ADD COLUMN sort_value TEXT;
+DELETE FROM metabib.browse_entry_def_map; -- Yeah.
+DELETE FROM metabib.browse_entry WHERE sort_value IS NULL;
+ALTER TABLE metabib.browse_entry ALTER COLUMN sort_value SET NOT NULL;
+ALTER TABLE metabib.browse_entry ADD UNIQUE (sort_value, value);
+DROP TRIGGER IF EXISTS mbe_sort_value ON metabib.browse_entry;
+
+CREATE INDEX browse_entry_sort_value_idx
+ ON metabib.browse_entry USING BTREE (sort_value);
+
+-- NOTE If I understand ordered indices correctly, an index on sort_value DESC
+-- is not actually needed, even though we do have a query that does ORDER BY
+-- on this column in that direction. The previous index serves for both
+-- directions, and ordering in an index is only helpful for multi-column
+-- indices, I think. See http://www.postgresql.org/docs/9.1/static/indexes-ordering.html
+
+-- CREATE INDEX CONCURRENTLY browse_entry_sort_value_idx_desc
+-- ON metabib.browse_entry USING BTREE (sort_value DESC);
+
+CREATE TYPE metabib.flat_browse_entry_appearance AS (
+ browse_entry BIGINT,
+ value TEXT,
+ fields TEXT,
+ authorities TEXT,
+ sources INT, -- visible ones, that is
+ row_number INT, -- internal use, sort of
+ accurate BOOL, -- Count in sources field is accurate? Not
+ -- if we had more than a browse superpage
+ -- of records to look at.
+ pivot_point BIGINT
+);
+
+
+CREATE OR REPLACE FUNCTION metabib.browse_pivot(
+ search_field INT[],
+ browse_term TEXT
+) RETURNS BIGINT AS $p$
+DECLARE
+ id BIGINT;
+BEGIN
+ SELECT INTO id mbe.id FROM metabib.browse_entry mbe
+ JOIN metabib.browse_entry_def_map mbedm ON (
+ mbedm.entry = mbe.id AND
+ mbedm.def = ANY(search_field)
+ )
+ WHERE mbe.sort_value >= public.search_normalize(browse_term)
+ ORDER BY mbe.sort_value, mbe.value LIMIT 1;
+
+ RETURN id;
+END;
+$p$ LANGUAGE PLPGSQL;
+
+CREATE OR REPLACE FUNCTION metabib.staged_browse(
+ query TEXT,
+ fields INT[],
+ context_org INT,
+ context_locations INT[],
+ staff BOOL,
+ browse_superpage_size INT,
+ count_up_from_zero BOOL, -- if false, count down from -1
+ result_limit INT,
+ next_pivot_pos INT
+) RETURNS SETOF metabib.flat_browse_entry_appearance AS $p$
+DECLARE
+ curs REFCURSOR;
+ rec RECORD;
+ qpfts_query TEXT;
+ result_row metabib.flat_browse_entry_appearance%ROWTYPE;
+ results_skipped INT := 0;
+ row_counter INT := 0;
+ row_number INT;
+ slice_start INT;
+ slice_end INT;
+ full_end INT;
+ all_records BIGINT[];
+ superpage_of_records BIGINT[];
+ superpage_size INT;
+BEGIN
+ IF count_up_from_zero THEN
+ row_number := 0;
+ ELSE
+ row_number := -1;
+ END IF;
+
+ OPEN curs FOR EXECUTE query;
+
+ LOOP
+ FETCH curs INTO rec;
+ IF NOT FOUND THEN
+ IF result_row.pivot_point IS NOT NULL THEN
+ RETURN NEXT result_row;
+ END IF;
+ RETURN;
+ END IF;
+
+ -- Gather aggregate data based on the MBE row we're looking at now
+ SELECT INTO all_records, result_row.authorities, result_row.fields
+ ARRAY_AGG(DISTINCT source),
+ ARRAY_TO_STRING(ARRAY_AGG(DISTINCT authority), $$,$$),
+ ARRAY_TO_STRING(ARRAY_AGG(DISTINCT def), $$,$$)
+ FROM metabib.browse_entry_def_map
+ WHERE entry = rec.id
+ AND def = ANY(fields);
+
+ result_row.sources := 0;
+
+ full_end := ARRAY_LENGTH(all_records, 1);
+ superpage_size := COALESCE(browse_superpage_size, full_end);
+ slice_start := 1;
+ slice_end := superpage_size;
+
+ WHILE result_row.sources = 0 AND slice_start <= full_end LOOP
+ superpage_of_records := all_records[slice_start:slice_end];
+ qpfts_query :=
+ 'SELECT NULL::BIGINT AS id, ARRAY[r] AS records, ' ||
+ '1::INT AS rel FROM (SELECT UNNEST(' ||
+ quote_literal(superpage_of_records) || '::BIGINT[]) AS r) rr';
+
+ -- We use search.query_parser_fts() for visibility testing.
+ -- We're calling it once per browse-superpage worth of records
+ -- out of the set of records related to a given mbe, until we've
+ -- either exhausted that set of records or found at least 1
+ -- visible record.
+
+ SELECT INTO result_row.sources visible
+ FROM search.query_parser_fts(
+ context_org, NULL, qpfts_query, NULL,
+ context_locations, 0, NULL, NULL, FALSE, staff, FALSE
+ ) qpfts
+ WHERE qpfts.rel IS NULL;
+
+ slice_start := slice_start + superpage_size;
+ slice_end := slice_end + superpage_size;
+ END LOOP;
+
+ -- Accurate? Well, probably.
+ result_row.accurate := browse_superpage_size IS NULL OR
+ browse_superpage_size >= full_end;
+
+ IF result_row.sources > 0 THEN
+ -- We've got a browse entry with visible holdings. Yay.
+
+
+ -- The function that calls this function needs row_number in order
+ -- to correctly order results from two different runs of this
+ -- functions.
+ result_row.row_number := row_number;
+
+ -- Now, if row_counter is still less than limit, return a row. If
+ -- not, but it is less than next_pivot_pos, continue on without
+ -- returning actual result rows until we find
+ -- that next pivot, and return it.
+
+ IF row_counter < result_limit THEN
+ result_row.browse_entry := rec.id;
+ result_row.value := rec.value;
+
+ RETURN NEXT result_row;
+ ELSE
+ result_row.browse_entry := NULL;
+ result_row.authorities := NULL;
+ result_row.fields := NULL;
+ result_row.value := NULL;
+ result_row.sources := NULL;
+ result_row.accurate := NULL;
+ result_row.pivot_point := rec.id;
+
+ IF row_counter >= next_pivot_pos THEN
+ RETURN NEXT result_row;
+ RETURN;
+ END IF;
+ END IF;
+
+ IF count_up_from_zero THEN
+ row_number := row_number + 1;
+ ELSE
+ row_number := row_number - 1;
+ END IF;
+
+ -- row_counter is different from row_number.
+ -- It simply counts up from zero so that we know when
+ -- we've reached our limit.
+ row_counter := row_counter + 1;
+ END IF;
+ END LOOP;
+END;
+$p$ LANGUAGE PLPGSQL;
+
+CREATE OR REPLACE FUNCTION metabib.browse(
+ search_field INT[],
+ browse_term TEXT,
+ context_org INT DEFAULT NULL,
+ context_loc_group INT DEFAULT NULL,
+ staff BOOL DEFAULT FALSE,
+ pivot_id BIGINT DEFAULT NULL,
+ result_limit INT DEFAULT 10
+) RETURNS SETOF metabib.flat_browse_entry_appearance AS $p$
+DECLARE
+ core_query TEXT;
+ back_query TEXT;
+ forward_query TEXT;
+ pivot_sort_value TEXT;
+ pivot_sort_fallback TEXT;
+ context_locations INT[];
+ browse_superpage_size INT;
+ results_skipped INT := 0;
+ back_limit INT;
+ back_to_pivot INT;
+ forward_limit INT;
+ forward_to_pivot INT;
+BEGIN
+ -- First, find the pivot if we were given a browse term but not a pivot.
+ IF pivot_id IS NULL THEN
+ pivot_id := metabib.browse_pivot(search_field, browse_term);
+ END IF;
+
+ SELECT INTO pivot_sort_value, pivot_sort_fallback
+ sort_value, value FROM metabib.browse_entry WHERE id = pivot_id;
+
+ -- Bail if we couldn't find a pivot.
+ IF pivot_sort_value IS NULL THEN
+ RETURN;
+ END IF;
+
+ -- Transform the context_loc_group argument (if any) (logc at the
+ -- TPAC layer) into a form we'll be able to use.
+ IF context_loc_group IS NOT NULL THEN
+ SELECT INTO context_locations ARRAY_AGG(location)
+ FROM asset.copy_location_group_map
+ WHERE lgroup = context_loc_group;
+ END IF;
+
+ -- Get the configured size of browse superpages.
+ SELECT INTO browse_superpage_size value -- NULL ok
+ FROM config.global_flag
+ WHERE enabled AND name = 'opac.browse.holdings_visibility_test_limit';
+
+ -- First we're going to search backward from the pivot, then we're going
+ -- to search forward. In each direction, we need two limits. At the
+ -- lesser of the two limits, we delineate the edge of the result set
+ -- we're going to return. At the greater of the two limits, we find the
+ -- pivot value that would represent an offset from the current pivot
+ -- at a distance of one "page" in either direction, where a "page" is a
+ -- result set of the size specified in the "result_limit" argument.
+ --
+ -- The two limits in each direction make four derived values in total,
+ -- and we calculate them now.
+ back_limit := CEIL(result_limit::FLOAT / 2);
+ back_to_pivot := result_limit;
+ forward_limit := result_limit / 2;
+ forward_to_pivot := result_limit - 1;
+
+ -- This is the meat of the SQL query that finds browse entries. We'll
+ -- pass this to a function which uses it with a cursor, so that individual
+ -- rows may be fetched in a loop until some condition is satisfied, without
+ -- waiting for a result set of fixed size to be collected all at once.
+ core_query := '
+ SELECT
+ mbe.id,
+ mbe.value,
+ mbe.sort_value
+ FROM metabib.browse_entry mbe
+ WHERE EXISTS (SELECT 1 FROM metabib.browse_entry_def_map mbedm WHERE
+ mbedm.entry = mbe.id AND
+ mbedm.def = ANY(' || quote_literal(search_field) || ')
+ ) AND ';
+
+ -- This is the variant of the query for browsing backward.
+ back_query := core_query ||
+ ' mbe.sort_value <= ' || quote_literal(pivot_sort_value) ||
+ ' ORDER BY mbe.sort_value DESC, mbe.value DESC ';
+
+ -- This variant browses forward.
+ forward_query := core_query ||
+ ' mbe.sort_value > ' || quote_literal(pivot_sort_value) ||
+ ' ORDER BY mbe.sort_value, mbe.value ';
+
+ -- We now call the function which applies a cursor to the provided
+ -- queries, stopping at the appropriate limits and also giving us
+ -- the next page's pivot.
+ RETURN QUERY
+ SELECT * FROM metabib.staged_browse(
+ back_query, search_field, context_org, context_locations,
+ staff, browse_superpage_size, TRUE, back_limit, back_to_pivot
+ ) UNION
+ SELECT * FROM metabib.staged_browse(
+ forward_query, search_field, context_org, context_locations,
+ staff, browse_superpage_size, FALSE, forward_limit, forward_to_pivot
+ ) ORDER BY row_number DESC;
+
+END;
+$p$ LANGUAGE PLPGSQL;
+
+CREATE OR REPLACE FUNCTION metabib.browse(
+ search_class TEXT,
+ browse_term TEXT,
+ context_org INT DEFAULT NULL,
+ context_loc_group INT DEFAULT NULL,
+ staff BOOL DEFAULT FALSE,
+ pivot_id BIGINT DEFAULT NULL,
+ result_limit INT DEFAULT 10
+) RETURNS SETOF metabib.flat_browse_entry_appearance AS $p$
+BEGIN
+ RETURN QUERY SELECT * FROM metabib.browse(
+ (SELECT COALESCE(ARRAY_AGG(id), ARRAY[]::INT[])
+ FROM config.metabib_field WHERE field_class = search_class),
+ browse_term,
+ context_org,
+ context_loc_group,
+ staff,
+ pivot_id,
+ result_limit
+ );
+END;
+$p$ LANGUAGE PLPGSQL;
+
+UPDATE config.metabib_field
+SET
+ xpath = $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[@type="nfi"]$$,
+ browse_sort_xpath = $$*[local-name() != "nonSort"]$$,
+ browse_xpath = NULL
+WHERE
+ field_class = 'series' AND name = 'seriestitle' ;
+
+UPDATE config.metabib_field
+SET
+ xpath = $$//mods32:mods/mods32:titleInfo[mods32:title and not (@type)]$$,
+ browse_sort_xpath = $$*[local-name() != "nonSort"]$$,
+ browse_xpath = NULL,
+ browse_field = TRUE
+WHERE
+ field_class = 'title' AND name = 'proper' ;
+
+UPDATE config.metabib_field
+SET
+ xpath = $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='alternative-nfi')]$$,
+ browse_sort_xpath = $$*[local-name() != "nonSort"]$$,
+ browse_xpath = NULL
+WHERE
+ field_class = 'title' AND name = 'alternative' ;
+
+UPDATE config.metabib_field
+SET
+ xpath = $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='uniform-nfi')]$$,
+ browse_sort_xpath = $$*[local-name() != "nonSort"]$$,
+ browse_xpath = NULL
+WHERE
+ field_class = 'title' AND name = 'uniform' ;
+
+UPDATE config.metabib_field
+SET
+ xpath = $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='translated-nfi')]$$,
+ browse_sort_xpath = $$*[local-name() != "nonSort"]$$,
+ browse_xpath = NULL
+WHERE
+ field_class = 'title' AND name = 'translated' ;
+
+-- This keeps extra terms like "creator" out of browse headings.
+UPDATE config.metabib_field
+ SET browse_xpath = $$//*[local-name()='namePart']$$ -- vim */
+ WHERE
+ browse_field AND
+ browse_xpath IS NULL AND
+ field_class = 'author';
+
+INSERT INTO config.org_unit_setting_type (
+ name, label, grp, description, datatype
+) VALUES (
+ 'opac.browse.pager_shortcuts',
+ 'Paging shortcut links for OPAC Browse',
+ 'opac',
+ 'The characters in this string, in order, will be used as shortcut links for quick paging in the OPAC browse interface. Any sequence surrounded by asterisks will be taken as a whole label, not split into individual labels at the character level, but only the first character will serve as the basis of the search.',
+ 'string'
+);
+
+
+\qecho This is a browse-only reingest of your bib records. It may take a while.
+\qecho You may cancel now without losing the effect of the rest of the
+\qecho upgrade script, and arrange the reingest later.
+\qecho .
+SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE)
+ FROM biblio.record_entry;
+
+-- NOTE: very IDs are still correct for perms and event_def data at merge.
+
+SELECT evergreen.upgrade_deps_block_check('0817', :eg_version);
+
+-- copy status
+
+INSERT INTO config.copy_status
+ (id, name, holdable, opac_visible, copy_active, restrict_copy_delete)
+ VALUES (16, oils_i18n_gettext(16, 'Long Overdue', 'ccs', 'name'), 'f', 'f', 'f', 't');
+
+-- checkin override perm
+
+INSERT INTO permission.perm_list (id, code, description) VALUES (
+ 549, -- VERIFY
+ 'COPY_STATUS_LONGOVERDUE.override',
+ oils_i18n_gettext(
+ 549, -- VERIFY
+ 'Allows the user to check-in long-overdue items, prompting ' ||
+ 'long-overdue check-in processing',
+ 'ppl',
+ 'code'
+ )
+), (
+ 550, -- VERIFY
+ 'SET_CIRC_LONG_OVERDUE',
+ oils_i18n_gettext(
+ 550, -- VERIFY
+ 'Allows the user to mark a circulation as long-overdue',
+ 'ppl',
+ 'code'
+ )
+);
+
+-- billing types
+
+INSERT INTO config.billing_type (id, owner, name) VALUES
+ (10, 1, oils_i18n_gettext(
+ 10, 'Long-Overdue Materials', 'cbt', 'name')),
+ (11, 1, oils_i18n_gettext(
+ 11, 'Long-Overdue Materials Processing Fee', 'cbt', 'name'));
+
+-- org settings
+
+INSERT INTO config.org_unit_setting_type
+ (name, grp, datatype, label, description) VALUES
+(
+ 'circ.longoverdue_immediately_available',
+ 'circ', 'bool',
+ oils_i18n_gettext(
+ 'circ.longoverdue_immediately_available',
+ 'Long-Overdue Items Usable on Checkin',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.longoverdue_immediately_available',
+ 'Long-overdue items are usable on checkin instead of going "home" first',
+ 'coust',
+ 'description'
+ )
+), (
+ 'circ.longoverdue_materials_processing_fee',
+ 'finance', 'currency',
+ oils_i18n_gettext(
+ 'circ.longoverdue_materials_processing_fee',
+ 'Long-Overdue Materials Processing Fee',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.longoverdue_materials_processing_fee',
+ 'Long-Overdue Materials Processing Fee',
+ 'coust',
+ 'description'
+ )
+), (
+ 'circ.max_accept_return_of_longoverdue',
+ 'circ', 'interval',
+ oils_i18n_gettext(
+ 'circ.max_accept_return_of_longoverdue',
+ 'Long-Overdue Max Return Interval',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.max_accept_return_of_longoverdue',
+ 'Long-overdue check-in processing (voiding fees, re-instating ' ||
+ 'overdues, etc.) will not take place for items that have been ' ||
+ 'overdue for (or have last activity older than) this amount of time',
+ 'coust',
+ 'description'
+ )
+), (
+ 'circ.restore_overdue_on_longoverdue_return',
+ 'circ', 'bool',
+ oils_i18n_gettext(
+ 'circ.restore_overdue_on_longoverdue_return',
+ 'Restore Overdues on Long-Overdue Item Return',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.restore_overdue_on_longoverdue_return',
+ 'Restore Overdues on Long-Overdue Item Return',
+ 'coust',
+ 'description'
+ )
+), (
+ 'circ.void_longoverdue_on_checkin',
+ 'circ', 'bool',
+ oils_i18n_gettext(
+ 'circ.void_longoverdue_on_checkin',
+ 'Void Long-Overdue Item Billing When Returned',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.void_longoverdue_on_checkin',
+ 'Void Long-Overdue Item Billing When Returned',
+ 'coust',
+ 'description'
+ )
+), (
+ 'circ.void_longoverdue_proc_fee_on_checkin',
+ 'circ', 'bool',
+ oils_i18n_gettext(
+ 'circ.void_longoverdue_proc_fee_on_checkin',
+ 'Void Processing Fee on Long-Overdue Item Return',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.void_longoverdue_proc_fee_on_checkin',
+ 'Void Processing Fee on Long-Overdue Item Return',
+ 'coust',
+ 'description'
+ )
+), (
+ 'circ.void_overdue_on_longoverdue',
+ 'finance', 'bool',
+ oils_i18n_gettext(
+ 'circ.void_overdue_on_longoverdue',
+ 'Void Overdue Fines When Items are Marked Long-Overdue',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.void_overdue_on_longoverdue',
+ 'Void Overdue Fines When Items are Marked Long-Overdue',
+ 'coust',
+ 'description'
+ )
+), (
+ 'circ.longoverdue.xact_open_on_zero',
+ 'finance', 'bool',
+ oils_i18n_gettext(
+ 'circ.longoverdue.xact_open_on_zero',
+ 'Leave transaction open when long overdue balance equals zero',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.longoverdue.xact_open_on_zero',
+ 'Leave transaction open when long-overdue balance equals zero. ' ||
+ 'This leaves the lost copy on the patron record when it is paid',
+ 'coust',
+ 'description'
+ )
+), (
+ 'circ.longoverdue.use_last_activity_date_on_return',
+ 'circ', 'bool',
+ oils_i18n_gettext(
+ 'circ.longoverdue.use_last_activity_date_on_return',
+ 'Long-Overdue Check-In Interval Uses Last Activity Date',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.longoverdue.use_last_activity_date_on_return',
+ 'Use the long-overdue last-activity date instead of the due_date to ' ||
+ 'determine whether the item has been checked out too long to ' ||
+ 'perform long-overdue check-in processing. If set, the system ' ||
+ 'will first check the last payment time, followed by the last ' ||
+ 'billing time, followed by the due date. See also ' ||
+ 'circ.max_accept_return_of_longoverdue',
+ 'coust',
+ 'description'
+ )
+);
+
+-- mark long-overdue reactor
+
+INSERT INTO action_trigger.reactor (module, description) VALUES
+( 'MarkItemLongOverdue',
+ oils_i18n_gettext(
+ 'MarkItemLongOverdue',
+ 'Marks a circulating item as long-overdue and applies configured ' ||
+ 'penalties. Also creates events for the longoverdue.auto hook',
+ 'atreact',
+ 'description'
+ )
+);
+
+INSERT INTO action_trigger.validator (module, description) VALUES (
+ 'PatronNotInCollections',
+ 'Event is valid if the linked patron is not in collections processing ' ||
+ 'at the context org unit'
+);
+
+-- VERIFY ID
+INSERT INTO action_trigger.event_definition
+ (id, active, owner, name, hook, validator, reactor, delay, delay_field)
+VALUES (
+ 49, FALSE, 1, '6 Month Overdue Mark Long-Overdue',
+ 'checkout.due', 'PatronNotInCollections',
+ 'MarkItemLongOverdue', '6 months', 'due_date'
+);
+
+-- VERIFY ID
+INSERT INTO action_trigger.event_params (event_def, param, value) VALUES
+ (49, 'editor', '''1''');
+
+-- new longoverdue and longervdue.auto hook.
+
+INSERT INTO action_trigger.hook (key,core_type,description) VALUES (
+ 'longoverdue',
+ 'circ',
+ 'Circulating Item marked long-overdue'
+);
+
+INSERT INTO action_trigger.hook (key,core_type,description) VALUES (
+ 'longoverdue.auto',
+ 'circ',
+ 'Circulating Item automatically marked long-overdue'
+);
+
+-- sample longoverdue.auto notification reactor
+
+-- VERIFY ID
+INSERT INTO action_trigger.event_definition
+ (id, active, owner, name, hook, validator, reactor, group_field, template)
+ VALUES (
+ 50, FALSE, 1, '6 Month Long Overdue Notice',
+ 'longoverdue.auto', 'NOOP_True', 'SendEmail', 'usr',
+$$
+[%- USE date -%]
+[%- user = target.0.usr -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- params.sender_email || default_sender %]
+Subject: Overdue Items Marked Long Overdue
+
+Dear [% user.family_name %], [% user.first_given_name %]
+The following items are 6 months overdue and have been marked Long Overdue.
+
+[% FOR circ IN target %]
+ [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
+ Title: [% copy_details.title %], by [% copy_details.author %]
+ Call Number: [% circ.target_copy.call_number.label %]
+ Shelving Location: [% circ.target_copy.location.name %]
+ Barcode: [% circ.target_copy.barcode %]
+ Due: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]
+ Item Cost: [% helpers.get_copy_price(circ.target_copy) %]
+ Total Owed For Transaction: [% circ.billable_transaction.summary.balance_owed %]
+ Library: [% circ.circ_lib.name %]
+
+[% END %]
+$$);
+
+-- ENV for above
+
+-- VERIFY IDs
+INSERT INTO action_trigger.environment (event_def, path) VALUES
+ (50, 'target_copy.call_number'),
+ (50, 'usr'),
+ (50, 'billable_transaction.summary'),
+ (50, 'circ_lib.billing_address'),
+ (50, 'target_copy.location');
+
+
+--ROLLBACK;
+
+SELECT evergreen.upgrade_deps_block_check('0822', :eg_version);
+
+ALTER TABLE action.hold_request
+ ADD COLUMN behind_desk BOOLEAN NOT NULL DEFAULT FALSE;
+
+-- The value on the hold is the new arbiter of whether a
+-- hold should be held behind the desk and reported as such
+-- Update existing holds that would in the current regime
+-- be considered behind-the-desk holds to use the new column
+
+UPDATE action.hold_request ahr
+ SET behind_desk = TRUE
+ FROM actor.usr_setting aus
+ WHERE
+ ahr.cancel_time IS NULL AND
+ ahr.fulfillment_time IS NULL AND
+ aus.usr = ahr.usr AND
+ aus.name = 'circ.holds_behind_desk' AND
+ aus.value = 'true' AND
+ EXISTS (
+ SELECT 1
+ FROM actor.org_unit_ancestor_setting(
+ 'circ.holds.behind_desk_pickup_supported',
+ ahr.pickup_lib
+ )
+ WHERE value = 'true'
+ );
+
+
+
+SELECT evergreen.upgrade_deps_block_check('0823', :eg_version);
+
+-- Track the requesting user
+ALTER TABLE staging.user_stage
+ ADD COLUMN requesting_usr INTEGER
+ REFERENCES actor.usr(id) ON DELETE SET NULL;
+
+-- add county column to staged address tables and
+-- drop state requirement to match actor.usr_address
+ALTER TABLE staging.mailing_address_stage
+ ADD COLUMN county TEXT,
+ ALTER COLUMN state DROP DEFAULT,
+ ALTER COLUMN state DROP NOT NULL;
+
+ALTER TABLE staging.billing_address_stage
+ ADD COLUMN county TEXT,
+ ALTER COLUMN state DROP DEFAULT,
+ ALTER COLUMN state DROP NOT NULL;
+
+-- stored procedure for deleting expired pending patrons
+CREATE OR REPLACE FUNCTION staging.purge_pending_users() RETURNS VOID AS $$
+DECLARE
+ org_id INT;
+ intvl TEXT;
+BEGIN
+ FOR org_id IN SELECT DISTINCT(home_ou) FROM staging.user_stage LOOP
+
+ SELECT INTO intvl value FROM
+ actor.org_unit_ancestor_setting(
+ 'opac.pending_user_expire_interval', org_id);
+
+ CONTINUE WHEN intvl IS NULL OR intvl ILIKE 'null';
+
+ -- de-JSON-ify the string
+ SELECT INTO intvl TRIM(BOTH '"' FROM intvl);
+
+ DELETE FROM staging.user_stage
+ WHERE home_ou = org_id AND row_date + intvl::INTERVAL < NOW();
+
+ END LOOP;
+END;
+$$ LANGUAGE PLPGSQL;
+
+
+INSERT INTO config.org_unit_setting_type
+ (name, grp, datatype, label, description)
+VALUES (
+ 'opac.allow_pending_user',
+ 'opac',
+ 'bool',
+ oils_i18n_gettext(
+ 'opac.allow_pending_user',
+ 'Allow Patron Self-Registration',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'opac.allow_pending_user',
+ 'Allow patrons to self-register, creating pending user accounts',
+ 'coust',
+ 'description'
+ )
+), (
+ 'opac.pending_user_expire_interval',
+ 'opac',
+ 'interval',
+ oils_i18n_gettext(
+ 'opac.pending_user_expire_interval',
+ 'Patron Self-Reg. Expire Interval',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'opac.pending_user_expire_interval',
+ 'If set, this is the amount of time a pending user account will ' ||
+ 'be allowed to sit in the database. After this time, the pending ' ||
+ 'user information will be purged',
+ 'coust',
+ 'description'
+ )
+), (
+ 'ui.patron.edit.aua.county.show',
+ 'gui',
+ 'bool',
+ oils_i18n_gettext(
+ 'ui.patron.edit.aua.county.require',
+ 'Show county field on patron registration',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ui.patron.edit.aua.county.require',
+ 'The county field will be shown on the patron registration screen',
+ 'coust',
+ 'description'
+ )
+);
+
+
+
+SELECT evergreen.upgrade_deps_block_check('0824', :eg_version);
+
+INSERT INTO config.org_unit_setting_type
+ (grp, name, label, description, datatype, fm_class)
+VALUES (
+ 'vandelay',
+ 'vandelay.item.barcode.auto',
+ oils_i18n_gettext(
+ 'vandelay.item.barcode.auto',
+ 'Vandelay Generate Default Barcodes',
+ 'coust', 'label'),
+ oils_i18n_gettext(
+ 'vandelay.item.barcode.auto',
+ 'Auto-generate deault item barcodes when no item barcode is present',
+ 'coust', 'label'),
+ 'bool',
+ NULL
+), (
+ 'vandelay',
+ 'vandelay.item.barcode.prefix',
+ oils_i18n_gettext(
+ 'vandelay.item.barcode.prefix',
+ 'Vandelay Default Barcode Prefix',
+ 'coust', 'label'),
+ oils_i18n_gettext(
+ 'vandelay.item.barcode.prefix',
+ 'Apply this prefix to any auto-generated item barcodes',
+ 'coust', 'label'),
+ 'string',
+ NULL
+), (
+ 'vandelay',
+ 'vandelay.item.call_number.auto',
+ oils_i18n_gettext(
+ 'vandelay.item.call_number.auto',
+ 'Vandelay Generate Default Call Numbers',
+ 'coust', 'label'),
+ oils_i18n_gettext(
+ 'vandelay.item.call_number.auto',
+ 'Auto-generate default item call numbers when no item call number is present',
+ 'coust', 'label'),
+ 'bool',
+ NULL
+), (
+ 'vandelay',
+ 'vandelay.item.call_number.prefix',
+ oils_i18n_gettext(
+ 'vandelay.item.call_number.prefix',
+ 'Vandelay Default Call Number Prefix',
+ 'coust', 'label'),
+ oils_i18n_gettext(
+ 'vandelay.item.call_number.prefix',
+ 'Apply this prefix to any auto-generated item call numbers',
+ 'coust', 'label'),
+ 'string',
+ NULL
+), (
+ 'vandelay',
+ 'vandelay.item.copy_location.default',
+ oils_i18n_gettext(
+ 'vandelay.item.copy_location.default',
+ 'Vandelay Default Copy Location',
+ 'coust', 'label'),
+ oils_i18n_gettext(
+ 'vandelay.item.copy_location.default',
+ 'Default copy location value for imported items',
+ 'coust', 'label'),
+ 'link',
+ 'acpl'
+), (
+ 'vandelay',
+ 'vandelay.item.circ_modifier.default',
+ oils_i18n_gettext(
+ 'vandelay.item.circ_modifier.default',
+ 'Vandelay Default Circulation Modifier',
+ 'coust', 'label'),
+ oils_i18n_gettext(
+ 'vandelay.item.circ_modifier.default',
+ 'Default circulation modifier value for imported items',
+ 'coust', 'label'),
+ 'link',
+ 'ccm'
+);
+
+
+CREATE OR REPLACE FUNCTION vandelay.ingest_items ( import_id BIGINT, attr_def_id BIGINT ) RETURNS SETOF vandelay.import_item AS $$
+DECLARE
+
+ owning_lib TEXT;
+ circ_lib TEXT;
+ call_number TEXT;
+ copy_number TEXT;
+ status TEXT;
+ location TEXT;
+ circulate TEXT;
+ deposit TEXT;
+ deposit_amount TEXT;
+ ref TEXT;
+ holdable TEXT;
+ price TEXT;
+ barcode TEXT;
+ circ_modifier TEXT;
+ circ_as_type TEXT;
+ alert_message TEXT;
+ opac_visible TEXT;
+ pub_note TEXT;
+ priv_note TEXT;
+ internal_id TEXT;
+
+ attr_def RECORD;
+ tmp_attr_set RECORD;
+ attr_set vandelay.import_item%ROWTYPE;
+
+ xpath TEXT;
+ tmp_str TEXT;
+
+BEGIN
+
+ SELECT * INTO attr_def FROM vandelay.import_item_attr_definition WHERE id = attr_def_id;
+
+ IF FOUND THEN
+
+ attr_set.definition := attr_def.id;
+
+ -- Build the combined XPath
+
+ owning_lib :=
+ CASE
+ WHEN attr_def.owning_lib IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.owning_lib ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.owning_lib || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.owning_lib
+ END;
+
+ circ_lib :=
+ CASE
+ WHEN attr_def.circ_lib IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.circ_lib ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.circ_lib || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.circ_lib
+ END;
+
+ call_number :=
+ CASE
+ WHEN attr_def.call_number IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.call_number ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.call_number || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.call_number
+ END;
+
+ copy_number :=
+ CASE
+ WHEN attr_def.copy_number IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.copy_number ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.copy_number || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.copy_number
+ END;
+
+ status :=
+ CASE
+ WHEN attr_def.status IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.status ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.status || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.status
+ END;
+
+ location :=
+ CASE
+ WHEN attr_def.location IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.location ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.location || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.location
+ END;
+
+ circulate :=
+ CASE
+ WHEN attr_def.circulate IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.circulate ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.circulate || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.circulate
+ END;
+
+ deposit :=
+ CASE
+ WHEN attr_def.deposit IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.deposit ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.deposit || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.deposit
+ END;
+
+ deposit_amount :=
+ CASE
+ WHEN attr_def.deposit_amount IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.deposit_amount ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.deposit_amount || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.deposit_amount
+ END;
+
+ ref :=
+ CASE
+ WHEN attr_def.ref IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.ref ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.ref || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.ref
+ END;
+
+ holdable :=
+ CASE
+ WHEN attr_def.holdable IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.holdable ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.holdable || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.holdable
+ END;
+
+ price :=
+ CASE
+ WHEN attr_def.price IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.price ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.price || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.price
+ END;
+
+ barcode :=
+ CASE
+ WHEN attr_def.barcode IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.barcode ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.barcode || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.barcode
+ END;
+
+ circ_modifier :=
+ CASE
+ WHEN attr_def.circ_modifier IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.circ_modifier ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.circ_modifier || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.circ_modifier
+ END;
+
+ circ_as_type :=
+ CASE
+ WHEN attr_def.circ_as_type IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.circ_as_type ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.circ_as_type || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.circ_as_type
+ END;
+
+ alert_message :=
+ CASE
+ WHEN attr_def.alert_message IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.alert_message ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.alert_message || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.alert_message
+ END;
+
+ opac_visible :=
+ CASE
+ WHEN attr_def.opac_visible IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.opac_visible ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.opac_visible || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.opac_visible
+ END;
+
+ pub_note :=
+ CASE
+ WHEN attr_def.pub_note IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.pub_note ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.pub_note || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.pub_note
+ END;
+ priv_note :=
+ CASE
+ WHEN attr_def.priv_note IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.priv_note ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.priv_note || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.priv_note
+ END;
+
+ internal_id :=
+ CASE
+ WHEN attr_def.internal_id IS NULL THEN 'null()'
+ WHEN LENGTH( attr_def.internal_id ) = 1 THEN '//*[@tag="' || attr_def.tag || '"]/*[@code="' || attr_def.internal_id || '"]'
+ ELSE '//*[@tag="' || attr_def.tag || '"]/*' || attr_def.internal_id
+ END;
+
+
+
+ xpath :=
+ owning_lib || '|' ||
+ circ_lib || '|' ||
+ call_number || '|' ||
+ copy_number || '|' ||
+ status || '|' ||
+ location || '|' ||
+ circulate || '|' ||
+ deposit || '|' ||
+ deposit_amount || '|' ||
+ ref || '|' ||
+ holdable || '|' ||
+ price || '|' ||
+ barcode || '|' ||
+ circ_modifier || '|' ||
+ circ_as_type || '|' ||
+ alert_message || '|' ||
+ pub_note || '|' ||
+ priv_note || '|' ||
+ internal_id || '|' ||
+ opac_visible;
+
+ FOR tmp_attr_set IN
+ SELECT *
+ FROM oils_xpath_table( 'id', 'marc', 'vandelay.queued_bib_record', xpath, 'id = ' || import_id )
+ AS t( id INT, ol TEXT, clib TEXT, cn TEXT, cnum TEXT, cs TEXT, cl TEXT, circ TEXT,
+ dep TEXT, dep_amount TEXT, r TEXT, hold TEXT, pr TEXT, bc TEXT, circ_mod TEXT,
+ circ_as TEXT, amessage TEXT, note TEXT, pnote TEXT, internal_id TEXT, opac_vis TEXT )
+ LOOP
+
+ attr_set.import_error := NULL;
+ attr_set.error_detail := NULL;
+ attr_set.deposit_amount := NULL;
+ attr_set.copy_number := NULL;
+ attr_set.price := NULL;
+ attr_set.circ_modifier := NULL;
+ attr_set.location := NULL;
+ attr_set.barcode := NULL;
+ attr_set.call_number := NULL;
+
+ IF tmp_attr_set.pr != '' THEN
+ tmp_str = REGEXP_REPLACE(tmp_attr_set.pr, E'[^0-9\\.]', '', 'g');
+ IF tmp_str = '' THEN
+ attr_set.import_error := 'import.item.invalid.price';
+ attr_set.error_detail := tmp_attr_set.pr; -- original value
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ attr_set.price := tmp_str::NUMERIC(8,2);
+ END IF;
+
+ IF tmp_attr_set.dep_amount != '' THEN
+ tmp_str = REGEXP_REPLACE(tmp_attr_set.dep_amount, E'[^0-9\\.]', '', 'g');
+ IF tmp_str = '' THEN
+ attr_set.import_error := 'import.item.invalid.deposit_amount';
+ attr_set.error_detail := tmp_attr_set.dep_amount;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ attr_set.deposit_amount := tmp_str::NUMERIC(8,2);
+ END IF;
+
+ IF tmp_attr_set.cnum != '' THEN
+ tmp_str = REGEXP_REPLACE(tmp_attr_set.cnum, E'[^0-9]', '', 'g');
+ IF tmp_str = '' THEN
+ attr_set.import_error := 'import.item.invalid.copy_number';
+ attr_set.error_detail := tmp_attr_set.cnum;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ attr_set.copy_number := tmp_str::INT;
+ END IF;
+
+ IF tmp_attr_set.ol != '' THEN
+ SELECT id INTO attr_set.owning_lib FROM actor.org_unit WHERE shortname = UPPER(tmp_attr_set.ol); -- INT
+ IF NOT FOUND THEN
+ attr_set.import_error := 'import.item.invalid.owning_lib';
+ attr_set.error_detail := tmp_attr_set.ol;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ END IF;
+
+ IF tmp_attr_set.clib != '' THEN
+ SELECT id INTO attr_set.circ_lib FROM actor.org_unit WHERE shortname = UPPER(tmp_attr_set.clib); -- INT
+ IF NOT FOUND THEN
+ attr_set.import_error := 'import.item.invalid.circ_lib';
+ attr_set.error_detail := tmp_attr_set.clib;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ END IF;
+
+ IF tmp_attr_set.cs != '' THEN
+ SELECT id INTO attr_set.status FROM config.copy_status WHERE LOWER(name) = LOWER(tmp_attr_set.cs); -- INT
+ IF NOT FOUND THEN
+ attr_set.import_error := 'import.item.invalid.status';
+ attr_set.error_detail := tmp_attr_set.cs;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ END IF;
+
+ IF COALESCE(tmp_attr_set.circ_mod, '') = '' THEN
+
+ -- no circ mod defined, see if we should apply a default
+ SELECT INTO attr_set.circ_modifier TRIM(BOTH '"' FROM value)
+ FROM actor.org_unit_ancestor_setting(
+ 'vandelay.item.circ_modifier.default',
+ attr_set.owning_lib
+ );
+
+ -- make sure the value from the org setting is still valid
+ PERFORM 1 FROM config.circ_modifier WHERE code = attr_set.circ_modifier;
+ IF NOT FOUND THEN
+ attr_set.import_error := 'import.item.invalid.circ_modifier';
+ attr_set.error_detail := tmp_attr_set.circ_mod;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+
+ ELSE
+
+ SELECT code INTO attr_set.circ_modifier FROM config.circ_modifier WHERE code = tmp_attr_set.circ_mod;
+ IF NOT FOUND THEN
+ attr_set.import_error := 'import.item.invalid.circ_modifier';
+ attr_set.error_detail := tmp_attr_set.circ_mod;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ END IF;
+
+ IF tmp_attr_set.circ_as != '' THEN
+ SELECT code INTO attr_set.circ_as_type FROM config.coded_value_map WHERE ctype = 'item_type' AND code = tmp_attr_set.circ_as;
+ IF NOT FOUND THEN
+ attr_set.import_error := 'import.item.invalid.circ_as_type';
+ attr_set.error_detail := tmp_attr_set.circ_as;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ END IF;
+
+ IF COALESCE(tmp_attr_set.cl, '') = '' THEN
+ -- no location specified, see if we should apply a default
+
+ SELECT INTO attr_set.location TRIM(BOTH '"' FROM value)
+ FROM actor.org_unit_ancestor_setting(
+ 'vandelay.item.copy_location.default',
+ attr_set.owning_lib
+ );
+
+ -- make sure the value from the org setting is still valid
+ PERFORM 1 FROM asset.copy_location WHERE id = attr_set.location;
+ IF NOT FOUND THEN
+ attr_set.import_error := 'import.item.invalid.location';
+ attr_set.error_detail := tmp_attr_set.cs;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ ELSE
+
+ -- search up the org unit tree for a matching copy location
+ WITH RECURSIVE anscestor_depth AS (
+ SELECT ou.id,
+ out.depth AS depth,
+ ou.parent_ou
+ FROM actor.org_unit ou
+ JOIN actor.org_unit_type out ON (out.id = ou.ou_type)
+ WHERE ou.id = COALESCE(attr_set.owning_lib, attr_set.circ_lib)
+ UNION ALL
+ SELECT ou.id,
+ out.depth,
+ ou.parent_ou
+ FROM actor.org_unit ou
+ JOIN actor.org_unit_type out ON (out.id = ou.ou_type)
+ JOIN anscestor_depth ot ON (ot.parent_ou = ou.id)
+ ) SELECT cpl.id INTO attr_set.location
+ FROM anscestor_depth a
+ JOIN asset.copy_location cpl ON (cpl.owning_lib = a.id)
+ WHERE LOWER(cpl.name) = LOWER(tmp_attr_set.cl)
+ ORDER BY a.depth DESC
+ LIMIT 1;
+
+ IF NOT FOUND THEN
+ attr_set.import_error := 'import.item.invalid.location';
+ attr_set.error_detail := tmp_attr_set.cs;
+ RETURN NEXT attr_set; CONTINUE;
+ END IF;
+ END IF;
+
+ attr_set.circulate :=
+ LOWER( SUBSTRING( tmp_attr_set.circ, 1, 1)) IN ('t','y','1')
+ OR LOWER(tmp_attr_set.circ) = 'circulating'; -- BOOL
+
+ attr_set.deposit :=
+ LOWER( SUBSTRING( tmp_attr_set.dep, 1, 1 ) ) IN ('t','y','1')
+ OR LOWER(tmp_attr_set.dep) = 'deposit'; -- BOOL
+
+ attr_set.holdable :=
+ LOWER( SUBSTRING( tmp_attr_set.hold, 1, 1 ) ) IN ('t','y','1')
+ OR LOWER(tmp_attr_set.hold) = 'holdable'; -- BOOL
+
+ attr_set.opac_visible :=
+ LOWER( SUBSTRING( tmp_attr_set.opac_vis, 1, 1 ) ) IN ('t','y','1')
+ OR LOWER(tmp_attr_set.opac_vis) = 'visible'; -- BOOL
+
+ attr_set.ref :=
+ LOWER( SUBSTRING( tmp_attr_set.r, 1, 1 ) ) IN ('t','y','1')
+ OR LOWER(tmp_attr_set.r) = 'reference'; -- BOOL
+
+ attr_set.call_number := tmp_attr_set.cn; -- TEXT
+ attr_set.barcode := tmp_attr_set.bc; -- TEXT,
+ attr_set.alert_message := tmp_attr_set.amessage; -- TEXT,
+ attr_set.pub_note := tmp_attr_set.note; -- TEXT,
+ attr_set.priv_note := tmp_attr_set.pnote; -- TEXT,
+ attr_set.alert_message := tmp_attr_set.amessage; -- TEXT,
+ attr_set.internal_id := tmp_attr_set.internal_id::BIGINT;
+
+ RETURN NEXT attr_set;
+
+ END LOOP;
+
+ END IF;
+
+ RETURN;
+
+END;
+$$ LANGUAGE PLPGSQL;
+
+
+
+SELECT evergreen.upgrade_deps_block_check('0826', :eg_version);
+
+INSERT INTO permission.perm_list ( id, code, description ) VALUES (
+ 551,
+ 'ADMIN_SERVER_ADDON_FOR_WORKSTATION',
+ oils_i18n_gettext(
+ 551,
+ 'Allows a user to specify which Server Add-ons get invoked at the current workstation',
+ 'ppl',
+ 'description'
+ )
+);
+
+
+
+SELECT evergreen.upgrade_deps_block_check('0827', :eg_version);
+
+ALTER TABLE action_trigger.event_definition ADD COLUMN repeat_delay INTERVAL;
+
+
+
+SELECT evergreen.upgrade_deps_block_check('0828', :eg_version);
+
+INSERT into config.org_unit_setting_type
+ (name, grp, label, description, datatype)
+VALUES (
+ 'opac.holds.org_unit_not_pickup_lib',
+ 'opac',
+ oils_i18n_gettext('opac.holds.org_unit_not_pickup_lib',
+ 'OPAC: Org Unit is not a hold pickup library',
+ 'coust', 'label'),
+ oils_i18n_gettext('opac.holds.org_unit_not_pickup_lib',
+ 'If set, this org unit will not be offered to the patron as an '||
+ 'option for a hold pickup location. This setting has no affect '||
+ 'on searching or hold targeting',
+ 'coust', 'description'),
+ 'bool'
+);
+
+
+--
+-- Adds a setting for selecting the number of items per page of a my list.
+--
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0829', :eg_version);
+
+INSERT INTO config.usr_setting_type (name,opac_visible,label,description,datatype)
+ VALUES (
+ 'opac.list_items_per_page',
+ TRUE,
+ oils_i18n_gettext(
+ 'opac.list_items_per_page',
+ 'List Items per Page',
+ 'cust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'opac.list_items_per_page',
+ 'A number designating the amount of list items displayed per page of a selected list.',
+ 'cust',
+ 'description'
+ ),
+ 'string'
+ );
+
+--
+-- Adds a setting for selecting the number of lists per page for my list.
+--
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0830', :eg_version);
+
+INSERT INTO config.usr_setting_type (name,opac_visible,label,description,datatype)
+ VALUES (
+ 'opac.lists_per_page',
+ TRUE,
+ oils_i18n_gettext(
+ 'opac.lists_per_page',
+ 'Lists per Page',
+ 'cust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'opac.lists_per_page',
+ 'A number designating the amount of lists displayed per page.',
+ 'cust',
+ 'description'
+ ),
+ 'string'
+ );
+
+
+SELECT evergreen.upgrade_deps_block_check('0831', :eg_version);
+
+-- TODO: check for penalty ID collision before master merge; affects
+-- config.standing_penalty and actor.calculate_system_penalties
+
+INSERT INTO config.standing_penalty
+ (id, name, label, block_list, staff_alert)
+VALUES (
+ 35,
+ 'PATRON_EXCEEDS_LONGOVERDUE_COUNT',
+ oils_i18n_gettext(
+ 35,
+ 'Patron Exceeds Max Long-Overdue Threshold',
+ 'csp',
+ 'label'
+ ),
+ 'CIRC|FULFILL|HOLD|CAPTURE|RENEW',
+ TRUE
+);
+
+
+CREATE OR REPLACE FUNCTION actor.calculate_system_penalties( match_user INT, context_org INT ) RETURNS SETOF actor.usr_standing_penalty AS $func$
+DECLARE
+ user_object actor.usr%ROWTYPE;
+ new_sp_row actor.usr_standing_penalty%ROWTYPE;
+ existing_sp_row actor.usr_standing_penalty%ROWTYPE;
+ collections_fines permission.grp_penalty_threshold%ROWTYPE;
+ max_fines permission.grp_penalty_threshold%ROWTYPE;
+ max_overdue permission.grp_penalty_threshold%ROWTYPE;
+ max_items_out permission.grp_penalty_threshold%ROWTYPE;
+ max_lost permission.grp_penalty_threshold%ROWTYPE;
+ max_longoverdue permission.grp_penalty_threshold%ROWTYPE;
+ tmp_grp INT;
+ items_overdue INT;
+ items_out INT;
+ items_lost INT;
+ items_longoverdue INT;
+ context_org_list INT[];
+ current_fines NUMERIC(8,2) := 0.0;
+ tmp_fines NUMERIC(8,2);
+ tmp_groc RECORD;
+ tmp_circ RECORD;
+ tmp_org actor.org_unit%ROWTYPE;
+ tmp_penalty config.standing_penalty%ROWTYPE;
+ tmp_depth INTEGER;
+BEGIN
+ SELECT INTO user_object * FROM actor.usr WHERE id = match_user;
+
+ -- Max fines
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has a high fine balance
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+ SELECT * INTO max_fines FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 1 AND org_unit = tmp_org.id;
+
+ IF max_fines.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL THEN
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_fines.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 1;
+
+ SELECT INTO context_org_list ARRAY_ACCUM(id) FROM actor.org_unit_full_path( max_fines.org_unit );
+
+ SELECT SUM(f.balance_owed) INTO current_fines
+ FROM money.materialized_billable_xact_summary f
+ JOIN (
+ SELECT r.id
+ FROM booking.reservation r
+ WHERE r.usr = match_user
+ AND r.pickup_lib IN (SELECT * FROM unnest(context_org_list))
+ AND xact_finish IS NULL
+ UNION ALL
+ SELECT g.id
+ FROM money.grocery g
+ WHERE g.usr = match_user
+ AND g.billing_location IN (SELECT * FROM unnest(context_org_list))
+ AND xact_finish IS NULL
+ UNION ALL
+ SELECT circ.id
+ FROM action.circulation circ
+ WHERE circ.usr = match_user
+ AND circ.circ_lib IN (SELECT * FROM unnest(context_org_list))
+ AND xact_finish IS NULL ) l USING (id);
+
+ IF current_fines >= max_fines.threshold THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_fines.org_unit;
+ new_sp_row.standing_penalty := 1;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+ -- Start over for max overdue
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has too many overdue items
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+
+ SELECT * INTO max_overdue FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 2 AND org_unit = tmp_org.id;
+
+ IF max_overdue.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_overdue.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_overdue.threshold IS NOT NULL THEN
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_overdue.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 2;
+
+ SELECT INTO items_overdue COUNT(*)
+ FROM action.circulation circ
+ JOIN actor.org_unit_full_path( max_overdue.org_unit ) fp ON (circ.circ_lib = fp.id)
+ WHERE circ.usr = match_user
+ AND circ.checkin_time IS NULL
+ AND circ.due_date < NOW()
+ AND (circ.stop_fines = 'MAXFINES' OR circ.stop_fines IS NULL);
+
+ IF items_overdue >= max_overdue.threshold::INT THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_overdue.org_unit;
+ new_sp_row.standing_penalty := 2;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+ -- Start over for max out
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has too many checked out items
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+ SELECT * INTO max_items_out FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 3 AND org_unit = tmp_org.id;
+
+ IF max_items_out.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_items_out.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+
+ -- Fail if the user has too many items checked out
+ IF max_items_out.threshold IS NOT NULL THEN
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_items_out.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 3;
+
+ SELECT INTO items_out COUNT(*)
+ FROM action.circulation circ
+ JOIN actor.org_unit_full_path( max_items_out.org_unit ) fp ON (circ.circ_lib = fp.id)
+ WHERE circ.usr = match_user
+ AND circ.checkin_time IS NULL
+ AND (circ.stop_fines IN (
+ SELECT 'MAXFINES'::TEXT
+ UNION ALL
+ SELECT 'LONGOVERDUE'::TEXT
+ UNION ALL
+ SELECT 'LOST'::TEXT
+ WHERE 'true' ILIKE
+ (
+ SELECT CASE
+ WHEN (SELECT value FROM actor.org_unit_ancestor_setting('circ.tally_lost', circ.circ_lib)) ILIKE 'true' THEN 'true'
+ ELSE 'false'
+ END
+ )
+ UNION ALL
+ SELECT 'CLAIMSRETURNED'::TEXT
+ WHERE 'false' ILIKE
+ (
+ SELECT CASE
+ WHEN (SELECT value FROM actor.org_unit_ancestor_setting('circ.do_not_tally_claims_returned', circ.circ_lib)) ILIKE 'true' THEN 'true'
+ ELSE 'false'
+ END
+ )
+ ) OR circ.stop_fines IS NULL)
+ AND xact_finish IS NULL;
+
+ IF items_out >= max_items_out.threshold::INT THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_items_out.org_unit;
+ new_sp_row.standing_penalty := 3;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+ -- Start over for max lost
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has too many lost items
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+
+ SELECT * INTO max_lost FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 5 AND org_unit = tmp_org.id;
+
+ IF max_lost.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_lost.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_lost.threshold IS NOT NULL THEN
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_lost.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 5;
+
+ SELECT INTO items_lost COUNT(*)
+ FROM action.circulation circ
+ JOIN actor.org_unit_full_path( max_lost.org_unit ) fp ON (circ.circ_lib = fp.id)
+ WHERE circ.usr = match_user
+ AND circ.checkin_time IS NULL
+ AND (circ.stop_fines = 'LOST')
+ AND xact_finish IS NULL;
+
+ IF items_lost >= max_lost.threshold::INT AND 0 < max_lost.threshold::INT THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_lost.org_unit;
+ new_sp_row.standing_penalty := 5;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+ -- Start over for max longoverdue
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has too many longoverdue items
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+
+ SELECT * INTO max_longoverdue
+ FROM permission.grp_penalty_threshold
+ WHERE grp = tmp_grp AND
+ penalty = 35 AND
+ org_unit = tmp_org.id;
+
+ IF max_longoverdue.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp
+ FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_longoverdue.threshold IS NOT NULL
+ OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_longoverdue.threshold IS NOT NULL THEN
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_longoverdue.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 35;
+
+ SELECT INTO items_longoverdue COUNT(*)
+ FROM action.circulation circ
+ JOIN actor.org_unit_full_path( max_longoverdue.org_unit ) fp
+ ON (circ.circ_lib = fp.id)
+ WHERE circ.usr = match_user
+ AND circ.checkin_time IS NULL
+ AND (circ.stop_fines = 'LONGOVERDUE')
+ AND xact_finish IS NULL;
+
+ IF items_longoverdue >= max_longoverdue.threshold::INT
+ AND 0 < max_longoverdue.threshold::INT THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_longoverdue.org_unit;
+ new_sp_row.standing_penalty := 35;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+
+ -- Start over for collections warning
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Fail if the user has a collections-level fine balance
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+ SELECT * INTO max_fines FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 4 AND org_unit = tmp_org.id;
+
+ IF max_fines.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL THEN
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_fines.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 4;
+
+ SELECT INTO context_org_list ARRAY_ACCUM(id) FROM actor.org_unit_full_path( max_fines.org_unit );
+
+ SELECT SUM(f.balance_owed) INTO current_fines
+ FROM money.materialized_billable_xact_summary f
+ JOIN (
+ SELECT r.id
+ FROM booking.reservation r
+ WHERE r.usr = match_user
+ AND r.pickup_lib IN (SELECT * FROM unnest(context_org_list))
+ AND r.xact_finish IS NULL
+ UNION ALL
+ SELECT g.id
+ FROM money.grocery g
+ WHERE g.usr = match_user
+ AND g.billing_location IN (SELECT * FROM unnest(context_org_list))
+ AND g.xact_finish IS NULL
+ UNION ALL
+ SELECT circ.id
+ FROM action.circulation circ
+ WHERE circ.usr = match_user
+ AND circ.circ_lib IN (SELECT * FROM unnest(context_org_list))
+ AND circ.xact_finish IS NULL ) l USING (id);
+
+ IF current_fines >= max_fines.threshold THEN
+ new_sp_row.usr := match_user;
+ new_sp_row.org_unit := max_fines.org_unit;
+ new_sp_row.standing_penalty := 4;
+ RETURN NEXT new_sp_row;
+ END IF;
+ END IF;
+
+ -- Start over for in collections
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+ -- Remove the in-collections penalty if the user has paid down enough
+ -- This penalty is different, because this code is not responsible for creating
+ -- new in-collections penalties, only for removing them
+ LOOP
+ tmp_grp := user_object.profile;
+ LOOP
+ SELECT * INTO max_fines FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 30 AND org_unit = tmp_org.id;
+
+ IF max_fines.threshold IS NULL THEN
+ SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+ ELSE
+ EXIT;
+ END IF;
+
+ IF tmp_grp IS NULL THEN
+ EXIT;
+ END IF;
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+ END LOOP;
+
+ IF max_fines.threshold IS NOT NULL THEN
+
+ SELECT INTO context_org_list ARRAY_ACCUM(id) FROM actor.org_unit_full_path( max_fines.org_unit );
+
+ -- first, see if the user had paid down to the threshold
+ SELECT SUM(f.balance_owed) INTO current_fines
+ FROM money.materialized_billable_xact_summary f
+ JOIN (
+ SELECT r.id
+ FROM booking.reservation r
+ WHERE r.usr = match_user
+ AND r.pickup_lib IN (SELECT * FROM unnest(context_org_list))
+ AND r.xact_finish IS NULL
+ UNION ALL
+ SELECT g.id
+ FROM money.grocery g
+ WHERE g.usr = match_user
+ AND g.billing_location IN (SELECT * FROM unnest(context_org_list))
+ AND g.xact_finish IS NULL
+ UNION ALL
+ SELECT circ.id
+ FROM action.circulation circ
+ WHERE circ.usr = match_user
+ AND circ.circ_lib IN (SELECT * FROM unnest(context_org_list))
+ AND circ.xact_finish IS NULL ) l USING (id);
+
+ IF current_fines IS NULL OR current_fines <= max_fines.threshold THEN
+ -- patron has paid down enough
+
+ SELECT INTO tmp_penalty * FROM config.standing_penalty WHERE id = 30;
+
+ IF tmp_penalty.org_depth IS NOT NULL THEN
+
+ -- since this code is not responsible for applying the penalty, it can't
+ -- guarantee the current context org will match the org at which the penalty
+ --- was applied. search up the org tree until we hit the configured penalty depth
+ SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+ SELECT INTO tmp_depth depth FROM actor.org_unit_type WHERE id = tmp_org.ou_type;
+
+ WHILE tmp_depth >= tmp_penalty.org_depth LOOP
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = tmp_org.id
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 30;
+
+ IF tmp_org.parent_ou IS NULL THEN
+ EXIT;
+ END IF;
+
+ SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+ SELECT INTO tmp_depth depth FROM actor.org_unit_type WHERE id = tmp_org.ou_type;
+ END LOOP;
+
+ ELSE
+
+ -- no penalty depth is defined, look for exact matches
+
+ RETURN QUERY
+ SELECT *
+ FROM actor.usr_standing_penalty
+ WHERE usr = match_user
+ AND org_unit = max_fines.org_unit
+ AND (stop_date IS NULL or stop_date > NOW())
+ AND standing_penalty = 30;
+ END IF;
+
+ END IF;
+
+ END IF;
+
+ RETURN;
+END;
+$func$ LANGUAGE plpgsql;
+
+
+
+SELECT evergreen.upgrade_deps_block_check('0832', :eg_version);
+
+ALTER TABLE serial.subscription_note
+ ADD COLUMN alert BOOL NOT NULL DEFAULT FALSE;
+
+ALTER TABLE serial.distribution_note
+ ADD COLUMN alert BOOL NOT NULL DEFAULT FALSE;
+
+ALTER TABLE serial.item_note
+ ADD COLUMN alert BOOL NOT NULL DEFAULT FALSE;
+
+
+SELECT evergreen.upgrade_deps_block_check('0833', :eg_version);
+
+INSERT INTO config.org_unit_setting_type
+ (name, grp, datatype, label, description)
+VALUES (
+ 'opac.self_register.timeout',
+ 'opac',
+ 'integer',
+ oils_i18n_gettext(
+ 'opac.self_register.timeout',
+ 'Patron Self-Reg. Display Timeout',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'opac.self_register.timeout',
+ 'Number of seconds to wait before reloading the patron self-'||
+ 'registration interface to clear sensitive data',
+ 'coust',
+ 'description'
+ )
+);
+
+
+SELECT evergreen.upgrade_deps_block_check('0834', :eg_version);
+
+INSERT INTO config.org_unit_setting_type
+ (name, grp, datatype, label, description)
+VALUES (
+ 'ui.circ.items_out.longoverdue', 'gui', 'integer',
+ oils_i18n_gettext(
+ 'ui.circ.items_out.longoverdue',
+ 'Items Out Long-Overdue display setting',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ui.circ.items_out.longoverdue',
+'Value is a numeric code, describing which list the circulation '||
+'should appear while checked out and whether the circulation should '||
+'continue to appear in the bottom list, when checked in with '||
+'oustanding fines. '||
+'1 = top list, bottom list. 2 = bottom list, bottom list. ' ||
+'5 = top list, do not display. 6 = bottom list, do not display.',
+ 'coust',
+ 'description'
+ )
+), (
+ 'ui.circ.items_out.lost', 'gui', 'integer',
+ oils_i18n_gettext(
+ 'ui.circ.items_out.lost',
+ 'Items Out Lost display setting',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ui.circ.items_out.lost',
+'Value is a numeric code, describing which list the circulation '||
+'should appear while checked out and whether the circulation should '||
+'continue to appear in the bottom list, when checked in with '||
+'oustanding fines. '||
+'1 = top list, bottom list. 2 = bottom list, bottom list. ' ||
+'5 = top list, do not display. 6 = bottom list, do not display.',
+ 'coust',
+ 'description'
+ )
+), (
+ 'ui.circ.items_out.claimsreturned', 'gui', 'integer',
+ oils_i18n_gettext(
+ 'ui.circ.items_out.claimsreturned',
+ 'Items Out Claims Returned display setting',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ui.circ.items_out.claimsreturned',
+'Value is a numeric code, describing which list the circulation '||
+'should appear while checked out and whether the circulation should '||
+'continue to appear in the bottom list, when checked in with '||
+'oustanding fines. '||
+'1 = top list, bottom list. 2 = bottom list, bottom list. ' ||
+'5 = top list, do not display. 6 = bottom list, do not display.',
+ 'coust',
+ 'description'
+ )
+);
+
+
+SELECT evergreen.upgrade_deps_block_check('0835', :eg_version);
+
+INSERT INTO config.org_unit_setting_type
+ (grp, name, datatype, label, description)
+VALUES (
+ 'finance',
+ 'circ.disable_patron_credit',
+ 'bool',
+ oils_i18n_gettext(
+ 'circ.disable_patron_credit',
+ 'Disable Patron Credit',
+ 'coust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'circ.disable_patron_credit',
+ 'Do not allow patrons to accrue credit or pay fines/fees with accrued credit',
+ 'coust',
+ 'description'
+ )
+);
+
+
+SELECT evergreen.upgrade_deps_block_check('0836', :eg_version);
+
+CREATE TABLE config.floating_group (
+ id SERIAL PRIMARY KEY,
+ name TEXT UNIQUE NOT NULL,
+ manual BOOL NOT NULL DEFAULT FALSE
+ );
+
+CREATE TABLE config.floating_group_member (
+ id SERIAL PRIMARY KEY,
+ floating_group INT NOT NULL REFERENCES config.floating_group (id),
+ org_unit INT NOT NULL REFERENCES actor.org_unit (id),
+ stop_depth INT NOT NULL DEFAULT 0,
+ max_depth INT,
+ exclude BOOL NOT NULL DEFAULT FALSE
+ );
+
+CREATE OR REPLACE FUNCTION evergreen.can_float( copy_floating_group integer, from_ou integer, to_ou integer ) RETURNS BOOL AS $f$
+DECLARE
+ float_member config.floating_group_member%ROWTYPE;
+ shared_ou_depth INT;
+ to_ou_depth INT;
+BEGIN
+ -- Grab the shared OU depth. If this is less than the stop depth later we ignore the entry.
+ SELECT INTO shared_ou_depth max(depth) FROM actor.org_unit_common_ancestors( from_ou, to_ou ) aou JOIN actor.org_unit_type aout ON aou.ou_type = aout.id;
+ -- Grab the to ou depth. If this is greater than max depth we ignore the entry.
+ SELECT INTO to_ou_depth depth FROM actor.org_unit aou JOIN actor.org_unit_type aout ON aou.ou_type = aout.id WHERE aou.id = to_ou;
+ -- Grab float members that apply. We don't care what we get beyond wanting excluded ones first.
+ SELECT INTO float_member *
+ FROM
+ config.floating_group_member cfgm
+ JOIN actor.org_unit aou ON cfgm.org_unit = aou.id
+ JOIN actor.org_unit_type aout ON aou.ou_type = aout.id
+ WHERE
+ cfgm.floating_group = copy_floating_group
+ AND to_ou IN (SELECT id FROM actor.org_unit_descendants(aou.id))
+ AND cfgm.stop_depth <= shared_ou_depth
+ AND (cfgm.max_depth IS NULL OR to_ou_depth <= max_depth)
+ ORDER BY
+ exclude DESC;
+ -- If we found something then we want to return the opposite of the exclude flag
+ IF FOUND THEN
+ RETURN NOT float_member.exclude;
+ END IF;
+ -- Otherwise no floating.
+ RETURN false;
+END;
+$f$ LANGUAGE PLPGSQL;
+
+INSERT INTO config.floating_group(name) VALUES ('Everywhere');
+INSERT INTO config.floating_group_member(floating_group, org_unit) VALUES (1, 1);
+
+-- We need to drop these before we can update asset.copy
+DROP VIEW auditor.asset_copy_lifecycle;
+DROP VIEW auditor.serial_unit_lifecycle;
+
+-- Update the appropriate auditor tables
+ALTER TABLE auditor.asset_copy_history
+ ALTER COLUMN floating DROP DEFAULT,
+ ALTER COLUMN floating DROP NOT NULL,
+ ALTER COLUMN floating TYPE int USING CASE WHEN floating THEN 1 ELSE NULL END;
+ALTER TABLE auditor.serial_unit_history
+ ALTER COLUMN floating DROP DEFAULT,
+ ALTER COLUMN floating DROP NOT NULL,
+ ALTER COLUMN floating TYPE int USING CASE WHEN floating THEN 1 ELSE NULL END;
+
+-- Update asset.copy itself (does not appear to trigger update triggers!)
+ALTER TABLE asset.copy
+ ALTER COLUMN floating DROP DEFAULT,
+ ALTER COLUMN floating DROP NOT NULL,
+ ALTER COLUMN floating TYPE int USING CASE WHEN floating THEN 1 ELSE NULL END;
+
+ALTER TABLE asset.copy ADD CONSTRAINT asset_copy_floating_fkey FOREIGN KEY (floating) REFERENCES config.floating_group (id) DEFERRABLE INITIALLY DEFERRED;
+
+-- Update asset.copy_template too
+ALTER TABLE asset.copy_template
+ ALTER COLUMN floating TYPE int USING CASE WHEN floating THEN 1 ELSE NULL END;
+ALTER TABLE asset.copy_template ADD CONSTRAINT asset_copy_template_floating_fkey FOREIGN KEY (floating) REFERENCES config.floating_group (id) DEFERRABLE INITIALLY DEFERRED;
+
+INSERT INTO permission.perm_list( code, description) VALUES
+('ADMIN_FLOAT_GROUPS', 'Allows administration of floating groups');
+
+-- And lets just update all auditors to re-create those lifecycle views
+SELECT auditor.update_auditors();
+
+-- Evergreen DB patch 0837.schema.browse-auth-linking.plus-joiner.sql
+--
+-- In this upgrade script we complete inter-subfield joiner support, so that
+-- subject components can be separated by " -- ", for instance. That's the
+-- easy part.
+--
+-- We also add the ability to browse by in-use authority main entries and find
+-- bibs that use unauthorized versions of the authority's value, by string matching.
+--
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0837', :eg_version);
+
+ALTER TABLE config.metabib_field ADD COLUMN joiner TEXT;
+UPDATE config.metabib_field SET joiner = ' -- ' WHERE field_class = 'subject' AND name NOT IN ('name', 'complete');
+
+-- To avoid problems with altering a table column after doing an
+-- update.
+ALTER TABLE authority.control_set_authority_field DISABLE TRIGGER ALL;
+
+ALTER TABLE authority.control_set_authority_field ADD COLUMN joiner TEXT;
+UPDATE authority.control_set_authority_field SET joiner = ' -- ' WHERE tag LIKE ANY (ARRAY['_4_','_5_','_8_']);
+
+ALTER TABLE authority.control_set_authority_field ENABLE TRIGGER ALL;
+
+-- Seed data will be generated from class <-> axis mapping
+CREATE TABLE authority.control_set_bib_field_metabib_field_map (
+ id SERIAL PRIMARY KEY,
+ bib_field INT NOT NULL REFERENCES authority.control_set_bib_field (id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ metabib_field INT NOT NULL REFERENCES config.metabib_field (id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
+ CONSTRAINT a_bf_mf_map_once UNIQUE (bib_field, metabib_field)
+);
+
+CREATE VIEW authority.control_set_auth_field_metabib_field_map_main AS
+ SELECT DISTINCT b.authority_field, m.metabib_field
+ FROM authority.control_set_bib_field_metabib_field_map m JOIN authority.control_set_bib_field b ON (b.id = m.bib_field);
+COMMENT ON VIEW authority.control_set_auth_field_metabib_field_map_main IS $$metabib fields for main entry auth fields$$;
+
+CREATE VIEW authority.control_set_auth_field_metabib_field_map_refs_only AS
+ SELECT DISTINCT a.id AS authority_field, m.metabib_field
+ FROM authority.control_set_authority_field a
+ JOIN authority.control_set_authority_field ame ON (a.main_entry = ame.id)
+ JOIN authority.control_set_bib_field b ON (b.authority_field = ame.id)
+ JOIN authority.control_set_bib_field_metabib_field_map mf ON (mf.bib_field = b.id)
+ JOIN authority.control_set_auth_field_metabib_field_map_main m ON (ame.id = m.authority_field);
+COMMENT ON VIEW authority.control_set_auth_field_metabib_field_map_refs_only IS $$metabib fields for NON-main entry auth fields$$;
+
+CREATE VIEW authority.control_set_auth_field_metabib_field_map_refs AS
+ SELECT * FROM authority.control_set_auth_field_metabib_field_map_main
+ UNION
+ SELECT * FROM authority.control_set_auth_field_metabib_field_map_refs_only;
+COMMENT ON VIEW authority.control_set_auth_field_metabib_field_map_refs IS $$metabib fields for all auth fields$$;
+
+
+-- blind refs only is probably what we want for lookup in bib/auth browse
+CREATE VIEW authority.control_set_auth_field_metabib_field_map_blind_refs_only AS
+ SELECT r.*
+ FROM authority.control_set_auth_field_metabib_field_map_refs_only r
+ JOIN authority.control_set_authority_field a ON (r.authority_field = a.id)
+ WHERE linking_subfield IS NULL;
+COMMENT ON VIEW authority.control_set_auth_field_metabib_field_map_blind_refs_only IS $$metabib fields for NON-main entry auth fields that can't be linked to other records$$; -- '
+
+CREATE VIEW authority.control_set_auth_field_metabib_field_map_blind_refs AS
+ SELECT r.*
+ FROM authority.control_set_auth_field_metabib_field_map_refs r
+ JOIN authority.control_set_authority_field a ON (r.authority_field = a.id)
+ WHERE linking_subfield IS NULL;
+COMMENT ON VIEW authority.control_set_auth_field_metabib_field_map_blind_refs IS $$metabib fields for all auth fields that can't be linked to other records$$; -- '
+
+CREATE VIEW authority.control_set_auth_field_metabib_field_map_blind_main AS
+ SELECT r.*
+ FROM authority.control_set_auth_field_metabib_field_map_main r
+ JOIN authority.control_set_authority_field a ON (r.authority_field = a.id)
+ WHERE linking_subfield IS NULL;
+COMMENT ON VIEW authority.control_set_auth_field_metabib_field_map_blind_main IS $$metabib fields for main entry auth fields that can't be linked to other records$$; -- '
+
+CREATE OR REPLACE FUNCTION authority.normalize_heading( marcxml TEXT, no_thesaurus BOOL ) RETURNS TEXT AS $func$
+DECLARE
+ acsaf authority.control_set_authority_field%ROWTYPE;
+ tag_used TEXT;
+ nfi_used TEXT;
+ sf TEXT;
+ sf_node TEXT;
+ tag_node TEXT;
+ thes_code TEXT;
+ cset INT;
+ heading_text TEXT;
+ tmp_text TEXT;
+ first_sf BOOL;
+ auth_id INT DEFAULT COALESCE(NULLIF(oils_xpath_string('//*[@tag="901"]/*[local-name()="subfield" and @code="c"]', marcxml), ''), '0')::INT;
+BEGIN
+ SELECT control_set INTO cset FROM authority.record_entry WHERE id = auth_id;
+
+ IF cset IS NULL THEN
+ SELECT control_set INTO cset
+ FROM authority.control_set_authority_field
+ WHERE tag IN ( SELECT UNNEST(XPATH('//*[starts-with(@tag,"1")]/@tag',marcxml::XML)::TEXT[]))
+ LIMIT 1;
+ END IF;
+
+ thes_code := vandelay.marc21_extract_fixed_field(marcxml,'Subj');
+ IF thes_code IS NULL THEN
+ thes_code := '|';
+ ELSIF thes_code = 'z' THEN
+ thes_code := COALESCE( oils_xpath_string('//*[@tag="040"]/*[@code="f"][1]', marcxml), '' );
+ END IF;
+
+ heading_text := '';
+ FOR acsaf IN SELECT * FROM authority.control_set_authority_field WHERE control_set = cset AND main_entry IS NULL LOOP
+ tag_used := acsaf.tag;
+ nfi_used := acsaf.nfi;
+ first_sf := TRUE;
+
+ FOR tag_node IN SELECT unnest(oils_xpath('//*[@tag="'||tag_used||'"]',marcxml)) LOOP
+ FOR sf_node IN SELECT unnest(oils_xpath('./*[contains("'||acsaf.sf_list||'", at code)]',tag_node)) LOOP
+
+ tmp_text := oils_xpath_string('.', sf_node);
+ sf := oils_xpath_string('./@code', sf_node);
+
+ IF first_sf AND tmp_text IS NOT NULL AND nfi_used IS NOT NULL THEN
+
+ tmp_text := SUBSTRING(
+ tmp_text FROM
+ COALESCE(
+ NULLIF(
+ REGEXP_REPLACE(
+ oils_xpath_string('./@ind'||nfi_used, tag_node),
+ $$\D+$$,
+ '',
+ 'g'
+ ),
+ ''
+ )::INT,
+ 0
+ ) + 1
+ );
+
+ END IF;
+
+ first_sf := FALSE;
+
+ IF tmp_text IS NOT NULL AND tmp_text <> '' THEN
+ heading_text := heading_text || E'\u2021' || sf || ' ' || tmp_text;
+ END IF;
+ END LOOP;
+
+ EXIT WHEN heading_text <> '';
+ END LOOP;
+
+ EXIT WHEN heading_text <> '';
+ END LOOP;
+
+ IF heading_text <> '' THEN
+ IF no_thesaurus IS TRUE THEN
+ heading_text := tag_used || ' ' || public.naco_normalize(heading_text);
+ ELSE
+ heading_text := tag_used || '_' || COALESCE(nfi_used,'-') || '_' || thes_code || ' ' || public.naco_normalize(heading_text);
+ END IF;
+ ELSE
+ heading_text := 'NOHEADING_' || thes_code || ' ' || MD5(marcxml);
+ END IF;
+
+ RETURN heading_text;
+END;
+$func$ LANGUAGE PLPGSQL IMMUTABLE;
+
+CREATE OR REPLACE FUNCTION authority.simple_heading_set( marcxml TEXT ) RETURNS SETOF authority.simple_heading AS $func$
+DECLARE
+ res authority.simple_heading%ROWTYPE;
+ acsaf authority.control_set_authority_field%ROWTYPE;
+ tag_used TEXT;
+ nfi_used TEXT;
+ sf TEXT;
+ cset INT;
+ heading_text TEXT;
+ joiner_text TEXT;
+ sort_text TEXT;
+ tmp_text TEXT;
+ tmp_xml TEXT;
+ first_sf BOOL;
+ auth_id INT DEFAULT COALESCE(NULLIF(oils_xpath_string('//*[@tag="901"]/*[local-name()="subfield" and @code="c"]', marcxml), ''), '0')::INT;
+BEGIN
+
+ SELECT control_set INTO cset FROM authority.record_entry WHERE id = auth_id;
+
+ IF cset IS NULL THEN
+ SELECT control_set INTO cset
+ FROM authority.control_set_authority_field
+ WHERE tag IN ( SELECT UNNEST(XPATH('//*[starts-with(@tag,"1")]/@tag',marcxml::XML)::TEXT[]))
+ LIMIT 1;
+ END IF;
+
+ res.record := auth_id;
+
+ FOR acsaf IN SELECT * FROM authority.control_set_authority_field WHERE control_set = cset LOOP
+
+ res.atag := acsaf.id;
+ tag_used := acsaf.tag;
+ nfi_used := acsaf.nfi;
+ joiner_text := COALESCE(acsaf.joiner, ' ');
+
+ FOR tmp_xml IN SELECT UNNEST(XPATH('//*[@tag="'||tag_used||'"]', marcxml::XML)) LOOP
+
+ heading_text := COALESCE(
+ oils_xpath_string('./*[contains("'||acsaf.sf_list||'", at code)]', tmp_xml::TEXT, joiner_text),
+ ''
+ );
+
+ IF nfi_used IS NOT NULL THEN
+
+ sort_text := SUBSTRING(
+ heading_text FROM
+ COALESCE(
+ NULLIF(
+ REGEXP_REPLACE(
+ oils_xpath_string('./@ind'||nfi_used, tmp_xml::TEXT),
+ $$\D+$$,
+ '',
+ 'g'
+ ),
+ ''
+ )::INT,
+ 0
+ ) + 1
+ );
+
+ ELSE
+ sort_text := heading_text;
+ END IF;
+
+ IF heading_text IS NOT NULL AND heading_text <> '' THEN
+ res.value := heading_text;
+ res.sort_value := public.naco_normalize(sort_text);
+ res.index_vector = to_tsvector('keyword'::regconfig, res.sort_value);
+ RETURN NEXT res;
+ END IF;
+
+ END LOOP;
+
+ END LOOP;
+
+ RETURN;
+END;
+$func$ LANGUAGE PLPGSQL IMMUTABLE;
+
+CREATE TABLE metabib.browse_entry_simple_heading_map (
+ id BIGSERIAL PRIMARY KEY,
+ entry BIGINT REFERENCES metabib.browse_entry (id),
+ simple_heading BIGINT REFERENCES authority.simple_heading (id) ON DELETE CASCADE
+);
+CREATE INDEX browse_entry_sh_map_entry_idx ON metabib.browse_entry_simple_heading_map (entry);
+CREATE INDEX browse_entry_sh_map_sh_idx ON metabib.browse_entry_simple_heading_map (simple_heading);
+
+CREATE OR REPLACE FUNCTION biblio.extract_metabib_field_entry ( rid BIGINT, default_joiner TEXT ) RETURNS SETOF metabib.field_entry_template AS $func$
+DECLARE
+ bib biblio.record_entry%ROWTYPE;
+ idx config.metabib_field%ROWTYPE;
+ xfrm config.xml_transform%ROWTYPE;
+ prev_xfrm TEXT;
+ transformed_xml TEXT;
+ xml_node TEXT;
+ xml_node_list TEXT[];
+ facet_text TEXT;
+ browse_text TEXT;
+ sort_value TEXT;
+ raw_text TEXT;
+ curr_text TEXT;
+ joiner TEXT := default_joiner; -- XXX will index defs supply a joiner?
+ authority_text TEXT;
+ authority_link BIGINT;
+ output_row metabib.field_entry_template%ROWTYPE;
+BEGIN
+
+ -- Start out with no field-use bools set
+ output_row.browse_field = FALSE;
+ output_row.facet_field = FALSE;
+ output_row.search_field = FALSE;
+
+ -- Get the record
+ SELECT INTO bib * FROM biblio.record_entry WHERE id = rid;
+
+ -- Loop over the indexing entries
+ FOR idx IN SELECT * FROM config.metabib_field ORDER BY format LOOP
+
+ joiner := COALESCE(idx.joiner, default_joiner);
+
+ SELECT INTO xfrm * from config.xml_transform WHERE name = idx.format;
+
+ -- See if we can skip the XSLT ... it's expensive
+ IF prev_xfrm IS NULL OR prev_xfrm <> xfrm.name THEN
+ -- Can't skip the transform
+ IF xfrm.xslt <> '---' THEN
+ transformed_xml := oils_xslt_process(bib.marc,xfrm.xslt);
+ ELSE
+ transformed_xml := bib.marc;
+ END IF;
+
+ prev_xfrm := xfrm.name;
+ END IF;
+
+ xml_node_list := oils_xpath( idx.xpath, transformed_xml, ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]] );
+
+ raw_text := NULL;
+ FOR xml_node IN SELECT x FROM unnest(xml_node_list) AS x LOOP
+ CONTINUE WHEN xml_node !~ E'^\\s*<';
+
+ -- XXX much of this should be moved into oils_xpath_string...
+ curr_text := ARRAY_TO_STRING(evergreen.array_remove_item_by_value(evergreen.array_remove_item_by_value(
+ oils_xpath( '//text()',
+ REGEXP_REPLACE(
+ REGEXP_REPLACE( -- This escapes all &s not followed by "amp;". Data ise returned from oils_xpath (above) in UTF-8, not entity encoded
+ REGEXP_REPLACE( -- This escapes embeded <s
+ xml_node,
+ $re$(>[^<]+)(<)([^>]+<)$re$,
+ E'\\1<\\3',
+ 'g'
+ ),
+ '&(?!amp;)',
+ '&',
+ 'g'
+ ),
+ E'\\s+',
+ ' ',
+ 'g'
+ )
+ ), ' '), ''),
+ joiner
+ );
+
+ CONTINUE WHEN curr_text IS NULL OR curr_text = '';
+
+ IF raw_text IS NOT NULL THEN
+ raw_text := raw_text || joiner;
+ END IF;
+
+ raw_text := COALESCE(raw_text,'') || curr_text;
+
+ -- autosuggest/metabib.browse_entry
+ IF idx.browse_field THEN
+
+ IF idx.browse_xpath IS NOT NULL AND idx.browse_xpath <> '' THEN
+ browse_text := oils_xpath_string( idx.browse_xpath, xml_node, joiner, ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]] );
+ ELSE
+ browse_text := curr_text;
+ END IF;
+
+ IF idx.browse_sort_xpath IS NOT NULL AND
+ idx.browse_sort_xpath <> '' THEN
+
+ sort_value := oils_xpath_string(
+ idx.browse_sort_xpath, xml_node, joiner,
+ ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]]
+ );
+ ELSE
+ sort_value := browse_text;
+ END IF;
+
+ output_row.field_class = idx.field_class;
+ output_row.field = idx.id;
+ output_row.source = rid;
+ output_row.value = BTRIM(REGEXP_REPLACE(browse_text, E'\\s+', ' ', 'g'));
+ output_row.sort_value :=
+ public.naco_normalize(sort_value);
+
+ output_row.authority := NULL;
+
+ IF idx.authority_xpath IS NOT NULL AND idx.authority_xpath <> '' THEN
+ authority_text := oils_xpath_string(
+ idx.authority_xpath, xml_node, joiner,
+ ARRAY[
+ ARRAY[xfrm.prefix, xfrm.namespace_uri],
+ ARRAY['xlink','http://www.w3.org/1999/xlink']
+ ]
+ );
+
+ IF authority_text ~ '^\d+$' THEN
+ authority_link := authority_text::BIGINT;
+ PERFORM * FROM authority.record_entry WHERE id = authority_link;
+ IF FOUND THEN
+ output_row.authority := authority_link;
+ END IF;
+ END IF;
+
+ END IF;
+
+ output_row.browse_field = TRUE;
+ RETURN NEXT output_row;
+ output_row.browse_field = FALSE;
+ output_row.sort_value := NULL;
+ END IF;
+
+ -- insert raw node text for faceting
+ IF idx.facet_field THEN
+
+ IF idx.facet_xpath IS NOT NULL AND idx.facet_xpath <> '' THEN
+ facet_text := oils_xpath_string( idx.facet_xpath, xml_node, joiner, ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]] );
+ ELSE
+ facet_text := curr_text;
+ END IF;
+
+ output_row.field_class = idx.field_class;
+ output_row.field = -1 * idx.id;
+ output_row.source = rid;
+ output_row.value = BTRIM(REGEXP_REPLACE(facet_text, E'\\s+', ' ', 'g'));
+
+ output_row.facet_field = TRUE;
+ RETURN NEXT output_row;
+ output_row.facet_field = FALSE;
+ END IF;
+
+ END LOOP;
+
+ CONTINUE WHEN raw_text IS NULL OR raw_text = '';
+
+ -- insert combined node text for searching
+ IF idx.search_field THEN
+ output_row.field_class = idx.field_class;
+ output_row.field = idx.id;
+ output_row.source = rid;
+ output_row.value = BTRIM(REGEXP_REPLACE(raw_text, E'\\s+', ' ', 'g'));
+
+ output_row.search_field = TRUE;
+ RETURN NEXT output_row;
+ output_row.search_field = FALSE;
+ END IF;
+
+ END LOOP;
+
+END;
+
+$func$ LANGUAGE PLPGSQL;
+
+CREATE OR REPLACE
+ FUNCTION metabib.autosuggest_prepare_tsquery(orig TEXT) RETURNS TEXT[] AS
+$$
+DECLARE
+ orig_ended_in_space BOOLEAN;
+ result RECORD;
+ plain TEXT;
+ normalized TEXT;
+BEGIN
+ orig_ended_in_space := orig ~ E'\\s$';
+
+ orig := ARRAY_TO_STRING(
+ evergreen.regexp_split_to_array(orig, E'\\W+'), ' '
+ );
+
+ normalized := public.naco_normalize(orig); -- also trim()s
+ plain := trim(orig);
+
+ IF NOT orig_ended_in_space THEN
+ plain := plain || ':*';
+ normalized := normalized || ':*';
+ END IF;
+
+ plain := ARRAY_TO_STRING(
+ evergreen.regexp_split_to_array(plain, E'\\s+'), ' & '
+ );
+ normalized := ARRAY_TO_STRING(
+ evergreen.regexp_split_to_array(normalized, E'\\s+'), ' & '
+ );
+
+ RETURN ARRAY[normalized, plain];
+END;
+$$ LANGUAGE PLPGSQL;
+
+ALTER TYPE metabib.flat_browse_entry_appearance ADD ATTRIBUTE sees TEXT;
+ALTER TYPE metabib.flat_browse_entry_appearance ADD ATTRIBUTE asources INT;
+ALTER TYPE metabib.flat_browse_entry_appearance ADD ATTRIBUTE aaccurate TEXT;
+
+CREATE OR REPLACE FUNCTION metabib.browse_bib_pivot(
+ INT[],
+ TEXT
+) RETURNS BIGINT AS $p$
+ SELECT mbe.id
+ FROM metabib.browse_entry mbe
+ JOIN metabib.browse_entry_def_map mbedm ON (
+ mbedm.entry = mbe.id
+ AND mbedm.def = ANY($1)
+ )
+ WHERE mbe.sort_value >= public.naco_normalize($2)
+ ORDER BY mbe.sort_value, mbe.value LIMIT 1;
+$p$ LANGUAGE SQL;
+
+CREATE OR REPLACE FUNCTION metabib.browse_authority_pivot(
+ INT[],
+ TEXT
+) RETURNS BIGINT AS $p$
+ SELECT mbe.id
+ FROM metabib.browse_entry mbe
+ JOIN metabib.browse_entry_simple_heading_map mbeshm ON ( mbeshm.entry = mbe.id )
+ JOIN authority.simple_heading ash ON ( mbeshm.simple_heading = ash.id )
+ JOIN authority.control_set_auth_field_metabib_field_map_refs map ON (
+ ash.atag = map.authority_field
+ AND map.metabib_field = ANY($1)
+ )
+ WHERE mbe.sort_value >= public.naco_normalize($2)
+ ORDER BY mbe.sort_value, mbe.value LIMIT 1;
+$p$ LANGUAGE SQL;
+
+CREATE OR REPLACE FUNCTION metabib.browse_authority_refs_pivot(
+ INT[],
+ TEXT
+) RETURNS BIGINT AS $p$
+ SELECT mbe.id
+ FROM metabib.browse_entry mbe
+ JOIN metabib.browse_entry_simple_heading_map mbeshm ON ( mbeshm.entry = mbe.id )
+ JOIN authority.simple_heading ash ON ( mbeshm.simple_heading = ash.id )
+ JOIN authority.control_set_auth_field_metabib_field_map_refs_only map ON (
+ ash.atag = map.authority_field
+ AND map.metabib_field = ANY($1)
+ )
+ WHERE mbe.sort_value >= public.naco_normalize($2)
+ ORDER BY mbe.sort_value, mbe.value LIMIT 1;
+$p$ LANGUAGE SQL;
+
+-- The drop is necessary because the language change from PLPGSQL to SQL
+-- carries with it name changes to the parameters
+DROP FUNCTION metabib.browse_pivot(INT[], TEXT);
+CREATE FUNCTION metabib.browse_pivot(
+ INT[],
+ TEXT
+) RETURNS BIGINT AS $p$
+ SELECT id FROM metabib.browse_entry
+ WHERE id IN (
+ metabib.browse_bib_pivot($1, $2),
+ metabib.browse_authority_refs_pivot($1,$2) -- only look in 4xx, 5xx, 7xx of authority
+ )
+ ORDER BY sort_value, value LIMIT 1;
+$p$ LANGUAGE SQL;
+
+CREATE OR REPLACE FUNCTION metabib.staged_browse(
+ query TEXT,
+ fields INT[],
+ context_org INT,
+ context_locations INT[],
+ staff BOOL,
+ browse_superpage_size INT,
+ count_up_from_zero BOOL, -- if false, count down from -1
+ result_limit INT,
+ next_pivot_pos INT
+) RETURNS SETOF metabib.flat_browse_entry_appearance AS $p$
+DECLARE
+ curs REFCURSOR;
+ rec RECORD;
+ qpfts_query TEXT;
+ aqpfts_query TEXT;
+ afields INT[];
+ bfields INT[];
+ result_row metabib.flat_browse_entry_appearance%ROWTYPE;
+ results_skipped INT := 0;
+ row_counter INT := 0;
+ row_number INT;
+ slice_start INT;
+ slice_end INT;
+ full_end INT;
+ all_records BIGINT[];
+ all_brecords BIGINT[];
+ all_arecords BIGINT[];
+ superpage_of_records BIGINT[];
+ superpage_size INT;
+BEGIN
+ IF count_up_from_zero THEN
+ row_number := 0;
+ ELSE
+ row_number := -1;
+ END IF;
+
+ OPEN curs FOR EXECUTE query;
+
+ LOOP
+ FETCH curs INTO rec;
+ IF NOT FOUND THEN
+ IF result_row.pivot_point IS NOT NULL THEN
+ RETURN NEXT result_row;
+ END IF;
+ RETURN;
+ END IF;
+
+
+ -- Gather aggregate data based on the MBE row we're looking at now, authority axis
+ SELECT INTO all_arecords, result_row.sees, afields
+ ARRAY_AGG(DISTINCT abl.bib), -- bibs to check for visibility
+ ARRAY_TO_STRING(ARRAY_AGG(DISTINCT aal.source), $$,$$), -- authority record ids
+ ARRAY_AGG(DISTINCT map.metabib_field) -- authority-tag-linked CMF rows
+
+ FROM metabib.browse_entry_simple_heading_map mbeshm
+ JOIN authority.simple_heading ash ON ( mbeshm.simple_heading = ash.id )
+ JOIN authority.authority_linking aal ON ( ash.record = aal.source )
+ JOIN authority.bib_linking abl ON ( aal.target = abl.authority )
+ JOIN authority.control_set_auth_field_metabib_field_map_refs map ON (
+ ash.atag = map.authority_field
+ AND map.metabib_field = ANY(fields)
+ )
+ WHERE mbeshm.entry = rec.id;
+
+
+ -- Gather aggregate data based on the MBE row we're looking at now, bib axis
+ SELECT INTO all_brecords, result_row.authorities, bfields
+ ARRAY_AGG(DISTINCT source),
+ ARRAY_TO_STRING(ARRAY_AGG(DISTINCT authority), $$,$$),
+ ARRAY_AGG(DISTINCT def)
+ FROM metabib.browse_entry_def_map
+ WHERE entry = rec.id
+ AND def = ANY(fields);
+
+ SELECT INTO result_row.fields ARRAY_TO_STRING(ARRAY_AGG(DISTINCT x), $$,$$) FROM UNNEST(afields || bfields) x;
+
+ result_row.sources := 0;
+ result_row.asources := 0;
+
+ -- Bib-linked vis checking
+ IF ARRAY_UPPER(all_brecords,1) IS NOT NULL THEN
+
+ full_end := ARRAY_LENGTH(all_brecords, 1);
+ superpage_size := COALESCE(browse_superpage_size, full_end);
+ slice_start := 1;
+ slice_end := superpage_size;
+
+ WHILE result_row.sources = 0 AND slice_start <= full_end LOOP
+ superpage_of_records := all_brecords[slice_start:slice_end];
+ qpfts_query :=
+ 'SELECT NULL::BIGINT AS id, ARRAY[r] AS records, ' ||
+ '1::INT AS rel FROM (SELECT UNNEST(' ||
+ quote_literal(superpage_of_records) || '::BIGINT[]) AS r) rr';
+
+ -- We use search.query_parser_fts() for visibility testing.
+ -- We're calling it once per browse-superpage worth of records
+ -- out of the set of records related to a given mbe, until we've
+ -- either exhausted that set of records or found at least 1
+ -- visible record.
+
+ SELECT INTO result_row.sources visible
+ FROM search.query_parser_fts(
+ context_org, NULL, qpfts_query, NULL,
+ context_locations, 0, NULL, NULL, FALSE, staff, FALSE
+ ) qpfts
+ WHERE qpfts.rel IS NULL;
+
+ slice_start := slice_start + superpage_size;
+ slice_end := slice_end + superpage_size;
+ END LOOP;
+
+ -- Accurate? Well, probably.
+ result_row.accurate := browse_superpage_size IS NULL OR
+ browse_superpage_size >= full_end;
+
+ END IF;
+
+ -- Authority-linked vis checking
+ IF ARRAY_UPPER(all_arecords,1) IS NOT NULL THEN
+
+ full_end := ARRAY_LENGTH(all_arecords, 1);
+ superpage_size := COALESCE(browse_superpage_size, full_end);
+ slice_start := 1;
+ slice_end := superpage_size;
+
+ WHILE result_row.asources = 0 AND slice_start <= full_end LOOP
+ superpage_of_records := all_arecords[slice_start:slice_end];
+ qpfts_query :=
+ 'SELECT NULL::BIGINT AS id, ARRAY[r] AS records, ' ||
+ '1::INT AS rel FROM (SELECT UNNEST(' ||
+ quote_literal(superpage_of_records) || '::BIGINT[]) AS r) rr';
+
+ -- We use search.query_parser_fts() for visibility testing.
+ -- We're calling it once per browse-superpage worth of records
+ -- out of the set of records related to a given mbe, via
+ -- authority until we've either exhausted that set of records
+ -- or found at least 1 visible record.
+
+ SELECT INTO result_row.asources visible
+ FROM search.query_parser_fts(
+ context_org, NULL, qpfts_query, NULL,
+ context_locations, 0, NULL, NULL, FALSE, staff, FALSE
+ ) qpfts
+ WHERE qpfts.rel IS NULL;
+
+ slice_start := slice_start + superpage_size;
+ slice_end := slice_end + superpage_size;
+ END LOOP;
+
+
+ -- Accurate? Well, probably.
+ result_row.aaccurate := browse_superpage_size IS NULL OR
+ browse_superpage_size >= full_end;
+
+ END IF;
+
+ IF result_row.sources > 0 OR result_row.asources > 0 THEN
+
+ -- The function that calls this function needs row_number in order
+ -- to correctly order results from two different runs of this
+ -- functions.
+ result_row.row_number := row_number;
+
+ -- Now, if row_counter is still less than limit, return a row. If
+ -- not, but it is less than next_pivot_pos, continue on without
+ -- returning actual result rows until we find
+ -- that next pivot, and return it.
+
+ IF row_counter < result_limit THEN
+ result_row.browse_entry := rec.id;
+ result_row.value := rec.value;
+
+ RETURN NEXT result_row;
+ ELSE
+ result_row.browse_entry := NULL;
+ result_row.authorities := NULL;
+ result_row.fields := NULL;
+ result_row.value := NULL;
+ result_row.sources := NULL;
+ result_row.sees := NULL;
+ result_row.accurate := NULL;
+ result_row.aaccurate := NULL;
+ result_row.pivot_point := rec.id;
+
+ IF row_counter >= next_pivot_pos THEN
+ RETURN NEXT result_row;
+ RETURN;
+ END IF;
+ END IF;
+
+ IF count_up_from_zero THEN
+ row_number := row_number + 1;
+ ELSE
+ row_number := row_number - 1;
+ END IF;
+
+ -- row_counter is different from row_number.
+ -- It simply counts up from zero so that we know when
+ -- we've reached our limit.
+ row_counter := row_counter + 1;
+ END IF;
+ END LOOP;
+END;
+$p$ LANGUAGE PLPGSQL;
+
+CREATE OR REPLACE FUNCTION metabib.browse(
+ search_field INT[],
+ browse_term TEXT,
+ context_org INT DEFAULT NULL,
+ context_loc_group INT DEFAULT NULL,
+ staff BOOL DEFAULT FALSE,
+ pivot_id BIGINT DEFAULT NULL,
+ result_limit INT DEFAULT 10
+) RETURNS SETOF metabib.flat_browse_entry_appearance AS $p$
+DECLARE
+ core_query TEXT;
+ back_query TEXT;
+ forward_query TEXT;
+ pivot_sort_value TEXT;
+ pivot_sort_fallback TEXT;
+ context_locations INT[];
+ browse_superpage_size INT;
+ results_skipped INT := 0;
+ back_limit INT;
+ back_to_pivot INT;
+ forward_limit INT;
+ forward_to_pivot INT;
+BEGIN
+ -- First, find the pivot if we were given a browse term but not a pivot.
+ IF pivot_id IS NULL THEN
+ pivot_id := metabib.browse_pivot(search_field, browse_term);
+ END IF;
+
+ SELECT INTO pivot_sort_value, pivot_sort_fallback
+ sort_value, value FROM metabib.browse_entry WHERE id = pivot_id;
+
+ -- Bail if we couldn't find a pivot.
+ IF pivot_sort_value IS NULL THEN
+ RETURN;
+ END IF;
+
+ -- Transform the context_loc_group argument (if any) (logc at the
+ -- TPAC layer) into a form we'll be able to use.
+ IF context_loc_group IS NOT NULL THEN
+ SELECT INTO context_locations ARRAY_AGG(location)
+ FROM asset.copy_location_group_map
+ WHERE lgroup = context_loc_group;
+ END IF;
+
+ -- Get the configured size of browse superpages.
+ SELECT INTO browse_superpage_size value -- NULL ok
+ FROM config.global_flag
+ WHERE enabled AND name = 'opac.browse.holdings_visibility_test_limit';
+
+ -- First we're going to search backward from the pivot, then we're going
+ -- to search forward. In each direction, we need two limits. At the
+ -- lesser of the two limits, we delineate the edge of the result set
+ -- we're going to return. At the greater of the two limits, we find the
+ -- pivot value that would represent an offset from the current pivot
+ -- at a distance of one "page" in either direction, where a "page" is a
+ -- result set of the size specified in the "result_limit" argument.
+ --
+ -- The two limits in each direction make four derived values in total,
+ -- and we calculate them now.
+ back_limit := CEIL(result_limit::FLOAT / 2);
+ back_to_pivot := result_limit;
+ forward_limit := result_limit / 2;
+ forward_to_pivot := result_limit - 1;
+
+ -- This is the meat of the SQL query that finds browse entries. We'll
+ -- pass this to a function which uses it with a cursor, so that individual
+ -- rows may be fetched in a loop until some condition is satisfied, without
+ -- waiting for a result set of fixed size to be collected all at once.
+ core_query := '
+SELECT mbe.id,
+ mbe.value,
+ mbe.sort_value
+ FROM metabib.browse_entry mbe
+ WHERE (
+ EXISTS ( -- are there any bibs using this mbe via the requested fields?
+ SELECT 1
+ FROM metabib.browse_entry_def_map mbedm
+ WHERE mbedm.entry = mbe.id AND mbedm.def = ANY(' || quote_literal(search_field) || ')
+ LIMIT 1
+ ) OR EXISTS ( -- are there any authorities using this mbe via the requested fields?
+ SELECT 1
+ FROM metabib.browse_entry_simple_heading_map mbeshm
+ JOIN authority.simple_heading ash ON ( mbeshm.simple_heading = ash.id )
+ JOIN authority.control_set_auth_field_metabib_field_map_refs map ON (
+ ash.atag = map.authority_field
+ AND map.metabib_field = ANY(' || quote_literal(search_field) || ')
+ )
+ WHERE mbeshm.entry = mbe.id
+ )
+ ) AND ';
+
+ -- This is the variant of the query for browsing backward.
+ back_query := core_query ||
+ ' mbe.sort_value <= ' || quote_literal(pivot_sort_value) ||
+ ' ORDER BY mbe.sort_value DESC, mbe.value DESC ';
+
+ -- This variant browses forward.
+ forward_query := core_query ||
+ ' mbe.sort_value > ' || quote_literal(pivot_sort_value) ||
+ ' ORDER BY mbe.sort_value, mbe.value ';
+
+ -- We now call the function which applies a cursor to the provided
+ -- queries, stopping at the appropriate limits and also giving us
+ -- the next page's pivot.
+ RETURN QUERY
+ SELECT * FROM metabib.staged_browse(
+ back_query, search_field, context_org, context_locations,
+ staff, browse_superpage_size, TRUE, back_limit, back_to_pivot
+ ) UNION
+ SELECT * FROM metabib.staged_browse(
+ forward_query, search_field, context_org, context_locations,
+ staff, browse_superpage_size, FALSE, forward_limit, forward_to_pivot
+ ) ORDER BY row_number DESC;
+
+END;
+$p$ LANGUAGE PLPGSQL;
+
+-- No 4XX inter-authority linking
+UPDATE authority.control_set_authority_field SET linking_subfield = NULL;
+UPDATE authority.control_set_authority_field SET linking_subfield = '0' WHERE tag LIKE ANY (ARRAY['5%','7%']);
+
+-- Map between authority controlled bib fields and stock indexing metabib fields
+INSERT INTO authority.control_set_bib_field_metabib_field_map (bib_field, metabib_field)
+ SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
+ FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
+ WHERE a.tag = '100' AND m.name = 'personal'
+
+ UNION
+
+ SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
+ FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
+ WHERE a.tag = '110' AND m.name = 'corporate'
+
+ UNION
+
+ SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
+ FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
+ WHERE a.tag = '111' AND m.name = 'conference'
+
+ UNION
+
+ SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
+ FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
+ WHERE a.tag = '130' AND m.name = 'uniform'
+
+ UNION
+
+ SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
+ FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
+ WHERE a.tag = '148' AND m.name = 'temporal'
+
+ UNION
+
+ SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
+ FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
+ WHERE a.tag = '150' AND m.name = 'topic'
+
+ UNION
+
+ SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
+ FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
+ WHERE a.tag = '151' AND m.name = 'geographic'
+
+ UNION
+
+ SELECT DISTINCT b.id AS bib_field, m.id AS metabib_field
+ FROM authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
+ WHERE a.tag = '155' AND m.name = 'genre' -- Just in case...
+;
+
+CREATE OR REPLACE FUNCTION authority.indexing_ingest_or_delete () RETURNS TRIGGER AS $func$
+DECLARE
+ ashs authority.simple_heading%ROWTYPE;
+ mbe_row metabib.browse_entry%ROWTYPE;
+ mbe_id BIGINT;
+ ash_id BIGINT;
+BEGIN
+
+ IF NEW.deleted IS TRUE THEN -- If this authority is deleted
+ DELETE FROM authority.bib_linking WHERE authority = NEW.id; -- Avoid updating fields in bibs that are no longer visible
+ DELETE FROM authority.full_rec WHERE record = NEW.id; -- Avoid validating fields against deleted authority records
+ DELETE FROM authority.simple_heading WHERE record = NEW.id;
+ -- Should remove matching $0 from controlled fields at the same time?
+
+ -- XXX What do we about the actual linking subfields present in
+ -- authority records that target this one when this happens?
+ DELETE FROM authority.authority_linking
+ WHERE source = NEW.id OR target = NEW.id;
+
+ RETURN NEW; -- and we're done
+ END IF;
+
+ IF TG_OP = 'UPDATE' THEN -- re-ingest?
+ PERFORM * FROM config.internal_flag WHERE name = 'ingest.reingest.force_on_same_marc' AND enabled;
+
+ IF NOT FOUND AND OLD.marc = NEW.marc THEN -- don't do anything if the MARC didn't change
+ RETURN NEW;
+ END IF;
+
+ -- Propagate these updates to any linked bib records
+ PERFORM authority.propagate_changes(NEW.id) FROM authority.record_entry WHERE id = NEW.id;
+
+ DELETE FROM authority.simple_heading WHERE record = NEW.id;
+ DELETE FROM authority.authority_linking WHERE source = NEW.id;
+ END IF;
+
+ INSERT INTO authority.authority_linking (source, target, field)
+ SELECT source, target, field FROM authority.calculate_authority_linking(
+ NEW.id, NEW.control_set, NEW.marc::XML
+ );
+
+ FOR ashs IN SELECT * FROM authority.simple_heading_set(NEW.marc) LOOP
+
+ INSERT INTO authority.simple_heading (record,atag,value,sort_value)
+ VALUES (ashs.record, ashs.atag, ashs.value, ashs.sort_value);
+ ash_id := CURRVAL('authority.simple_heading_id_seq'::REGCLASS);
+
+ SELECT INTO mbe_row * FROM metabib.browse_entry
+ WHERE value = ashs.value AND sort_value = ashs.sort_value;
+
+ IF FOUND THEN
+ mbe_id := mbe_row.id;
+ ELSE
+ INSERT INTO metabib.browse_entry
+ ( value, sort_value ) VALUES
+ ( ashs.value, ashs.sort_value );
+
+ mbe_id := CURRVAL('metabib.browse_entry_id_seq'::REGCLASS);
+ END IF;
+
+ INSERT INTO metabib.browse_entry_simple_heading_map (entry,simple_heading) VALUES (mbe_id,ash_id);
+
+ END LOOP;
+
+ -- Flatten and insert the afr data
+ PERFORM * FROM config.internal_flag WHERE name = 'ingest.disable_authority_full_rec' AND enabled;
+ IF NOT FOUND THEN
+ PERFORM authority.reingest_authority_full_rec(NEW.id);
+ PERFORM * FROM config.internal_flag WHERE name = 'ingest.disable_authority_rec_descriptor' AND enabled;
+ IF NOT FOUND THEN
+ PERFORM authority.reingest_authority_rec_descriptor(NEW.id);
+ END IF;
+ END IF;
+
+ RETURN NEW;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0838', :eg_version);
+
+DELETE FROM config.metabib_field_index_norm_map
+ WHERE field = 25 AND norm IN (
+ SELECT id
+ FROM config.index_normalizer
+ WHERE func IN ('search_normalize','split_date_range')
+ );
+
+\qecho If your site's bibcn searches are affected by this issue, you may wish
+\qecho to reingest your bib records now. It's probably not worth it for many
+\qecho sites.
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0839', :eg_version);
+
+UPDATE config.metabib_field
+SET
+ xpath = $$//mods32:mods/mods32:titleInfo[mods32:title and starts-with(@type,'alternative')]$$,
+ browse_sort_xpath = $$*[local-name() != "nonSort"]$$,
+ browse_xpath = NULL
+WHERE
+ field_class = 'title' AND name = 'alternative' ;
+
+
+-- The following function only appears in the upgrade script and not the
+-- baseline schema because it's not necessary in the latter (and it's a
+-- temporary function). It just serves to do a hopefully cheaper, more
+-- focused reingest just to hit the alternative title index.
+
+-- This cribs from the guts of metabib.reingest_metabib_field_entries(),
+-- and if it actually is a timesaver over a full reingest, then at some
+-- point in the future it would be nice if we broke it out into a separate
+-- function to make things like this easier.
+
+CREATE OR REPLACE FUNCTION pg_temp.alternative_title_reingest( bib_id BIGINT ) RETURNS VOID AS $func$
+DECLARE
+ ind_data metabib.field_entry_template%ROWTYPE;
+ mbe_row metabib.browse_entry%ROWTYPE;
+ mbe_id BIGINT;
+ b_skip_facet BOOL := false;
+ b_skip_browse BOOL := false;
+ b_skip_search BOOL := false;
+ alt_title INT;
+ value_prepped TEXT;
+BEGIN
+ SELECT INTO alt_title id FROM config.metabib_field WHERE field_class = 'title' AND name = 'alternative';
+ FOR ind_data IN SELECT * FROM biblio.extract_metabib_field_entry( bib_id ) WHERE field = alt_title LOOP
+ IF ind_data.field < 0 THEN
+ ind_data.field = -1 * ind_data.field;
+ END IF;
+
+ IF ind_data.facet_field AND NOT b_skip_facet THEN
+ INSERT INTO metabib.facet_entry (field, source, value)
+ VALUES (ind_data.field, ind_data.source, ind_data.value);
+ END IF;
+
+ IF ind_data.browse_field AND NOT b_skip_browse THEN
+ -- A caveat about this SELECT: this should take care of replacing
+ -- old mbe rows when data changes, but not if normalization (by
+ -- which I mean specifically the output of
+ -- evergreen.oils_tsearch2()) changes. It may or may not be
+ -- expensive to add a comparison of index_vector to index_vector
+ -- to the WHERE clause below.
+
+ value_prepped := metabib.browse_normalize(ind_data.value, ind_data.field);
+ SELECT INTO mbe_row * FROM metabib.browse_entry
+ WHERE value = value_prepped AND sort_value = ind_data.sort_value;
+
+ IF FOUND THEN
+ mbe_id := mbe_row.id;
+ ELSE
+ INSERT INTO metabib.browse_entry
+ ( value, sort_value ) VALUES
+ ( value_prepped, ind_data.sort_value );
+
+ mbe_id := CURRVAL('metabib.browse_entry_id_seq'::REGCLASS);
+ END IF;
+
+ INSERT INTO metabib.browse_entry_def_map (entry, def, source, authority)
+ VALUES (mbe_id, ind_data.field, ind_data.source, ind_data.authority);
+ END IF;
+
+ -- Avoid inserting duplicate rows, but retain granularity of being
+ -- able to search browse fields with "starts with" type operators
+ -- (for example, for titles of songs in music albums)
+ IF (ind_data.search_field OR ind_data.browse_field) AND NOT b_skip_search THEN
+ EXECUTE 'SELECT 1 FROM metabib.' || ind_data.field_class ||
+ '_field_entry WHERE field = $1 AND source = $2 AND value = $3'
+ INTO mbe_id USING ind_data.field, ind_data.source, ind_data.value;
+ -- RAISE NOTICE 'Search for an already matching row returned %', mbe_id;
+ IF mbe_id IS NULL THEN
+ EXECUTE $$
+ INSERT INTO metabib.$$ || ind_data.field_class || $$_field_entry (field, source, value)
+ VALUES ($$ ||
+ quote_literal(ind_data.field) || $$, $$ ||
+ quote_literal(ind_data.source) || $$, $$ ||
+ quote_literal(ind_data.value) ||
+ $$);$$;
+ END IF;
+ END IF;
+
+ END LOOP;
+
+ IF NOT b_skip_search THEN
+ PERFORM metabib.update_combined_index_vectors(bib_id);
+ END IF;
+
+ RETURN;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+\qecho This is a partial reingest of your bib records. It may take a while.
+
+SELECT pg_temp.alternative_title_reingest(id) FROM biblio.record_entry WHERE NOT deleted;
+
+SELECT evergreen.upgrade_deps_block_check('0840', :eg_version);
+
+INSERT INTO config.usr_setting_type (name,grp,opac_visible,label,description,datatype) VALUES (
+ 'ui.grid_columns.conify.config.circ_matrix_matchpoint',
+ 'gui',
+ FALSE,
+ oils_i18n_gettext(
+ 'ui.grid_columns.conify.config.circ_matrix_matchpoint',
+ 'Circulation Policy Configuration',
+ 'cust',
+ 'label'
+ ),
+ oils_i18n_gettext(
+ 'ui.grid_columns.conify.config.circ_matrix_matchpoint',
+ 'Circulation Policy Configuration Column Settings',
+ 'cust',
+ 'description'
+ ),
+ 'string'
+);
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0841', :eg_version);
+
+ALTER TABLE config.metabib_field_ts_map DROP CONSTRAINT metabib_field_ts_map_metabib_field_fkey;
+ALTER TABLE config.metabib_search_alias DROP CONSTRAINT metabib_search_alias_field_fkey;
+ALTER TABLE config.z3950_index_field_map DROP CONSTRAINT z3950_index_field_map_metabib_field_fkey;
+ALTER TABLE metabib.browse_entry_def_map DROP CONSTRAINT browse_entry_def_map_def_fkey;
+
+ALTER TABLE config.metabib_field_ts_map ADD CONSTRAINT metabib_field_ts_map_metabib_field_fkey FOREIGN KEY (metabib_field) REFERENCES config.metabib_field(id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE config.metabib_search_alias ADD CONSTRAINT metabib_search_alias_field_fkey FOREIGN KEY (field) REFERENCES config.metabib_field(id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE config.z3950_index_field_map ADD CONSTRAINT z3950_index_field_map_metabib_field_fkey FOREIGN KEY (metabib_field) REFERENCES config.metabib_field(id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE metabib.browse_entry_def_map ADD CONSTRAINT browse_entry_def_map_def_fkey FOREIGN KEY (def) REFERENCES config.metabib_field(id) DEFERRABLE INITIALLY DEFERRED;
+
+
+DROP FUNCTION IF EXISTS config.modify_metabib_field(source INT, target INT);
+CREATE FUNCTION config.modify_metabib_field(v_source INT, target INT) RETURNS INT AS $func$
+DECLARE
+ f_class TEXT;
+ check_id INT;
+ target_id INT;
+BEGIN
+ SELECT field_class INTO f_class FROM config.metabib_field WHERE id = v_source;
+ IF NOT FOUND THEN
+ RETURN 0;
+ END IF;
+ IF target IS NULL THEN
+ target_id = v_source + 1000;
+ ELSE
+ target_id = target;
+ END IF;
+ SELECT id FROM config.metabib_field INTO check_id WHERE id = target_id;
+ IF FOUND THEN
+ RAISE NOTICE 'Cannot bump config.metabib_field.id from % to %; the target ID already exists.', v_source, target_id;
+ RETURN 0;
+ END IF;
+ UPDATE config.metabib_field SET id = target_id WHERE id = v_source;
+ EXECUTE ' UPDATE metabib.' || f_class || '_field_entry SET field = ' || target_id || ' WHERE field = ' || v_source;
+ UPDATE config.metabib_field_ts_map SET metabib_field = target_id WHERE metabib_field = v_source;
+ UPDATE config.metabib_field_index_norm_map SET field = target_id WHERE field = v_source;
+ UPDATE search.relevance_adjustment SET field = target_id WHERE field = v_source;
+ UPDATE config.metabib_search_alias SET field = target_id WHERE field = v_source;
+ UPDATE config.z3950_index_field_map SET metabib_field = target_id WHERE metabib_field = v_source;
+ UPDATE metabib.browse_entry_def_map SET def = target_id WHERE def = v_source;
+ RETURN 1;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+SELECT config.modify_metabib_field(id, NULL)
+ FROM config.metabib_field
+ WHERE id > 30;
+
+SELECT SETVAL('config.metabib_field_id_seq', GREATEST(1000, (SELECT MAX(id) FROM config.metabib_field)));
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0842', :eg_version);
+
+-- this upgrade is only for people coming from 2_3, and is a NO-OP for those on 2_4
+ALTER TABLE config.metabib_field_ts_map DROP CONSTRAINT metabib_field_ts_map_metabib_field_fkey;
+
+ALTER TABLE config.metabib_field_ts_map ADD CONSTRAINT metabib_field_ts_map_metabib_field_fkey FOREIGN KEY (metabib_field) REFERENCES config.metabib_field(id) ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0843', :eg_version);
+
+-- this upgrade file serves 2 purposes:
+-- 1) add ON UPDATE CASCADE for those upgrading 2_5/master
+-- 2) alter config.z3950_index_field_map for those upgrading from 2_4 and previous (other lines
+-- are no-ops in this case)
+ALTER TABLE config.metabib_search_alias DROP CONSTRAINT metabib_search_alias_field_fkey;
+ALTER TABLE config.z3950_index_field_map DROP CONSTRAINT z3950_index_field_map_metabib_field_fkey;
+ALTER TABLE metabib.browse_entry_def_map DROP CONSTRAINT browse_entry_def_map_def_fkey;
+
+ALTER TABLE config.metabib_search_alias ADD CONSTRAINT metabib_search_alias_field_fkey FOREIGN KEY (field) REFERENCES config.metabib_field(id) ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE config.z3950_index_field_map ADD CONSTRAINT z3950_index_field_map_metabib_field_fkey FOREIGN KEY (metabib_field) REFERENCES config.metabib_field(id) ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE metabib.browse_entry_def_map ADD CONSTRAINT browse_entry_def_map_def_fkey FOREIGN KEY (def) REFERENCES config.metabib_field(id) ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0844', :eg_version);
+
+-- 953.data.MODS32-xsl.sql
+UPDATE config.xml_transform SET xslt=$$<?xml version="1.0" encoding="UTF-8"?>
+<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:output encoding="UTF-8" indent="yes" method="xml"/>
+<!--
+Revision 1.14 - Fixed template isValid and fields 010, 020, 022, 024, 028, and 037 to output additional identifier elements
+ with corresponding @type and @invalid eq 'yes' when subfields z or y (in the case of 022) exist in the MARCXML ::: 2007/01/04 17:35:20 cred
+
+Revision 1.13 - Changed order of output under cartographics to reflect schema 2006/11/28 tmee
+
+Revision 1.12 - Updated to reflect MODS 3.2 Mapping 2006/10/11 tmee
+
+Revision 1.11 - The attribute objectPart moved from <languageTerm> to <language>
+ 2006/04/08 jrad
+
+Revision 1.10 MODS 3.1 revisions to language and classification elements
+ (plus ability to find marc:collection embedded in wrapper elements such as SRU zs: wrappers)
+ 2006/02/06 ggar
+
+Revision 1.9 subfield $y was added to field 242 2004/09/02 10:57 jrad
+
+Revision 1.8 Subject chopPunctuation expanded and attribute fixes 2004/08/12 jrad
+
+Revision 1.7 2004/03/25 08:29 jrad
+
+Revision 1.6 various validation fixes 2004/02/20 ntra
+
+Revision 1.5 2003/10/02 16:18:58 ntra
+MODS2 to MODS3 updates, language unstacking and
+de-duping, chopPunctuation expanded
+
+Revision 1.3 2003/04/03 00:07:19 ntra
+Revision 1.3 Additional Changes not related to MODS Version 2.0 by ntra
+
+Revision 1.2 2003/03/24 19:37:42 ckeith
+Added Log Comment
+
+-->
+ <xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="//marc:collection">
+ <modsCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
+ <xsl:for-each select="//marc:collection/marc:record">
+ <mods version="3.2">
+ <xsl:call-template name="marcRecord"/>
+ </mods>
+ </xsl:for-each>
+ </modsCollection>
+ </xsl:when>
+ <xsl:otherwise>
+ <mods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.2" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-2.xsd">
+ <xsl:for-each select="//marc:record">
+ <xsl:call-template name="marcRecord"/>
+ </xsl:for-each>
+ </mods>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="marcRecord">
+ <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="typeOf008">
+ <xsl:choose>
+ <xsl:when test="$leader6='a'">
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">SE</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$leader6='t'">BK</xsl:when>
+ <xsl:when test="$leader6='p'">MM</xsl:when>
+ <xsl:when test="$leader6='m'">CF</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
+ <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">MU</xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="marc:datafield[@tag='245']">
+ <titleInfo>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='b']">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="beforeCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abfgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="$title"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop"/>
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">b</xsl:with-param>
+ <xsl:with-param name="anyCodes">b</xsl:with-param>
+ <xsl:with-param name="afterCodes">afgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <!-- A form of title that ignores non-filing characters; useful
+ for not converting "L'Oreal" into "L' Oreal" at index time -->
+ <titleNonfiling>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abfgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleNonfiling>
+ <!-- hybrid of titleInfo and titleNonfiling which will give us a preformatted string (for punctuation)
+ but also keep the nonSort stuff in a separate field (for sorting) -->
+ <titleBrowse>
+ <xsl:variable name="titleBrowseChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abfgk</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleBrowseChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleBrowseChop, at ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleBrowseChop"/>
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleBrowse>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='210']">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='242']">
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <!-- 1/04 removed $h, b -->
+ <xsl:with-param name="codes">a</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo type="translated">
+ <!--09/01/04 Added subfield $y-->
+ <xsl:for-each select="marc:subfield[@code='y']">
+ <xsl:attribute name="lang">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <!-- 1/04 fix -->
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <titleInfo type="translated-nfi">
+ <xsl:for-each select="marc:subfield[@code='y']">
+ <xsl:attribute name="lang">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='246']">
+ <titleInfo type="alternative">
+ <xsl:for-each select="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="text()"/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <!-- 1/04 removed $h, $b -->
+ <xsl:with-param name="codes">af</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="subtitle"/>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='130']|marc:datafield[@tag='240']|marc:datafield[@tag='730'][@ind2!='2']">
+ <xsl:variable name="nfi">
+ <xsl:choose>
+ <xsl:when test="@tag='240'">
+ <xsl:value-of select="@ind2"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@ind1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="uri" />
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="(contains('adfklmor', at 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:variable>
+ <titleInfo type="uniform">
+ <title>
+ <xsl:value-of select="$titleChop"/>
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <titleInfo type="uniform-nfi">
+ <xsl:choose>
+ <xsl:when test="$nfi>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1,$nfi)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop,$nfi+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop"/>
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='740'][@ind2!='2']">
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ah</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo type="alternative">
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <titleInfo type="alternative-nfi">
+ <xsl:choose>
+ <xsl:when test="@ind1>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind1)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind1+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='100']">
+ <name type="personal">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameABCDQ"/>
+ <xsl:call-template name="affiliation"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='110']">
+ <name type="corporate">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameABCDN"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='111']">
+ <name type="conference">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameACDEQ"/>
+ <role>
+ <roleTerm authority="marcrelator" type="text">creator</roleTerm>
+ </role>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='700'][not(marc:subfield[@code='t'])]">
+ <name type="personal">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameABCDQ"/>
+ <xsl:call-template name="affiliation"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='710'][not(marc:subfield[@code='t'])]">
+ <name type="corporate">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameABCDN"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='711'][not(marc:subfield[@code='t'])]">
+ <name type="conference">
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="nameACDEQ"/>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='720'][not(marc:subfield[@code='t'])]">
+ <name>
+ <xsl:if test="@ind1=1">
+ <xsl:attribute name="type">
+ <xsl:text>personal</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <namePart>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ </xsl:for-each>
+ <typeOfResource>
+ <xsl:if test="$leader7='c'">
+ <xsl:attribute name="collection">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$leader6='d' or $leader6='f' or $leader6='p' or $leader6='t'">
+ <xsl:attribute name="manuscript">yes</xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$leader6='a' or $leader6='t'">text</xsl:when>
+ <xsl:when test="$leader6='e' or $leader6='f'">cartographic</xsl:when>
+ <xsl:when test="$leader6='c' or $leader6='d'">notated music</xsl:when>
+ <xsl:when test="$leader6='i'">sound recording-nonmusical</xsl:when>
+ <xsl:when test="$leader6='j'">sound recording-musical</xsl:when>
+ <xsl:when test="$leader6='k'">still image</xsl:when>
+ <xsl:when test="$leader6='g'">moving image</xsl:when>
+ <xsl:when test="$leader6='r'">three dimensional object</xsl:when>
+ <xsl:when test="$leader6='m'">software, multimedia</xsl:when>
+ <xsl:when test="$leader6='p'">mixed material</xsl:when>
+ </xsl:choose>
+ </typeOfResource>
+ <xsl:if test="substring($controlField008,26,1)='d'">
+ <genre authority="marc">globe</genre>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag='007'][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
+ <genre authority="marc">remote sensing image</genre>
+ </xsl:if>
+ <xsl:if test="$typeOf008='MP'">
+ <xsl:variable name="controlField008-25" select="substring($controlField008,26,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-25='a' or $controlField008-25='b' or $controlField008-25='c' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
+ <genre authority="marc">map</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-25='e' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
+ <genre authority="marc">atlas</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='SE'">
+ <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-21='d'">
+ <genre authority="marc">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='l'">
+ <genre authority="marc">loose-leaf</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='m'">
+ <genre authority="marc">series</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='n'">
+ <genre authority="marc">newspaper</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='p'">
+ <genre authority="marc">periodical</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-21='w'">
+ <genre authority="marc">web site</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='BK' or $typeOf008='SE'">
+ <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="contains($controlField008-24,'a')">
+ <genre authority="marc">abstract or summary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'b')">
+ <genre authority="marc">bibliography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'c')">
+ <genre authority="marc">catalog</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'d')">
+ <genre authority="marc">dictionary</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'e')">
+ <genre authority="marc">encyclopedia</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'f')">
+ <genre authority="marc">handbook</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'g')">
+ <genre authority="marc">legal article</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'i')">
+ <genre authority="marc">index</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'k')">
+ <genre authority="marc">discography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'l')">
+ <genre authority="marc">legislation</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'m')">
+ <genre authority="marc">theses</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'n')">
+ <genre authority="marc">survey of literature</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'o')">
+ <genre authority="marc">review</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'p')">
+ <genre authority="marc">programmed text</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'q')">
+ <genre authority="marc">filmography</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'r')">
+ <genre authority="marc">directory</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'s')">
+ <genre authority="marc">statistics</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'t')">
+ <genre authority="marc">technical report</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'v')">
+ <genre authority="marc">legal case and case notes</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'w')">
+ <genre authority="marc">law report or digest</genre>
+ </xsl:when>
+ <xsl:when test="contains($controlField008-24,'z')">
+ <genre authority="marc">treaty</genre>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-29='1'">
+ <genre authority="marc">conference publication</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='CF'">
+ <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-26='a'">
+ <genre authority="marc">numeric data</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='e'">
+ <genre authority="marc">database</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='f'">
+ <genre authority="marc">font</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-26='g'">
+ <genre authority="marc">game</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='BK'">
+ <xsl:if test="substring($controlField008,25,1)='j'">
+ <genre authority="marc">patent</genre>
+ </xsl:if>
+ <xsl:if test="substring($controlField008,31,1)='1'">
+ <genre authority="marc">festschrift</genre>
+ </xsl:if>
+ <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"></xsl:variable>
+ <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
+ <genre authority="marc">biography</genre>
+ </xsl:if>
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='e'">
+ <genre authority="marc">essay</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marc">drama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marc">comic strip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marc">fiction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='h'">
+ <genre authority="marc">humor, satire</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marc">letter</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marc">novel</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='j'">
+ <genre authority="marc">short story</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marc">speech</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="$typeOf008='MU'">
+ <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"></xsl:variable>
+ <xsl:if test="contains($controlField008-30-31,'b')">
+ <genre authority="marc">biography</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'c')">
+ <genre authority="marc">conference publication</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'d')">
+ <genre authority="marc">drama</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'e')">
+ <genre authority="marc">essay</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'f')">
+ <genre authority="marc">fiction</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'o')">
+ <genre authority="marc">folktale</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'h')">
+ <genre authority="marc">history</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'k')">
+ <genre authority="marc">humor, satire</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'m')">
+ <genre authority="marc">memoir</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'p')">
+ <genre authority="marc">poetry</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'r')">
+ <genre authority="marc">rehearsal</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'g')">
+ <genre authority="marc">reporting</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'s')">
+ <genre authority="marc">sound</genre>
+ </xsl:if>
+ <xsl:if test="contains($controlField008-30-31,'l')">
+ <genre authority="marc">speech</genre>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$typeOf008='VM'">
+ <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$controlField008-33='a'">
+ <genre authority="marc">art original</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='b'">
+ <genre authority="marc">kit</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='c'">
+ <genre authority="marc">art reproduction</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='d'">
+ <genre authority="marc">diorama</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='f'">
+ <genre authority="marc">filmstrip</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='g'">
+ <genre authority="marc">legal article</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='i'">
+ <genre authority="marc">picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='k'">
+ <genre authority="marc">graphic</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='l'">
+ <genre authority="marc">technical drawing</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='m'">
+ <genre authority="marc">motion picture</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='n'">
+ <genre authority="marc">chart</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='o'">
+ <genre authority="marc">flash card</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='p'">
+ <genre authority="marc">microscope slide</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
+ <genre authority="marc">model</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='r'">
+ <genre authority="marc">realia</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='s'">
+ <genre authority="marc">slide</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='t'">
+ <genre authority="marc">transparency</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='v'">
+ <genre authority="marc">videorecording</genre>
+ </xsl:when>
+ <xsl:when test="$controlField008-33='w'">
+ <genre authority="marc">toy</genre>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=655]">
+ <genre authority="marc">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"/>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abvxyz</xsl:with-param>
+ <xsl:with-param name="delimeter">-</xsl:with-param>
+ </xsl:call-template>
+ </genre>
+ </xsl:for-each>
+ <originInfo>
+ <xsl:variable name="MARCpublicationCode" select="normalize-space(substring($controlField008,16,3))"></xsl:variable>
+ <xsl:if test="translate($MARCpublicationCode,'|','')">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marccountry</xsl:attribute>
+ <xsl:value-of select="$MARCpublicationCode"/>
+ </placeTerm>
+ </place>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=044]/marc:subfield[@code='c']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">iso3166</xsl:attribute>
+ <xsl:value-of select="."/>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='a']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:call-template name="chopPunctuationFront">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='m']">
+ <dateValid point="start">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='n']">
+ <dateValid point="end">
+ <xsl:value-of select="."/>
+ </dateValid>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=046]/marc:subfield[@code='j']">
+ <dateModified>
+ <xsl:value-of select="."/>
+ </dateModified>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=260]/marc:subfield[@code='b' or @code='c' or @code='g']">
+ <xsl:choose>
+ <xsl:when test="@code='b'">
+ <publisher>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ <xsl:with-param name="punctuation">
+ <xsl:text>:,;/ </xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ </publisher>
+ </xsl:when>
+ <xsl:when test="@code='c'">
+ <dateIssued>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."/>
+ </xsl:call-template>
+ </dateIssued>
+ </xsl:when>
+ <xsl:when test="@code='g'">
+ <dateCreated>
+ <xsl:value-of select="."/>
+ </dateCreated>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:variable name="dataField260c">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="marc:datafield[@tag=260]/marc:subfield[@code='c']"></xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="controlField008-7-10" select="normalize-space(substring($controlField008, 8, 4))"></xsl:variable>
+ <xsl:variable name="controlField008-11-14" select="normalize-space(substring($controlField008, 12, 4))"></xsl:variable>
+ <xsl:variable name="controlField008-6" select="normalize-space(substring($controlField008, 7, 1))"></xsl:variable>
+ <xsl:if test="$controlField008-6='e' or $controlField008-6='p' or $controlField008-6='r' or $controlField008-6='t' or $controlField008-6='s'">
+ <xsl:if test="$controlField008-7-10 and ($controlField008-7-10 != $dataField260c)">
+ <dateIssued encoding="marc">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='c' or $controlField008-6='d' or $controlField008-6='i' or $controlField008-6='k' or $controlField008-6='m' or $controlField008-6='q' or $controlField008-6='u'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-7-10">
+ <dateIssued encoding="marc" point="start" qualifier="questionable">
+ <xsl:value-of select="$controlField008-7-10"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='q'">
+ <xsl:if test="$controlField008-11-14">
+ <dateIssued encoding="marc" point="end" qualifier="questionable">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </dateIssued>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$controlField008-6='t'">
+ <xsl:if test="$controlField008-11-14">
+ <copyrightDate encoding="marc">
+ <xsl:value-of select="$controlField008-11-14"/>
+ </copyrightDate>
+ </xsl:if>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=0 or @ind1=1]/marc:subfield[@code='a']">
+ <dateCaptured encoding="iso8601">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][1]">
+ <dateCaptured encoding="iso8601" point="start">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=033][@ind1=2]/marc:subfield[@code='a'][2]">
+ <dateCaptured encoding="iso8601" point="end">
+ <xsl:value-of select="."/>
+ </dateCaptured>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=250]/marc:subfield[@code='a']">
+ <edition>
+ <xsl:value-of select="."/>
+ </edition>
+ </xsl:for-each>
+ <xsl:for-each select="marc:leader">
+ <issuance>
+ <xsl:choose>
+ <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">monographic</xsl:when>
+ <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">continuing</xsl:when>
+ </xsl:choose>
+ </issuance>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=310]|marc:datafield[@tag=321]">
+ <frequency>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </frequency>
+ </xsl:for-each>
+ </originInfo>
+ <xsl:variable name="controlField008-35-37" select="normalize-space(translate(substring($controlField008,36,3),'|#',''))"></xsl:variable>
+ <xsl:if test="$controlField008-35-37">
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($controlField008,36,3)"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=041]">
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='d' or @code='e' or @code='f' or @code='g' or @code='h']">
+ <xsl:variable name="langCodes" select="."/>
+ <xsl:choose>
+ <xsl:when test="../marc:subfield[@code='2']='rfc3066'">
+ <!-- not stacked but could be repeated -->
+ <xsl:call-template name="rfcLanguages">
+ <xsl:with-param name="nodeNum">
+ <xsl:value-of select="1"/>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:text></xsl:text>
+ </xsl:with-param>
+ <xsl:with-param name="controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- iso -->
+ <xsl:variable name="allLanguages">
+ <xsl:copy-of select="$langCodes"></xsl:copy-of>
+ </xsl:variable>
+ <xsl:variable name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"></xsl:value-of>
+ </xsl:variable>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($allLanguages,1,3)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($allLanguages,4,string-length($allLanguages)-3)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:if test="$controlField008-35-37">
+ <xsl:value-of select="$controlField008-35-37"></xsl:value-of>
+ </xsl:if>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:variable name="physicalDescription">
+ <!--3.2 change tmee 007/11 -->
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a']">
+ <digitalOrigin>reformatted digital</digitalOrigin>
+ </xsl:if>
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='b']">
+ <digitalOrigin>digitized microfilm</digitalOrigin>
+ </xsl:if>
+ <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='d']">
+ <digitalOrigin>digitized other analog</digitalOrigin>
+ </xsl:if>
+ <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"></xsl:variable>
+ <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"></xsl:variable>
+ <xsl:variable name="check008-23">
+ <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='SE' or $typeOf008='MM'">
+ <xsl:value-of select="true()"></xsl:value-of>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:variable name="check008-29">
+ <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
+ <xsl:value-of select="true()"></xsl:value-of>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
+ <form authority="marcform">braille</form>
+ </xsl:when>
+ <xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='SE') and ($controlField008-23=' ' or $controlField008='r'))">
+ <form authority="marcform">print</form>
+ </xsl:when>
+ <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
+ <form authority="marcform">electronic</form>
+ </xsl:when>
+ <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
+ <form authority="marcform">microfiche</form>
+ </xsl:when>
+ <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
+ <form authority="marcform">microfilm</form>
+ </xsl:when>
+ </xsl:choose>
+ <!-- 1/04 fix -->
+ <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
+ <form authority="gmd">
+ <xsl:call-template name="chopBrackets">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </form>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
+ <form>
+ <xsl:value-of select="."></xsl:value-of>
+ </form>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
+ <xsl:choose>
+ <xsl:when test="substring(text(),14,1)='a'">
+ <reformattingQuality>access</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='p'">
+ <reformattingQuality>preservation</reformattingQuality>
+ </xsl:when>
+ <xsl:when test="substring(text(),14,1)='r'">
+ <reformattingQuality>replacement</reformattingQuality>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ <!--3.2 change tmee 007/01 -->
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='b']">
+ <form authority="smd">chip cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='c']">
+ <form authority="smd">computer optical disc cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
+ <form authority="smd">magnetic disc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='m']">
+ <form authority="smd">magneto-optical disc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='o']">
+ <form authority="smd">optical disc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
+ <form authority="smd">remote</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
+ <form authority="smd">tape cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='f']">
+ <form authority="smd">tape cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='h']">
+ <form authority="smd">tape reel</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='a']">
+ <form authority="smd">celestial globe</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='e']">
+ <form authority="smd">earth moon globe</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='b']">
+ <form authority="smd">planetary or lunar globe</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='c']">
+ <form authority="smd">terrestrial globe</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
+ <form authority="smd">kit</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
+ <form authority="smd">atlas</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='g']">
+ <form authority="smd">diagram</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
+ <form authority="smd">map</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
+ <form authority="smd">model</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='k']">
+ <form authority="smd">profile</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
+ <form authority="smd">remote-sensing image</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='s']">
+ <form authority="smd">section</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='y']">
+ <form authority="smd">view</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='a']">
+ <form authority="smd">aperture card</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='e']">
+ <form authority="smd">microfiche</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='f']">
+ <form authority="smd">microfiche cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='b']">
+ <form authority="smd">microfilm cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='c']">
+ <form authority="smd">microfilm cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='d']">
+ <form authority="smd">microfilm reel</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='g']">
+ <form authority="smd">microopaque</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='c']">
+ <form authority="smd">film cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='f']">
+ <form authority="smd">film cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='r']">
+ <form authority="smd">film reel</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='n']">
+ <form authority="smd">chart</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
+ <form authority="smd">collage</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='d']">
+ <form authority="smd">drawing</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='o']">
+ <form authority="smd">flash card</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='e']">
+ <form authority="smd">painting</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
+ <form authority="smd">photomechanical print</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='g']">
+ <form authority="smd">photonegative</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='h']">
+ <form authority="smd">photoprint</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='i']">
+ <form authority="smd">picture</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
+ <form authority="smd">print</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='l']">
+ <form authority="smd">technical drawing</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='q'][substring(text(),2,1)='q']">
+ <form authority="smd">notated music</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
+ <form authority="smd">filmslip</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='c']">
+ <form authority="smd">filmstrip cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='o']">
+ <form authority="smd">filmstrip roll</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='f']">
+ <form authority="smd">other filmstrip type</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='s']">
+ <form authority="smd">slide</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
+ <form authority="smd">transparency</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='r'][substring(text(),2,1)='r']">
+ <form authority="smd">remote-sensing image</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='e']">
+ <form authority="smd">cylinder</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='q']">
+ <form authority="smd">roll</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='g']">
+ <form authority="smd">sound cartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='s']">
+ <form authority="smd">sound cassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='d']">
+ <form authority="smd">sound disc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
+ <form authority="smd">sound-tape reel</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='i']">
+ <form authority="smd">sound-track film</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='w']">
+ <form authority="smd">wire recording</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='c']">
+ <form authority="smd">braille</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='b']">
+ <form authority="smd">combination</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='a']">
+ <form authority="smd">moon</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='d']">
+ <form authority="smd">tactile, with no writing system</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='c']">
+ <form authority="smd">braille</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='b']">
+ <form authority="smd">large print</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
+ <form authority="smd">regular print</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='d']">
+ <form authority="smd">text in looseleaf binder</form>
+ </xsl:if>
+
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='c']">
+ <form authority="smd">videocartridge</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='f']">
+ <form authority="smd">videocassette</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='d']">
+ <form authority="smd">videodisc</form>
+ </xsl:if>
+ <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
+ <form authority="smd">videoreel</form>
+ </xsl:if>
+
+ <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
+ <internetMediaType>
+ <xsl:value-of select="."></xsl:value-of>
+ </internetMediaType>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=300]">
+ <extent>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abce</xsl:with-param>
+ </xsl:call-template>
+ </extent>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($physicalDescription))">
+ <physicalDescription>
+ <xsl:copy-of select="$physicalDescription"></xsl:copy-of>
+ </physicalDescription>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=520]">
+ <abstract>
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </abstract>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=505]">
+ <tableOfContents>
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">agrt</xsl:with-param>
+ </xsl:call-template>
+ </tableOfContents>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=521]">
+ <targetAudience>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </targetAudience>
+ </xsl:for-each>
+ <xsl:if test="$typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM'">
+ <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"></xsl:variable>
+ <xsl:choose>
+ <!-- 01/04 fix -->
+ <xsl:when test="$controlField008-22='d'">
+ <targetAudience authority="marctarget">adolescent</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='e'">
+ <targetAudience authority="marctarget">adult</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='g'">
+ <targetAudience authority="marctarget">general</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='b' or $controlField008-22='c' or $controlField008-22='j'">
+ <targetAudience authority="marctarget">juvenile</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='a'">
+ <targetAudience authority="marctarget">preschool</targetAudience>
+ </xsl:when>
+ <xsl:when test="$controlField008-22='f'">
+ <targetAudience authority="marctarget">specialized</targetAudience>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:for-each select="marc:datafield[@tag=245]/marc:subfield[@code='c']">
+ <note type="statement of responsibility">
+ <xsl:value-of select="."></xsl:value-of>
+ </note>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=500]">
+ <note>
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ <xsl:call-template name="uri"></xsl:call-template>
+ </note>
+ </xsl:for-each>
+
+ <!--3.2 change tmee additional note fields-->
+
+ <xsl:for-each select="marc:datafield[@tag=506]">
+ <note type="restrictions">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=510]">
+ <note type="citation/reference">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+
+ <xsl:for-each select="marc:datafield[@tag=511]">
+ <note type="performers">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=518]">
+ <note type="venue">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=530]">
+ <note type="additional physical form">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=533]">
+ <note type="reproduction">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=534]">
+ <note type="original version">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=538]">
+ <note type="system details">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+ <xsl:for-each select="marc:datafield[@tag=583]">
+ <note type="action">
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+
+
+
+
+
+ <xsl:for-each select="marc:datafield[@tag=501 or @tag=502 or @tag=504 or @tag=507 or @tag=508 or @tag=513 or @tag=514 or @tag=515 or @tag=516 or @tag=522 or @tag=524 or @tag=525 or @tag=526 or @tag=535 or @tag=536 or @tag=540 or @tag=541 or @tag=544 or @tag=545 or @tag=546 or @tag=547 or @tag=550 or @tag=552 or @tag=555 or @tag=556 or @tag=561 or @tag=562 or @tag=565 or @tag=567 or @tag=580 or @tag=581 or @tag=584 or @tag=585 or @tag=586]">
+ <note>
+ <xsl:call-template name="uri"></xsl:call-template>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield[@code!='6' or @code!='8']">
+ <xsl:value-of select="."></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </note>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=034][marc:subfield[@code='d' or @code='e' or @code='f' or @code='g']]">
+ <subject>
+ <cartographics>
+ <coordinates>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">defg</xsl:with-param>
+ </xsl:call-template>
+ </coordinates>
+ </cartographics>
+ </subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=043]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
+ <geographicCode>
+ <xsl:attribute name="authority">
+ <xsl:if test="@code='a'">
+ <xsl:text>marcgac</xsl:text>
+ </xsl:if>
+ <xsl:if test="@code='b'">
+ <xsl:value-of select="following-sibling::marc:subfield[@code=2]"></xsl:value-of>
+ </xsl:if>
+ <xsl:if test="@code='c'">
+ <xsl:text>iso3166</xsl:text>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:value-of select="self::marc:subfield"></xsl:value-of>
+ </geographicCode>
+ </xsl:for-each>
+ </subject>
+ </xsl:for-each>
+ <!-- tmee 2006/11/27 -->
+ <xsl:for-each select="marc:datafield[@tag=255]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a' or @code='b' or @code='c']">
+ <cartographics>
+ <xsl:if test="@code='a'">
+ <scale>
+ <xsl:value-of select="."></xsl:value-of>
+ </scale>
+ </xsl:if>
+ <xsl:if test="@code='b'">
+ <projection>
+ <xsl:value-of select="."></xsl:value-of>
+ </projection>
+ </xsl:if>
+ <xsl:if test="@code='c'">
+ <coordinates>
+ <xsl:value-of select="."></xsl:value-of>
+ </coordinates>
+ </xsl:if>
+ </cartographics>
+ </xsl:for-each>
+ </subject>
+ </xsl:for-each>
+
+ <xsl:apply-templates select="marc:datafield[653 >= @tag and @tag >= 600]"></xsl:apply-templates>
+ <xsl:apply-templates select="marc:datafield[@tag=656]"></xsl:apply-templates>
+ <xsl:for-each select="marc:datafield[@tag=752]">
+ <subject>
+ <hierarchicalGeographic>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <country>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </country>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <state>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </state>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <county>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </county>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <city>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </city>
+ </xsl:for-each>
+ </hierarchicalGeographic>
+ </subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=045][marc:subfield[@code='b']]">
+ <subject>
+ <xsl:choose>
+ <xsl:when test="@ind1=2">
+ <temporal encoding="iso8601" point="start">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b'][1]"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ <temporal encoding="iso8601" point="end">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b'][2]"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
+ </subject>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=050]">
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <classification authority="lcc">
+ <xsl:if test="../marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="../marc:subfield[@code='3']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="preceding-sibling::marc:subfield[@code='a'][1]"></xsl:value-of>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="text()"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='a'][not(following-sibling::marc:subfield[@code='b'])]">
+ <classification authority="lcc">
+ <xsl:if test="../marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="../marc:subfield[@code='3']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="text()"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=082]">
+ <classification authority="ddc">
+ <xsl:if test="marc:subfield[@code='2']">
+ <xsl:attribute name="edition">
+ <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=080]">
+ <classification authority="udc">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abx</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=060]">
+ <classification authority="nlm">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=0]">
+ <classification authority="sudocs">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=086][@ind1=1]">
+ <classification authority="candoc">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=086]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
+ </xsl:attribute>
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=084]">
+ <classification>
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
+ </xsl:attribute>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </classification>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=440]">
+ <relatedItem type="series">
+ <xsl:variable name="titleChop">
+ <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>
+ </xsl:variable>
+ <titleInfo>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <titleInfo type="nfi">
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind2+1)"/>
+ </title>
+ <xsl:call-template name="part"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <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>
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=510]">
+ <relatedItem type="isReferencedBy">
+ <note>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcx3</xsl:with-param>
+ </xsl:call-template>
+ </note>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=534]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedTitle"></xsl:call-template>
+ <xsl:call-template name="relatedName"></xsl:call-template>
+ <xsl:if test="marc:subfield[@code='b' or @code='c']">
+ <originInfo>
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <publisher>
+ <xsl:value-of select="."></xsl:value-of>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."></xsl:value-of>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ <xsl:for-each select="marc:subfield[@code='z']">
+ <identifier type="isbn">
+ <xsl:value-of select="."></xsl:value-of>
+ </identifier>
+ </xsl:for-each>
+ <xsl:call-template name="relatedNote"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"></xsl:call-template>
+ <xsl:call-template name="nameDate"></xsl:call-template>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=710][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:variable name="tempNamePart">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="normalize-space($tempNamePart)">
+ <namePart>
+ <xsl:value-of select="$tempNamePart"></xsl:value-of>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=711][marc:subfield[@code='t']]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=730][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=740][@ind2=2]">
+ <relatedItem>
+ <xsl:call-template name="constituentOrRelatedType"></xsl:call-template>
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <titleInfo type="nfi">
+ <xsl:choose>
+ <xsl:when test="@ind1>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind1)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind1+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=760]|marc:datafield[@tag=762]">
+ <relatedItem type="series">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=765]|marc:datafield[@tag=767]|marc:datafield[@tag=777]|marc:datafield[@tag=787]">
+ <relatedItem>
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=775]">
+ <relatedItem type="otherVersion">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=770]|marc:datafield[@tag=774]">
+ <relatedItem type="constituent">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=772]|marc:datafield[@tag=773]">
+ <relatedItem type="host">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=776]">
+ <relatedItem type="otherFormat">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=780]">
+ <relatedItem type="preceding">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=785]">
+ <relatedItem type="succeeding">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=786]">
+ <relatedItem type="original">
+ <xsl:call-template name="relatedItem76X-78X"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=800]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <name type="personal">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aq</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"></xsl:call-template>
+ <xsl:call-template name="nameDate"></xsl:call-template>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=810]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklmorsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">dg</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </titleInfo>
+ <name type="corporate">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">c</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">dgn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="relatedForm"></xsl:call-template>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=811]">
+ <relatedItem type="series">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">tfklsv</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="afterCodes">g</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="relatedPartNumName"/>
+ </titleInfo>
+ <name type="conference">
+ <namePart>
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="anyCodes">aqdc</xsl:with-param>
+ <xsl:with-param name="axis">t</xsl:with-param>
+ <xsl:with-param name="beforeCodes">gn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:call-template name="role"/>
+ </name>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='830']">
+ <relatedItem type="series">
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfgklmorsv</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <titleInfo type="nfi">
+ <xsl:choose>
+ <xsl:when test="@ind2>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind2)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind2+1)"/>
+ </title>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"/>
+ </titleInfo>
+ <xsl:call-template name="relatedForm"/>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='856'][@ind2='2']/marc:subfield[@code='q']">
+ <relatedItem>
+ <internetMediaType>
+ <xsl:value-of select="."/>
+ </internetMediaType>
+ </relatedItem>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='020']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">isbn</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='a']">
+ <identifier type="isbn">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='024'][@ind1='0']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">isrc</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='a']">
+ <identifier type="isrc">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='024'][@ind1='2']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">ismn</xsl:with-param>
+ </xsl:call-template>
+ <xsl:if test="marc:subfield[@code='a']">
+ <identifier type="ismn">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='024'][@ind1='4']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">sici</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="sici">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='022']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">issn</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="issn">
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='010']">
+ <xsl:call-template name="isInvalid">
+ <xsl:with-param name="type">lccn</xsl:with-param>
+ </xsl:call-template>
+ <identifier type="lccn">
+ <xsl:value-of select="normalize-space(marc:subfield[@code='a'])"/>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='028']">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="@ind1='0'">issue number</xsl:when>
+ <xsl:when test="@ind1='1'">matrix number</xsl:when>
+ <xsl:when test="@ind1='2'">music plate</xsl:when>
+ <xsl:when test="@ind1='3'">music publisher</xsl:when>
+ <xsl:when test="@ind1='4'">videorecording identifier</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <!--<xsl:call-template name="isInvalid"/>--> <!-- no $z in 028 -->
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">
+ <xsl:choose>
+ <xsl:when test="@ind1='0'">ba</xsl:when>
+ <xsl:otherwise>ab</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='037']">
+ <identifier type="stock number">
+ <!--<xsl:call-template name="isInvalid"/>--> <!-- no $z in 037 -->
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">ab</xsl:with-param>
+ </xsl:call-template>
+ </identifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag='856'][marc:subfield[@code='u']]">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:choose>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:doi') or starts-with(marc:subfield[@code='u'],'doi')">doi</xsl:when>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov')">hdl</xsl:when>
+ <xsl:otherwise>uri</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl') or starts-with(marc:subfield[@code='u'],'http://hdl.loc.gov') ">
+ <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="marc:subfield[@code='u']"></xsl:value-of>
+ </xsl:otherwise>
+ </xsl:choose>
+ </identifier>
+ <xsl:if test="starts-with(marc:subfield[@code='u'],'urn:hdl') or starts-with(marc:subfield[@code='u'],'hdl')">
+ <identifier type="hdl">
+ <xsl:if test="marc:subfield[@code='y' or @code='3' or @code='z']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="concat('hdl:',substring-after(marc:subfield[@code='u'],'http://hdl.loc.gov/'))"></xsl:value-of>
+ </identifier>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=024][@ind1=1]">
+ <identifier type="upc">
+ <xsl:call-template name="isInvalid"/>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </identifier>
+ </xsl:for-each>
+ <!-- 1/04 fix added $y -->
+ <xsl:for-each select="marc:datafield[@tag=856][marc:subfield[@code='u']]">
+ <location>
+ <url>
+ <xsl:if test="marc:subfield[@code='y' or @code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='z' ]">
+ <xsl:attribute name="note">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="marc:subfield[@code='u']"></xsl:value-of>
+
+ </url>
+ </location>
+ </xsl:for-each>
+
+ <!-- 3.2 change tmee 856z -->
+
+
+ <xsl:for-each select="marc:datafield[@tag=852]">
+ <location>
+ <physicalLocation>
+ <xsl:call-template name="displayLabel"></xsl:call-template>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abje</xsl:with-param>
+ </xsl:call-template>
+ </physicalLocation>
+ </location>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=506]">
+ <accessCondition type="restrictionOnAccess">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=540]">
+ <accessCondition type="useAndReproduction">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcde35</xsl:with-param>
+ </xsl:call-template>
+ </accessCondition>
+ </xsl:for-each>
+ <recordInfo>
+ <xsl:for-each select="marc:datafield[@tag=040]">
+ <recordContentSource authority="marcorg">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </recordContentSource>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=008]">
+ <recordCreationDate encoding="marc">
+ <xsl:value-of select="substring(.,1,6)"></xsl:value-of>
+ </recordCreationDate>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=005]">
+ <recordChangeDate encoding="iso8601">
+ <xsl:value-of select="."></xsl:value-of>
+ </recordChangeDate>
+ </xsl:for-each>
+ <xsl:for-each select="marc:controlfield[@tag=001]">
+ <recordIdentifier>
+ <xsl:if test="../marc:controlfield[@tag=003]">
+ <xsl:attribute name="source">
+ <xsl:value-of select="../marc:controlfield[@tag=003]"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="."></xsl:value-of>
+ </recordIdentifier>
+ </xsl:for-each>
+ <xsl:for-each select="marc:datafield[@tag=040]/marc:subfield[@code='b']">
+ <languageOfCataloging>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="."></xsl:value-of>
+ </languageTerm>
+ </languageOfCataloging>
+ </xsl:for-each>
+ </recordInfo>
+ </xsl:template>
+ <xsl:template name="displayForm">
+ <xsl:for-each select="marc:subfield[@code='c']">
+ <displayForm>
+ <xsl:value-of select="."></xsl:value-of>
+ </displayForm>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="affiliation">
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <affiliation>
+ <xsl:value-of select="."></xsl:value-of>
+ </affiliation>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="uri">
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:attribute>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='0']">
+ <xsl:choose>
+ <xsl:when test="contains(text(), ')')">
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="substring-after(text(), ')')"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="xlink:href">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="role">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <role>
+ <roleTerm type="text">
+ <xsl:value-of select="."></xsl:value-of>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."></xsl:value-of>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </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">fgkdlmor</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">fgkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partNumber"></xsl:with-param>
+ </xsl:call-template>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$partName"></xsl:with-param>
+ </xsl:call-template>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedPart">
+ <xsl:if test="@tag=773">
+ <xsl:for-each select="marc:subfield[@code='g']">
+ <part>
+ <text>
+ <xsl:value-of select="."></xsl:value-of>
+ </text>
+ </part>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='q']">
+ <part>
+ <xsl:call-template name="parsePart"></xsl:call-template>
+ </part>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedPartNumName">
+ <xsl:variable name="partNumber">
+ <xsl:call-template name="specialSubfieldSelect">
+ <xsl:with-param name="axis">g</xsl:with-param>
+ <xsl:with-param name="anyCodes">g</xsl:with-param>
+ <xsl:with-param name="afterCodes">pst</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">fgkdlmor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string-length(normalize-space($partNumber))">
+ <partNumber>
+ <xsl:value-of select="$partNumber"></xsl:value-of>
+ </partNumber>
+ </xsl:if>
+ <xsl:if test="string-length(normalize-space($partName))">
+ <partName>
+ <xsl:value-of select="$partName"></xsl:value-of>
+ </partName>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedName">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <name>
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </name>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedForm">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <form>
+ <xsl:value-of select="."></xsl:value-of>
+ </form>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedExtent">
+ <xsl:for-each select="marc:subfield[@code='h']">
+ <physicalDescription>
+ <extent>
+ <xsl:value-of select="."></xsl:value-of>
+ </extent>
+ </physicalDescription>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedNote">
+ <xsl:for-each select="marc:subfield[@code='n']">
+ <note>
+ <xsl:value-of select="."></xsl:value-of>
+ </note>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedSubject">
+ <xsl:for-each select="marc:subfield[@code='j']">
+ <subject>
+ <temporal encoding="iso8601">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </subject>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedIdentifierISSN">
+ <xsl:for-each select="marc:subfield[@code='x']">
+ <identifier type="issn">
+ <xsl:value-of select="."></xsl:value-of>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedIdentifierLocal">
+ <xsl:for-each select="marc:subfield[@code='w']">
+ <identifier type="local">
+ <xsl:value-of select="."></xsl:value-of>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedIdentifier">
+ <xsl:for-each select="marc:subfield[@code='o']">
+ <identifier>
+ <xsl:value-of select="."></xsl:value-of>
+ </identifier>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedItem76X-78X">
+ <xsl:call-template name="displayLabel"></xsl:call-template>
+ <xsl:call-template name="relatedTitle76X-78X"></xsl:call-template>
+ <xsl:call-template name="relatedName"></xsl:call-template>
+ <xsl:call-template name="relatedOriginInfo"></xsl:call-template>
+ <xsl:call-template name="relatedLanguage"></xsl:call-template>
+ <xsl:call-template name="relatedExtent"></xsl:call-template>
+ <xsl:call-template name="relatedNote"></xsl:call-template>
+ <xsl:call-template name="relatedSubject"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifier"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierISSN"></xsl:call-template>
+ <xsl:call-template name="relatedIdentifierLocal"></xsl:call-template>
+ <xsl:call-template name="relatedPart"></xsl:call-template>
+ </xsl:template>
+ <xsl:template name="subjectGeographicZ">
+ <geographic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </geographic>
+ </xsl:template>
+ <xsl:template name="subjectTemporalY">
+ <temporal>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </temporal>
+ </xsl:template>
+ <xsl:template name="subjectTopic">
+ <topic>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </topic>
+ </xsl:template>
+ <!-- 3.2 change tmee 6xx $v genre -->
+ <xsl:template name="subjectGenre">
+ <genre>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </genre>
+ </xsl:template>
+
+ <xsl:template name="nameABCDN">
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">cdn</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="nameABCDQ">
+ <namePart>
+ <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>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"></xsl:call-template>
+ <xsl:call-template name="nameDate"></xsl:call-template>
+ </xsl:template>
+ <xsl:template name="nameACDEQ">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">acdeq</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:template>
+ <xsl:template name="constituentOrRelatedType">
+ <xsl:if test="@ind2=2">
+ <xsl:attribute name="type">constituent</xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedTitle">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedTitle76X-78X">
+ <xsl:for-each select="marc:subfield[@code='t']">
+ <titleInfo>
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='p']">
+ <titleInfo type="abbreviated">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='s']">
+ <titleInfo type="uniform">
+ <title>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </title>
+ <xsl:if test="marc:datafield[@tag!=773]and marc:subfield[@code='g']">
+ <xsl:call-template name="relatedPartNumName"></xsl:call-template>
+ </xsl:if>
+ </titleInfo>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="relatedOriginInfo">
+ <xsl:if test="marc:subfield[@code='b' or @code='d'] or marc:subfield[@code='f']">
+ <originInfo>
+ <xsl:if test="@tag=775">
+ <xsl:for-each select="marc:subfield[@code='f']">
+ <place>
+ <placeTerm>
+ <xsl:attribute name="type">code</xsl:attribute>
+ <xsl:attribute name="authority">marcgac</xsl:attribute>
+ <xsl:value-of select="."></xsl:value-of>
+ </placeTerm>
+ </place>
+ </xsl:for-each>
+ </xsl:if>
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <publisher>
+ <xsl:value-of select="."></xsl:value-of>
+ </publisher>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <edition>
+ <xsl:value-of select="."></xsl:value-of>
+ </edition>
+ </xsl:for-each>
+ </originInfo>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="relatedLanguage">
+ <xsl:for-each select="marc:subfield[@code='e']">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString">
+ <xsl:value-of select="."></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="nameDate">
+ <xsl:for-each select="marc:subfield[@code='d']">
+ <namePart type="date">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="subjectAuthority">
+ <xsl:if test="@ind2!=4">
+ <xsl:if test="@ind2!=' '">
+ <xsl:if test="@ind2!=8">
+ <xsl:if test="@ind2!=9">
+ <xsl:attribute name="authority">
+ <xsl:choose>
+ <xsl:when test="@ind2=0">lcsh</xsl:when>
+ <xsl:when test="@ind2=1">lcshac</xsl:when>
+ <xsl:when test="@ind2=2">mesh</xsl:when>
+ <!-- 1/04 fix -->
+ <xsl:when test="@ind2=3">nal</xsl:when>
+ <xsl:when test="@ind2=5">csh</xsl:when>
+ <xsl:when test="@ind2=6">rvm</xsl:when>
+ <xsl:when test="@ind2=7">
+ <xsl:value-of select="marc:subfield[@code='2']"></xsl:value-of>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="subjectAnyOrder">
+ <xsl:for-each select="marc:subfield[@code='v' or @code='x' or @code='y' or @code='z']">
+ <xsl:choose>
+ <xsl:when test="@code='v'">
+ <xsl:call-template name="subjectGenre"></xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@code='x'">
+ <xsl:call-template name="subjectTopic"></xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@code='y'">
+ <xsl:call-template name="subjectTemporalY"></xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@code='z'">
+ <xsl:call-template name="subjectGeographicZ"></xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="specialSubfieldSelect">
+ <xsl:param name="anyCodes"></xsl:param>
+ <xsl:param name="axis"></xsl:param>
+ <xsl:param name="beforeCodes"></xsl:param>
+ <xsl:param name="afterCodes"></xsl:param>
+ <xsl:variable name="str">
+ <xsl:for-each select="marc:subfield">
+ <xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes, at code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes, at code) and preceding-sibling::marc:subfield[@code=$axis])">
+ <xsl:value-of select="text()"></xsl:value-of>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:value-of select="substring($str,1,string-length($str)-1)"></xsl:value-of>
+ </xsl:template>
+
+ <!-- 3.2 change tmee 6xx $v genre -->
+ <xsl:template match="marc:datafield[@tag=600]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <name type="personal">
+ <xsl:call-template name="uri" />
+ <namePart>
+ <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:call-template>
+ </namePart>
+ <xsl:call-template name="termsOfAddress"></xsl:call-template>
+ <xsl:call-template name="nameDate"></xsl:call-template>
+ <xsl:call-template name="affiliation"></xsl:call-template>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=610]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <name type="corporate">
+ <xsl:call-template name="uri" />
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:for-each select="marc:subfield[@code='b']">
+ <namePart>
+ <xsl:value-of select="."></xsl:value-of>
+ </namePart>
+ </xsl:for-each>
+ <xsl:if test="marc:subfield[@code='c' or @code='d' or @code='n' or @code='p']">
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">cdnp</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ </xsl:if>
+ <xsl:call-template name="role"></xsl:call-template>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=611]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <name type="conference">
+ <xsl:call-template name="uri" />
+ <namePart>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdeqnp</xsl:with-param>
+ </xsl:call-template>
+ </namePart>
+ <xsl:for-each select="marc:subfield[@code='4']">
+ <role>
+ <roleTerm authority="marcrelator" type="code">
+ <xsl:value-of select="."></xsl:value-of>
+ </roleTerm>
+ </role>
+ </xsl:for-each>
+ </name>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=630]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <xsl:variable name="titleChop">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">adfhklor</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <titleInfo>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <titleInfo type="nfi">
+ <xsl:choose>
+ <xsl:when test="@ind1>0">
+ <nonSort>
+ <xsl:value-of select="substring($titleChop,1, at ind1)"/>
+ </nonSort>
+ <title>
+ <xsl:value-of select="substring($titleChop, at ind1+1)"/>
+ </title>
+ <xsl:call-template name="part"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <title>
+ <xsl:value-of select="$titleChop" />
+ </title>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="part"></xsl:call-template>
+ </titleInfo>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=650]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <topic>
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </topic>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=651]">
+ <subject>
+ <xsl:call-template name="subjectAuthority"></xsl:call-template>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <geographic>
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="."></xsl:with-param>
+ </xsl:call-template>
+ </geographic>
+ </xsl:for-each>
+ <xsl:call-template name="subjectAnyOrder"></xsl:call-template>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=653]">
+ <subject>
+ <xsl:for-each select="marc:subfield[@code='a']">
+ <topic>
+ <xsl:call-template name="uri" />
+ <xsl:value-of select="."></xsl:value-of>
+ </topic>
+ </xsl:for-each>
+ </subject>
+ </xsl:template>
+ <xsl:template match="marc:datafield[@tag=656]">
+ <subject>
+ <xsl:if test="marc:subfield[@code=2]">
+ <xsl:attribute name="authority">
+ <xsl:value-of select="marc:subfield[@code=2]"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <occupation>
+ <xsl:call-template name="uri" />
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='a']"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </occupation>
+ </subject>
+ </xsl:template>
+ <xsl:template name="termsOfAddress">
+ <xsl:if test="marc:subfield[@code='b' or @code='c']">
+ <namePart type="termsOfAddress">
+ <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>
+ </namePart>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="displayLabel">
+ <xsl:if test="marc:subfield[@code='i']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='i']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='3']">
+ <xsl:attribute name="displayLabel">
+ <xsl:value-of select="marc:subfield[@code='3']"></xsl:value-of>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="isInvalid">
+ <xsl:param name="type"/>
+ <xsl:if test="marc:subfield[@code='z'] or marc:subfield[@code='y']">
+ <identifier>
+ <xsl:attribute name="type">
+ <xsl:value-of select="$type"/>
+ </xsl:attribute>
+ <xsl:attribute name="invalid">
+ <xsl:text>yes</xsl:text>
+ </xsl:attribute>
+ <xsl:if test="marc:subfield[@code='z']">
+ <xsl:value-of select="marc:subfield[@code='z']"/>
+ </xsl:if>
+ <xsl:if test="marc:subfield[@code='y']">
+ <xsl:value-of select="marc:subfield[@code='y']"/>
+ </xsl:if>
+ </identifier>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="subtitle">
+ <xsl:if test="marc:subfield[@code='b']">
+ <subTitle>
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:value-of select="marc:subfield[@code='b']"/>
+ <!--<xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">b</xsl:with-param>
+ </xsl:call-template>-->
+ </xsl:with-param>
+ </xsl:call-template>
+ </subTitle>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="script">
+ <xsl:param name="scriptCode"></xsl:param>
+ <xsl:attribute name="script">
+ <xsl:choose>
+ <xsl:when test="$scriptCode='(3'">Arabic</xsl:when>
+ <xsl:when test="$scriptCode='(B'">Latin</xsl:when>
+ <xsl:when test="$scriptCode='$1'">Chinese, Japanese, Korean</xsl:when>
+ <xsl:when test="$scriptCode='(N'">Cyrillic</xsl:when>
+ <xsl:when test="$scriptCode='(2'">Hebrew</xsl:when>
+ <xsl:when test="$scriptCode='(S'">Greek</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template name="parsePart">
+ <!-- assumes 773$q= 1:2:3<4
+ with up to 3 levels and one optional start page
+ -->
+ <xsl:variable name="level1">
+ <xsl:choose>
+ <xsl:when test="contains(text(),':')">
+ <!-- 1:2 -->
+ <xsl:value-of select="substring-before(text(),':')"></xsl:value-of>
+ </xsl:when>
+ <xsl:when test="not(contains(text(),':'))">
+ <!-- 1 or 1<3 -->
+ <xsl:if test="contains(text(),'<')">
+ <!-- 1<3 -->
+ <xsl:value-of select="substring-before(text(),'<')"></xsl:value-of>
+ </xsl:if>
+ <xsl:if test="not(contains(text(),'<'))">
+ <!-- 1 -->
+ <xsl:value-of select="text()"></xsl:value-of>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici2">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after(text(),$level1),':')">
+ <xsl:value-of select="substring(substring-after(text(),$level1),2)"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after(text(),$level1)"></xsl:value-of>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level2">
+ <xsl:choose>
+ <xsl:when test="contains($sici2,':')">
+ <!-- 2:3<4 -->
+ <xsl:value-of select="substring-before($sici2,':')"></xsl:value-of>
+ </xsl:when>
+ <xsl:when test="contains($sici2,'<')">
+ <!-- 1: 2<4 -->
+ <xsl:value-of select="substring-before($sici2,'<')"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici2"></xsl:value-of>
+ <!-- 1:2 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="sici3">
+ <xsl:choose>
+ <xsl:when test="starts-with(substring-after($sici2,$level2),':')">
+ <xsl:value-of select="substring(substring-after($sici2,$level2),2)"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after($sici2,$level2)"></xsl:value-of>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="level3">
+ <xsl:choose>
+ <xsl:when test="contains($sici3,'<')">
+ <!-- 2<4 -->
+ <xsl:value-of select="substring-before($sici3,'<')"></xsl:value-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$sici3"></xsl:value-of>
+ <!-- 3 -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="page">
+ <xsl:if test="contains(text(),'<')">
+ <xsl:value-of select="substring-after(text(),'<')"></xsl:value-of>
+ </xsl:if>
+ </xsl:variable>
+ <xsl:if test="$level1">
+ <detail level="1">
+ <number>
+ <xsl:value-of select="$level1"></xsl:value-of>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level2">
+ <detail level="2">
+ <number>
+ <xsl:value-of select="$level2"></xsl:value-of>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$level3">
+ <detail level="3">
+ <number>
+ <xsl:value-of select="$level3"></xsl:value-of>
+ </number>
+ </detail>
+ </xsl:if>
+ <xsl:if test="$page">
+ <extent unit="page">
+ <start>
+ <xsl:value-of select="$page"></xsl:value-of>
+ </start>
+ </extent>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="getLanguage">
+ <xsl:param name="langString"></xsl:param>
+ <xsl:param name="controlField008-35-37"></xsl:param>
+ <xsl:variable name="length" select="string-length($langString)"></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$length=0"></xsl:when>
+ <xsl:when test="$controlField008-35-37=substring($langString,1,3)">
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"></xsl:with-param>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"></xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <language>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="substring($langString,1,3)"></xsl:value-of>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="getLanguage">
+ <xsl:with-param name="langString" select="substring($langString,4,$length)"></xsl:with-param>
+ <xsl:with-param name="controlField008-35-37" select="$controlField008-35-37"></xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="isoLanguage">
+ <xsl:param name="currentLanguage"></xsl:param>
+ <xsl:param name="usedLanguages"></xsl:param>
+ <xsl:param name="remainingLanguages"></xsl:param>
+ <xsl:choose>
+ <xsl:when test="string-length($currentLanguage)=0"></xsl:when>
+ <xsl:when test="not(contains($usedLanguages, $currentLanguage))">
+ <language>
+ <xsl:if test="@code!='a'">
+ <xsl:attribute name="objectPart">
+ <xsl:choose>
+ <xsl:when test="@code='b'">summary or subtitle</xsl:when>
+ <xsl:when test="@code='d'">sung or spoken text</xsl:when>
+ <xsl:when test="@code='e'">libretto</xsl:when>
+ <xsl:when test="@code='f'">table of contents</xsl:when>
+ <xsl:when test="@code='g'">accompanying material</xsl:when>
+ <xsl:when test="@code='h'">translation</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ <languageTerm authority="iso639-2b" type="code">
+ <xsl:value-of select="$currentLanguage"></xsl:value-of>
+ </languageTerm>
+ </language>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="isoLanguage">
+ <xsl:with-param name="currentLanguage">
+ <xsl:value-of select="substring($remainingLanguages,1,3)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="usedLanguages">
+ <xsl:value-of select="concat($usedLanguages,$currentLanguage)"></xsl:value-of>
+ </xsl:with-param>
+ <xsl:with-param name="remainingLanguages">
+ <xsl:value-of select="substring($remainingLanguages,4,string-length($remainingLanguages))"></xsl:value-of>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="chopBrackets">
+ <xsl:param name="chopString"></xsl:param>
+ <xsl:variable name="string">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString" select="$chopString"></xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="substring($string, 1,1)='['">
+ <xsl:value-of select="substring($string,2, string-length($string)-2)"></xsl:value-of>
+ </xsl:if>
+ <xsl:if test="substring($string, 1,1)!='['">
+ <xsl:value-of select="$string"></xsl:value-of>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template name="rfcLanguages">
+ <xsl:param name="nodeNum"></xsl:param>
+ <xsl:param name="usedLanguages"></xsl:param>
+ <xsl:param name="controlField008-35-37"></xsl:param>
+ <xsl:variable name="currentLanguage" select="."></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="not($currentLanguage)"></xsl:when>
+ <xsl:when test="$currentLanguage!=$controlField008-35-37 and $currentLanguage!='rfc3066'">
+ <xsl:if test="not(contains($usedLanguages,$currentLanguage))">
+ <language>
+ <xsl:if test="@code!='a'">
+ <xsl:attribute name="objectPart">
+ <xsl:choose>
+ <xsl:when test="@code='b'">summary or subtitle</xsl:when>
+ <xsl:when test="@code='d'">sung or spoken text</xsl:when>
+ <xsl:when test="@code='e'">libretto</xsl:when>
+ <xsl:when test="@code='f'">table of contents</xsl:when>
+ <xsl:when test="@code='g'">accompanying material</xsl:when>
+ <xsl:when test="@code='h'">translation</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ <languageTerm authority="rfc3066" type="code">
+ <xsl:value-of select="$currentLanguage"/>
+ </languageTerm>
+ </language>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <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"/>
+ <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:stylesheet>$$ WHERE name = 'mods32';
+
+CREATE OR REPLACE FUNCTION biblio.extract_metabib_field_entry ( rid BIGINT, default_joiner TEXT ) RETURNS SETOF metabib.field_entry_template AS $func$
+DECLARE
+ bib biblio.record_entry%ROWTYPE;
+ idx config.metabib_field%ROWTYPE;
+ xfrm config.xml_transform%ROWTYPE;
+ prev_xfrm TEXT;
+ transformed_xml TEXT;
+ xml_node TEXT;
+ xml_node_list TEXT[];
+ facet_text TEXT;
+ browse_text TEXT;
+ sort_value TEXT;
+ raw_text TEXT;
+ curr_text TEXT;
+ joiner TEXT := default_joiner; -- XXX will index defs supply a joiner?
+ authority_text TEXT;
+ authority_link BIGINT;
+ output_row metabib.field_entry_template%ROWTYPE;
+BEGIN
+
+ -- Start out with no field-use bools set
+ output_row.browse_field = FALSE;
+ output_row.facet_field = FALSE;
+ output_row.search_field = FALSE;
+
+ -- Get the record
+ SELECT INTO bib * FROM biblio.record_entry WHERE id = rid;
+
+ -- Loop over the indexing entries
+ FOR idx IN SELECT * FROM config.metabib_field ORDER BY format LOOP
+
+ joiner := COALESCE(idx.joiner, default_joiner);
+
+ SELECT INTO xfrm * from config.xml_transform WHERE name = idx.format;
+
+ -- See if we can skip the XSLT ... it's expensive
+ IF prev_xfrm IS NULL OR prev_xfrm <> xfrm.name THEN
+ -- Can't skip the transform
+ IF xfrm.xslt <> '---' THEN
+ transformed_xml := oils_xslt_process(bib.marc,xfrm.xslt);
+ ELSE
+ transformed_xml := bib.marc;
+ END IF;
+
+ prev_xfrm := xfrm.name;
+ END IF;
+
+ xml_node_list := oils_xpath( idx.xpath, transformed_xml, ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]] );
+
+ raw_text := NULL;
+ FOR xml_node IN SELECT x FROM unnest(xml_node_list) AS x LOOP
+ CONTINUE WHEN xml_node !~ E'^\\s*<';
+
+ -- XXX much of this should be moved into oils_xpath_string...
+ curr_text := ARRAY_TO_STRING(evergreen.array_remove_item_by_value(evergreen.array_remove_item_by_value(
+ oils_xpath( '//text()',
+ REGEXP_REPLACE(
+ REGEXP_REPLACE( -- This escapes all &s not followed by "amp;". Data ise returned from oils_xpath (above) in UTF-8, not entity encoded
+ REGEXP_REPLACE( -- This escapes embeded <s
+ xml_node,
+ $re$(>[^<]+)(<)([^>]+<)$re$,
+ E'\\1<\\3',
+ 'g'
+ ),
+ '&(?!amp;)',
+ '&',
+ 'g'
+ ),
+ E'\\s+',
+ ' ',
+ 'g'
+ )
+ ), ' '), ''),
+ joiner
+ );
+
+ CONTINUE WHEN curr_text IS NULL OR curr_text = '';
+
+ IF raw_text IS NOT NULL THEN
+ raw_text := raw_text || joiner;
+ END IF;
+
+ raw_text := COALESCE(raw_text,'') || curr_text;
+
+ -- autosuggest/metabib.browse_entry
+ IF idx.browse_field THEN
+
+ IF idx.browse_xpath IS NOT NULL AND idx.browse_xpath <> '' THEN
+ browse_text := oils_xpath_string( idx.browse_xpath, xml_node, joiner, ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]] );
+ ELSE
+ browse_text := curr_text;
+ END IF;
+
+ IF idx.browse_sort_xpath IS NOT NULL AND
+ idx.browse_sort_xpath <> '' THEN
+
+ sort_value := oils_xpath_string(
+ idx.browse_sort_xpath, xml_node, joiner,
+ ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]]
+ );
+ ELSE
+ sort_value := browse_text;
+ END IF;
+
+ output_row.field_class = idx.field_class;
+ output_row.field = idx.id;
+ output_row.source = rid;
+ output_row.value = BTRIM(REGEXP_REPLACE(browse_text, E'\\s+', ' ', 'g'));
+ output_row.sort_value :=
+ public.naco_normalize(sort_value);
+
+ output_row.authority := NULL;
+
+ IF idx.authority_xpath IS NOT NULL AND idx.authority_xpath <> '' THEN
+ authority_text := oils_xpath_string(
+ idx.authority_xpath, xml_node, joiner,
+ ARRAY[
+ ARRAY[xfrm.prefix, xfrm.namespace_uri],
+ ARRAY['xlink','http://www.w3.org/1999/xlink']
+ ]
+ );
+
+ IF authority_text ~ '^\d+$' THEN
+ authority_link := authority_text::BIGINT;
+ PERFORM * FROM authority.record_entry WHERE id = authority_link;
+ IF FOUND THEN
+ output_row.authority := authority_link;
+ END IF;
+ END IF;
+
+ END IF;
+
+ output_row.browse_field = TRUE;
+ -- Returning browse rows with search_field = true for search+browse
+ -- configs allows us to retain granularity of being able to search
+ -- browse fields with "starts with" type operators (for example, for
+ -- titles of songs in music albums)
+ IF idx.search_field THEN
+ output_row.search_field = TRUE;
+ END IF;
+ RETURN NEXT output_row;
+ output_row.browse_field = FALSE;
+ output_row.search_field = FALSE;
+ output_row.sort_value := NULL;
+ END IF;
+
+ -- insert raw node text for faceting
+ IF idx.facet_field THEN
+
+ IF idx.facet_xpath IS NOT NULL AND idx.facet_xpath <> '' THEN
+ facet_text := oils_xpath_string( idx.facet_xpath, xml_node, joiner, ARRAY[ARRAY[xfrm.prefix, xfrm.namespace_uri]] );
+ ELSE
+ facet_text := curr_text;
+ END IF;
+
+ output_row.field_class = idx.field_class;
+ output_row.field = -1 * idx.id;
+ output_row.source = rid;
+ output_row.value = BTRIM(REGEXP_REPLACE(facet_text, E'\\s+', ' ', 'g'));
+
+ output_row.facet_field = TRUE;
+ RETURN NEXT output_row;
+ output_row.facet_field = FALSE;
+ END IF;
+
+ END LOOP;
+
+ CONTINUE WHEN raw_text IS NULL OR raw_text = '';
+
+ -- insert combined node text for searching
+ IF idx.search_field THEN
+ output_row.field_class = idx.field_class;
+ output_row.field = idx.id;
+ output_row.source = rid;
+ output_row.value = BTRIM(REGEXP_REPLACE(raw_text, E'\\s+', ' ', 'g'));
+
+ output_row.search_field = TRUE;
+ RETURN NEXT output_row;
+ output_row.search_field = FALSE;
+ END IF;
+
+ END LOOP;
+
+END;
+
+$func$ LANGUAGE PLPGSQL;
+
+
+CREATE OR REPLACE FUNCTION metabib.reingest_metabib_field_entries( bib_id BIGINT, skip_facet BOOL DEFAULT FALSE, skip_browse BOOL DEFAULT FALSE, skip_search BOOL DEFAULT FALSE ) RETURNS VOID AS $func$
+DECLARE
+ fclass RECORD;
+ ind_data metabib.field_entry_template%ROWTYPE;
+ mbe_row metabib.browse_entry%ROWTYPE;
+ mbe_id BIGINT;
+ b_skip_facet BOOL;
+ b_skip_browse BOOL;
+ b_skip_search BOOL;
+ value_prepped TEXT;
+BEGIN
+
+ SELECT COALESCE(NULLIF(skip_facet, FALSE), EXISTS (SELECT enabled FROM config.internal_flag WHERE name = 'ingest.skip_facet_indexing' AND enabled)) INTO b_skip_facet;
+ SELECT COALESCE(NULLIF(skip_browse, FALSE), EXISTS (SELECT enabled FROM config.internal_flag WHERE name = 'ingest.skip_browse_indexing' AND enabled)) INTO b_skip_browse;
+ SELECT COALESCE(NULLIF(skip_search, FALSE), EXISTS (SELECT enabled FROM config.internal_flag WHERE name = 'ingest.skip_search_indexing' AND enabled)) INTO b_skip_search;
+
+ PERFORM * FROM config.internal_flag WHERE name = 'ingest.assume_inserts_only' AND enabled;
+ IF NOT FOUND THEN
+ IF NOT b_skip_search THEN
+ FOR fclass IN SELECT * FROM config.metabib_class LOOP
+ -- RAISE NOTICE 'Emptying out %', fclass.name;
+ EXECUTE $$DELETE FROM metabib.$$ || fclass.name || $$_field_entry WHERE source = $$ || bib_id;
+ END LOOP;
+ END IF;
+ IF NOT b_skip_facet THEN
+ DELETE FROM metabib.facet_entry WHERE source = bib_id;
+ END IF;
+ IF NOT b_skip_browse THEN
+ DELETE FROM metabib.browse_entry_def_map WHERE source = bib_id;
+ END IF;
+ END IF;
+
+ FOR ind_data IN SELECT * FROM biblio.extract_metabib_field_entry( bib_id ) LOOP
+ IF ind_data.field < 0 THEN
+ ind_data.field = -1 * ind_data.field;
+ END IF;
+
+ IF ind_data.facet_field AND NOT b_skip_facet THEN
+ INSERT INTO metabib.facet_entry (field, source, value)
+ VALUES (ind_data.field, ind_data.source, ind_data.value);
+ END IF;
+
+ IF ind_data.browse_field AND NOT b_skip_browse THEN
+ -- A caveat about this SELECT: this should take care of replacing
+ -- old mbe rows when data changes, but not if normalization (by
+ -- which I mean specifically the output of
+ -- evergreen.oils_tsearch2()) changes. It may or may not be
+ -- expensive to add a comparison of index_vector to index_vector
+ -- to the WHERE clause below.
+
+ value_prepped := metabib.browse_normalize(ind_data.value, ind_data.field);
+ SELECT INTO mbe_row * FROM metabib.browse_entry
+ WHERE value = value_prepped AND sort_value = ind_data.sort_value;
+
+ IF FOUND THEN
+ mbe_id := mbe_row.id;
+ ELSE
+ INSERT INTO metabib.browse_entry
+ ( value, sort_value ) VALUES
+ ( value_prepped, ind_data.sort_value );
+
+ mbe_id := CURRVAL('metabib.browse_entry_id_seq'::REGCLASS);
+ END IF;
+
+ INSERT INTO metabib.browse_entry_def_map (entry, def, source, authority)
+ VALUES (mbe_id, ind_data.field, ind_data.source, ind_data.authority);
+ END IF;
+
+ IF ind_data.search_field AND NOT b_skip_search THEN
+ -- Avoid inserting duplicate rows
+ EXECUTE 'SELECT 1 FROM metabib.' || ind_data.field_class ||
+ '_field_entry WHERE field = $1 AND source = $2 AND value = $3'
+ INTO mbe_id USING ind_data.field, ind_data.source, ind_data.value;
+ -- RAISE NOTICE 'Search for an already matching row returned %', mbe_id;
+ IF mbe_id IS NULL THEN
+ EXECUTE $$
+ INSERT INTO metabib.$$ || ind_data.field_class || $$_field_entry (field, source, value)
+ VALUES ($$ ||
+ quote_literal(ind_data.field) || $$, $$ ||
+ quote_literal(ind_data.source) || $$, $$ ||
+ quote_literal(ind_data.value) ||
+ $$);$$;
+ END IF;
+ END IF;
+
+ END LOOP;
+
+ IF NOT b_skip_search THEN
+ PERFORM metabib.update_combined_index_vectors(bib_id);
+ END IF;
+
+ RETURN;
+END;
+$func$ LANGUAGE PLPGSQL;
+
+-- Don't use Title Proper search field as the browse field
+UPDATE config.metabib_field SET browse_field = FALSE, browse_xpath = NULL, browse_sort_xpath = NULL WHERE id = 6;
+
+-- Create a new Title Proper browse config
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, authority_xpath, browse_field, browse_sort_xpath ) VALUES
+ (31, 'title', 'browse', oils_i18n_gettext(31, 'Title Proper (Browse)', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleBrowse$$, FALSE, '//@xlink:href', TRUE, $$*[local-name() != "nonSort"]$$ );
+
+
+\qecho This is a browse-only reingest of your bib records. It may take a while.
+\qecho You may cancel now without losing the effect of the rest of the
+\qecho upgrade script, and arrange the reingest later.
+\qecho .
+SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE)
+ FROM biblio.record_entry;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0845', :eg_version);
+
+ALTER FUNCTION metabib.browse_pivot (integer[], text) STABLE;
+ALTER FUNCTION metabib.browse_bib_pivot (integer[], text) STABLE;
+ALTER FUNCTION metabib.browse_authority_pivot (integer[], text) STABLE;
+ALTER FUNCTION metabib.browse_authority_refs_pivot (integer[], text) STABLE;
+
+
+SELECT evergreen.upgrade_deps_block_check('0846', :eg_version);
+
+CREATE OR REPLACE FUNCTION vandelay.add_field ( target_xml TEXT, source_xml TEXT, field TEXT, force_add INT ) RETURNS TEXT AS $_$
+
+ use MARC::Record;
+ use MARC::File::XML (BinaryEncoding => 'UTF-8');
+ use MARC::Charset;
+ use strict;
+
+ MARC::Charset->assume_unicode(1);
+
+ my $target_xml = shift;
+ my $source_xml = shift;
+ my $field_spec = shift;
+ my $force_add = shift || 0;
+
+ my $target_r = MARC::Record->new_from_xml( $target_xml );
+ my $source_r = MARC::Record->new_from_xml( $source_xml );
+
+ return $target_xml unless ($target_r && $source_r);
+
+ my @field_list = split(',', $field_spec);
+
+ my %fields;
+ for my $f (@field_list) {
+ $f =~ s/^\s*//; $f =~ s/\s*$//;
+ if ($f =~ /^(.{3})(\w*)(?:\[([^]]*)\])?$/) {
+ my $field = $1;
+ $field =~ s/\s+//;
+ my $sf = $2;
+ $sf =~ s/\s+//;
+ my $match = $3;
+ $match =~ s/^\s*//; $match =~ s/\s*$//;
+ $fields{$field} = { sf => [ split('', $sf) ] };
+ if ($match) {
+ my ($msf,$mre) = split('~', $match);
+ if (length($msf) > 0 and length($mre) > 0) {
+ $msf =~ s/^\s*//; $msf =~ s/\s*$//;
+ $mre =~ s/^\s*//; $mre =~ s/\s*$//;
+ $fields{$field}{match} = { sf => $msf, re => qr/$mre/ };
+ }
+ }
+ }
+ }
+
+ for my $f ( keys %fields) {
+ if ( @{$fields{$f}{sf}} ) {
+ for my $from_field ($source_r->field( $f )) {
+ my @tos = $target_r->field( $f );
+ if (!@tos) {
+ next if (exists($fields{$f}{match}) and !$force_add);
+ my @new_fields = map { $_->clone } $source_r->field( $f );
+ $target_r->insert_fields_ordered( @new_fields );
+ } else {
+ for my $to_field (@tos) {
+ if (exists($fields{$f}{match})) {
+ next unless (grep { $_ =~ $fields{$f}{match}{re} } $to_field->subfield($fields{$f}{match}{sf}));
+ }
+ for my $old_sf ($from_field->subfields) {
+ $to_field->add_subfields( @$old_sf ) if grep(/$$old_sf[0]/,@{$fields{$f}{sf}});
+ }
+ }
+ }
+ }
+ } else {
+ my @new_fields = map { $_->clone } $source_r->field( $f );
+ $target_r->insert_fields_ordered( @new_fields );
+ }
+ }
+
+ $target_xml = $target_r->as_xml_record;
+ $target_xml =~ s/^<\?.+?\?>$//mo;
+ $target_xml =~ s/\n//sgo;
+ $target_xml =~ s/>\s+</></sgo;
+
+ return $target_xml;
+
+$_$ LANGUAGE PLPERLU;
+
+
+
+SELECT evergreen.upgrade_deps_block_check('0847', :eg_version);
+
+CREATE OR REPLACE FUNCTION authority.generate_overlay_template (source_xml TEXT) RETURNS TEXT AS $f$
+DECLARE
+ cset INT;
+ main_entry authority.control_set_authority_field%ROWTYPE;
+ bib_field authority.control_set_bib_field%ROWTYPE;
+ auth_id INT DEFAULT oils_xpath_string('//*[@tag="901"]/*[local-name()="subfield" and @code="c"]', source_xml)::INT;
+ tmp_data XML;
+ replace_data XML[] DEFAULT '{}'::XML[];
+ replace_rules TEXT[] DEFAULT '{}'::TEXT[];
+ auth_field XML[];
+ auth_i1 TEXT;
+ auth_i2 TEXT;
+BEGIN
+ IF auth_id IS NULL THEN
+ RETURN NULL;
+ END IF;
+
+ -- Default to the LoC controll set
+ SELECT control_set INTO cset FROM authority.record_entry WHERE id = auth_id;
+
+ -- if none, make a best guess
+ IF cset IS NULL THEN
+ SELECT control_set INTO cset
+ FROM authority.control_set_authority_field
+ WHERE tag IN (
+ SELECT UNNEST(XPATH('//*[starts-with(@tag,"1")]/@tag',marc::XML)::TEXT[])
+ FROM authority.record_entry
+ WHERE id = auth_id
+ )
+ LIMIT 1;
+ END IF;
+
+ -- if STILL none, no-op change
+ IF cset IS NULL THEN
+ RETURN XMLELEMENT(
+ name record,
+ XMLATTRIBUTES('http://www.loc.gov/MARC21/slim' AS xmlns),
+ XMLELEMENT( name leader, '00881nam a2200193 4500'),
+ XMLELEMENT(
+ name datafield,
+ XMLATTRIBUTES( '905' AS tag, ' ' AS ind1, ' ' AS ind2),
+ XMLELEMENT(
+ name subfield,
+ XMLATTRIBUTES('d' AS code),
+ '901c'
+ )
+ )
+ )::TEXT;
+ END IF;
+
+ FOR main_entry IN SELECT * FROM authority.control_set_authority_field acsaf WHERE acsaf.control_set = cset AND acsaf.main_entry IS NULL LOOP
+ auth_field := XPATH('//*[@tag="'||main_entry.tag||'"][1]',source_xml::XML);
+ auth_i1 = (XPATH('@ind1',auth_field[1]))[1];
+ auth_i2 = (XPATH('@ind2',auth_field[1]))[1];
+ IF ARRAY_LENGTH(auth_field,1) > 0 THEN
+ FOR bib_field IN SELECT * FROM authority.control_set_bib_field WHERE authority_field = main_entry.id LOOP
+ SELECT XMLELEMENT( -- XMLAGG avoids magical <element> creation, but requires unnest subquery
+ name datafield,
+ XMLATTRIBUTES(bib_field.tag AS tag, auth_i1 AS ind1, auth_i2 AS ind2),
+ XMLAGG(UNNEST)
+ ) INTO tmp_data FROM UNNEST(XPATH('//*[local-name()="subfield"]', auth_field[1]));
+ replace_data := replace_data || tmp_data;
+ replace_rules := replace_rules || ( bib_field.tag || main_entry.sf_list || E'[0~\\)' || auth_id || '$]' );
+ tmp_data = NULL;
+ END LOOP;
+ EXIT;
+ END IF;
+ END LOOP;
+
+ SELECT XMLAGG(UNNEST) INTO tmp_data FROM UNNEST(replace_data);
+
+ RETURN XMLELEMENT(
+ name record,
+ XMLATTRIBUTES('http://www.loc.gov/MARC21/slim' AS xmlns),
+ XMLELEMENT( name leader, '00881nam a2200193 4500'),
+ tmp_data,
+ XMLELEMENT(
+ name datafield,
+ XMLATTRIBUTES( '905' AS tag, ' ' AS ind1, ' ' AS ind2),
+ XMLELEMENT(
+ name subfield,
+ XMLATTRIBUTES('r' AS code),
+ ARRAY_TO_STRING(replace_rules,',')
+ )
+ )
+ )::TEXT;
+END;
+$f$ STABLE LANGUAGE PLPGSQL;
+
+COMMIT;
diff --git a/Open-ILS/xul/staff_client/chrome/content/main/about.html b/Open-ILS/xul/staff_client/chrome/content/main/about.html
index 2737f47..0c522fe 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/about.html
+++ b/Open-ILS/xul/staff_client/chrome/content/main/about.html
@@ -1,7 +1,7 @@
<html><head><script></script></head><body onload="var x = document.getElementById('version'); var version ='/xul/server/'.split(/\//)[2]; if (version == 'server') { version = 'versionless debug build'; } x.appendChild(document.createTextNode(version));">
<h1 style="text-decoration: underline">Evergreen</h1>
<p>Target Server ID: <span id="version"></span></p>
-<p>$HeadURL$</p>
+<p>http://git.evergreen-ils.org/?p=Evergreen.git;a=shortlog;h=refs/heads/tags/rel_2_5_0</p>
<h2>What is Evergreen?</h2>
<blockquote>
<p>
diff --git a/Open-ILS/xul/staff_client/defaults/preferences/prefs.js b/Open-ILS/xul/staff_client/defaults/preferences/prefs.js
index 0613a13..ebbc07c 100644
--- a/Open-ILS/xul/staff_client/defaults/preferences/prefs.js
+++ b/Open-ILS/xul/staff_client/defaults/preferences/prefs.js
@@ -11,7 +11,7 @@ pref("toolkit.singletonWindowType", "eg_main");
pref("open-ils.enable_join_tabs", true);
// We'll use this one to help brand some build information into the client, and rely on subversion keywords
-pref("open-ils.repository.headURL","$HeadURL$");
+pref("open-ils.repository.headURL","http://git.evergreen-ils.org/?p=Evergreen.git;a=shortlog;h=refs/heads/tags/rel_2_5_0");
pref("open-ils.repository.author","$Author$");
pref("open-ils.repository.revision","$Revision$");
pref("open-ils.repository.date","$Date$");
diff --git a/Open-ILS/xul/staff_client/windowssetup.nsi b/Open-ILS/xul/staff_client/windowssetup.nsi
index a954357..5ba81df 100644
--- a/Open-ILS/xul/staff_client/windowssetup.nsi
+++ b/Open-ILS/xul/staff_client/windowssetup.nsi
@@ -3,7 +3,7 @@
; HM NIS Edit Wizard helper defines
; Old versions of makensis don't like this, moved to Makefile
;!define /file PRODUCT_VERSION "client/VERSION"
-!define PRODUCT_TAG "Master"
+!define PRODUCT_TAG "2.5"
!define PRODUCT_INSTALL_TAG "${PRODUCT_TAG}"
!define UI_IMAGESET "beta"
;!define UI_IMAGESET "release"
diff --git a/README b/README
deleted file mode 120000
index b57451a..0000000
--- a/README
+++ /dev/null
@@ -1 +0,0 @@
-docs/installation/server_installation.txt
\ No newline at end of file
diff --git a/README b/README
new file mode 100644
index 0000000..5288092
--- /dev/null
+++ b/README
@@ -0,0 +1,538 @@
+Installing the Evergreen server
+===============================
+:toc:
+:numbered:
+
+Preamble: referenced user accounts
+----------------------------------
+
+In subsequent sections, we will refer to a number of different accounts, as
+follows:
+
+ * Linux user accounts:
+ ** The *user* Linux account is the account that you use to log onto the
+ Linux system as a regular user.
+ ** The *root* Linux account is an account that has system administrator
+ privileges. On Debian and Fedora you can switch to this account from
+ your *user* account by issuing the `su -` command and entering the
+ password for the *root* account when prompted. On Ubuntu you can switch
+ to this account from your *user* account using the `sudo su -` command
+ and entering the password for your *user* account when prompted.
+ ** The *opensrf* Linux account is an account that you create when installing
+ OpenSRF. You can switch to this account from the *root* account by
+ issuing the `su - opensrf` command.
+ ** The *postgres* Linux account is created automatically when you install
+ the PostgreSQL database server. You can switch to this account from the
+ *root* account by issuing the `su - postgres` command.
+ * PostgreSQL user accounts:
+ ** The *evergreen* PostgreSQL account is a superuser account that you will
+ create to connect to the PostgreSQL database server.
+ * Evergreen administrator account:
+ ** The *egadmin* Evergreen account is an administrator account for
+ Evergreen that you will use to test connectivity and configure your
+ Evergreen instance.
+
+Preamble: developer instructions
+--------------------------------
+
+[NOTE]
+Skip this section if you are using an official release tarball downloaded
+from http://evergreen-ils.org/downloads
+
+Developers working directly with the source code from the Git repository,
+rather than an official release tarball, must install some extra packages
+and perform one step before they can proceed with the `./configure` step.
+
+As the *root* Linux account, install the following packages:
+
+ * autoconf
+ * automake
+ * libtool
+
+As the *user* Linux account, issue the following command in the Evergreen
+source directory to generate the configure script and Makefiles:
+
+[source, bash]
+------------------------------------------------------------------------------
+autoreconf -i
+------------------------------------------------------------------------------
+
+After running `make install`, developers also need to install the Dojo Toolkit
+set of JavaScript libraries. The appropriate version of Dojo is included
+in Evergreen release tarballs. Developers should install the Dojo 1.3.3
+version of Dojo by issuing the following commands as the *opensrf* Linux
+account:
+
+[source, bash]
+------------------------------------------------------------------------------
+wget http://download.dojotoolkit.org/release-1.3.3/dojo-release-1.3.3.tar.gz
+tar -C /openils/var/web/js -xzf dojo-release-1.3.3.tar.gz
+cp -r /openils/var/web/js/dojo-release-1.3.3/* /openils/var/web/js/dojo/.
+------------------------------------------------------------------------------
+
+Installing prerequisites
+------------------------
+
+Evergreen has a number of prerequisite packages that must be installed
+before you can successfully configure, compile, and install Evergreen.
+
+1. Begin by installing the most recent version of OpenSRF (2.2.1 or later).
+ You can download OpenSRF releases from http://evergreen-ils.org/opensrf-downloads/
+2. On many distributions, it is necessary to install PostgreSQL 9 from external
+ repositories.
++
+ * On Debian Squeeze, open `/etc/apt/sources.list` in a text editor as the
+ *root* Linux account and add the following line:
++
+[source, bash]
+------------------------------------------------------------------------------
+deb http://backports.debian.org/debian-backports squeeze-backports main contrib
+------------------------------------------------------------------------------
++
+ * On Ubuntu Lucid, you can use a PPA (personal package archive), which are
+ package sources hosted on Launchpad. The one most commonly used by Evergreen
+ Community members is maintained by Martin Pitt, who also maintains the
+ official PostgreSQL packages for Ubuntu. As the *root* Linux account, issue
+ the following commands to add the PPA source:
++
+[source, bash]
+------------------------------------------------------------------------------
+apt-get install python-software-properties
+add-apt-repository ppa:pitti/postgresql
+------------------------------------------------------------------------------
++
+ * Ubuntu Precise comes with PostgreSQL 9, so no additional steps are required.
++
+ * Fedora comes with PostgreSQL 9, so no additional steps are required.
++
+3. On Debian and Ubuntu, run `aptitude update` as the *root* Linux account to
+ retrieve the new packages from the backports repository.
+4. Issue the following commands as the *root* Linux account to install
+ prerequisites using the `Makefile.install` prerequisite installer,
+ substituting `debian-squeeze`, `fedora`, `ubuntu-lucid`, or
+ `ubuntu-precise` for <osname> below:
++
+[source, bash]
+------------------------------------------------------------------------------
+make -f Open-ILS/src/extras/Makefile.install <osname>
+------------------------------------------------------------------------------
++
+5. Add the libdbi-libdbd libraries to the system dynamic library path by
+ issuing the following commands as the *root* Linux account:
++
+[NOTE]
+You should skip this step if installing on Ubuntu Precise. The ubuntu-precise
+target uses libdbd-pgsql from packages.
++
+.Debian / Ubuntu Lucid
+[source, bash]
+------------------------------------------------------------------------------
+echo "/usr/local/lib/dbd" > /etc/ld.so.conf.d/eg.conf
+ldconfig
+------------------------------------------------------------------------------
++
+.Fedora
+[source, bash]
+------------------------------------------------------------------------------
+echo "/usr/lib64/dbd" > /etc/ld.so.conf.d/eg.conf
+ldconfig
+------------------------------------------------------------------------------
+
+Configuration and compilation instructions
+------------------------------------------
+
+For the time being, we are still installing everything in the `/openils/`
+directory. From the Evergreen source directory, issue the following commands as
+the *user* Linux account to configure and build Evergreen:
+
+[source, bash]
+------------------------------------------------------------------------------
+PATH=/openils/bin:$PATH ./configure --prefix=/openils --sysconfdir=/openils/conf
+make
+------------------------------------------------------------------------------
+
+These instructions assume that you have also installed OpenSRF under `/openils/`.
+If not, please adjust PATH as needed so that the Evergreen `configure` script
+can find `osrf_config`.
+
+Installation instructions
+-------------------------
+
+1. Once you have configured and compiled Evergreen, issue the following
+ command as the *root* Linux account to install Evergreen, build the server
+ portion of the staff client, and copy example configuration files to
+ `/openils/conf`.
+ Change the value of the `STAFF_CLIENT_STAMP_ID` variable to match the version
+ of the staff client that you will use to connect to the Evergreen server.
++
+[source, bash]
+------------------------------------------------------------------------------
+make STAFF_CLIENT_STAMP_ID=rel_2_5_0 install
+------------------------------------------------------------------------------
++
+2. The server portion of the staff client expects `http://hostname/xul/server`
+ to resolve. Issue the following commands as the *root* Linux account to
+ create a symbolic link pointing to the `server` subdirectory of the server
+ portion of the staff client that we just built using the staff client ID
+ 'rel_name':
++
+[source, bash]
+------------------------------------------------------------------------------
+cd /openils/var/web/xul
+ln -sf rel_name/server server
+------------------------------------------------------------------------------
+
+Change ownership of the Evergreen files
+---------------------------------------
+
+All files in the `/openils/` directory and subdirectories must be owned by the
+`opensrf` user. Issue the following command as the *root* Linux account to
+change the ownership on the files:
+
+[source, bash]
+------------------------------------------------------------------------------
+chown -R opensrf:opensrf /openils
+------------------------------------------------------------------------------
+
+Configure the Apache Web server
+-------------------------------
+
+1. Use the example configuration files in `Open-ILS/examples/apache/` (for
+Apache versions below 2.4) or `Open-ILS/examples/apache_24/` (for Apache
+versions 2.4 or greater) to configure your Web server for the Evergreen
+catalog, staff client, Web services, and administration interfaces. Issue the
+following commands as the *root* Linux account:
++
+.Debian and Ubuntu
+[source,bash]
+------------------------------------------------------------------------------
+cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/
+cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/
+cp Open-ILS/examples/apache/eg_startup /etc/apache2/
+# Now set up SSL
+mkdir /etc/apache2/ssl
+cd /etc/apache2/ssl
+------------------------------------------------------------------------------
++
+.Fedora
+[source,bash]
+------------------------------------------------------------------------------
+cp Open-ILS/examples/apache_24/eg_24.conf /etc/httpd/conf.d/
+cp Open-ILS/examples/apache_24/eg_vhost_24.conf /etc/httpd/eg_vhost.conf
+cp Open-ILS/examples/apache/eg_startup /etc/httpd/
+# Now set up SSL
+mkdir /etc/httpd/ssl
+cd /etc/httpd/ssl
+------------------------------------------------------------------------------
++
+2. The `openssl` command cuts a new SSL key for your Apache server. For a
+production server, you should purchase a signed SSL certificate, but you can
+just use a self-signed certificate and accept the warnings in the staff client
+and browser during testing and development. Create an SSL key for the Apache
+server by issuing the following command as the *root* Linux account:
++
+[source,bash]
+------------------------------------------------------------------------------
+openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key
+------------------------------------------------------------------------------
++
+3. As the *root* Linux account, edit the `eg.conf` file that you copied into
+place.
+ a. To enable access to the offline upload / execute interface from any
+ workstation on any network, make the following change (and note that
+ you *must* secure this for a production instance):
+ * (Apache 2.2): Replace `Allow from 10.0.0.0/8` with `Allow from all`
+ * (Apache 2.4): Replace `Require host 10.0.0.0/8` with `Require all granted`
+ b. (Fedora): Change references from the non-existent `/etc/apache2/` directory
+ to `/etc/httpd/`.
+4. Change the user for the Apache server.
+ * (Debian and Ubuntu): As the *root* Linux account, edit
+ `/etc/apache2/envvars`. Change `export APACHE_RUN_USER=www-data` to
+ `export APACHE_RUN_USER=opensrf`.
+ * (Fedora): As the *root* Linux account , edit `/etc/httpd/conf/httpd.conf`.
+ Change `User apache` to `User opensrf`.
+5. Configure Apache with performance settings appropriate for Evergreen:
+ * (Debian and Ubuntu): As the *root* Linux account, edit
+ `/etc/apache2/apache2.conf`:
+ * (Fedora): As the *root* Linux account, edit `/etc/httpd/conf/httpd.conf`:
+ a. Change `KeepAliveTimeout` to `1`. Higher values reduce the chance of
+ a request timing out unexpectedly, but increase the risk of using up
+ all available Apache child processes.
+ b. 'Optional': Change `MaxKeepAliveRequests` to `100`
+ c. Update the prefork configuration section to suit your environment. The
+ following settings apply to a busy system:
++
+[source,bash]
+------------------------------------------------------------------------------
+<IfModule mpm_prefork_module>
+ StartServers 20
+ MinSpareServers 5
+ MaxSpareServers 15
+ MaxClients 150
+ MaxRequestsPerChild 10000
+</IfModule>
+------------------------------------------------------------------------------
++
+6. (Fedora): As the *root* Linux account, edit the `/etc/httpd/eg_vhost.conf`
+ file to change references from the non-existent `/etc/apache2/` directory
+ to `/etc/httpd/`.
+7. (Debian and Ubuntu): As the *root* Linux account, enable the Evergreen site:
++
+[source,bash]
+------------------------------------------------------------------------------
+a2dissite default # OPTIONAL: disable the default site (the "It Works" page)
+a2ensite eg.conf
+------------------------------------------------------------------------------
+
+Configure OpenSRF for the Evergreen application
+-----------------------------------------------
+There are a number of example OpenSRF configuration files in `/openils/conf/`
+that you can use as a template for your Evergreen installation. Issue the
+following commands as the *opensrf* Linux account:
+
+[source, bash]
+------------------------------------------------------------------------------
+cp -b /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml
+cp -b /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml
+------------------------------------------------------------------------------
+
+When you installed OpenSRF, you created four Jabber users on two
+separate domains and edited the `opensrf_core.xml` file accordingly. Please
+refer back to the OpenSRF README and, as the *opensrf* Linux account, edit the
+Evergreen version of the `opensrf_core.xml` file using the same Jabber users
+and domains as you used while installing and testing OpenSRF.
+
+[NOTE]
+The `-b` flag tells the `cp` command to create a backup version of the
+destination file. The backup version of the destination file has a tilde (`~`)
+appended to the file name, so if you have forgotten the Jabber users and
+domains, you can retrieve the settings from the backup version of the files.
+
+`eg_db_config`, described in the following section, sets the database
+connection information in `opensrf.xml` for you.
+
+Creating the Evergreen database
+-------------------------------
+
+By default, the `Makefile.install` prerequisite installer does not install
+the PostgreSQL 9 database server required by every Evergreen system;
+for production use, most libraries install the PostgreSQL database server on a
+dedicated machine. You can install the packages required by Debian or Ubuntu Lucid
+on the machine of your choice using the following commands as the *root*
+Linux account:
+
+.(Debian / Ubuntu / Fedora) Installing PostgreSQL server packages
+
+Each OS build target provides the postgres server installation packages
+required for each operating system. To install Postgres server packages,
+use the make target 'postgres-server-<OSTYPE>'. Choose the most appropriate
+command below based on your operating system.
+
+[source, bash]
+------------------------------------------------------------------------------
+make -f Open-ILS/src/extras/Makefile.install postgres-server-debian-wheezy
+make -f Open-ILS/src/extras/Makefile.install postgres-server-debian-squeeze
+make -f Open-ILS/src/extras/Makefile.install postgres-server-ubuntu-lucid
+make -f Open-ILS/src/extras/Makefile.install postgres-server-ubuntu-precise
+make -f Open-ILS/src/extras/Makefile.install postgres-server-fedora
+------------------------------------------------------------------------------
+
+.(Fedora) Postgres initialization
+
+Installing Postgres on Fedora requires one additional step.
+
+[source, bash]
+------------------------------------------------------------------------------
+postgresql-setup initdb
+------------------------------------------------------------------------------
+
+For a standalone PostgreSQL server, install the following Perl modules as the
+*root* Linux account:
+
+.(Debian / Ubuntu) Installing additional Perl modules on a standalone PostgreSQL 9 server
+[source, bash]
+------------------------------------------------------------------------------
+aptitude install gcc libxml-libxml-perl libxml-libxslt-perl
+cpan Business::ISBN
+cpan JSON::XS
+cpan Library::CallNumber::LC
+cpan MARC::Record
+cpan MARC::File::XML
+cpan UUID::Tiny
+cpan Rose::URI
+------------------------------------------------------------------------------
+
+.(Fedora) Installing additional Perl modules on a standalone PostgreSQL 9 server
+[source, bash]
+------------------------------------------------------------------------------
+yum install gcc perl-XML-LibXML perl-XML-LibXSLT perl-Business-ISBN
+yum install perl-Library-CallNumber-LC perl-MARC-Record perl-MARC-Charset
+yum install perl-MARC-File-XML perl-UUID-Tiny
+------------------------------------------------------------------------------
+
+You need to create a PostgreSQL superuser to create and access the database.
+Issue the following command as the *postgres* Linux account to create a new
+PostgreSQL superuser named `evergreen`. When prompted, enter the new user's
+password:
+
+[source, bash]
+------------------------------------------------------------------------------
+createuser -s -P evergreen
+------------------------------------------------------------------------------
+
+Once you have created the *evergreen* PostgreSQL account, you also need to
+create the database and schema, and configure your configuration files to point
+at the database server. Issue the following command as the *root* Linux account
+from inside the Evergreen source directory, replacing <user>, <password>,
+<hostname>, <port>, and <dbname> with the appropriate values for your
+PostgreSQL database (where <user> and <password> are for the *evergreen*
+PostgreSQL account you just created), and replace <admin-user> and <admin-pass>
+with the values you want for the *egadmin* Evergreen administrator account:
+
+[source, bash]
+------------------------------------------------------------------------------
+perl Open-ILS/src/support-scripts/eg_db_config --update-config \
+ --service all --create-database --create-schema --create-offline \
+ --user <user> --password <password> --hostname <hostname> --port <port> \
+ --database <dbname> --admin-user <admin-user> --admin-pass <admin-pass>
+------------------------------------------------------------------------------
+
+This creates the database and schema and configures all of the services in
+your `/openils/conf/opensrf.xml` configuration file to point to that database.
+It also creates the configuration files required by the Evergreen `cgi-bin`
+administration scripts, and sets the user name and password for the *egadmin*
+Evergreen administrator account to your requested values.
+
+Creating the database on a remote server
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In a production instance of Evergreen, your PostgreSQL server should be
+installed on a dedicated server.
+
+PostgreSQL 9.1 and later
+^^^^^^^^^^^^^^^^^^^^^^^^
+To create the database instance on a remote database server running PostgreSQL
+9.1 or later, simply use the `--create-database` flag on `eg_db_config`.
+
+Starting Evergreen
+------------------
+1. As the *root* Linux account, start the `memcached` and `ejabberd` services
+(if they aren't already running):
++
+[source, bash]
+------------------------------------------------------------------------------
+/etc/init.d/ejabberd start
+/etc/init.d/memcached start
+------------------------------------------------------------------------------
++
+2. As the *opensrf* Linux account, start Evergreen. The `-l` flag in the
+following command is only necessary if you want to force Evergreen to treat the
+hostname as `localhost`; if you configured `opensrf.xml` using the real
+hostname of your machine as returned by `perl -ENet::Domain 'print
+Net::Domain::hostfqdn() . "\n";'`, you should not use the `-l` flag.
++
+[source, bash]
+------------------------------------------------------------------------------
+osrf_ctl.sh -l -a start_all
+------------------------------------------------------------------------------
++
+ ** If you receive the error message `bash: osrf_ctl.sh: command not found`,
+ then your environment variable `PATH` does not include the `/openils/bin`
+ directory; this should have been set in the *opensrf* Linux account's
+ `.bashrc` configuration file. To manually set the `PATH` variable, edit the
+ configuration file `~/.bashrc` as the *opensrf* Linux account and add the
+ following line:
++
+[source, bash]
+------------------------------------------------------------------------------
+export PATH=$PATH:/openils/bin
+------------------------------------------------------------------------------
++
+3. As the *opensrf* Linux account, generate the Web files needed by the staff
+ client and catalogue and update the organization unit proximity (you need to do
+ this the first time you start Evergreen, and after that each time you change
+ the library hierarchy in `config.cgi`):
++
+[source, bash]
+------------------------------------------------------------------------------
+autogen.sh -u
+------------------------------------------------------------------------------
++
+4. As the *root* Linux account, restart the Apache Web server:
++
+[source, bash]
+------------------------------------------------------------------------------
+/etc/init.d/apache2 restart
+------------------------------------------------------------------------------
++
+If the Apache Web server was running when you started the OpenSRF services, you
+might not be able to successfully log in to the OPAC or staff client until the
+Apache Web server is restarted.
+
+Testing connections to Evergreen
+--------------------------------
+
+Once you have installed and started Evergreen, test your connection to
+Evergreen via `srfsh`. As the *opensrf* Linux account, issue the following
+commands to start `srfsh` and try to log onto the Evergreen server using the
+*egadmin* Evergreen administrator user name and password that you set using the
+`eg_db_config` command:
+
+[source, bash]
+------------------------------------------------------------------------------
+/openils/bin/srfsh
+srfsh% login <admin-user> <admin-pass>
+------------------------------------------------------------------------------
+
+You should see a result like:
+
+ Received Data: "250bf1518c7527a03249858687714376"
+ ------------------------------------
+ Request Completed Successfully
+ Request Time in seconds: 0.045286
+ ------------------------------------
+
+ Received Data: {
+ "ilsevent":0,
+ "textcode":"SUCCESS",
+ "desc":" ",
+ "pid":21616,
+ "stacktrace":"oils_auth.c:304",
+ "payload":{
+ "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a",
+ "authtime":420
+ }
+
+ }
+
+ ------------------------------------
+ Request Completed Successfully
+ Request Time in seconds: 1.336568
+ ------------------------------------
+
+If this does not work, it's time to do some troubleshooting.
+
+ * As the *opensrf* Linux account, run the `settings-tester.pl` script to see
+ if it finds any system configuration problems. The script is found at
+ `Open-ILS/src/support-scripts/settings-tester.pl` in the Evergreen source
+ tree.
+ * Follow the steps in the http://evergreen-ils.org/dokuwiki/doku.php?id=troubleshooting:checking_for_errors[troubleshooting guide].
+ * If you have faithfully followed the entire set of installation steps
+ listed here, you are probably extremely close to a working system.
+ Gather your configuration files and log files and contact the
+ http://evergreen-ils.org/communicate/mailing-lists/[Evergreen development
+mailing list] for assistance before making any drastic changes to your system
+ configuration.
+
+Getting help
+------------
+
+Need help installing or using Evergreen? Join the mailing lists at
+http://evergreen-ils.org/communicate/mailing-lists/ or contact us on the Freenode
+IRC network on the #evergreen channel.
+
+License
+-------
+This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
+Unported License. To view a copy of this license, visit
+http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
+Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
diff --git a/configure.ac b/configure.ac
index 99370e4..f9decb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,8 +20,8 @@
export PATH=${PATH}:/usr/sbin
AC_PREREQ(2.61)
-AC_INIT(Open-ILS, trunk, open-ils-dev at list.georgialibraries.org)
-AM_INIT_AUTOMAKE([OpenILS], [trunk])
+AC_INIT(Open-ILS, 2.5.0, open-ils-dev at list.georgialibraries.org)
+AM_INIT_AUTOMAKE([OpenILS], [2.5.0])
AC_REVISION($Revision: 0.1 $)
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_SUBDIRS([Open-ILS/xul/staff_client/external/libmar])
commit f8ffa8ac17800a173ead90a420f2d50a5b4ac56a
Author: Dan Wells <dbw2 at calvin.edu>
Date: Thu Nov 7 16:35:15 2013 -0500
Changes to smooth out make_release
1) Make the fake 'HeadURL' into a URL which works with our web repo.
Note that this has 'tags/' hardcoded in, so it only works with true
release branches (e.g. rel_x_y_z) not "working" branches
(e.g. rel_x_y).
2) Change range selector when building log to exclude commits from
rel_2_4.
3) Switch the XULRunner download order so that we can remove them
automatically during make_release and manually afterwards.
4) Add a pause between tagging and building for manual tweaks.
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/build/tools/make_release b/build/tools/make_release
index c141ca7..3a710d6 100755
--- a/build/tools/make_release
+++ b/build/tools/make_release
@@ -2,7 +2,7 @@
GIT_ABS=`git rev-parse --show-toplevel`
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD | sed 's|.*/||'`
-HEADURLBASE="http://git.evergreen-ils.org/Evergreen.git?h=refs/heads/"
+HEADURLBASE="http://git.evergreen-ils.org/?p=Evergreen.git;a=shortlog;h=refs/heads/tags/"
HEADURL="$HEADURLBASE$GIT_BRANCH"
# Drop to the root of the checkout
@@ -246,7 +246,7 @@ if [ $PREV_BRANCH != "PACKAGE" ]; then
grep -i -m 1 Signed-off-by ChangeLog &> /dev/null
if [ $? -ne 0 ]; then
echo "Building ChangeLog"
- git log --cherry-pick --right-only --no-merges --pretty --summary --numstat $PREV_BRANCH..HEAD > $GIT_ABS/ChangeLog
+ git log --cherry-pick --right-only --no-merges --pretty --summary --numstat $PREV_BRANCH...HEAD > $GIT_ABS/ChangeLog
else
echo "Not overwriting existing ChangeLog!"
fi
@@ -257,6 +257,8 @@ if [ $PREV_BRANCH != "PACKAGE" ]; then
COMMIT_MESSAGE="Bumping version numbers, adding Upgrade Script and Changelog"
fi
git commit -asm "$COMMIT_MESSAGE"
+
+ read -p "If you wish to make manual edits before building, suspend and do so now..."
fi
echo "Building release dump"
@@ -283,24 +285,25 @@ if [ ! -f "../dojo.tgz" ]; then
wget http://evergreen-ils.org/downloads/dojo.tgz -O ../dojo.tgz
fi
tar xzf ../dojo.tgz -C Open-ILS/web/js/dojo/
-echo "Grabbing XULRunner (to avoid issues with version changes)"
-cd Open-ILS/xul/staff_client
-XULRUNNER_VERSION=`grep '^XULRUNNER_VERSION' Makefile.am`
-XULRUNNER_VERSION=${XULRUNNER_VERSION##XULRUNNER_VERSION=}
-wget http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$XULRUNNER_VERSION/runtimes/xulrunner-$XULRUNNER_VERSION.en-US.win32.zip
-wget http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$XULRUNNER_VERSION/runtimes/xulrunner-$XULRUNNER_VERSION.en-US.linux-i686.tar.bz2
-wget http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$XULRUNNER_VERSION/runtimes/xulrunner-$XULRUNNER_VERSION.en-US.linux-x86_64.tar.bz2
+cd ..
echo "Prepping server download files"
-cd ../../../../
tar czf Evergreen-ILS-$VERSION.tar.gz Evergreen-ILS-$VERSION/
md5sum Evergreen-ILS-$VERSION.tar.gz > Evergreen-ILS-$VERSION.tar.gz.md5
if [ $PREV_BRANCH != "PACKAGE" ]; then # We need to have tagged to do this ;)
cp Evergreen-ILS-$VERSION/ChangeLog ChangeLog-$PREV_VERSION-$VERSION
fi
+echo "Grabbing XULRunner (to avoid issues with version changes)"
+cd Evergreen-ILS-$VERSION/Open-ILS/xul/staff_client
+XULRUNNER_VERSION=`grep '^XULRUNNER_VERSION' Makefile.am`
+XULRUNNER_VERSION=${XULRUNNER_VERSION##XULRUNNER_VERSION=}
+wget http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$XULRUNNER_VERSION/runtimes/xulrunner-$XULRUNNER_VERSION.en-US.win32.zip
+wget http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$XULRUNNER_VERSION/runtimes/xulrunner-$XULRUNNER_VERSION.en-US.linux-i686.tar.bz2
+wget http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$XULRUNNER_VERSION/runtimes/xulrunner-$XULRUNNER_VERSION.en-US.linux-x86_64.tar.bz2
+cd ../../..
+
echo "Running enough of configure to build staff client"
-cd Evergreen-ILS-$VERSION/
./configure --disable-core --disable-web --disable-updates --disable-apache-modules --disable-reporter
echo "Building Release Staff Clients"
commit 0d82736b6960d5e4b9c6deb1aa42faaf7802c9d2
Author: Dan Wells <dbw2 at calvin.edu>
Date: Thu Sep 26 19:21:43 2013 -0400
Bump OpenILS.pm version
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS.pm b/Open-ILS/src/perlmods/lib/OpenILS.pm
index d7235ce..a3922ae 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS.pm
@@ -6,6 +6,6 @@ OpenILS - Client and server support for the Evergreen open source library system
=cut
-our $VERSION = '2.4';
+our $VERSION = '2.0500';
1;
-----------------------------------------------------------------------
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list