From 0764a1e5556c3c592d31d1eabe5226ef9e5808a4 Mon Sep 17 00:00:00 2001 From: dev2 Date: Mon, 21 Jun 2010 12:24:00 -0400 Subject: [PATCH] Bug 5192 Enhancement to add new index for 658 curriculum field Creates new curriculum index for 658 subfields a,b,c and search option in Advanced search (under More Options). Also modifies the installer files to make 658abc display (they were hidden in the frameworks) and to create the new indexes. The 658 already displays as part of the staff/OPAC subject display line. --- etc/zebradb/biblios/etc/bib1.att | 3 + etc/zebradb/ccl.properties | 2 + etc/zebradb/marc_defs/marc21/biblios/record.abs | 3 + .../marc21/mandatory/marc21_framework_DEFAULT.sql | 6 +- .../optional/marc21_simple_bib_frameworks.sql | 48 ++++++++++---------- .../prog/en/includes/search_indexes.inc | 1 + .../opac-tmpl/prog/en/modules/opac-advsearch.tmpl | 1 + 7 files changed, 37 insertions(+), 27 deletions(-) diff --git a/etc/zebradb/biblios/etc/bib1.att b/etc/zebradb/biblios/etc/bib1.att index d47b2a3..97c3d68 100644 --- a/etc/zebradb/biblios/etc/bib1.att +++ b/etc/zebradb/biblios/etc/bib1.att @@ -189,3 +189,6 @@ att 9903 lex att 9904 arl att 9013 arp att 9520 Item +# Curriculum +att 9658 curriculum + diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 231c420..2f923ae 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -1052,6 +1052,8 @@ arl 1=9904 r=r #Accelerated Reader Point arp 1=9013 r=r +# Curriculum +curriculum 1=9658 ## Statuses popularity 1=issues diff --git a/etc/zebradb/marc_defs/marc21/biblios/record.abs b/etc/zebradb/marc_defs/marc21/biblios/record.abs index 6cf37ba..4874bfd 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/record.abs +++ b/etc/zebradb/marc_defs/marc21/biblios/record.abs @@ -188,6 +188,9 @@ melm 656$9 Koha-Auth-Number melm 656 Subject melm 657$9 Koha-Auth-Number melm 657 Subject +melm 658$a curriculum:w,curriculum:p +melm 658$b curriculum:w,curriculum:p +melm 658$c curriculum:w,curriculum:p melm 690$9 Koha-Auth-Number melm 690 Subject,Subject:p diff --git a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index a5e7d77..3cbc997 100644 --- a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -1895,9 +1895,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -6, '', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, '', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, '', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, '', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, 0, '', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), diff --git a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql index 8821aa2..78a18d6 100644 --- a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql +++ b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql @@ -1920,9 +1920,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'BKS', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'BKS', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'BKS', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'BKS', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'BKS', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'BKS', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'BKS', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'BKS', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'BKS', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'BKS', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'BKS', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'BKS', '', '', NULL), @@ -5841,9 +5841,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'CF', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'CF', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'CF', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'CF', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'CF', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'CF', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'CF', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'CF', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'CF', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'CF', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'CF', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'CF', '', '', NULL), @@ -9761,9 +9761,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'SR', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'SR', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'SR', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'SR', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'SR', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'SR', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'SR', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'SR', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'SR', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'SR', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'SR', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'SR', '', '', NULL), @@ -13681,9 +13681,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'VR', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'VR', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'VR', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'VR', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'VR', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'VR', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'VR', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'VR', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'VR', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'VR', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'VR', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'VR', '', '', NULL), @@ -17599,9 +17599,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'AR', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'AR', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'AR', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'AR', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'AR', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'AR', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'AR', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'AR', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'AR', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'AR', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'AR', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'AR', '', '', NULL), @@ -21517,9 +21517,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'KT', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'KT', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'KT', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'KT', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'KT', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'KT', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'KT', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'KT', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'KT', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'KT', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'KT', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'KT', '', '', NULL), @@ -25436,9 +25436,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'IR', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'IR', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'IR', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'IR', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'IR', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'IR', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'IR', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'IR', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'IR', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'IR', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'IR', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'IR', '', '', NULL), @@ -29351,9 +29351,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'SER', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'SER', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'SER', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'SER', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'SER', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'SER', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'SER', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'SER', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'SER', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'SER', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'SER', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'SER', '', '', NULL), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc index cd3226c..fe58c61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc @@ -20,6 +20,7 @@ + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl index 52b00e7..1ee82d0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl @@ -82,6 +82,7 @@ + -- 1.5.6.5