]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/XXXX.data.angular-patron.sql
LP1904036 print/copy patron address; summary styling
[Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / XXXX.data.angular-patron.sql
1
2 BEGIN;
3
4 -- SELECT evergreen.upgrade_deps_block_check('TODO', :eg_version); 
5
6 /*
7 INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
8 VALUES (
9     'eg.catalog.results.count', 'gui', 'integer',
10     oils_i18n_gettext(
11         'eg.catalog.results.count',
12         'Catalog Results Page Size',
13         'cwst', 'label'
14     )
15 );
16
17 eg.circ.patron.holds.prefetch
18
19 eg.grid.circ.patron.holds
20
21 holds_for_patron print template
22
23 items out print template
24 */
25
26 -- insert then update for easier iterative development tweaks
27 /*
28 INSERT INTO config.print_template 
29     (name, label, owner, active, locale, content_type, template)
30 VALUES ('items_out', 'Patron Items Out', 1, TRUE, 'en-US', 'text/html', '');
31 */
32
33 UPDATE config.print_template SET template = $TEMPLATE$
34 [% 
35         USE date;
36         circulations = template_data.circulations;
37 %]
38 <div>
39   <div>Welcome to [% staff_org.name %]</div>
40   <div>You have the following items:</div>
41   <hr/>
42   <ol>
43   [% FOR checkout IN circulations %]
44     <li>
45       <div>[% checkout.title %]</div>
46       <div>
47             [% IF checkout.copy %]Barcode: [% checkout.copy.barcode %][% END %]
48                 Due: [% date.format(helpers.format_date(checkout.dueDate, staff_org_timezone), '%x %r') %]
49       </div>
50     </li>
51   [% END %]
52   </ol>
53   <hr/>
54   <div>[% staff_org.name %] [% date.format(date.now, '%x %r') %]</div>
55   <div>You were helped by [% staff.first_given_name %]</div>
56   <br/>
57 </div>
58 $TEMPLATE$ WHERE name = 'items_out';
59
60 UPDATE config.print_template SET active = TRUE WHERE name = 'patron_address';
61
62 COMMIT;
63
64