[open-ils-commits] [GIT] Evergreen ILS branch master updated. 3bade44241f9c77cf2cc6bffc4bdf78cca1ebbea
Evergreen Git
git at git.evergreen-ils.org
Thu Jul 7 14:25:44 EDT 2011
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, master has been updated
via 3bade44241f9c77cf2cc6bffc4bdf78cca1ebbea (commit)
via 617e313d991dcc1cbc60d89685f3d95d1d5fb40a (commit)
from a45184da2ac9f490886ebde47fcc8af4227afcf0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3bade44241f9c77cf2cc6bffc4bdf78cca1ebbea
Author: Bill Erickson <berick at esilibrary.com>
Date: Thu Jul 7 14:24:45 2011 -0400
Stamped DB version for hold_pull_list_template w/ parts
Signed-off-by: Bill Erickson <berick at esilibrary.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 67b3493..294eb0e 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
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 ('0573', :eg_version); -- miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0574', :eg_version); -- berick
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/xxx.data.hold_pull_list_template.sql b/Open-ILS/src/sql/Pg/upgrade/0574.data.hold_pull_list_template.sql
similarity index 97%
rename from Open-ILS/src/sql/Pg/upgrade/xxx.data.hold_pull_list_template.sql
rename to Open-ILS/src/sql/Pg/upgrade/0574.data.hold_pull_list_template.sql
index 32c9460..a0bea8c 100644
--- a/Open-ILS/src/sql/Pg/upgrade/xxx.data.hold_pull_list_template.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0574.data.hold_pull_list_template.sql
@@ -1,6 +1,6 @@
BEGIN;
-INSERT INTO config.upgrade_log (version) VALUES ('xxxx');
+SELECT evergreen.upgrade_deps_block_check('0574', :eg_version);
UPDATE action_trigger.event_definition SET template =
$$
commit 617e313d991dcc1cbc60d89685f3d95d1d5fb40a
Author: Jason Etheridge <jason at esilibrary.com>
Date: Wed Jul 6 12:05:58 2011 -0400
Add "parts" to Print Full Pull List and Print Full Pull List (Alternate strategy)
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
Signed-off-by: Bill Erickson <berick at esilibrary.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index 651e9b5..0a056ac 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -1560,7 +1560,7 @@ sub print_hold_pull_list_stream {
"flesh_fields" => {
"ahr" => ["usr", "current_copy"],
"au" => ["card"],
- "acp" => ["location", "call_number"],
+ "acp" => ["location", "call_number", "parts"],
"acn" => ["record","prefix","suffix"]
}
}
diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index c7372ed..c739b95 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -8407,11 +8407,11 @@ INSERT INTO action_trigger.event_definition (
$$
[%- USE date -%]
<style>
- table { border-collapse: collapse; }
- td { padding: 5px; border-bottom: 1px solid #888; }
+ table { border-collapse: collapse; }
+ td { padding: 5px; border-bottom: 1px solid #888; }
th { font-weight: bold; }
</style>
-[%
+[%
# Sort the holds into copy-location buckets
# In the main print loop, sort each bucket by callnumber before printing
SET holds_list = [];
@@ -8438,14 +8438,14 @@ $$
<th>Author</th>
<th>Shelving Location</th>
<th>Call Number</th>
- <th>Barcode</th>
+ <th>Barcode/Part</th>
<th>Patron</th>
</tr>
</thead>
<tbody>
[% FOR loc_data IN holds_list %]
[% FOR hold_data IN loc_data.sort('callnumber') %]
- [%
+ [%
SET hold = hold_data.hold;
SET copy_data = helpers.get_copy_bib_basics(hold.current_copy.id);
%]
@@ -8454,7 +8454,11 @@ $$
<td>[% copy_data.author | truncate %]</td>
<td>[% hold.current_copy.location.name %]</td>
<td>[% hold.current_copy.call_number.label %]</td>
- <td>[% hold.current_copy.barcode %]</td>
+ <td>[% hold.current_copy.barcode %]
+ [% FOR part IN hold.current_copy.parts %]
+ [% part.part.label %]
+ [% END %]
+ </td>
<td>[% hold.usr.card.barcode %]</td>
</tr>
[% END %]
@@ -8471,7 +8475,9 @@ INSERT INTO action_trigger.environment (
(35, 'current_copy.location'),
(35, 'current_copy.call_number'),
(35, 'usr.card'),
- (35, 'pickup_lib')
+ (35, 'pickup_lib'),
+ (35, 'current_copy.parts'),
+ (35, 'current_copy.parts.part')
;
-- 0386.data.org-setting-patron-clone-copy-addr.sql
diff --git a/Open-ILS/src/sql/Pg/upgrade/xxx.data.hold_pull_list_template.sql b/Open-ILS/src/sql/Pg/upgrade/xxx.data.hold_pull_list_template.sql
new file mode 100644
index 0000000..32c9460
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/xxx.data.hold_pull_list_template.sql
@@ -0,0 +1,79 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('xxxx');
+
+UPDATE action_trigger.event_definition SET template =
+$$
+[%- USE date -%]
+<style>
+ table { border-collapse: collapse; }
+ td { padding: 5px; border-bottom: 1px solid #888; }
+ th { font-weight: bold; }
+</style>
+[%
+ # Sort the holds into copy-location buckets
+ # In the main print loop, sort each bucket by callnumber before printing
+ SET holds_list = [];
+ SET loc_data = [];
+ SET current_location = target.0.current_copy.location.id;
+ FOR hold IN target;
+ IF current_location != hold.current_copy.location.id;
+ SET current_location = hold.current_copy.location.id;
+ holds_list.push(loc_data);
+ SET loc_data = [];
+ END;
+ SET hold_data = {
+ 'hold' => hold,
+ 'callnumber' => hold.current_copy.call_number.label
+ };
+ loc_data.push(hold_data);
+ END;
+ holds_list.push(loc_data)
+%]
+<table>
+ <thead>
+ <tr>
+ <th>Title</th>
+ <th>Author</th>
+ <th>Shelving Location</th>
+ <th>Call Number</th>
+ <th>Barcode/Part</th>
+ <th>Patron</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOR loc_data IN holds_list %]
+ [% FOR hold_data IN loc_data.sort('callnumber') %]
+ [%
+ SET hold = hold_data.hold;
+ SET copy_data = helpers.get_copy_bib_basics(hold.current_copy.id);
+ %]
+ <tr>
+ <td>[% copy_data.title | truncate %]</td>
+ <td>[% copy_data.author | truncate %]</td>
+ <td>[% hold.current_copy.location.name %]</td>
+ <td>[% hold.current_copy.call_number.label %]</td>
+ <td>[% hold.current_copy.barcode %]
+ [% FOR part IN hold.current_copy.parts %]
+ [% part.part.label %]
+ [% END %]
+ </td>
+ <td>[% hold.usr.card.barcode %]</td>
+ </tr>
+ [% END %]
+ [% END %]
+ <tbody>
+</table>
+$$
+ WHERE id = 35;
+
+INSERT INTO action_trigger.environment (
+ event_def,
+ path
+ ) VALUES
+ (35, 'current_copy.parts'),
+ (35, 'current_copy.parts.part')
+;
+
+COMMIT;
+
diff --git a/Open-ILS/web/opac/extras/circ/alt_holds_print.html b/Open-ILS/web/opac/extras/circ/alt_holds_print.html
index 5801df2..a7a1619 100644
--- a/Open-ILS/web/opac/extras/circ/alt_holds_print.html
+++ b/Open-ILS/web/opac/extras/circ/alt_holds_print.html
@@ -81,7 +81,7 @@
<th>Author</th>
<th>Shelving Location</th>
<th>Call Number</th>
- <th>Barcode</th>
+ <th>Barcode/Part</th>
</tr>
</thead>
<tbody id='target'>
@@ -94,7 +94,7 @@
<td type='opac/slot-data' query='datafield[tag^=1]' limit='1'> </td>
<td>${current_copy.location.name}</td>
<td>${current_copy.call_number.prefix.label} ${current_copy.call_number.label} ${current_copy.call_number.suffix.label}</td>
- <td>${current_copy.barcode}</td>
+ <td>${current_copy.barcode} ${current_copy.parts_stringified}</td>
</tr>
</tbody>
</table>
diff --git a/Open-ILS/web/opac/extras/circ/alt_holds_print.js b/Open-ILS/web/opac/extras/circ/alt_holds_print.js
index a3f0378..724e4e7 100644
--- a/Open-ILS/web/opac/extras/circ/alt_holds_print.js
+++ b/Open-ILS/web/opac/extras/circ/alt_holds_print.js
@@ -37,6 +37,11 @@ function do_pull_list() {
hold.current_copy.call_number.record = hold_fm.current_copy().call_number().record().toHash(true);
hold.current_copy.call_number.prefix = hold_fm.current_copy().call_number().prefix().toHash(true);
hold.current_copy.call_number.suffix = hold_fm.current_copy().call_number().suffix().toHash(true);
+ hold.current_copy.parts_stringified = '';
+ dojo.forEach( hold_fm.current_copy().parts(), function(part) {
+ hold.current_copy.parts_stringified += ' ' + part.label();
+ });
+
// clone the template's html
var tr = dojo.clone(
-----------------------------------------------------------------------
Summary of changes:
.../perlmods/lib/OpenILS/Application/Circ/Holds.pm | 2 +-
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/950.data.seed-values.sql | 20 ++++--
...e.sql => 0574.data.hold_pull_list_template.sql} | 63 +++++---------------
Open-ILS/web/opac/extras/circ/alt_holds_print.html | 4 +-
Open-ILS/web/opac/extras/circ/alt_holds_print.js | 5 ++
6 files changed, 37 insertions(+), 59 deletions(-)
copy Open-ILS/src/sql/Pg/upgrade/{0384.data.hold_pull_list_template.sql => 0574.data.hold_pull_list_template.sql} (53%)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list