BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1117', :eg_version); -- berick/kmlussier
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1118', :eg_version); -- gmcharlt/berick
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1118', :eg_version);
+
+UPDATE action_trigger.event_definition
+SET template =
+$$
+[%- USE date -%]
+[%- SET user = target.0.owner -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- params.sender_email || default_sender %]
+Date: [%- date.format(date.now, '%a, %d %b %Y %T -0000', gmt => 1) %]
+Subject: Bibliographic Records
+Auto-Submitted: auto-generated
+
+[% FOR cbreb IN target %]
+[% FOR item IN cbreb.items;
+ bre_id = item.target_biblio_record_entry;
+
+ bibxml = helpers.unapi_bre(bre_id, {flesh => '{mra}'});
+ title = '';
+ FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
+ title = title _ part.textContent;
+ END;
+
+ author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+ item_type = bibxml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="item_type"]').getAttribute('coded-value');
+ publisher = bibxml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
+ pubdate = bibxml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+ isbn = bibxml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;
+ issn = bibxml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
+ upc = bibxml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
+%]
+
+[% loop.count %]/[% loop.size %]. Bib ID# [% bre_id %]
+[% IF isbn %]ISBN: [% isbn _ "\n" %][% END -%]
+[% IF issn %]ISSN: [% issn _ "\n" %][% END -%]
+[% IF upc %]UPC: [% upc _ "\n" %] [% END -%]
+Title: [% title %]
+Author: [% author %]
+Publication Info: [% publisher %] [% pubdate %]
+Item Type: [% item_type %]
+
+[% END %]
+[% END %]
+$$
+WHERE hook = 'biblio.format.record_entry.email'
+-- from previous stock definition
+AND MD5(template) = 'ee4e6c1b3049086c570c7a77413d46c1';
+
+UPDATE action_trigger.event_definition
+SET template =
+$$
+<div>
+ <style> li { padding: 8px; margin 5px; }</style>
+ <ol>
+ [% FOR cbreb IN target %]
+ [% FOR item IN cbreb.items;
+ bre_id = item.target_biblio_record_entry;
+
+ bibxml = helpers.unapi_bre(bre_id, {flesh => '{mra}'});
+ title = '';
+ FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
+ title = title _ part.textContent;
+ END;
+
+ author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+ item_type = bibxml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="item_type"]').getAttribute('coded-value');
+ publisher = bibxml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
+ pubdate = bibxml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+ isbn = bibxml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;
+ %]
+
+ <li>
+ Bib ID# [% bre_id %] ISBN: [% isbn %]<br />
+ Title: [% title %]<br />
+ Author: [% author %]<br />
+ Publication Info: [% publisher %] [% pubdate %]<br/>
+ Item Type: [% item_type %]
+ </li>
+ [% END %]
+ [% END %]
+ </ol>
+</div>
+$$
+WHERE hook = 'biblio.format.record_entry.print'
+-- from previous stock definition
+AND MD5(template) = '9ada7ea8417cb23f89d0dc8f15ec68d0';
+
+COMMIT;
+++ /dev/null
-BEGIN;
-
-UPDATE action_trigger.event_definition
-SET template =
-$$
-[%- USE date -%]
-[%- SET user = target.0.owner -%]
-To: [%- params.recipient_email || user.email %]
-From: [%- params.sender_email || default_sender %]
-Date: [%- date.format(date.now, '%a, %d %b %Y %T -0000', gmt => 1) %]
-Subject: Bibliographic Records
-Auto-Submitted: auto-generated
-
-[% FOR cbreb IN target %]
-[% FOR item IN cbreb.items;
- bre_id = item.target_biblio_record_entry;
-
- bibxml = helpers.unapi_bre(bre_id, {flesh => '{mra}'});
- title = '';
- FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
- title = title _ part.textContent;
- END;
-
- author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
- item_type = bibxml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="item_type"]').getAttribute('coded-value');
- publisher = bibxml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
- pubdate = bibxml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
- isbn = bibxml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;
- issn = bibxml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
- upc = bibxml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
-%]
-
-[% loop.count %]/[% loop.size %]. Bib ID# [% bre_id %]
-[% IF isbn %]ISBN: [% isbn _ "\n" %][% END -%]
-[% IF issn %]ISSN: [% issn _ "\n" %][% END -%]
-[% IF upc %]UPC: [% upc _ "\n" %] [% END -%]
-Title: [% title %]
-Author: [% author %]
-Publication Info: [% publisher %] [% pubdate %]
-Item Type: [% item_type %]
-
-[% END %]
-[% END %]
-$$
-WHERE hook = 'biblio.format.record_entry.email'
--- from previous stock definition
-AND MD5(template) = 'ee4e6c1b3049086c570c7a77413d46c1';
-
-UPDATE action_trigger.event_definition
-SET template =
-$$
-<div>
- <style> li { padding: 8px; margin 5px; }</style>
- <ol>
- [% FOR cbreb IN target %]
- [% FOR item IN cbreb.items;
- bre_id = item.target_biblio_record_entry;
-
- bibxml = helpers.unapi_bre(bre_id, {flesh => '{mra}'});
- title = '';
- FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
- title = title _ part.textContent;
- END;
-
- author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
- item_type = bibxml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="item_type"]').getAttribute('coded-value');
- publisher = bibxml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
- pubdate = bibxml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
- isbn = bibxml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;
- %]
-
- <li>
- Bib ID# [% bre_id %] ISBN: [% isbn %]<br />
- Title: [% title %]<br />
- Author: [% author %]<br />
- Publication Info: [% publisher %] [% pubdate %]<br/>
- Item Type: [% item_type %]
- </li>
- [% END %]
- [% END %]
- </ol>
-</div>
-$$
-WHERE hook = 'biblio.format.record_entry.print'
--- from previous stock definition
-AND MD5(template) = '9ada7ea8417cb23f89d0dc8f15ec68d0';
<p class="big-strong">[% l('Basket') %]</p>
<div class="sort">
<form method="get">
- <label for="anonsort">[% l("Sort cart items by: ") %]</label>
+ <label for="anonsort">[% l("Sort basket items by: ") %]</label>
[% INCLUDE "opac/parts/filtersort.tt2" mode='bookbag'
id="anonsort" name="anonsort" value=CGI.param("anonsort") %]
<input type="hidden" name="id"