View | Details | Raw Unified | Return to bug 3150
Collapse All | Expand All

(-)a/basket/sendbasket.pl (-91 / +44 lines)
Lines 52-163 if ( $email_add ) { Link Here
52
            session_id => scalar $query->cookie('CGISESSID'),
52
            session_id => scalar $query->cookie('CGISESSID'),
53
            token  => scalar $query->param('csrf_token'),
53
            token  => scalar $query->param('csrf_token'),
54
        });
54
        });
55
    my $comment = $query->param('comment');
56
55
57
    # Since we are already logged in, no need to check credentials again
56
    my $patron = Koha::Patrons->find( $borrowernumber );
58
    # when loading a second template.
57
59
    my $template2 = C4::Templates::gettemplate(
58
    my $comment = $query->param('comment');
60
        'basket/sendbasket.tt', 'intranet', $query,
61
    );
62
59
63
    my @bibs = split( /\//, $bib_list );
60
    my @bibs = split( /\//, $bib_list );
64
    my @results;
65
    my $iso2709;
61
    my $iso2709;
66
    my $marcflavour = C4::Context->preference('marcflavour');
67
    foreach my $biblionumber (@bibs) {
68
        $template2->param( biblionumber => $biblionumber );
69
70
        my $dat              = GetBiblioData($biblionumber);
71
        next unless $dat;
72
        my $biblio           = Koha::Biblios->find( $biblionumber );
73
        my $record           = GetMarcBiblio({
74
            biblionumber => $biblionumber,
75
            embed_items => 1 });
76
        my $marcauthorsarray = $biblio->get_authors_from_MARC;
77
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
78
79
        my @items = GetItemsInfo( $biblionumber );
80
81
        my $hasauthors = 0;
82
        if($dat->{'author'} || @$marcauthorsarray) {
83
          $hasauthors = 1;
84
        }
85
	
86
87
        $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
88
        $dat->{MARCAUTHORS}    = $marcauthorsarray;
89
        $dat->{HASAUTHORS}     = $hasauthors;
90
        $dat->{'biblionumber'} = $biblionumber;
91
        $dat->{ITEM_RESULTS}   = \@items;
92
93
        $iso2709 .= $record->as_usmarc();
94
95
        push( @results, $dat );
96
    }
97
98
    my $resultsarray = \@results;
99
    $template2->param(
100
        BIBLIO_RESULTS => $resultsarray,
101
        comment        => $comment
102
    );
103
104
    # Getting template result
105
    my $template_res = $template2->output();
106
    my $body;
107
108
    my $subject;
109
    # Analysing information and getting mail properties
110
    if ( $template_res =~ /<SUBJECT>(?<subject>.*)<END_SUBJECT>/s ) {
111
        $subject = $+{subject};
112
        $subject =~ s|\n?(.*)\n?|$1|;
113
    }
114
    else {
115
        $subject = "no subject";
116
    }
117
62
118
    my $email_header = "";
63
    foreach my $bib ( @bibs ) {
119
    if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
64
        my $biblio = Koha::Biblios->find($bib);
120
        $email_header = $1;
65
        $iso2709 .= $biblio->metadata->record->as_usmarc();
121
        $email_header =~ s|\n?(.*)\n?|$1|;
66
    };
122
    }
123
124
    if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
125
        $body = $1;
126
        $body =~ s|\n?(.*)\n?|$1|;
127
    }
128
67
129
    my $THE_body = <<END_OF_BODY;
68
    if ( !defined $iso2709 ) {
130
$email_header
69
        carp "Error sending mail: empty basket";
131
$body
70
        $template->param( error => 1 );
132
END_OF_BODY
133
71
134
    try {
72
    } else {
73
        my %loops = (
74
            biblio => \@bibs,
75
        );
135
76
136
        my $email = Koha::Email->create(
77
        my %substitute = (
137
            {
78
            comment => $comment,
138
                to      => $email_add,
139
                subject => $subject,
140
            }
141
        );
79
        );
142
80
143
        $email->text_body( $THE_body );
81
        my $letter = C4::Letters::GetPreparedLetter(
144
        $email->attach(
82
            module => 'catalog',
145
            Encode::encode( "UTF-8", $iso2709 ),
83
            letter_code => 'CART',
146
            content_type => 'application/octet-stream',
84
            lang => $patron->lang,
147
            name         => 'basket.iso2709',
85
            tables => {
148
            disposition  => 'attachment',
86
                borrowers => $borrowernumber,
87
            },
88
            message_transport_type => 'email',
89
            loops => \%loops,
90
            substitute => \%substitute,
149
        );
91
        );
150
92
151
        my $library = Koha::Patrons->find( $borrowernumber )->library;
93
        my $attachment = {
152
        $email->send_or_die({ transport => $library->smtp_server->transport });
94
            filename => 'basket.iso2709',
153
        $template->param( SENT => "1" );
95
            type => 'application/octet-stream',
96
            content => Encode::encode("UTF-8", $iso2709),
97
        };
98
99
        my $user_email = $patron->first_valid_email_address || C4::Context->preference('KohaAdminEmailAddress');
100
        C4::Letters::EnqueueLetter({
101
            letter => $letter,
102
            message_transport_type => 'email',
103
            borrowernumber => $patron->borrowernumber,
104
            to_address => $email_add,
105
            reply_address => $user_email,
106
            attachments => [$attachment],
107
        });
108
109
        $template->param( SENT => 1 );
154
    }
110
    }
155
    catch {
156
        carp "Error sending mail: $_";
157
        $template->param( error => 1 );
158
    };
159
111
160
    $template->param( email_add => $email_add );
112
    $template->param( email_add => $email_add );
113
161
    output_html_with_http_headers $query, $cookie, $template->output;
114
    output_html_with_http_headers $query, $cookie, $template->output;
162
}
115
}
163
else {
116
else {
(-)a/installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl (+224 lines)
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
        ('catalog','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE raw -%]
5
<p>Hi,</p>
6
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
7
<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>
8
<hr/>
9
<p>[% comment | $raw %]</p>
10
<hr/>
11
<ol>
12
[% FOREACH biblio IN biblios %]
13
    <li>
14
        <span>
15
            [% biblio.title | $raw %]
16
            [% IF ( biblio.subtitle ) %]
17
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
18
                    [% subtitle | $raw %]
19
                [% END %]
20
            [% END %]
21
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
22
        </span>
23
        <p>
24
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
25
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
26
                [% IF ( biblio.get_authors_from_MARC ) %]
27
                    [% IF ( biblio.author ) %]; [% END %]
28
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
29
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
30
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
31
                        [% END %]
32
                        [% UNLESS ( loop.last ) %];[% END %]
33
                    [% END %]
34
                [% END %]
35
                </span><br/>
36
            [% END %]
37
            [% SET biblioitem = biblio.biblioitem %]
38
            [% IF ( biblioitem.isbn ) %]
39
                <span>
40
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
41
                        [% isbn | $raw %]
42
                        [% UNLESS ( loop.last ) %]; [% END %]
43
                    [% END %]
44
                </span><br/>
45
            [% END %]
46
            [% IF ( biblioitem.publishercode ) %]
47
                <span>
48
                    Published by: [% biblioitem.publishercode | $raw %]
49
                    [% IF ( biblioitem.publicationyear ) %]
50
                        in [% biblioitem.publicationyear | $raw %]
51
                    [% END %]
52
                    [% IF ( biblioitem.pages ) %]
53
                        , [% biblioitem.pages | $raw %]
54
                    [% END %]
55
                </span><br/>
56
            [% END %]
57
            [% IF ( biblio.seriestitle ) %]
58
                <span>
59
                    Collection: [% biblio.seriestitle | $raw %]
60
                </span><br/>
61
            [% END %]
62
            [% IF ( biblio.copyrightdate ) %]
63
                <span>
64
                    Copyright year: [% biblio.copyrightdate | $raw %]
65
                </span><br/>
66
            [% END %]
67
            [% IF ( biblio.notes ) %]
68
                <span>
69
                    Notes: [% biblio.notes | $raw %]
70
                </span><br/>
71
            [% END %]
72
            [% IF ( biblio.unititle ) %]
73
                <span>
74
                    Unified title: [% biblio.unititle | $raw %]
75
                </span><br/>
76
            [% END %]
77
            [% IF ( biblio.serial ) %]
78
                <span>
79
                    Serial: [% biblio.serial | $raw %]
80
                </span><br/>
81
            [% END %]
82
            [% IF ( biblioitem.lccn ) %]
83
                <span>
84
                    LCCN: [% biblioitem.lccn | $raw %]
85
                </span><br/>
86
            [% END %]
87
            [% IF ( biblioitem.url ) %]
88
                <span>
89
                    URL: [% biblioitem.url | html %]
90
                </span>
91
            [% END %]
92
        </p>
93
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
94
        [% IF ( OPACBaseURL ) %]
95
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
96
        [% END %]
97
        [% IF ( biblio.items.count > 0 ) %]
98
            <p>Items:
99
                <ul>
100
                    [% FOREACH item IN biblio.items %]<li>
101
                        [% item.holding_branch.branchname | $raw %]
102
                        [% item.location | $raw %]
103
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
104
                        [% item.barcode | $raw %]
105
                    </li>[% END %]
106
                </ul>
107
            </p>
108
        [% END %]
109
        <hr/>
110
    </li>
111
[% END %]
112
</ol>", 'email','default' ),
113
        ('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
114
<p>Hi,</p>
115
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
116
<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>
117
<hr/>
118
<p>[% comment | $raw %]</p>
119
<hr/>
120
<ol>
121
[% FOREACH biblio IN biblios %]
122
    <li>
123
        <span>
124
            [% biblio.title | $raw %]
125
            [% IF ( biblio.subtitle ) %]
126
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
127
                    [% subtitle | $raw %]
128
                [% END %]
129
            [% END %]
130
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
131
        </span>
132
        <p>
133
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
134
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
135
                [% IF ( biblio.get_authors_from_MARC ) %]
136
                    [% IF ( biblio.author ) %]; [% END %]
137
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
138
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
139
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
140
                        [% END %]
141
                        [% UNLESS ( loop.last ) %];[% END %]
142
                    [% END %]
143
                [% END %]
144
                </span><br/>
145
            [% END %]
146
            [% SET biblioitem = biblio.biblioitem %]
147
            [% IF ( biblioitem.isbn ) %]
148
                <span>
149
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
150
                        [% isbn | $raw %]
151
                        [% UNLESS ( loop.last ) %]; [% END %]
152
                    [% END %]
153
                </span><br/>
154
            [% END %]
155
            [% IF ( biblioitem.publishercode ) %]
156
                <span>
157
                    Published by: [% biblioitem.publishercode | $raw %]
158
                    [% IF ( biblioitem.publicationyear ) %]
159
                        in [% biblioitem.publicationyear | $raw %]
160
                    [% END %]
161
                    [% IF ( biblioitem.pages ) %]
162
                        , [% biblioitem.pages | $raw %]
163
                    [% END %]
164
                </span><br/>
165
            [% END %]
166
            [% IF ( biblio.seriestitle ) %]
167
                <span>
168
                    Collection: [% biblio.seriestitle | $raw %]
169
                </span><br/>
170
            [% END %]
171
            [% IF ( biblio.copyrightdate ) %]
172
                <span>
173
                    Copyright year: [% biblio.copyrightdate | $raw %]
174
                </span><br/>
175
            [% END %]
176
            [% IF ( biblio.notes ) %]
177
                <span>
178
                    Notes: [% biblio.notes | $raw %]
179
                </span><br/>
180
            [% END %]
181
            [% IF ( biblio.unititle ) %]
182
                <span>
183
                    Unified title: [% biblio.unititle | $raw %]
184
                </span><br/>
185
            [% END %]
186
            [% IF ( biblio.serial ) %]
187
                <span>
188
                    Serial: [% biblio.serial | $raw %]
189
                </span><br/>
190
            [% END %]
191
            [% IF ( biblioitem.lccn ) %]
192
                <span>
193
                    LCCN: [% biblioitem.lccn | $raw %]
194
                </span><br/>
195
            [% END %]
196
            [% IF ( biblioitem.url ) %]
197
                <span>
198
                    URL: [% biblioitem.url | html %]
199
                </span>
200
            [% END %]
201
        </p>
202
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
203
        [% IF ( OPACBaseURL ) %]
204
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
205
        [% END %]
206
        [% IF ( biblio.items.count > 0 ) %]
207
            <p>Items:
208
                <ul>
209
                    [% FOREACH item IN biblio.items %]<li>
210
                        [% item.holding_branch.branchname | $raw %]
211
                        [% item.location | $raw %]
212
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
213
                        [% item.barcode | $raw %]
214
                    </li>[% END %]
215
                </ul>
216
            </p>
217
        [% END %]
218
        <hr/>
219
    </li>
220
[% END %]
221
</ol>",'email','default') });
222
223
    NewVersion( $DBversion, 3150, 'Add LIST and CART notices' );
224
}
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (+238 lines)
Lines 1442-1444 tables: Link Here
1442
            - "[% ELSE %]"
1442
            - "[% ELSE %]"
1443
            - "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due | $KohaDates as_due_date => 1 %]"
1443
            - "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due | $KohaDates as_due_date => 1 %]"
1444
            - "[% END %]"
1444
            - "[% END %]"
1445
1446
        - module: catalog
1447
          code: LIST
1448
          branchcode: ""
1449
          name: "Send list"
1450
          is_html: 1
1451
          title: "Your list: [% listname | html %]"
1452
          message_transport_type: email
1453
          lang: default
1454
          content:
1455
            - "[%- USE raw -%]"
1456
            - "<p>Hi,</p>"
1457
            - "<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>"
1458
            - "<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>"
1459
            - "<hr/>"
1460
            - "<p>[% comment | $raw %]</p>"
1461
            - "<hr/>"
1462
            - "<ol>"
1463
            - "[% FOREACH biblio IN biblios %]"
1464
            - "<li>"
1465
            - "<span>"
1466
            - "[% biblio.title | $raw %]"
1467
            - "[% IF ( biblio.subtitle ) %]"
1468
            - "[% FOREACH subtitle IN biblio.subtitle.split(' | ') %]"
1469
            - "[% subtitle | $raw %]"
1470
            - "[% END %]"
1471
            - "[% END %]"
1472
            - "[% biblio.part_number | $raw %] [% biblio.part_name | $raw %]"
1473
            - "</span>"
1474
            - "<p>"
1475
            - "[% IF ( biblio.author || biblio.get_authors_from_MARC ) %]"
1476
            - "<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]"
1477
            - "[% IF ( biblio.get_authors_from_MARC ) %]"
1478
            - "[% IF ( biblio.author ) %]; [% END %]"
1479
            - "[% FOREACH author IN biblio.get_authors_from_MARC %]"
1480
            - "[% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]"
1481
            - "[% subfield.separator | $raw %][% subfield.value | $raw %]"
1482
            - "[% END %]"
1483
            - "[% UNLESS ( loop.last ) %];[% END %]"
1484
            - "[% END %]"
1485
            - "[% END %]"
1486
            - "</span><br/>"
1487
            - "[% END %]"
1488
            - "[% SET biblioitem = biblio.biblioitem %]"
1489
            - "[% IF ( biblioitem.isbn ) %]"
1490
            - "<span>"
1491
            - "ISBN: [% FOREACH isbn IN biblioitem.isbn %]"
1492
            - "[% isbn | $raw %]"
1493
            - "[% UNLESS ( loop.last ) %]; [% END %]"
1494
            - "[% END %]"
1495
            - "</span><br/>"
1496
            - "[% END %]"
1497
            - "[% IF ( biblioitem.publishercode ) %]"
1498
            - "<span>"
1499
            - "Published by: [% biblioitem.publishercode | $raw %]"
1500
            - "[% IF ( biblioitem.publicationyear ) %]"
1501
            - "in [% biblioitem.publicationyear | $raw %]"
1502
            - "[% END %]"
1503
            - "[% IF ( biblioitem.pages ) %]"
1504
            - ", [% biblioitem.pages | $raw %]"
1505
            - "[% END %]"
1506
            - "</span><br/>"
1507
            - "[% END %]"
1508
            - "[% IF ( biblio.seriestitle ) %]"
1509
            - "<span>"
1510
            - "Collection: [% biblio.seriestitle | $raw %]"
1511
            - "</span><br/>"
1512
            - "[% END %]"
1513
            - "[% IF ( biblio.copyrightdate ) %]"
1514
            - "<span>"
1515
            - "Copyright year: [% biblio.copyrightdate | $raw %]"
1516
            - "</span><br/>"
1517
            - "[% END %]"
1518
            - "[% IF ( biblio.notes ) %]"
1519
            - "<span>"
1520
            - "Notes: [% biblio.notes | $raw %]"
1521
            - "</span><br/>"
1522
            - "[% END %]"
1523
            - "[% IF ( biblio.unititle ) %]"
1524
            - "<span>"
1525
            - "Unified title: [% biblio.unititle | $raw %]"
1526
            - "</span><br/>"
1527
            - "[% END %]"
1528
            - "[% IF ( biblio.serial ) %]"
1529
            - "<span>"
1530
            - "Serial: [% biblio.serial | $raw %]"
1531
            - "</span><br/>"
1532
            - "[% END %]"
1533
            - "[% IF ( biblioitem.lccn ) %]"
1534
            - "<span>"
1535
            - "LCCN: [% biblioitem.lccn | $raw %]"
1536
            - "</span><br/>"
1537
            - "[% END %]"
1538
            - "[% IF ( biblioitem.url ) %]"
1539
            - "<span>"
1540
            - "URL: [% biblioitem.url | html %]"
1541
            - "</span>"
1542
            - "[% END %]"
1543
            - "</p>"
1544
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]"
1545
            - "[% IF ( OPACBaseURL ) %]"
1546
            - "<p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>"
1547
            - "[% END %]"
1548
            - "[% IF ( biblio.items.count > 0 ) %]"
1549
            - "<p>Items:"
1550
            - "<ul>"
1551
            - "[% FOREACH item IN biblio.items %]<li>"
1552
            - "[% item.holding_branch.branchname | $raw %]"
1553
            - "[% item.location | $raw %]"
1554
            - "[% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]"
1555
            - "[% item.barcode | $raw %]"
1556
            - "</li>[% END %]"
1557
            - "</ul>"
1558
            - "</p>"
1559
            - "[% END %]"
1560
            - "<hr/>"
1561
            - "</li>"
1562
            - "[% END %]"
1563
            - "</ol>"
1564
1565
        - module: catalog
1566
          code: CART
1567
          branchcode: ""
1568
          name: "Send cart"
1569
          is_html: 1
1570
          title: "Your cart"
1571
          message_transport_type: email
1572
          lang: default
1573
          content:
1574
            - "[%- USE raw -%]"
1575
            - "<p>Hi,</p>"
1576
            - "<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>"
1577
            - "<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>"
1578
            - "<hr/>"
1579
            - "<p>[% comment | $raw %]</p>"
1580
            - "<hr/>"
1581
            - "<ol>"
1582
            - "[% FOREACH biblio IN biblios %]"
1583
            - "<li>"
1584
            - "<span>"
1585
            - "[% biblio.title | $raw %]"
1586
            - "[% IF ( biblio.subtitle ) %]"
1587
            - "[% FOREACH subtitle IN biblio.subtitle.split(' | ') %]"
1588
            - "[% subtitle | $raw %]"
1589
            - "[% END %]"
1590
            - "[% END %]"
1591
            - "[% biblio.part_number | $raw %] [% biblio.part_name | $raw %]"
1592
            - "</span>"
1593
            - "<p>"
1594
            - "[% IF ( biblio.author || biblio.get_authors_from_MARC ) %]"
1595
            - "<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]"
1596
            - "[% IF ( biblio.get_authors_from_MARC ) %]"
1597
            - "[% IF ( biblio.author ) %]; [% END %]"
1598
            - "[% FOREACH author IN biblio.get_authors_from_MARC %]"
1599
            - "[% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]"
1600
            - "[% subfield.separator | $raw %][% subfield.value | $raw %]"
1601
            - "[% END %]"
1602
            - "[% UNLESS ( loop.last ) %];[% END %]"
1603
            - "[% END %]"
1604
            - "[% END %]"
1605
            - "</span><br/>"
1606
            - "[% END %]"
1607
            - "[% SET biblioitem = biblio.biblioitem %]"
1608
            - "[% IF ( biblioitem.isbn ) %]"
1609
            - "<span>"
1610
            - "ISBN: [% FOREACH isbn IN biblioitem.isbn %]"
1611
            - "[% isbn | $raw %]"
1612
            - "[% UNLESS ( loop.last ) %]; [% END %]"
1613
            - "[% END %]"
1614
            - "</span><br/>"
1615
            - "[% END %]"
1616
            - "[% IF ( biblioitem.publishercode ) %]"
1617
            - "<span>"
1618
            - "Published by: [% biblioitem.publishercode | $raw %]"
1619
            - "[% IF ( biblioitem.publicationyear ) %]"
1620
            - "in [% biblioitem.publicationyear | $raw %]"
1621
            - "[% END %]"
1622
            - "[% IF ( biblioitem.pages ) %]"
1623
            - ", [% biblioitem.pages | $raw %]"
1624
            - "[% END %]"
1625
            - "</span><br/>"
1626
            - "[% END %]"
1627
            - "[% IF ( biblio.seriestitle ) %]"
1628
            - "<span>"
1629
            - "Collection: [% biblio.seriestitle | $raw %]"
1630
            - "</span><br/>"
1631
            - "[% END %]"
1632
            - "[% IF ( biblio.copyrightdate ) %]"
1633
            - "<span>"
1634
            - "Copyright year: [% biblio.copyrightdate | $raw %]"
1635
            - "</span><br/>"
1636
            - "[% END %]"
1637
            - "[% IF ( biblio.notes ) %]"
1638
            - "<span>"
1639
            - "Notes: [% biblio.notes | $raw %]"
1640
            - "</span><br/>"
1641
            - "[% END %]"
1642
            - "[% IF ( biblio.unititle ) %]"
1643
            - "<span>"
1644
            - "Unified title: [% biblio.unititle | $raw %]"
1645
            - "</span><br/>"
1646
            - "[% END %]"
1647
            - "[% IF ( biblio.serial ) %]"
1648
            - "<span>"
1649
            - "Serial: [% biblio.serial | $raw %]"
1650
            - "</span><br/>"
1651
            - "[% END %]"
1652
            - "[% IF ( biblioitem.lccn ) %]"
1653
            - "<span>"
1654
            - "LCCN: [% biblioitem.lccn | $raw %]"
1655
            - "</span><br/>"
1656
            - "[% END %]"
1657
            - "[% IF ( biblioitem.url ) %]"
1658
            - "<span>"
1659
            - "URL: [% biblioitem.url | html %]"
1660
            - "</span>"
1661
            - "[% END %]"
1662
            - "</p>"
1663
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]"
1664
            - "[% IF ( OPACBaseURL ) %]"
1665
            - "<p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>"
1666
            - "[% END %]"
1667
            - "[% IF ( biblio.items.count > 0 ) %]"
1668
            - "<p>Items:"
1669
            - "<ul>"
1670
            - "[% FOREACH item IN biblio.items %]<li>"
1671
            - "[% item.holding_branch.branchname | $raw %]"
1672
            - "[% item.location | $raw %]"
1673
            - "[% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]"
1674
            - "[% item.barcode | $raw %]"
1675
            - "</li>[% END %]"
1676
            - "</ul>"
1677
            - "</p>"
1678
            - "[% END %]"
1679
            - "<hr/>"
1680
            - "</li>"
1681
            - "[% END %]"
1682
            - "</ol>"
(-)a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql (+219 lines)
Lines 302-304 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
302
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
302
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
303
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
303
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
304
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
304
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
305
306
INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('catalog','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE raw -%]
307
<p>Hi,</p>
308
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
309
<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>
310
<hr/>
311
<p>[% comment | $raw %]</p>
312
<hr/>
313
<ol>
314
[% FOREACH biblio IN biblios %]
315
    <li>
316
        <span>
317
            [% biblio.title | $raw %]
318
            [% IF ( biblio.subtitle ) %]
319
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
320
                    [% subtitle | $raw %]
321
                [% END %]
322
            [% END %]
323
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
324
        </span>
325
        <p>
326
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
327
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
328
                [% IF ( biblio.get_authors_from_MARC ) %]
329
                    [% IF ( biblio.author ) %]; [% END %]
330
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
331
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
332
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
333
                        [% END %]
334
                        [% UNLESS ( loop.last ) %];[% END %]
335
                    [% END %]
336
                [% END %]
337
                </span><br/>
338
            [% END %]
339
            [% SET biblioitem = biblio.biblioitem %]
340
            [% IF ( biblioitem.isbn ) %]
341
                <span>
342
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
343
                        [% isbn | $raw %]
344
                        [% UNLESS ( loop.last ) %]; [% END %]
345
                    [% END %]
346
                </span><br/>
347
            [% END %]
348
            [% IF ( biblioitem.publishercode ) %]
349
                <span>
350
                    Published by: [% biblioitem.publishercode | $raw %]
351
                    [% IF ( biblioitem.publicationyear ) %]
352
                        in [% biblioitem.publicationyear | $raw %]
353
                    [% END %]
354
                    [% IF ( biblioitem.pages ) %]
355
                        , [% biblioitem.pages | $raw %]
356
                    [% END %]
357
                </span><br/>
358
            [% END %]
359
            [% IF ( biblio.seriestitle ) %]
360
                <span>
361
                    Collection: [% biblio.seriestitle | $raw %]
362
                </span><br/>
363
            [% END %]
364
            [% IF ( biblio.copyrightdate ) %]
365
                <span>
366
                    Copyright year: [% biblio.copyrightdate | $raw %]
367
                </span><br/>
368
            [% END %]
369
            [% IF ( biblio.notes ) %]
370
                <span>
371
                    Notes: [% biblio.notes | $raw %]
372
                </span><br/>
373
            [% END %]
374
            [% IF ( biblio.unititle ) %]
375
                <span>
376
                    Unified title: [% biblio.unititle | $raw %]
377
                </span><br/>
378
            [% END %]
379
            [% IF ( biblio.serial ) %]
380
                <span>
381
                    Serial: [% biblio.serial | $raw %]
382
                </span><br/>
383
            [% END %]
384
            [% IF ( biblioitem.lccn ) %]
385
                <span>
386
                    LCCN: [% biblioitem.lccn | $raw %]
387
                </span><br/>
388
            [% END %]
389
            [% IF ( biblioitem.url ) %]
390
                <span>
391
                    URL: [% biblioitem.url | html %]
392
                </span>
393
            [% END %]
394
        </p>
395
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
396
        [% IF ( OPACBaseURL ) %]
397
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
398
        [% END %]
399
        [% IF ( biblio.items.count > 0 ) %]
400
            <p>Items:
401
                <ul>
402
                    [% FOREACH item IN biblio.items %]<li>
403
                        [% item.holding_branch.branchname | $raw %]
404
                        [% item.location | $raw %]
405
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
406
                        [% item.barcode | $raw %]
407
                    </li>[% END %]
408
                </ul>
409
            </p>
410
        [% END %]
411
        <hr/>
412
    </li>
413
[% END %]
414
</ol>", 'email','default' ),
415
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
416
<p>Hi,</p>
417
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
418
<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>
419
<hr/>
420
<p>[% comment | $raw %]</p>
421
<hr/>
422
<ol>
423
[% FOREACH biblio IN biblios %]
424
    <li>
425
        <span>
426
            [% biblio.title | $raw %]
427
            [% IF ( biblio.subtitle ) %]
428
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
429
                    [% subtitle | $raw %]
430
                [% END %]
431
            [% END %]
432
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
433
        </span>
434
        <p>
435
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
436
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
437
                [% IF ( biblio.get_authors_from_MARC ) %]
438
                    [% IF ( biblio.author ) %]; [% END %]
439
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
440
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
441
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
442
                        [% END %]
443
                        [% UNLESS ( loop.last ) %];[% END %]
444
                    [% END %]
445
                [% END %]
446
                </span><br/>
447
            [% END %]
448
            [% SET biblioitem = biblio.biblioitem %]
449
            [% IF ( biblioitem.isbn ) %]
450
                <span>
451
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
452
                        [% isbn | $raw %]
453
                        [% UNLESS ( loop.last ) %]; [% END %]
454
                    [% END %]
455
                </span><br/>
456
            [% END %]
457
            [% IF ( biblioitem.publishercode ) %]
458
                <span>
459
                    Published by: [% biblioitem.publishercode | $raw %]
460
                    [% IF ( biblioitem.publicationyear ) %]
461
                        in [% biblioitem.publicationyear | $raw %]
462
                    [% END %]
463
                    [% IF ( biblioitem.pages ) %]
464
                        , [% biblioitem.pages | $raw %]
465
                    [% END %]
466
                </span><br/>
467
            [% END %]
468
            [% IF ( biblio.seriestitle ) %]
469
                <span>
470
                    Collection: [% biblio.seriestitle | $raw %]
471
                </span><br/>
472
            [% END %]
473
            [% IF ( biblio.copyrightdate ) %]
474
                <span>
475
                    Copyright year: [% biblio.copyrightdate | $raw %]
476
                </span><br/>
477
            [% END %]
478
            [% IF ( biblio.notes ) %]
479
                <span>
480
                    Notes: [% biblio.notes | $raw %]
481
                </span><br/>
482
            [% END %]
483
            [% IF ( biblio.unititle ) %]
484
                <span>
485
                    Unified title: [% biblio.unititle | $raw %]
486
                </span><br/>
487
            [% END %]
488
            [% IF ( biblio.serial ) %]
489
                <span>
490
                    Serial: [% biblio.serial | $raw %]
491
                </span><br/>
492
            [% END %]
493
            [% IF ( biblioitem.lccn ) %]
494
                <span>
495
                    LCCN: [% biblioitem.lccn | $raw %]
496
                </span><br/>
497
            [% END %]
498
            [% IF ( biblioitem.url ) %]
499
                <span>
500
                    URL: [% biblioitem.url | html %]
501
                </span>
502
            [% END %]
503
        </p>
504
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
505
        [% IF ( OPACBaseURL ) %]
506
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
507
        [% END %]
508
        [% IF ( biblio.items.count > 0 ) %]
509
            <p>Items:
510
                <ul>
511
                    [% FOREACH item IN biblio.items %]<li>
512
                        [% item.holding_branch.branchname | $raw %]
513
                        [% item.location | $raw %]
514
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
515
                        [% item.barcode | $raw %]
516
                    </li>[% END %]
517
                </ul>
518
            </p>
519
        [% END %]
520
        <hr/>
521
    </li>
522
[% END %]
523
</ol>",'email','default');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql (+219 lines)
Lines 413-415 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
413
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
413
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
414
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
414
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
415
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
415
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
416
417
INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('catalog','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE raw -%]
418
<p>Hi,</p>
419
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
420
<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>
421
<hr/>
422
<p>[% comment | $raw %]</p>
423
<hr/>
424
<ol>
425
[% FOREACH biblio IN biblios %]
426
    <li>
427
        <span>
428
            [% biblio.title | $raw %]
429
            [% IF ( biblio.subtitle ) %]
430
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
431
                    [% subtitle | $raw %]
432
                [% END %]
433
            [% END %]
434
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
435
        </span>
436
        <p>
437
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
438
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
439
                [% IF ( biblio.get_authors_from_MARC ) %]
440
                    [% IF ( biblio.author ) %]; [% END %]
441
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
442
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
443
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
444
                        [% END %]
445
                        [% UNLESS ( loop.last ) %];[% END %]
446
                    [% END %]
447
                [% END %]
448
                </span><br/>
449
            [% END %]
450
            [% SET biblioitem = biblio.biblioitem %]
451
            [% IF ( biblioitem.isbn ) %]
452
                <span>
453
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
454
                        [% isbn | $raw %]
455
                        [% UNLESS ( loop.last ) %]; [% END %]
456
                    [% END %]
457
                </span><br/>
458
            [% END %]
459
            [% IF ( biblioitem.publishercode ) %]
460
                <span>
461
                    Published by: [% biblioitem.publishercode | $raw %]
462
                    [% IF ( biblioitem.publicationyear ) %]
463
                        in [% biblioitem.publicationyear | $raw %]
464
                    [% END %]
465
                    [% IF ( biblioitem.pages ) %]
466
                        , [% biblioitem.pages | $raw %]
467
                    [% END %]
468
                </span><br/>
469
            [% END %]
470
            [% IF ( biblio.seriestitle ) %]
471
                <span>
472
                    Collection: [% biblio.seriestitle | $raw %]
473
                </span><br/>
474
            [% END %]
475
            [% IF ( biblio.copyrightdate ) %]
476
                <span>
477
                    Copyright year: [% biblio.copyrightdate | $raw %]
478
                </span><br/>
479
            [% END %]
480
            [% IF ( biblio.notes ) %]
481
                <span>
482
                    Notes: [% biblio.notes | $raw %]
483
                </span><br/>
484
            [% END %]
485
            [% IF ( biblio.unititle ) %]
486
                <span>
487
                    Unified title: [% biblio.unititle | $raw %]
488
                </span><br/>
489
            [% END %]
490
            [% IF ( biblio.serial ) %]
491
                <span>
492
                    Serial: [% biblio.serial | $raw %]
493
                </span><br/>
494
            [% END %]
495
            [% IF ( biblioitem.lccn ) %]
496
                <span>
497
                    LCCN: [% biblioitem.lccn | $raw %]
498
                </span><br/>
499
            [% END %]
500
            [% IF ( biblioitem.url ) %]
501
                <span>
502
                    URL: [% biblioitem.url | html %]
503
                </span>
504
            [% END %]
505
        </p>
506
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
507
        [% IF ( OPACBaseURL ) %]
508
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
509
        [% END %]
510
        [% IF ( biblio.items.count > 0 ) %]
511
            <p>Items:
512
                <ul>
513
                    [% FOREACH item IN biblio.items %]<li>
514
                        [% item.holding_branch.branchname | $raw %]
515
                        [% item.location | $raw %]
516
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
517
                        [% item.barcode | $raw %]
518
                    </li>[% END %]
519
                </ul>
520
            </p>
521
        [% END %]
522
        <hr/>
523
    </li>
524
[% END %]
525
</ol>", 'email','default' ),
526
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
527
<p>Hi,</p>
528
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
529
<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>
530
<hr/>
531
<p>[% comment | $raw %]</p>
532
<hr/>
533
<ol>
534
[% FOREACH biblio IN biblios %]
535
    <li>
536
        <span>
537
            [% biblio.title | $raw %]
538
            [% IF ( biblio.subtitle ) %]
539
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
540
                    [% subtitle | $raw %]
541
                [% END %]
542
            [% END %]
543
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
544
        </span>
545
        <p>
546
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
547
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
548
                [% IF ( biblio.get_authors_from_MARC ) %]
549
                    [% IF ( biblio.author ) %]; [% END %]
550
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
551
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
552
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
553
                        [% END %]
554
                        [% UNLESS ( loop.last ) %];[% END %]
555
                    [% END %]
556
                [% END %]
557
                </span><br/>
558
            [% END %]
559
            [% SET biblioitem = biblio.biblioitem %]
560
            [% IF ( biblioitem.isbn ) %]
561
                <span>
562
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
563
                        [% isbn | $raw %]
564
                        [% UNLESS ( loop.last ) %]; [% END %]
565
                    [% END %]
566
                </span><br/>
567
            [% END %]
568
            [% IF ( biblioitem.publishercode ) %]
569
                <span>
570
                    Published by: [% biblioitem.publishercode | $raw %]
571
                    [% IF ( biblioitem.publicationyear ) %]
572
                        in [% biblioitem.publicationyear | $raw %]
573
                    [% END %]
574
                    [% IF ( biblioitem.pages ) %]
575
                        , [% biblioitem.pages | $raw %]
576
                    [% END %]
577
                </span><br/>
578
            [% END %]
579
            [% IF ( biblio.seriestitle ) %]
580
                <span>
581
                    Collection: [% biblio.seriestitle | $raw %]
582
                </span><br/>
583
            [% END %]
584
            [% IF ( biblio.copyrightdate ) %]
585
                <span>
586
                    Copyright year: [% biblio.copyrightdate | $raw %]
587
                </span><br/>
588
            [% END %]
589
            [% IF ( biblio.notes ) %]
590
                <span>
591
                    Notes: [% biblio.notes | $raw %]
592
                </span><br/>
593
            [% END %]
594
            [% IF ( biblio.unititle ) %]
595
                <span>
596
                    Unified title: [% biblio.unititle | $raw %]
597
                </span><br/>
598
            [% END %]
599
            [% IF ( biblio.serial ) %]
600
                <span>
601
                    Serial: [% biblio.serial | $raw %]
602
                </span><br/>
603
            [% END %]
604
            [% IF ( biblioitem.lccn ) %]
605
                <span>
606
                    LCCN: [% biblioitem.lccn | $raw %]
607
                </span><br/>
608
            [% END %]
609
            [% IF ( biblioitem.url ) %]
610
                <span>
611
                    URL: [% biblioitem.url | html %]
612
                </span>
613
            [% END %]
614
        </p>
615
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
616
        [% IF ( OPACBaseURL ) %]
617
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
618
        [% END %]
619
        [% IF ( biblio.items.count > 0 ) %]
620
            <p>Items:
621
                <ul>
622
                    [% FOREACH item IN biblio.items %]<li>
623
                        [% item.holding_branch.branchname | $raw %]
624
                        [% item.location | $raw %]
625
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
626
                        [% item.barcode | $raw %]
627
                    </li>[% END %]
628
                </ul>
629
            </p>
630
        [% END %]
631
        <hr/>
632
    </li>
633
[% END %]
634
</ol>",'email','default');
(-)a/installer/data/mysql/it-IT/necessari/notices.sql (+219 lines)
Lines 416-418 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
416
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
416
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
417
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
417
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
418
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
418
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
419
420
INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('catalog','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE raw -%]
421
<p>Hi,</p>
422
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
423
<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>
424
<hr/>
425
<p>[% comment | $raw %]</p>
426
<hr/>
427
<ol>
428
[% FOREACH biblio IN biblios %]
429
    <li>
430
        <span>
431
            [% biblio.title | $raw %]
432
            [% IF ( biblio.subtitle ) %]
433
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
434
                    [% subtitle | $raw %]
435
                [% END %]
436
            [% END %]
437
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
438
        </span>
439
        <p>
440
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
441
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
442
                [% IF ( biblio.get_authors_from_MARC ) %]
443
                    [% IF ( biblio.author ) %]; [% END %]
444
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
445
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
446
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
447
                        [% END %]
448
                        [% UNLESS ( loop.last ) %];[% END %]
449
                    [% END %]
450
                [% END %]
451
                </span><br/>
452
            [% END %]
453
            [% SET biblioitem = biblio.biblioitem %]
454
            [% IF ( biblioitem.isbn ) %]
455
                <span>
456
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
457
                        [% isbn | $raw %]
458
                        [% UNLESS ( loop.last ) %]; [% END %]
459
                    [% END %]
460
                </span><br/>
461
            [% END %]
462
            [% IF ( biblioitem.publishercode ) %]
463
                <span>
464
                    Published by: [% biblioitem.publishercode | $raw %]
465
                    [% IF ( biblioitem.publicationyear ) %]
466
                        in [% biblioitem.publicationyear | $raw %]
467
                    [% END %]
468
                    [% IF ( biblioitem.pages ) %]
469
                        , [% biblioitem.pages | $raw %]
470
                    [% END %]
471
                </span><br/>
472
            [% END %]
473
            [% IF ( biblio.seriestitle ) %]
474
                <span>
475
                    Collection: [% biblio.seriestitle | $raw %]
476
                </span><br/>
477
            [% END %]
478
            [% IF ( biblio.copyrightdate ) %]
479
                <span>
480
                    Copyright year: [% biblio.copyrightdate | $raw %]
481
                </span><br/>
482
            [% END %]
483
            [% IF ( biblio.notes ) %]
484
                <span>
485
                    Notes: [% biblio.notes | $raw %]
486
                </span><br/>
487
            [% END %]
488
            [% IF ( biblio.unititle ) %]
489
                <span>
490
                    Unified title: [% biblio.unititle | $raw %]
491
                </span><br/>
492
            [% END %]
493
            [% IF ( biblio.serial ) %]
494
                <span>
495
                    Serial: [% biblio.serial | $raw %]
496
                </span><br/>
497
            [% END %]
498
            [% IF ( biblioitem.lccn ) %]
499
                <span>
500
                    LCCN: [% biblioitem.lccn | $raw %]
501
                </span><br/>
502
            [% END %]
503
            [% IF ( biblioitem.url ) %]
504
                <span>
505
                    URL: [% biblioitem.url | html %]
506
                </span>
507
            [% END %]
508
        </p>
509
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
510
        [% IF ( OPACBaseURL ) %]
511
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
512
        [% END %]
513
        [% IF ( biblio.items.count > 0 ) %]
514
            <p>Items:
515
                <ul>
516
                    [% FOREACH item IN biblio.items %]<li>
517
                        [% item.holding_branch.branchname | $raw %]
518
                        [% item.location | $raw %]
519
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
520
                        [% item.barcode | $raw %]
521
                    </li>[% END %]
522
                </ul>
523
            </p>
524
        [% END %]
525
        <hr/>
526
    </li>
527
[% END %]
528
</ol>", 'email','default' ),
529
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
530
<p>Hi,</p>
531
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
532
<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>
533
<hr/>
534
<p>[% comment | $raw %]</p>
535
<hr/>
536
<ol>
537
[% FOREACH biblio IN biblios %]
538
    <li>
539
        <span>
540
            [% biblio.title | $raw %]
541
            [% IF ( biblio.subtitle ) %]
542
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
543
                    [% subtitle | $raw %]
544
                [% END %]
545
            [% END %]
546
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
547
        </span>
548
        <p>
549
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
550
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
551
                [% IF ( biblio.get_authors_from_MARC ) %]
552
                    [% IF ( biblio.author ) %]; [% END %]
553
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
554
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
555
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
556
                        [% END %]
557
                        [% UNLESS ( loop.last ) %];[% END %]
558
                    [% END %]
559
                [% END %]
560
                </span><br/>
561
            [% END %]
562
            [% SET biblioitem = biblio.biblioitem %]
563
            [% IF ( biblioitem.isbn ) %]
564
                <span>
565
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
566
                        [% isbn | $raw %]
567
                        [% UNLESS ( loop.last ) %]; [% END %]
568
                    [% END %]
569
                </span><br/>
570
            [% END %]
571
            [% IF ( biblioitem.publishercode ) %]
572
                <span>
573
                    Published by: [% biblioitem.publishercode | $raw %]
574
                    [% IF ( biblioitem.publicationyear ) %]
575
                        in [% biblioitem.publicationyear | $raw %]
576
                    [% END %]
577
                    [% IF ( biblioitem.pages ) %]
578
                        , [% biblioitem.pages | $raw %]
579
                    [% END %]
580
                </span><br/>
581
            [% END %]
582
            [% IF ( biblio.seriestitle ) %]
583
                <span>
584
                    Collection: [% biblio.seriestitle | $raw %]
585
                </span><br/>
586
            [% END %]
587
            [% IF ( biblio.copyrightdate ) %]
588
                <span>
589
                    Copyright year: [% biblio.copyrightdate | $raw %]
590
                </span><br/>
591
            [% END %]
592
            [% IF ( biblio.notes ) %]
593
                <span>
594
                    Notes: [% biblio.notes | $raw %]
595
                </span><br/>
596
            [% END %]
597
            [% IF ( biblio.unititle ) %]
598
                <span>
599
                    Unified title: [% biblio.unititle | $raw %]
600
                </span><br/>
601
            [% END %]
602
            [% IF ( biblio.serial ) %]
603
                <span>
604
                    Serial: [% biblio.serial | $raw %]
605
                </span><br/>
606
            [% END %]
607
            [% IF ( biblioitem.lccn ) %]
608
                <span>
609
                    LCCN: [% biblioitem.lccn | $raw %]
610
                </span><br/>
611
            [% END %]
612
            [% IF ( biblioitem.url ) %]
613
                <span>
614
                    URL: [% biblioitem.url | html %]
615
                </span>
616
            [% END %]
617
        </p>
618
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
619
        [% IF ( OPACBaseURL ) %]
620
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
621
        [% END %]
622
        [% IF ( biblio.items.count > 0 ) %]
623
            <p>Items:
624
                <ul>
625
                    [% FOREACH item IN biblio.items %]<li>
626
                        [% item.holding_branch.branchname | $raw %]
627
                        [% item.location | $raw %]
628
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
629
                        [% item.barcode | $raw %]
630
                    </li>[% END %]
631
                </ul>
632
            </p>
633
        [% END %]
634
        <hr/>
635
    </li>
636
[% END %]
637
</ol>",'email','default');
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql (+219 lines)
Lines 431-433 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
431
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
431
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
432
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
432
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
433
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
433
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
434
435
INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('catalog','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE raw -%]
436
<p>Hi,</p>
437
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
438
<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>
439
<hr/>
440
<p>[% comment | $raw %]</p>
441
<hr/>
442
<ol>
443
[% FOREACH biblio IN biblios %]
444
    <li>
445
        <span>
446
            [% biblio.title | $raw %]
447
            [% IF ( biblio.subtitle ) %]
448
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
449
                    [% subtitle | $raw %]
450
                [% END %]
451
            [% END %]
452
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
453
        </span>
454
        <p>
455
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
456
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
457
                [% IF ( biblio.get_authors_from_MARC ) %]
458
                    [% IF ( biblio.author ) %]; [% END %]
459
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
460
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
461
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
462
                        [% END %]
463
                        [% UNLESS ( loop.last ) %];[% END %]
464
                    [% END %]
465
                [% END %]
466
                </span><br/>
467
            [% END %]
468
            [% SET biblioitem = biblio.biblioitem %]
469
            [% IF ( biblioitem.isbn ) %]
470
                <span>
471
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
472
                        [% isbn | $raw %]
473
                        [% UNLESS ( loop.last ) %]; [% END %]
474
                    [% END %]
475
                </span><br/>
476
            [% END %]
477
            [% IF ( biblioitem.publishercode ) %]
478
                <span>
479
                    Published by: [% biblioitem.publishercode | $raw %]
480
                    [% IF ( biblioitem.publicationyear ) %]
481
                        in [% biblioitem.publicationyear | $raw %]
482
                    [% END %]
483
                    [% IF ( biblioitem.pages ) %]
484
                        , [% biblioitem.pages | $raw %]
485
                    [% END %]
486
                </span><br/>
487
            [% END %]
488
            [% IF ( biblio.seriestitle ) %]
489
                <span>
490
                    Collection: [% biblio.seriestitle | $raw %]
491
                </span><br/>
492
            [% END %]
493
            [% IF ( biblio.copyrightdate ) %]
494
                <span>
495
                    Copyright year: [% biblio.copyrightdate | $raw %]
496
                </span><br/>
497
            [% END %]
498
            [% IF ( biblio.notes ) %]
499
                <span>
500
                    Notes: [% biblio.notes | $raw %]
501
                </span><br/>
502
            [% END %]
503
            [% IF ( biblio.unititle ) %]
504
                <span>
505
                    Unified title: [% biblio.unititle | $raw %]
506
                </span><br/>
507
            [% END %]
508
            [% IF ( biblio.serial ) %]
509
                <span>
510
                    Serial: [% biblio.serial | $raw %]
511
                </span><br/>
512
            [% END %]
513
            [% IF ( biblioitem.lccn ) %]
514
                <span>
515
                    LCCN: [% biblioitem.lccn | $raw %]
516
                </span><br/>
517
            [% END %]
518
            [% IF ( biblioitem.url ) %]
519
                <span>
520
                    URL: [% biblioitem.url | html %]
521
                </span>
522
            [% END %]
523
        </p>
524
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
525
        [% IF ( OPACBaseURL ) %]
526
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
527
        [% END %]
528
        [% IF ( biblio.items.count > 0 ) %]
529
            <p>Items:
530
                <ul>
531
                    [% FOREACH item IN biblio.items %]<li>
532
                        [% item.holding_branch.branchname | $raw %]
533
                        [% item.location | $raw %]
534
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
535
                        [% item.barcode | $raw %]
536
                    </li>[% END %]
537
                </ul>
538
            </p>
539
        [% END %]
540
        <hr/>
541
    </li>
542
[% END %]
543
</ol>", 'email','default' ),
544
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
545
<p>Hi,</p>
546
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
547
<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>
548
<hr/>
549
<p>[% comment | $raw %]</p>
550
<hr/>
551
<ol>
552
[% FOREACH biblio IN biblios %]
553
    <li>
554
        <span>
555
            [% biblio.title | $raw %]
556
            [% IF ( biblio.subtitle ) %]
557
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
558
                    [% subtitle | $raw %]
559
                [% END %]
560
            [% END %]
561
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
562
        </span>
563
        <p>
564
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
565
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
566
                [% IF ( biblio.get_authors_from_MARC ) %]
567
                    [% IF ( biblio.author ) %]; [% END %]
568
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
569
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
570
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
571
                        [% END %]
572
                        [% UNLESS ( loop.last ) %];[% END %]
573
                    [% END %]
574
                [% END %]
575
                </span><br/>
576
            [% END %]
577
            [% SET biblioitem = biblio.biblioitem %]
578
            [% IF ( biblioitem.isbn ) %]
579
                <span>
580
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
581
                        [% isbn | $raw %]
582
                        [% UNLESS ( loop.last ) %]; [% END %]
583
                    [% END %]
584
                </span><br/>
585
            [% END %]
586
            [% IF ( biblioitem.publishercode ) %]
587
                <span>
588
                    Published by: [% biblioitem.publishercode | $raw %]
589
                    [% IF ( biblioitem.publicationyear ) %]
590
                        in [% biblioitem.publicationyear | $raw %]
591
                    [% END %]
592
                    [% IF ( biblioitem.pages ) %]
593
                        , [% biblioitem.pages | $raw %]
594
                    [% END %]
595
                </span><br/>
596
            [% END %]
597
            [% IF ( biblio.seriestitle ) %]
598
                <span>
599
                    Collection: [% biblio.seriestitle | $raw %]
600
                </span><br/>
601
            [% END %]
602
            [% IF ( biblio.copyrightdate ) %]
603
                <span>
604
                    Copyright year: [% biblio.copyrightdate | $raw %]
605
                </span><br/>
606
            [% END %]
607
            [% IF ( biblio.notes ) %]
608
                <span>
609
                    Notes: [% biblio.notes | $raw %]
610
                </span><br/>
611
            [% END %]
612
            [% IF ( biblio.unititle ) %]
613
                <span>
614
                    Unified title: [% biblio.unititle | $raw %]
615
                </span><br/>
616
            [% END %]
617
            [% IF ( biblio.serial ) %]
618
                <span>
619
                    Serial: [% biblio.serial | $raw %]
620
                </span><br/>
621
            [% END %]
622
            [% IF ( biblioitem.lccn ) %]
623
                <span>
624
                    LCCN: [% biblioitem.lccn | $raw %]
625
                </span><br/>
626
            [% END %]
627
            [% IF ( biblioitem.url ) %]
628
                <span>
629
                    URL: [% biblioitem.url | html %]
630
                </span>
631
            [% END %]
632
        </p>
633
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
634
        [% IF ( OPACBaseURL ) %]
635
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
636
        [% END %]
637
        [% IF ( biblio.items.count > 0 ) %]
638
            <p>Items:
639
                <ul>
640
                    [% FOREACH item IN biblio.items %]<li>
641
                        [% item.holding_branch.branchname | $raw %]
642
                        [% item.location | $raw %]
643
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
644
                        [% item.barcode | $raw %]
645
                    </li>[% END %]
646
                </ul>
647
            </p>
648
        [% END %]
649
        <hr/>
650
    </li>
651
[% END %]
652
</ol>",'email','default');
(-)a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql (+219 lines)
Lines 410-412 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
410
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
410
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
411
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
411
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
412
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
412
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
413
414
INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('catalog','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE raw -%]
415
<p>Hi,</p>
416
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
417
<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>
418
<hr/>
419
<p>[% comment | $raw %]</p>
420
<hr/>
421
<ol>
422
[% FOREACH biblio IN biblios %]
423
    <li>
424
        <span>
425
            [% biblio.title | $raw %]
426
            [% IF ( biblio.subtitle ) %]
427
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
428
                    [% subtitle | $raw %]
429
                [% END %]
430
            [% END %]
431
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
432
        </span>
433
        <p>
434
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
435
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
436
                [% IF ( biblio.get_authors_from_MARC ) %]
437
                    [% IF ( biblio.author ) %]; [% END %]
438
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
439
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
440
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
441
                        [% END %]
442
                        [% UNLESS ( loop.last ) %];[% END %]
443
                    [% END %]
444
                [% END %]
445
                </span><br/>
446
            [% END %]
447
            [% SET biblioitem = biblio.biblioitem %]
448
            [% IF ( biblioitem.isbn ) %]
449
                <span>
450
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
451
                        [% isbn | $raw %]
452
                        [% UNLESS ( loop.last ) %]; [% END %]
453
                    [% END %]
454
                </span><br/>
455
            [% END %]
456
            [% IF ( biblioitem.publishercode ) %]
457
                <span>
458
                    Published by: [% biblioitem.publishercode | $raw %]
459
                    [% IF ( biblioitem.publicationyear ) %]
460
                        in [% biblioitem.publicationyear | $raw %]
461
                    [% END %]
462
                    [% IF ( biblioitem.pages ) %]
463
                        , [% biblioitem.pages | $raw %]
464
                    [% END %]
465
                </span><br/>
466
            [% END %]
467
            [% IF ( biblio.seriestitle ) %]
468
                <span>
469
                    Collection: [% biblio.seriestitle | $raw %]
470
                </span><br/>
471
            [% END %]
472
            [% IF ( biblio.copyrightdate ) %]
473
                <span>
474
                    Copyright year: [% biblio.copyrightdate | $raw %]
475
                </span><br/>
476
            [% END %]
477
            [% IF ( biblio.notes ) %]
478
                <span>
479
                    Notes: [% biblio.notes | $raw %]
480
                </span><br/>
481
            [% END %]
482
            [% IF ( biblio.unititle ) %]
483
                <span>
484
                    Unified title: [% biblio.unititle | $raw %]
485
                </span><br/>
486
            [% END %]
487
            [% IF ( biblio.serial ) %]
488
                <span>
489
                    Serial: [% biblio.serial | $raw %]
490
                </span><br/>
491
            [% END %]
492
            [% IF ( biblioitem.lccn ) %]
493
                <span>
494
                    LCCN: [% biblioitem.lccn | $raw %]
495
                </span><br/>
496
            [% END %]
497
            [% IF ( biblioitem.url ) %]
498
                <span>
499
                    URL: [% biblioitem.url | html %]
500
                </span>
501
            [% END %]
502
        </p>
503
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
504
        [% IF ( OPACBaseURL ) %]
505
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
506
        [% END %]
507
        [% IF ( biblio.items.count > 0 ) %]
508
            <p>Items:
509
                <ul>
510
                    [% FOREACH item IN biblio.items %]<li>
511
                        [% item.holding_branch.branchname | $raw %]
512
                        [% item.location | $raw %]
513
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
514
                        [% item.barcode | $raw %]
515
                    </li>[% END %]
516
                </ul>
517
            </p>
518
        [% END %]
519
        <hr/>
520
    </li>
521
[% END %]
522
</ol>", 'email','default' ),
523
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
524
<p>Hi,</p>
525
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
526
<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>
527
<hr/>
528
<p>[% comment | $raw %]</p>
529
<hr/>
530
<ol>
531
[% FOREACH biblio IN biblios %]
532
    <li>
533
        <span>
534
            [% biblio.title | $raw %]
535
            [% IF ( biblio.subtitle ) %]
536
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
537
                    [% subtitle | $raw %]
538
                [% END %]
539
            [% END %]
540
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
541
        </span>
542
        <p>
543
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
544
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
545
                [% IF ( biblio.get_authors_from_MARC ) %]
546
                    [% IF ( biblio.author ) %]; [% END %]
547
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
548
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
549
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
550
                        [% END %]
551
                        [% UNLESS ( loop.last ) %];[% END %]
552
                    [% END %]
553
                [% END %]
554
                </span><br/>
555
            [% END %]
556
            [% SET biblioitem = biblio.biblioitem %]
557
            [% IF ( biblioitem.isbn ) %]
558
                <span>
559
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
560
                        [% isbn | $raw %]
561
                        [% UNLESS ( loop.last ) %]; [% END %]
562
                    [% END %]
563
                </span><br/>
564
            [% END %]
565
            [% IF ( biblioitem.publishercode ) %]
566
                <span>
567
                    Published by: [% biblioitem.publishercode | $raw %]
568
                    [% IF ( biblioitem.publicationyear ) %]
569
                        in [% biblioitem.publicationyear | $raw %]
570
                    [% END %]
571
                    [% IF ( biblioitem.pages ) %]
572
                        , [% biblioitem.pages | $raw %]
573
                    [% END %]
574
                </span><br/>
575
            [% END %]
576
            [% IF ( biblio.seriestitle ) %]
577
                <span>
578
                    Collection: [% biblio.seriestitle | $raw %]
579
                </span><br/>
580
            [% END %]
581
            [% IF ( biblio.copyrightdate ) %]
582
                <span>
583
                    Copyright year: [% biblio.copyrightdate | $raw %]
584
                </span><br/>
585
            [% END %]
586
            [% IF ( biblio.notes ) %]
587
                <span>
588
                    Notes: [% biblio.notes | $raw %]
589
                </span><br/>
590
            [% END %]
591
            [% IF ( biblio.unititle ) %]
592
                <span>
593
                    Unified title: [% biblio.unititle | $raw %]
594
                </span><br/>
595
            [% END %]
596
            [% IF ( biblio.serial ) %]
597
                <span>
598
                    Serial: [% biblio.serial | $raw %]
599
                </span><br/>
600
            [% END %]
601
            [% IF ( biblioitem.lccn ) %]
602
                <span>
603
                    LCCN: [% biblioitem.lccn | $raw %]
604
                </span><br/>
605
            [% END %]
606
            [% IF ( biblioitem.url ) %]
607
                <span>
608
                    URL: [% biblioitem.url | html %]
609
                </span>
610
            [% END %]
611
        </p>
612
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
613
        [% IF ( OPACBaseURL ) %]
614
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
615
        [% END %]
616
        [% IF ( biblio.items.count > 0 ) %]
617
            <p>Items:
618
                <ul>
619
                    [% FOREACH item IN biblio.items %]<li>
620
                        [% item.holding_branch.branchname | $raw %]
621
                        [% item.location | $raw %]
622
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
623
                        [% item.barcode | $raw %]
624
                    </li>[% END %]
625
                </ul>
626
            </p>
627
        [% END %]
628
        <hr/>
629
    </li>
630
[% END %]
631
</ol>",'email','default');
(-)a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql (+219 lines)
Lines 412-414 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
412
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
412
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
413
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
413
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
414
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
414
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
415
416
INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('catalog','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE raw -%]
417
<p>Hi,</p>
418
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
419
<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>
420
<hr/>
421
<p>[% comment | $raw %]</p>
422
<hr/>
423
<ol>
424
[% FOREACH biblio IN biblios %]
425
    <li>
426
        <span>
427
            [% biblio.title | $raw %]
428
            [% IF ( biblio.subtitle ) %]
429
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
430
                    [% subtitle | $raw %]
431
                [% END %]
432
            [% END %]
433
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
434
        </span>
435
        <p>
436
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
437
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
438
                [% IF ( biblio.get_authors_from_MARC ) %]
439
                    [% IF ( biblio.author ) %]; [% END %]
440
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
441
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
442
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
443
                        [% END %]
444
                        [% UNLESS ( loop.last ) %];[% END %]
445
                    [% END %]
446
                [% END %]
447
                </span><br/>
448
            [% END %]
449
            [% SET biblioitem = biblio.biblioitem %]
450
            [% IF ( biblioitem.isbn ) %]
451
                <span>
452
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
453
                        [% isbn | $raw %]
454
                        [% UNLESS ( loop.last ) %]; [% END %]
455
                    [% END %]
456
                </span><br/>
457
            [% END %]
458
            [% IF ( biblioitem.publishercode ) %]
459
                <span>
460
                    Published by: [% biblioitem.publishercode | $raw %]
461
                    [% IF ( biblioitem.publicationyear ) %]
462
                        in [% biblioitem.publicationyear | $raw %]
463
                    [% END %]
464
                    [% IF ( biblioitem.pages ) %]
465
                        , [% biblioitem.pages | $raw %]
466
                    [% END %]
467
                </span><br/>
468
            [% END %]
469
            [% IF ( biblio.seriestitle ) %]
470
                <span>
471
                    Collection: [% biblio.seriestitle | $raw %]
472
                </span><br/>
473
            [% END %]
474
            [% IF ( biblio.copyrightdate ) %]
475
                <span>
476
                    Copyright year: [% biblio.copyrightdate | $raw %]
477
                </span><br/>
478
            [% END %]
479
            [% IF ( biblio.notes ) %]
480
                <span>
481
                    Notes: [% biblio.notes | $raw %]
482
                </span><br/>
483
            [% END %]
484
            [% IF ( biblio.unititle ) %]
485
                <span>
486
                    Unified title: [% biblio.unititle | $raw %]
487
                </span><br/>
488
            [% END %]
489
            [% IF ( biblio.serial ) %]
490
                <span>
491
                    Serial: [% biblio.serial | $raw %]
492
                </span><br/>
493
            [% END %]
494
            [% IF ( biblioitem.lccn ) %]
495
                <span>
496
                    LCCN: [% biblioitem.lccn | $raw %]
497
                </span><br/>
498
            [% END %]
499
            [% IF ( biblioitem.url ) %]
500
                <span>
501
                    URL: [% biblioitem.url | html %]
502
                </span>
503
            [% END %]
504
        </p>
505
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
506
        [% IF ( OPACBaseURL ) %]
507
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
508
        [% END %]
509
        [% IF ( biblio.items.count > 0 ) %]
510
            <p>Items:
511
                <ul>
512
                    [% FOREACH item IN biblio.items %]<li>
513
                        [% item.holding_branch.branchname | $raw %]
514
                        [% item.location | $raw %]
515
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
516
                        [% item.barcode | $raw %]
517
                    </li>[% END %]
518
                </ul>
519
            </p>
520
        [% END %]
521
        <hr/>
522
    </li>
523
[% END %]
524
</ol>", 'email','default' ),
525
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
526
<p>Hi,</p>
527
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
528
<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>
529
<hr/>
530
<p>[% comment | $raw %]</p>
531
<hr/>
532
<ol>
533
[% FOREACH biblio IN biblios %]
534
    <li>
535
        <span>
536
            [% biblio.title | $raw %]
537
            [% IF ( biblio.subtitle ) %]
538
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
539
                    [% subtitle | $raw %]
540
                [% END %]
541
            [% END %]
542
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
543
        </span>
544
        <p>
545
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
546
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
547
                [% IF ( biblio.get_authors_from_MARC ) %]
548
                    [% IF ( biblio.author ) %]; [% END %]
549
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
550
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
551
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
552
                        [% END %]
553
                        [% UNLESS ( loop.last ) %];[% END %]
554
                    [% END %]
555
                [% END %]
556
                </span><br/>
557
            [% END %]
558
            [% SET biblioitem = biblio.biblioitem %]
559
            [% IF ( biblioitem.isbn ) %]
560
                <span>
561
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
562
                        [% isbn | $raw %]
563
                        [% UNLESS ( loop.last ) %]; [% END %]
564
                    [% END %]
565
                </span><br/>
566
            [% END %]
567
            [% IF ( biblioitem.publishercode ) %]
568
                <span>
569
                    Published by: [% biblioitem.publishercode | $raw %]
570
                    [% IF ( biblioitem.publicationyear ) %]
571
                        in [% biblioitem.publicationyear | $raw %]
572
                    [% END %]
573
                    [% IF ( biblioitem.pages ) %]
574
                        , [% biblioitem.pages | $raw %]
575
                    [% END %]
576
                </span><br/>
577
            [% END %]
578
            [% IF ( biblio.seriestitle ) %]
579
                <span>
580
                    Collection: [% biblio.seriestitle | $raw %]
581
                </span><br/>
582
            [% END %]
583
            [% IF ( biblio.copyrightdate ) %]
584
                <span>
585
                    Copyright year: [% biblio.copyrightdate | $raw %]
586
                </span><br/>
587
            [% END %]
588
            [% IF ( biblio.notes ) %]
589
                <span>
590
                    Notes: [% biblio.notes | $raw %]
591
                </span><br/>
592
            [% END %]
593
            [% IF ( biblio.unititle ) %]
594
                <span>
595
                    Unified title: [% biblio.unititle | $raw %]
596
                </span><br/>
597
            [% END %]
598
            [% IF ( biblio.serial ) %]
599
                <span>
600
                    Serial: [% biblio.serial | $raw %]
601
                </span><br/>
602
            [% END %]
603
            [% IF ( biblioitem.lccn ) %]
604
                <span>
605
                    LCCN: [% biblioitem.lccn | $raw %]
606
                </span><br/>
607
            [% END %]
608
            [% IF ( biblioitem.url ) %]
609
                <span>
610
                    URL: [% biblioitem.url | html %]
611
                </span>
612
            [% END %]
613
        </p>
614
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
615
        [% IF ( OPACBaseURL ) %]
616
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
617
        [% END %]
618
        [% IF ( biblio.items.count > 0 ) %]
619
            <p>Items:
620
                <ul>
621
                    [% FOREACH item IN biblio.items %]<li>
622
                        [% item.holding_branch.branchname | $raw %]
623
                        [% item.location | $raw %]
624
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
625
                        [% item.barcode | $raw %]
626
                    </li>[% END %]
627
                </ul>
628
            </p>
629
        [% END %]
630
        <hr/>
631
    </li>
632
[% END %]
633
</ol>",'email','default');
(-)a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql (+219 lines)
Lines 503-505 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
503
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
503
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_CANCEL', '', 'ILL request cancelled', 0, "Interlibrary loan request cancelled", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
504
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
504
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_MODIFIED', '', 'ILL request modified', 0, "Interlibrary loan request modified", "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:\n\n[% ill_full_metadata %]", 'sms', 'default');
505
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
505
INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_PARTNER_REQ', '', 'ILL request to partners', 0, "Interlibrary loan request to partners", "Dear Sir/Madam,\n\nWe would like to request an interlibrary loan for a title matching the following description:\n\n[% ill_full_metadata %]\n\nPlease let us know if you are able to supply this to us.\n\nKind Regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');
506
507
INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('catalog','LIST','','Send list',1,'Your list: [% listname | html %]',"[%- USE raw -%]
508
<p>Hi,</p>
509
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
510
<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>
511
<hr/>
512
<p>[% comment | $raw %]</p>
513
<hr/>
514
<ol>
515
[% FOREACH biblio IN biblios %]
516
    <li>
517
        <span>
518
            [% biblio.title | $raw %]
519
            [% IF ( biblio.subtitle ) %]
520
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
521
                    [% subtitle | $raw %]
522
                [% END %]
523
            [% END %]
524
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
525
        </span>
526
        <p>
527
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
528
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
529
                [% IF ( biblio.get_authors_from_MARC ) %]
530
                    [% IF ( biblio.author ) %]; [% END %]
531
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
532
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
533
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
534
                        [% END %]
535
                        [% UNLESS ( loop.last ) %];[% END %]
536
                    [% END %]
537
                [% END %]
538
                </span><br/>
539
            [% END %]
540
            [% SET biblioitem = biblio.biblioitem %]
541
            [% IF ( biblioitem.isbn ) %]
542
                <span>
543
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
544
                        [% isbn | $raw %]
545
                        [% UNLESS ( loop.last ) %]; [% END %]
546
                    [% END %]
547
                </span><br/>
548
            [% END %]
549
            [% IF ( biblioitem.publishercode ) %]
550
                <span>
551
                    Published by: [% biblioitem.publishercode | $raw %]
552
                    [% IF ( biblioitem.publicationyear ) %]
553
                        in [% biblioitem.publicationyear | $raw %]
554
                    [% END %]
555
                    [% IF ( biblioitem.pages ) %]
556
                        , [% biblioitem.pages | $raw %]
557
                    [% END %]
558
                </span><br/>
559
            [% END %]
560
            [% IF ( biblio.seriestitle ) %]
561
                <span>
562
                    Collection: [% biblio.seriestitle | $raw %]
563
                </span><br/>
564
            [% END %]
565
            [% IF ( biblio.copyrightdate ) %]
566
                <span>
567
                    Copyright year: [% biblio.copyrightdate | $raw %]
568
                </span><br/>
569
            [% END %]
570
            [% IF ( biblio.notes ) %]
571
                <span>
572
                    Notes: [% biblio.notes | $raw %]
573
                </span><br/>
574
            [% END %]
575
            [% IF ( biblio.unititle ) %]
576
                <span>
577
                    Unified title: [% biblio.unititle | $raw %]
578
                </span><br/>
579
            [% END %]
580
            [% IF ( biblio.serial ) %]
581
                <span>
582
                    Serial: [% biblio.serial | $raw %]
583
                </span><br/>
584
            [% END %]
585
            [% IF ( biblioitem.lccn ) %]
586
                <span>
587
                    LCCN: [% biblioitem.lccn | $raw %]
588
                </span><br/>
589
            [% END %]
590
            [% IF ( biblioitem.url ) %]
591
                <span>
592
                    URL: [% biblioitem.url | html %]
593
                </span>
594
            [% END %]
595
        </p>
596
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
597
        [% IF ( OPACBaseURL ) %]
598
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
599
        [% END %]
600
        [% IF ( biblio.items.count > 0 ) %]
601
            <p>Items:
602
                <ul>
603
                    [% FOREACH item IN biblio.items %]<li>
604
                        [% item.holding_branch.branchname | $raw %]
605
                        [% item.location | $raw %]
606
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
607
                        [% item.barcode | $raw %]
608
                    </li>[% END %]
609
                </ul>
610
            </p>
611
        [% END %]
612
        <hr/>
613
    </li>
614
[% END %]
615
</ol>", 'email','default' ),
616
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
617
<p>Hi,</p>
618
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
619
<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>
620
<hr/>
621
<p>[% comment | $raw %]</p>
622
<hr/>
623
<ol>
624
[% FOREACH biblio IN biblios %]
625
    <li>
626
        <span>
627
            [% biblio.title | $raw %]
628
            [% IF ( biblio.subtitle ) %]
629
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
630
                    [% subtitle | $raw %]
631
                [% END %]
632
            [% END %]
633
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
634
        </span>
635
        <p>
636
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
637
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
638
                [% IF ( biblio.get_authors_from_MARC ) %]
639
                    [% IF ( biblio.author ) %]; [% END %]
640
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
641
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
642
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
643
                        [% END %]
644
                        [% UNLESS ( loop.last ) %];[% END %]
645
                    [% END %]
646
                [% END %]
647
                </span><br/>
648
            [% END %]
649
            [% SET biblioitem = biblio.biblioitem %]
650
            [% IF ( biblioitem.isbn ) %]
651
                <span>
652
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
653
                        [% isbn | $raw %]
654
                        [% UNLESS ( loop.last ) %]; [% END %]
655
                    [% END %]
656
                </span><br/>
657
            [% END %]
658
            [% IF ( biblioitem.publishercode ) %]
659
                <span>
660
                    Published by: [% biblioitem.publishercode | $raw %]
661
                    [% IF ( biblioitem.publicationyear ) %]
662
                        in [% biblioitem.publicationyear | $raw %]
663
                    [% END %]
664
                    [% IF ( biblioitem.pages ) %]
665
                        , [% biblioitem.pages | $raw %]
666
                    [% END %]
667
                </span><br/>
668
            [% END %]
669
            [% IF ( biblio.seriestitle ) %]
670
                <span>
671
                    Collection: [% biblio.seriestitle | $raw %]
672
                </span><br/>
673
            [% END %]
674
            [% IF ( biblio.copyrightdate ) %]
675
                <span>
676
                    Copyright year: [% biblio.copyrightdate | $raw %]
677
                </span><br/>
678
            [% END %]
679
            [% IF ( biblio.notes ) %]
680
                <span>
681
                    Notes: [% biblio.notes | $raw %]
682
                </span><br/>
683
            [% END %]
684
            [% IF ( biblio.unititle ) %]
685
                <span>
686
                    Unified title: [% biblio.unititle | $raw %]
687
                </span><br/>
688
            [% END %]
689
            [% IF ( biblio.serial ) %]
690
                <span>
691
                    Serial: [% biblio.serial | $raw %]
692
                </span><br/>
693
            [% END %]
694
            [% IF ( biblioitem.lccn ) %]
695
                <span>
696
                    LCCN: [% biblioitem.lccn | $raw %]
697
                </span><br/>
698
            [% END %]
699
            [% IF ( biblioitem.url ) %]
700
                <span>
701
                    URL: [% biblioitem.url | html %]
702
                </span>
703
            [% END %]
704
        </p>
705
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
706
        [% IF ( OPACBaseURL ) %]
707
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
708
        [% END %]
709
        [% IF ( biblio.items.count > 0 ) %]
710
            <p>Items:
711
                <ul>
712
                    [% FOREACH item IN biblio.items %]<li>
713
                        [% item.holding_branch.branchname | $raw %]
714
                        [% item.location | $raw %]
715
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
716
                        [% item.barcode | $raw %]
717
                    </li>[% END %]
718
                </ul>
719
            </p>
720
        [% END %]
721
        <hr/>
722
    </li>
723
[% END %]
724
</ol>",'email','default');
(-)a/opac/opac-sendbasket.pl (-108 / +45 lines)
Lines 54-181 if ( $email_add ) { Link Here
54
        session_id => scalar $query->cookie('CGISESSID'),
54
        session_id => scalar $query->cookie('CGISESSID'),
55
        token  => scalar $query->param('csrf_token'),
55
        token  => scalar $query->param('csrf_token'),
56
    });
56
    });
57
    my $patron = Koha::Patrons->find( $borrowernumber );
58
    my $borcat = $patron ? $patron->categorycode : q{};
59
    my $user_email = $patron->first_valid_email_address
60
    || C4::Context->preference('KohaAdminEmailAddress');
61
57
62
    my $email_replyto = $patron->firstname . " " . $patron->surname . " <$user_email>";
58
    my $patron = Koha::Patrons->find( $borrowernumber );
63
    my $comment    = $query->param('comment');
64
59
65
    # Since we are already logged in, no need to check credentials again
60
    my $comment = $query->param('comment');
66
    # when loading a second template.
67
    my $template2 = C4::Templates::gettemplate(
68
        'opac-sendbasket.tt', 'opac', $query,
69
    );
70
61
71
    my @bibs = split( /\//, $bib_list );
62
    my @bibs = split( /\//, $bib_list );
72
    my @results;
73
    my $iso2709;
63
    my $iso2709;
74
    my $marcflavour = C4::Context->preference('marcflavour');
75
    foreach my $biblionumber (@bibs) {
76
        $template2->param( biblionumber => $biblionumber );
77
78
        my $dat              = GetBiblioData($biblionumber);
79
        next unless $dat;
80
        my $biblio           = Koha::Biblios->find( $biblionumber );
81
        my $record           = GetMarcBiblio({
82
            biblionumber => $biblionumber,
83
            embed_items  => 1,
84
            opac         => 1,
85
            borcat       => $borcat });
86
        my $marcauthorsarray = $biblio->get_authors_from_MARC;
87
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
88
89
        my @items = GetItemsInfo( $biblionumber );
90
91
        my $hasauthors = 0;
92
        if($dat->{'author'} || @$marcauthorsarray) {
93
          $hasauthors = 1;
94
        }
95
	
96
97
        $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
98
        $dat->{MARCAUTHORS}    = $marcauthorsarray;
99
        $dat->{HASAUTHORS}     = $hasauthors;
100
        $dat->{'biblionumber'} = $biblionumber;
101
        $dat->{ITEM_RESULTS}   = \@items;
102
103
        $iso2709 .= $record->as_usmarc();
104
105
        push( @results, $dat );
106
    }
107
108
    my $resultsarray = \@results;
109
    
110
    $template2->param(
111
        BIBLIO_RESULTS => $resultsarray,
112
        comment        => $comment,
113
        firstname      => $patron->firstname,
114
        surname        => $patron->surname,
115
    );
116
117
    # Getting template result
118
    my $template_res = $template2->output();
119
    my $body;
120
121
    # Analysing information and getting mail properties
122
    my $subject;
123
    if ( $template_res =~ /\<SUBJECT\>(?<subject>.*)\<END_SUBJECT\>/s ) {
124
        $subject = $+{subject};
125
        $subject =~ s|\n?(.*)\n?|$1|;
126
    }
127
    else {
128
        $subject = "no subject";
129
    }
130
131
    my $email_header = "";
132
    if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
133
        $email_header = $1;
134
        $email_header =~ s|\n?(.*)\n?|$1|;
135
    }
136
137
    if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
138
        $body = $1;
139
        $body =~ s|\n?(.*)\n?|$1|;
140
    }
141
64
142
    my $THE_body = <<END_OF_BODY;
65
    foreach my $bib ( @bibs ) {
143
$email_header
66
        my $biblio = Koha::Biblios->find($bib);
144
$body
67
        $iso2709 .= $biblio->metadata->record->as_usmarc();
145
END_OF_BODY
68
    };
146
69
147
    if ( !defined $iso2709 ) {
70
    if ( !defined $iso2709 ) {
148
        carp "Error sending mail: empty basket";
71
        carp "Error sending mail: empty basket";
149
        $template->param( error => 1 );
72
        $template->param( error => 1 );
150
    }
73
151
    else {
74
    } else {
152
        try {
75
        my %loops = (
153
            # if you want to use the KohaAdmin address as from, that is the default no need to set it
76
            biblio => \@bibs,
154
            my $email = Koha::Email->create({
77
        );
155
                to       => $email_add,
78
156
                reply_to => $email_replyto,
79
        my %substitute = (
157
                subject  => $subject,
80
            comment => $comment,
158
            });
81
        );
159
            $email->header( 'X-Abuse-Report' => C4::Context->preference('KohaAdminEmailAddress') );
82
160
            $email->text_body( $THE_body );
83
        my $letter = C4::Letters::GetPreparedLetter(
161
            $email->attach(
84
            module => 'catalog',
162
                Encode::encode( "UTF-8", $iso2709 ),
85
            letter_code => 'CART',
163
                content_type => 'application/octet-stream',
86
            lang => $patron->lang,
164
                name         => 'basket.iso2709',
87
            tables => {
165
                disposition  => 'attachment',
88
                borrowers => $borrowernumber,
166
            );
89
            },
167
            my $library = $patron->library;
90
            message_transport_type => 'email',
168
            $email->transport( $library->smtp_server->transport );
91
            loops => \%loops,
169
            $email->send_or_die;
92
            substitute => \%substitute,
170
            $template->param( SENT => "1" );
93
        );
171
        }
94
172
        catch {
95
        my $attachment = {
173
            carp "Error sending mail: $_";
96
            filename => 'basket.iso2709',
174
            $template->param( error => 1 );
97
            type => 'application/octet-stream',
98
            content => Encode::encode("UTF-8", $iso2709),
175
        };
99
        };
100
101
        my $user_email = $patron->first_valid_email_address || C4::Context->preference('KohaAdminEmailAddress');
102
        C4::Letters::EnqueueLetter({
103
            letter => $letter,
104
            message_transport_type => 'email',
105
            borrowernumber => $patron->borrowernumber,
106
            to_address => $email_add,
107
            reply_address => $user_email,
108
            attachments => [$attachment],
109
        });
110
111
        $template->param( SENT => 1 );
176
    }
112
    }
177
113
178
    $template->param( email_add => $email_add );
114
    $template->param( email_add => $email_add );
115
179
    output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
116
    output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
180
}
117
}
181
else {
118
else {
(-)a/opac/opac-sendshelf.pl (-89 / +46 lines)
Lines 58-64 my $shelf = Koha::Virtualshelves->find( $shelfid ); Link Here
58
if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
58
if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
59
59
60
if ( $email ) {
60
if ( $email ) {
61
    my $comment    = $query->param('comment');
61
    my $comment = $query->param('comment');
62
62
63
    my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
63
    my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
64
        {
64
        {
Lines 70-178 if ( $email ) { Link Here
70
    );
70
    );
71
71
72
    my $patron = Koha::Patrons->find( $borrowernumber );
72
    my $patron = Koha::Patrons->find( $borrowernumber );
73
    my $borcat = $patron ? $patron->categorycode : q{};
74
75
    my $shelf = Koha::Virtualshelves->find( $shelfid );
73
    my $shelf = Koha::Virtualshelves->find( $shelfid );
76
    my $contents = $shelf->get_contents;
74
    my $contents = $shelf->get_contents;
77
    my $marcflavour         = C4::Context->preference('marcflavour');
75
    my @biblionumbers;
78
    my $iso2709;
79
    my @results;
80
76
77
    my $iso2709;
81
    while ( my $content = $contents->next ) {
78
    while ( my $content = $contents->next ) {
82
        my $biblionumber = $content->biblionumber;
79
        push @biblionumbers, $content->biblionumber;
83
        my $record           = GetMarcBiblio({
80
        my $biblio = Koha::Biblios->find($content->biblionumber);
84
            biblionumber => $biblionumber,
81
        $iso2709 .= $biblio->metadata->record->as_usmarc();
85
            embed_items  => 1,
82
    };
86
            opac         => 1,
87
            borcat       => $borcat });
88
        next unless $record;
89
        my $biblio           = Koha::Biblios->find( $biblionumber );
90
        my $fw               = GetFrameworkCode($biblionumber);
91
        my $dat              = GetBiblioData($biblionumber);
92
93
        my $marcauthorsarray = $biblio->get_authors_from_MARC;
94
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
95
96
        my @items = GetItemsInfo( $biblionumber );
97
98
        $dat->{ISBN}           = GetMarcISBN($record, $marcflavour);
99
        $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
100
        $dat->{MARCAUTHORS}    = $marcauthorsarray;
101
        $dat->{'biblionumber'} = $biblionumber;
102
        $dat->{ITEM_RESULTS}   = \@items;
103
        $dat->{HASAUTHORS}     = $dat->{'author'} || @$marcauthorsarray;
104
105
        $iso2709 .= $record->as_usmarc();
106
107
        push( @results, $dat );
108
    }
109
110
    $template2->param(
111
        BIBLIO_RESULTS => \@results,
112
        comment        => $comment,
113
        shelfname      => $shelf->shelfname,
114
        firstname      => $patron->firstname,
115
        surname        => $patron->surname,
116
    );
117
118
    # Getting template result
119
    my $template_res = $template2->output();
120
    my $body;
121
122
    my $subject;
123
    # Analysing information and getting mail properties
124
    if ( $template_res =~ /<SUBJECT>(?<subject>.*)<END_SUBJECT>/s ) {
125
        $subject = $+{subject};
126
        $subject =~ s|\n?(.*)\n?|$1|;
127
    }
128
    else {
129
        $subject = "no subject";
130
    }
131
83
132
    my $email_header = "";
84
    if ( !defined $iso2709 ) {
133
    if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
85
        carp "Error sending mail: empty list";
134
        $email_header = $1;
86
        $template->param( error => 1 );
135
        $email_header =~ s|\n?(.*)\n?|$1|;
136
    }
137
87
138
    if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
88
    } else {
139
        $body = $1;
89
        my %loops = (
140
        $body =~ s|\n?(.*)\n?|$1|;
90
            biblio => \@biblionumbers,
141
    }
91
        );
142
92
143
    my $THE_body = <<END_OF_BODY;
93
        my %substitute = (
144
$email_header
94
            comment => $comment,
145
$body
95
            listname => $shelf->shelfname,
146
END_OF_BODY
147
148
    try {
149
        my $email = Koha::Email->create(
150
            {
151
                to      => $email,
152
                subject => $subject,
153
            }
154
        );
96
        );
155
        $email->text_body( $THE_body );
97
156
        $email->attach(
98
        my $letter = C4::Letters::GetPreparedLetter(
157
            Encode::encode( "UTF-8", $iso2709 ),
99
            module => 'catalog',
158
            content_type => 'application/octet-stream',
100
            letter_code => 'LIST',
159
            name         => 'list.iso2709',
101
            lang => $patron->lang,
160
            disposition  => 'attachment',
102
            tables => {
103
                borrowers => $borrowernumber,
104
            },
105
            message_transport_type => 'email',
106
            loops => \%loops,
107
            substitute => \%substitute,
161
        );
108
        );
162
        my $library = Koha::Patrons->find( $borrowernumber )->library;
109
163
        $email->transport( $library->smtp_server->transport );
110
        my $attachment = {
164
        $email->send_or_die;
111
            filename => 'list.iso2709',
165
        $template->param( SENT => "1" );
112
            type => 'application/octet-stream',
113
            content => Encode::encode("UTF-8", $iso2709),
114
        };
115
116
        C4::Letters::EnqueueLetter({
117
            letter => $letter,
118
            message_transport_type => 'email',
119
            borrowernumber => $patron->borrowernumber,
120
            to_address => $email,
121
            reply_address => $patron->first_valid_email_address,
122
            attachments => [$attachment],
123
        });
124
125
        $template->param( SENT => 1 );
166
    }
126
    }
167
    catch {
168
        carp "Error sending mail: $_";
169
        $template->param( error => 1 );
170
    };
171
127
172
    $template->param(
128
    $template->param(
173
        shelfid => $shelfid,
129
        shelfid => $shelfid,
174
        email   => $email,
130
        email   => $email,
175
    );
131
    );
132
176
    output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
133
    output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
177
134
178
135
(-)a/virtualshelves/sendshelf.pl (-80 / +45 lines)
Lines 59-157 if ($to_address) { Link Here
59
        }
59
        }
60
    );
60
    );
61
61
62
    my $patron = Koha::Patrons->find( $borrowernumber );
62
    my $shelf = Koha::Virtualshelves->find( $shelfid );
63
    my $shelf = Koha::Virtualshelves->find( $shelfid );
63
    my $contents = $shelf->get_contents;
64
    my $contents = $shelf->get_contents;
64
    my $marcflavour = C4::Context->preference('marcflavour');
65
    my @biblionumbers;
65
    my $iso2709;
66
    my @results;
67
66
67
    my $iso2709;
68
    while ( my $content = $contents->next ) {
68
    while ( my $content = $contents->next ) {
69
        my $biblionumber     = $content->biblionumber;
69
        push @biblionumbers, $content->biblionumber;
70
        my $biblio           = Koha::Biblios->find( $biblionumber );
70
        my $biblio = Koha::Biblios->find($content->biblionumber);
71
        my $dat              = GetBiblioData($biblionumber);
71
        $iso2709 .= $biblio->metadata->record->as_usmarc();
72
        my $record           = GetMarcBiblio({
72
    };
73
            biblionumber => $biblionumber,
74
            embed_items  => 1 });
75
        my $marcauthorsarray = $biblio->get_authors_from_MARC;
76
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
77
78
        my @items = GetItemsInfo($biblionumber);
79
80
        $dat->{ISBN}           = GetMarcISBN($record, $marcflavour);
81
        $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
82
        $dat->{MARCAUTHORS}    = $marcauthorsarray;
83
        $dat->{'biblionumber'} = $biblionumber;
84
        $dat->{ITEM_RESULTS}   = \@items;
85
        $dat->{HASAUTHORS}     = $dat->{'author'} || @$marcauthorsarray;
86
87
        $iso2709 .= $record->as_usmarc();
88
89
        push( @results, $dat );
90
    }
91
92
    $template2->param(
93
        BIBLIO_RESULTS => \@results,
94
        comment        => $comment,
95
        shelfname      => $shelf->shelfname,
96
    );
97
98
    # Getting template result
99
    my $template_res = $template2->output();
100
    my $body;
101
102
    my $subject;
103
    # Analysing information and getting mail properties
104
    if ( $template_res =~ /<SUBJECT>(?<subject>.*)<END_SUBJECT>/s ) {
105
        $subject = $+{subject};
106
        $subject =~ s|\n?(.*)\n?|$1|;
107
    }
108
    else {
109
        $subject = "no subject";
110
    }
111
73
112
    my $email_header = "";
74
    if ( !defined $iso2709 ) {
113
    if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
75
        carp "Error sending mail: empty list";
114
        $email_header = $1;
76
        $template->param( error => 1 );
115
        $email_header =~ s|\n?(.*)\n?|$1|;
116
    }
117
77
118
    if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
78
    } else {
119
        $body = $1;
79
        my %loops = (
120
        $body =~ s|\n?(.*)\n?|$1|;
80
            biblio => \@biblionumbers,
121
    }
81
        );
122
82
123
    my $THE_body = <<END_OF_BODY;
83
        my %substitute = (
124
$email_header
84
            comment => $comment,
125
$body
85
            listname => $shelf->shelfname,
126
END_OF_BODY
127
128
    try {
129
        my $email = Koha::Email->create(
130
            {
131
                to      => $to_address,
132
                subject => $subject,
133
            }
134
        );
86
        );
135
        $email->text_body( $THE_body );
87
136
        $email->attach(
88
        my $letter = C4::Letters::GetPreparedLetter(
137
            Encode::encode("UTF-8", $iso2709),
89
            module => 'catalog',
138
            content_type => 'application/octet-stream',
90
            letter_code => 'LIST',
139
            name         => 'shelf.iso2709',
91
            lang => $patron->lang,
140
            disposition  => 'attachment',
92
            tables => {
93
                borrowers => $borrowernumber,
94
            },
95
            message_transport_type => 'email',
96
            loops => \%loops,
97
            substitute => \%substitute,
141
        );
98
        );
142
99
143
        my $library = Koha::Patrons->find( $borrowernumber )->library;
100
        my $attachment = {
144
        $email->send_or_die({ transport => $library->smtp_server->transport });
101
            filename => 'shelf.iso2709',
145
        $template->param( SENT => "1" );
102
            type => 'application/octet-stream',
103
            content => Encode::encode("UTF-8", $iso2709),
104
        };
105
106
        C4::Letters::EnqueueLetter({
107
            letter => $letter,
108
            message_transport_type => 'email',
109
            borrowernumber => $patron->borrowernumber,
110
            to_address => $to_address,
111
            reply_address => $patron->first_valid_email_address,
112
            attachments => [$attachment],
113
        });
114
115
        $template->param( SENT => 1 );
146
    }
116
    }
147
    catch {
148
        carp "Error sending mail: $_";
149
        $template->param( error => 1 );
150
    };
151
117
152
    $template->param( email => $to_address );
118
    $template->param( email => $to_address );
153
    output_html_with_http_headers $query, $cookie, $template->output;
154
119
120
    output_html_with_http_headers $query, $cookie, $template->output;
155
}
121
}
156
else {
122
else {
157
    $template->param(
123
    $template->param(
158
- 

Return to bug 3150