Line 0
Link Here
|
|
|
1 |
$DBversion = 'XXX'; |
2 |
if( CheckVersion( $DBversion ) ) { |
3 |
$dbh->do(q{ INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES |
4 |
('catalogue','LIST','','Send list',1,'Your list: [% listname %]'," |
5 |
<p>Hi,</p> |
6 |
|
7 |
<p>[% borrower.firstname %] [% borrower.surname %] sent you a list from our online catalog called: [% listname %].</p> |
8 |
|
9 |
<p>Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.</p> |
10 |
<hr/> |
11 |
|
12 |
<p><<comment>></p> |
13 |
<hr/> |
14 |
|
15 |
<ol> |
16 |
[% FOREACH biblio IN biblios %] |
17 |
<li> |
18 |
<span> |
19 |
[% biblio.title %] |
20 |
[% IF ( biblio.subtitle ) %] |
21 |
[% FOREACH subtitle IN biblio.subtitle.split(' | ') %] |
22 |
[% subtitle %] |
23 |
[% END %] |
24 |
[% END %] |
25 |
[% biblio.part_number %] [% biblio.part_name | $raw %] |
26 |
</span> |
27 |
|
28 |
<p> |
29 |
[% IF ( BIBLIO_RESULT.HASAUTHORS ) %] |
30 |
<span>Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author | $raw %][% END %] |
31 |
|
32 |
[% IF ( BIBLIO_RESULT.MARCAUTHORS ) %] |
33 |
[% IF ( BIBLIO_RESULT.author ) %]; [% END %] |
34 |
[% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %] |
35 |
[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] |
36 |
[% MARCAUTHOR_SUBFIELDS_LOO.separator | $raw %][% MARCAUTHOR_SUBFIELDS_LOO.value | $raw %] |
37 |
[% END %] |
38 |
[% UNLESS ( loop.last ) %];[% END %] |
39 |
[% END %] |
40 |
[% END %] |
41 |
</span><br/> |
42 |
[% END %] |
43 |
|
44 |
[% SET record = biblio.metadata.record %] |
45 |
<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %] |
46 |
[% FOREACH field IN record.fields('7..') %] |
47 |
[% IF ( biblio.author ) %]; [% END %] |
48 |
[% UNLESS ( field.tag < 700 || field.tag > 720 ) %] |
49 |
[% SET separator = Koha.Preference('AuthoritySeparator') %] |
50 |
[% IF ( separator ) %][% separator | $raw %][% ELSE %] [% END %][% field.as_string | $raw %] |
51 |
[% END %] |
52 |
[% UNLESS ( loop.last ) %];[% END %] |
53 |
[% END %] |
54 |
</span> |
55 |
|
56 |
[% SET biblioitem = biblio.biblioitem %] |
57 |
|
58 |
[% IF ( biblioitem.isbn ) %] |
59 |
<span> |
60 |
ISBN: [% FOREACH isbn IN biblioitem.isbn %] |
61 |
[% isbn | $raw %] |
62 |
[% UNLESS ( loop.last ) %]; [% END %] |
63 |
[% END %] |
64 |
</span><br/> |
65 |
[% END %] |
66 |
|
67 |
[% IF ( biblioitem.publishercode ) %] |
68 |
<span> |
69 |
Published by: [% biblioitem.publishercode | $raw %] |
70 |
[% IF ( biblioitem.publicationyear ) %] |
71 |
in [% biblioitem.publicationyear | $raw %] |
72 |
[% END %] |
73 |
[% IF ( biblioitem.pages ) %] |
74 |
, [% biblioitem.pages | $raw %] |
75 |
[% END %] |
76 |
[% IF BIBLIO_RESULT.item('size') %] |
77 |
, [% BIBLIO_RESULT.item('size') | html %] |
78 |
[% END %] |
79 |
</span><br/> |
80 |
[% END %] |
81 |
|
82 |
[% IF ( biblio.seriestitle ) %] |
83 |
<span> |
84 |
Collection: [% biblio.seriestitle | $raw %] |
85 |
</span><br/> |
86 |
[% END %] |
87 |
|
88 |
[% IF ( BIBLIO_RESULT.subject ) %] |
89 |
<span> |
90 |
Subject: [% BIBLIO_RESULT.subject | $raw %] |
91 |
<span><br/> |
92 |
[% END %] |
93 |
|
94 |
<span>Subject: |
95 |
[% IF ( Koha.Preference('marcflavour') eq 'UNIMARC' ) %] |
96 |
[% SET maxtag = 611 %] |
97 |
[% ELSE %] |
98 |
[% SET maxtag = 699 %] |
99 |
[% END %] |
100 |
[% FOREACH field IN record.fields('6..') %] |
101 |
[% IF ( biblio.author ) %]; [% END %] |
102 |
[% UNLESS ( field.tag < 600 || field.tag >= maxtag ) %] |
103 |
[% SET separator = Koha.Preference('AuthoritySeparator') %] |
104 |
[% IF ( separator ) %][% separator | $raw %][% ELSE %] [% END %][% field.as_string | $raw %] |
105 |
[% END %] |
106 |
[% UNLESS ( loop.last ) %];[% END %] |
107 |
[% END %] |
108 |
<span><br/> |
109 |
|
110 |
[% IF ( biblio.copyrightdate ) %] |
111 |
<span> |
112 |
Copyright year: [% biblio.copyrightdate | $raw %] |
113 |
</span><br/> |
114 |
[% END %] |
115 |
|
116 |
[% IF ( biblio.notes || biblioitem.notes ) %] |
117 |
<span> |
118 |
Notes: [% biblio.notes | $raw %]<br>[% biblioitem.notes | $raw %] |
119 |
</span><br/> |
120 |
[% END %] |
121 |
|
122 |
[% IF ( biblio.unititle ) %] |
123 |
<span> |
124 |
Unified title: [% biblio.unititle | $raw %] |
125 |
</span><br/> |
126 |
[% END %] |
127 |
|
128 |
[% IF ( biblio.serial ) %] |
129 |
<span> |
130 |
Serial: [% biblio.serial | $raw %] |
131 |
</span><br/> |
132 |
[% END %] |
133 |
|
134 |
[% IF ( record.field('082') ) %] |
135 |
<span> |
136 |
Dewey: [% record.field('082').as_string | $raw %] |
137 |
</span><br/> |
138 |
[% END %] |
139 |
|
140 |
[% IF ( biblioitem.cn_source ) %] |
141 |
<span> |
142 |
Classification: [% biblioitem.cn_source | $raw %] |
143 |
</span><br/> |
144 |
[% END %] |
145 |
|
146 |
[% IF ( biblioitem.lccn ) %] |
147 |
<span> |
148 |
LCCN: [% biblioitem.lccn | $raw %] |
149 |
</span><br/> |
150 |
[% END %] |
151 |
|
152 |
[% IF ( biblioitem.url ) %] |
153 |
<span> |
154 |
URL: [% biblioitem.url | html %] |
155 |
</span> |
156 |
[% END %] |
157 |
</p> |
158 |
|
159 |
[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %] |
160 |
[% IF ( OPACBaseURL ) %] |
161 |
<p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p> |
162 |
[% END %] |
163 |
|
164 |
[% IF ( biblio.items.size ) %] |
165 |
<p>Items: |
166 |
<ul> |
167 |
[% FOREACH item IN biblio.items %]<li> |
168 |
[% item.branchname | $raw %] |
169 |
[% item.location | $raw %] |
170 |
[% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %] |
171 |
[% item.barcode | $raw %] |
172 |
</li>[% END %] |
173 |
</ul> |
174 |
</p> |
175 |
[% END %] |
176 |
<hr/> |
177 |
</li> |
178 |
|
179 |
[% END %] |
180 |
</ol>", 'email','default' ), |
181 |
('catalogue','CART','','Send cart',1,'Your cart',"<p>Hi,</p> |
182 |
|
183 |
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p> |
184 |
|
185 |
<p>Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.</p> |
186 |
<hr/> |
187 |
|
188 |
<p><<comment>></p> |
189 |
<hr/> |
190 |
|
191 |
<ol> |
192 |
[% FOREACH biblio IN biblios %] |
193 |
<li> |
194 |
<span> |
195 |
[% biblio.title | $raw %] |
196 |
[% IF ( biblio.subtitle ) %] |
197 |
[% FOREACH subtitle IN biblio.subtitle.split(' | ') %] |
198 |
[% subtitle | $raw %] |
199 |
[% END %] |
200 |
[% END %] |
201 |
[% biblio.part_number | $raw %] [% biblio.part_name | $raw %] |
202 |
</span> |
203 |
|
204 |
<p> |
205 |
[% IF ( BIBLIO_RESULT.HASAUTHORS ) %] |
206 |
<span>Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author | $raw %][% END %] |
207 |
|
208 |
[% IF ( BIBLIO_RESULT.MARCAUTHORS ) %] |
209 |
[% IF ( BIBLIO_RESULT.author ) %]; [% END %] |
210 |
[% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %] |
211 |
[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] |
212 |
[% MARCAUTHOR_SUBFIELDS_LOO.separator | $raw %][% MARCAUTHOR_SUBFIELDS_LOO.value | $raw %] |
213 |
[% END %] |
214 |
[% UNLESS ( loop.last ) %];[% END %] |
215 |
[% END %] |
216 |
[% END %] |
217 |
</span><br/> |
218 |
[% END %] |
219 |
|
220 |
[% SET record = biblio.metadata.record %] |
221 |
<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %] |
222 |
[% FOREACH field IN record.fields('7..') %] |
223 |
[% IF ( biblio.author ) %]; [% END %] |
224 |
[% UNLESS ( field.tag < 700 || field.tag > 720 ) %] |
225 |
[% SET separator = Koha.Preference('AuthoritySeparator') %] |
226 |
[% IF ( separator ) %][% separator | $raw %][% ELSE %] [% END %][% field.as_string | $raw %] |
227 |
[% END %] |
228 |
[% UNLESS ( loop.last ) %];[% END %] |
229 |
[% END %] |
230 |
</span> |
231 |
|
232 |
[% SET biblioitem = biblio.biblioitem %] |
233 |
|
234 |
[% IF ( biblioitem.isbn ) %] |
235 |
<span> |
236 |
ISBN: [% FOREACH isbn IN biblioitem.isbn %] |
237 |
[% isbn | $raw %] |
238 |
[% UNLESS ( loop.last ) %]; [% END %] |
239 |
[% END %] |
240 |
</span><br/> |
241 |
[% END %] |
242 |
|
243 |
[% IF ( biblioitem.publishercode ) %] |
244 |
<span> |
245 |
Published by: [% biblioitem.publishercode | $raw %] |
246 |
[% IF ( biblioitem.publicationyear ) %] |
247 |
in [% biblioitem.publicationyear | $raw %] |
248 |
[% END %] |
249 |
[% IF ( biblioitem.pages ) %] |
250 |
, [% biblioitem.pages | $raw %] |
251 |
[% END %] |
252 |
[% IF BIBLIO_RESULT.item('size') %] |
253 |
, [% BIBLIO_RESULT.item('size') | html %] |
254 |
[% END %] |
255 |
</span><br/> |
256 |
[% END %] |
257 |
|
258 |
[% IF ( biblio.seriestitle ) %] |
259 |
<span> |
260 |
Collection: [% biblio.seriestitle | $raw %] |
261 |
</span><br/> |
262 |
[% END %] |
263 |
|
264 |
[% IF ( BIBLIO_RESULT.subject ) %] |
265 |
<span> |
266 |
Subject: [% BIBLIO_RESULT.subject | $raw %] |
267 |
<span><br/> |
268 |
[% END %] |
269 |
|
270 |
<span>Subject: |
271 |
[% IF ( Koha.Preference('marcflavour') eq 'UNIMARC' ) %] |
272 |
[% SET maxtag = 611 %] |
273 |
[% ELSE %] |
274 |
[% SET maxtag = 699 %] |
275 |
[% END %] |
276 |
[% FOREACH field IN record.fields('6..') %] |
277 |
[% IF ( biblio.author ) %]; [% END %] |
278 |
[% UNLESS ( field.tag < 600 || field.tag >= maxtag ) %] |
279 |
[% SET separator = Koha.Preference('AuthoritySeparator') %] |
280 |
[% IF ( separator ) %][% separator | $raw %][% ELSE %] [% END %][% field.as_string | $raw %] |
281 |
[% END %] |
282 |
[% UNLESS ( loop.last ) %];[% END %] |
283 |
[% END %] |
284 |
<span><br/> |
285 |
|
286 |
[% IF ( biblio.copyrightdate ) %] |
287 |
<span> |
288 |
Copyright year: [% biblio.copyrightdate | $raw %] |
289 |
</span><br/> |
290 |
[% END %] |
291 |
|
292 |
[% IF ( biblio.notes || biblioitem.notes ) %] |
293 |
<span> |
294 |
Notes: [% biblio.notes | $raw %]<br>[% biblioitem.notes | $raw %] |
295 |
</span><br/> |
296 |
[% END %] |
297 |
|
298 |
[% IF ( biblio.unititle ) %] |
299 |
<span> |
300 |
Unified title: [% biblio.unititle | $raw %] |
301 |
</span><br/> |
302 |
[% END %] |
303 |
|
304 |
[% IF ( biblio.serial ) %] |
305 |
<span> |
306 |
Serial: [% biblio.serial | $raw %] |
307 |
</span><br/> |
308 |
[% END %] |
309 |
|
310 |
[% IF ( record.field('082') ) %] |
311 |
<span> |
312 |
Dewey: [% record.field('082').as_string | $raw %] |
313 |
</span><br/> |
314 |
[% END %] |
315 |
|
316 |
[% IF ( biblioitem.cn_source ) %] |
317 |
<span> |
318 |
Classification: [% biblioitem.cn_source | $raw %] |
319 |
</span><br/> |
320 |
[% END %] |
321 |
|
322 |
[% IF ( biblioitem.lccn ) %] |
323 |
<span> |
324 |
LCCN: [% biblioitem.lccn | $raw %] |
325 |
</span><br/> |
326 |
[% END %] |
327 |
|
328 |
[% IF ( biblioitem.url ) %] |
329 |
<span> |
330 |
URL: [% biblioitem.url | html %] |
331 |
</span> |
332 |
[% END %] |
333 |
</p> |
334 |
|
335 |
[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %] |
336 |
[% IF ( OPACBaseURL ) %] |
337 |
<p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p> |
338 |
[% END %] |
339 |
|
340 |
[% IF ( biblio.items.size ) %] |
341 |
<p>Items: |
342 |
<ul> |
343 |
[% FOREACH item IN biblio.items %]<li> |
344 |
[% item.branchname | $raw %] |
345 |
[% item.location | $raw %] |
346 |
[% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %] |
347 |
[% item.barcode | $raw %] |
348 |
</li>[% END %] |
349 |
</ul> |
350 |
</p> |
351 |
[% END %] |
352 |
<hr/> |
353 |
</li> |
354 |
[% END %] |
355 |
</ol>",'email','default') }); |
356 |
|
357 |
NewVersion( $DBversion, 3150, 'Add LIST and CART notices' ); |
358 |
} |