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 |
|
46 |
[% SET marcflavour = Koha.Preference('marcflavour') %] |
47 |
[% IF marcflavour == 'UNIMARC' %] |
48 |
[% SET maxtag = 712 %] |
49 |
[% ELSE %] |
50 |
[% SET maxtag = 720 %] |
51 |
[% END %] |
52 |
|
53 |
<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %] |
54 |
[% FOREACH field IN record.fields('7..') %] |
55 |
[% IF ( biblio.author ) %]; [% END %] |
56 |
[% UNLESS ( field.tag < 700 || field.tag > maxtag ) %] |
57 |
[% SET separator = Koha.Preference('AuthoritySeparator') %] |
58 |
[% IF ( separator ) %][% separator | $raw %][% ELSE %] [% END %][% field.as_string | $raw %] |
59 |
[% END %] |
60 |
[% UNLESS ( loop.last ) %];[% END %] |
61 |
[% END %] |
62 |
</span> |
63 |
|
64 |
[% SET biblioitem = biblio.biblioitem %] |
65 |
|
66 |
[% IF ( biblioitem.isbn ) %] |
67 |
<span> |
68 |
ISBN: [% FOREACH isbn IN biblioitem.isbn %] |
69 |
[% isbn | $raw %] |
70 |
[% UNLESS ( loop.last ) %]; [% END %] |
71 |
[% END %] |
72 |
</span><br/> |
73 |
[% END %] |
74 |
|
75 |
[% IF ( biblioitem.publishercode ) %] |
76 |
<span> |
77 |
Published by: [% biblioitem.publishercode | $raw %] |
78 |
[% IF ( biblioitem.publicationyear ) %] |
79 |
in [% biblioitem.publicationyear | $raw %] |
80 |
[% END %] |
81 |
[% IF ( biblioitem.pages ) %] |
82 |
, [% biblioitem.pages | $raw %] |
83 |
[% END %] |
84 |
[% IF BIBLIO_RESULT.item('size') %] |
85 |
, [% BIBLIO_RESULT.item('size') | html %] |
86 |
[% END %] |
87 |
</span><br/> |
88 |
[% END %] |
89 |
|
90 |
[% IF ( biblio.seriestitle ) %] |
91 |
<span> |
92 |
Collection: [% biblio.seriestitle | $raw %] |
93 |
</span><br/> |
94 |
[% END %] |
95 |
|
96 |
[% IF ( biblio.copyrightdate ) %] |
97 |
<span> |
98 |
Copyright year: [% biblio.copyrightdate | $raw %] |
99 |
</span><br/> |
100 |
[% END %] |
101 |
|
102 |
[% IF ( biblio.notes ) %] |
103 |
<span> |
104 |
Notes: [% biblio.notes | $raw %] |
105 |
</span><br/> |
106 |
[% END %] |
107 |
|
108 |
[% IF ( biblio.unititle ) %] |
109 |
<span> |
110 |
Unified title: [% biblio.unititle | $raw %] |
111 |
</span><br/> |
112 |
[% END %] |
113 |
|
114 |
[% IF ( biblio.serial ) %] |
115 |
<span> |
116 |
Serial: [% biblio.serial | $raw %] |
117 |
</span><br/> |
118 |
[% END %] |
119 |
|
120 |
[% IF ( biblioitem.lccn ) %] |
121 |
<span> |
122 |
LCCN: [% biblioitem.lccn | $raw %] |
123 |
</span><br/> |
124 |
[% END %] |
125 |
|
126 |
[% IF ( biblioitem.url ) %] |
127 |
<span> |
128 |
URL: [% biblioitem.url | html %] |
129 |
</span> |
130 |
[% END %] |
131 |
</p> |
132 |
|
133 |
[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %] |
134 |
[% IF ( OPACBaseURL ) %] |
135 |
<p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p> |
136 |
[% END %] |
137 |
|
138 |
[% IF ( biblio.items.size ) %] |
139 |
<p>Items: |
140 |
<ul> |
141 |
[% FOREACH item IN biblio.items %]<li> |
142 |
[% item.branchname | $raw %] |
143 |
[% item.location | $raw %] |
144 |
[% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %] |
145 |
[% item.barcode | $raw %] |
146 |
</li>[% END %] |
147 |
</ul> |
148 |
</p> |
149 |
[% END %] |
150 |
<hr/> |
151 |
</li> |
152 |
|
153 |
[% END %] |
154 |
</ol>", 'email','default' ), |
155 |
('catalogue','CART','','Send cart',1,'Your cart',"<p>Hi,</p> |
156 |
|
157 |
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p> |
158 |
|
159 |
<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> |
160 |
<hr/> |
161 |
|
162 |
<p><<comment>></p> |
163 |
<hr/> |
164 |
|
165 |
<ol> |
166 |
[% FOREACH biblio IN biblios %] |
167 |
<li> |
168 |
<span> |
169 |
[% biblio.title | $raw %] |
170 |
[% IF ( biblio.subtitle ) %] |
171 |
[% FOREACH subtitle IN biblio.subtitle.split(' | ') %] |
172 |
[% subtitle | $raw %] |
173 |
[% END %] |
174 |
[% END %] |
175 |
[% biblio.part_number | $raw %] [% biblio.part_name | $raw %] |
176 |
</span> |
177 |
|
178 |
<p> |
179 |
[% IF ( BIBLIO_RESULT.HASAUTHORS ) %] |
180 |
<span>Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author | $raw %][% END %] |
181 |
|
182 |
[% IF ( BIBLIO_RESULT.MARCAUTHORS ) %] |
183 |
[% IF ( BIBLIO_RESULT.author ) %]; [% END %] |
184 |
[% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %] |
185 |
[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] |
186 |
[% MARCAUTHOR_SUBFIELDS_LOO.separator | $raw %][% MARCAUTHOR_SUBFIELDS_LOO.value | $raw %] |
187 |
[% END %] |
188 |
[% UNLESS ( loop.last ) %];[% END %] |
189 |
[% END %] |
190 |
[% END %] |
191 |
</span><br/> |
192 |
[% END %] |
193 |
|
194 |
[% SET record = biblio.metadata.record %] |
195 |
<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %] |
196 |
[% FOREACH field IN record.fields('7..') %] |
197 |
[% IF ( biblio.author ) %]; [% END %] |
198 |
[% UNLESS ( field.tag < 700 || field.tag > 720 ) %] |
199 |
[% SET separator = Koha.Preference('AuthoritySeparator') %] |
200 |
[% IF ( separator ) %][% separator | $raw %][% ELSE %] [% END %][% field.as_string | $raw %] |
201 |
[% END %] |
202 |
[% UNLESS ( loop.last ) %];[% END %] |
203 |
[% END %] |
204 |
</span> |
205 |
|
206 |
[% SET biblioitem = biblio.biblioitem %] |
207 |
|
208 |
[% IF ( biblioitem.isbn ) %] |
209 |
<span> |
210 |
ISBN: [% FOREACH isbn IN biblioitem.isbn %] |
211 |
[% isbn | $raw %] |
212 |
[% UNLESS ( loop.last ) %]; [% END %] |
213 |
[% END %] |
214 |
</span><br/> |
215 |
[% END %] |
216 |
|
217 |
[% IF ( biblioitem.publishercode ) %] |
218 |
<span> |
219 |
Published by: [% biblioitem.publishercode | $raw %] |
220 |
[% IF ( biblioitem.publicationyear ) %] |
221 |
in [% biblioitem.publicationyear | $raw %] |
222 |
[% END %] |
223 |
[% IF ( biblioitem.pages ) %] |
224 |
, [% biblioitem.pages | $raw %] |
225 |
[% END %] |
226 |
[% IF BIBLIO_RESULT.item('size') %] |
227 |
, [% BIBLIO_RESULT.item('size') | html %] |
228 |
[% END %] |
229 |
</span><br/> |
230 |
[% END %] |
231 |
|
232 |
[% IF ( biblio.seriestitle ) %] |
233 |
<span> |
234 |
Collection: [% biblio.seriestitle | $raw %] |
235 |
</span><br/> |
236 |
[% END %] |
237 |
|
238 |
[% IF ( biblio.copyrightdate ) %] |
239 |
<span> |
240 |
Copyright year: [% biblio.copyrightdate | $raw %] |
241 |
</span><br/> |
242 |
[% END %] |
243 |
|
244 |
[% IF ( biblio.notes ) %] |
245 |
<span> |
246 |
Notes: [% biblio.notes | $raw %] |
247 |
</span><br/> |
248 |
[% END %] |
249 |
|
250 |
[% IF ( biblio.unititle ) %] |
251 |
<span> |
252 |
Unified title: [% biblio.unititle | $raw %] |
253 |
</span><br/> |
254 |
[% END %] |
255 |
|
256 |
[% IF ( biblio.serial ) %] |
257 |
<span> |
258 |
Serial: [% biblio.serial | $raw %] |
259 |
</span><br/> |
260 |
[% END %] |
261 |
|
262 |
[% IF ( biblioitem.lccn ) %] |
263 |
<span> |
264 |
LCCN: [% biblioitem.lccn | $raw %] |
265 |
</span><br/> |
266 |
[% END %] |
267 |
|
268 |
[% IF ( biblioitem.url ) %] |
269 |
<span> |
270 |
URL: [% biblioitem.url | html %] |
271 |
</span> |
272 |
[% END %] |
273 |
</p> |
274 |
|
275 |
[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %] |
276 |
[% IF ( OPACBaseURL ) %] |
277 |
<p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p> |
278 |
[% END %] |
279 |
|
280 |
[% IF ( biblio.items.size ) %] |
281 |
<p>Items: |
282 |
<ul> |
283 |
[% FOREACH item IN biblio.items %]<li> |
284 |
[% item.branchname | $raw %] |
285 |
[% item.location | $raw %] |
286 |
[% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %] |
287 |
[% item.barcode | $raw %] |
288 |
</li>[% END %] |
289 |
</ul> |
290 |
</p> |
291 |
[% END %] |
292 |
<hr/> |
293 |
</li> |
294 |
[% END %] |
295 |
</ol>",'email','default') }); |
296 |
|
297 |
NewVersion( $DBversion, 3150, 'Add LIST and CART notices' ); |
298 |
} |