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 1478-1480 tables: Link Here
1478
            - "Barcode: [% item.barcode %] <br />"
1478
            - "Barcode: [% item.barcode %] <br />"
1479
            - "</p>"
1479
            - "</p>"
1480
            - "[% END %]"
1480
            - "[% END %]"
1481
              
1482
        - module: catalog
1483
          code: LIST
1484
          branchcode: ""
1485
          name: "Send list"
1486
          is_html: 1
1487
          title: "Your list: [% listname | html %]"
1488
          message_transport_type: email
1489
          lang: default
1490
          content:
1491
            - "[%- USE raw -%]"
1492
            - "<p>Hi,</p>"
1493
            - "<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>"
1494
            - "<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>"
1495
            - "<hr/>"
1496
            - "<p>[% comment | $raw %]</p>"
1497
            - "<hr/>"
1498
            - "<ol>"
1499
            - "[% FOREACH biblio IN biblios %]"
1500
            - "<li>"
1501
            - "<span>"
1502
            - "[% biblio.title | $raw %]"
1503
            - "[% IF ( biblio.subtitle ) %]"
1504
            - "[% FOREACH subtitle IN biblio.subtitle.split(' | ') %]"
1505
            - "[% subtitle | $raw %]"
1506
            - "[% END %]"
1507
            - "[% END %]"
1508
            - "[% biblio.part_number | $raw %] [% biblio.part_name | $raw %]"
1509
            - "</span>"
1510
            - "<p>"
1511
            - "[% IF ( biblio.author || biblio.get_authors_from_MARC ) %]"
1512
            - "<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]"
1513
            - "[% IF ( biblio.get_authors_from_MARC ) %]"
1514
            - "[% IF ( biblio.author ) %]; [% END %]"
1515
            - "[% FOREACH author IN biblio.get_authors_from_MARC %]"
1516
            - "[% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]"
1517
            - "[% subfield.separator | $raw %][% subfield.value | $raw %]"
1518
            - "[% END %]"
1519
            - "[% UNLESS ( loop.last ) %];[% END %]"
1520
            - "[% END %]"
1521
            - "[% END %]"
1522
            - "</span><br/>"
1523
            - "[% END %]"
1524
            - "[% SET biblioitem = biblio.biblioitem %]"
1525
            - "[% IF ( biblioitem.isbn ) %]"
1526
            - "<span>"
1527
            - "ISBN: [% FOREACH isbn IN biblioitem.isbn %]"
1528
            - "[% isbn | $raw %]"
1529
            - "[% UNLESS ( loop.last ) %]; [% END %]"
1530
            - "[% END %]"
1531
            - "</span><br/>"
1532
            - "[% END %]"
1533
            - "[% IF ( biblioitem.publishercode ) %]"
1534
            - "<span>"
1535
            - "Published by: [% biblioitem.publishercode | $raw %]"
1536
            - "[% IF ( biblioitem.publicationyear ) %]"
1537
            - "in [% biblioitem.publicationyear | $raw %]"
1538
            - "[% END %]"
1539
            - "[% IF ( biblioitem.pages ) %]"
1540
            - ", [% biblioitem.pages | $raw %]"
1541
            - "[% END %]"
1542
            - "</span><br/>"
1543
            - "[% END %]"
1544
            - "[% IF ( biblio.seriestitle ) %]"
1545
            - "<span>"
1546
            - "Collection: [% biblio.seriestitle | $raw %]"
1547
            - "</span><br/>"
1548
            - "[% END %]"
1549
            - "[% IF ( biblio.copyrightdate ) %]"
1550
            - "<span>"
1551
            - "Copyright year: [% biblio.copyrightdate | $raw %]"
1552
            - "</span><br/>"
1553
            - "[% END %]"
1554
            - "[% IF ( biblio.notes ) %]"
1555
            - "<span>"
1556
            - "Notes: [% biblio.notes | $raw %]"
1557
            - "</span><br/>"
1558
            - "[% END %]"
1559
            - "[% IF ( biblio.unititle ) %]"
1560
            - "<span>"
1561
            - "Unified title: [% biblio.unititle | $raw %]"
1562
            - "</span><br/>"
1563
            - "[% END %]"
1564
            - "[% IF ( biblio.serial ) %]"
1565
            - "<span>"
1566
            - "Serial: [% biblio.serial | $raw %]"
1567
            - "</span><br/>"
1568
            - "[% END %]"
1569
            - "[% IF ( biblioitem.lccn ) %]"
1570
            - "<span>"
1571
            - "LCCN: [% biblioitem.lccn | $raw %]"
1572
            - "</span><br/>"
1573
            - "[% END %]"
1574
            - "[% IF ( biblioitem.url ) %]"
1575
            - "<span>"
1576
            - "URL: [% biblioitem.url | html %]"
1577
            - "</span>"
1578
            - "[% END %]"
1579
            - "</p>"
1580
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]"
1581
            - "[% IF ( OPACBaseURL ) %]"
1582
            - "<p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>"
1583
            - "[% END %]"
1584
            - "[% IF ( biblio.items.count > 0 ) %]"
1585
            - "<p>Items:"
1586
            - "<ul>"
1587
            - "[% FOREACH item IN biblio.items %]<li>"
1588
            - "[% item.holding_branch.branchname | $raw %]"
1589
            - "[% item.location | $raw %]"
1590
            - "[% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]"
1591
            - "[% item.barcode | $raw %]"
1592
            - "</li>[% END %]"
1593
            - "</ul>"
1594
            - "</p>"
1595
            - "[% END %]"
1596
            - "<hr/>"
1597
            - "</li>"
1598
            - "[% END %]"
1599
            - "</ol>"
1600
1601
        - module: catalog
1602
          code: CART
1603
          branchcode: ""
1604
          name: "Send cart"
1605
          is_html: 1
1606
          title: "Your cart"
1607
          message_transport_type: email
1608
          lang: default
1609
          content:
1610
            - "[%- USE raw -%]"
1611
            - "<p>Hi,</p>"
1612
            - "<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>"
1613
            - "<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>"
1614
            - "<hr/>"
1615
            - "<p>[% comment | $raw %]</p>"
1616
            - "<hr/>"
1617
            - "<ol>"
1618
            - "[% FOREACH biblio IN biblios %]"
1619
            - "<li>"
1620
            - "<span>"
1621
            - "[% biblio.title | $raw %]"
1622
            - "[% IF ( biblio.subtitle ) %]"
1623
            - "[% FOREACH subtitle IN biblio.subtitle.split(' | ') %]"
1624
            - "[% subtitle | $raw %]"
1625
            - "[% END %]"
1626
            - "[% END %]"
1627
            - "[% biblio.part_number | $raw %] [% biblio.part_name | $raw %]"
1628
            - "</span>"
1629
            - "<p>"
1630
            - "[% IF ( biblio.author || biblio.get_authors_from_MARC ) %]"
1631
            - "<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]"
1632
            - "[% IF ( biblio.get_authors_from_MARC ) %]"
1633
            - "[% IF ( biblio.author ) %]; [% END %]"
1634
            - "[% FOREACH author IN biblio.get_authors_from_MARC %]"
1635
            - "[% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]"
1636
            - "[% subfield.separator | $raw %][% subfield.value | $raw %]"
1637
            - "[% END %]"
1638
            - "[% UNLESS ( loop.last ) %];[% END %]"
1639
            - "[% END %]"
1640
            - "[% END %]"
1641
            - "</span><br/>"
1642
            - "[% END %]"
1643
            - "[% SET biblioitem = biblio.biblioitem %]"
1644
            - "[% IF ( biblioitem.isbn ) %]"
1645
            - "<span>"
1646
            - "ISBN: [% FOREACH isbn IN biblioitem.isbn %]"
1647
            - "[% isbn | $raw %]"
1648
            - "[% UNLESS ( loop.last ) %]; [% END %]"
1649
            - "[% END %]"
1650
            - "</span><br/>"
1651
            - "[% END %]"
1652
            - "[% IF ( biblioitem.publishercode ) %]"
1653
            - "<span>"
1654
            - "Published by: [% biblioitem.publishercode | $raw %]"
1655
            - "[% IF ( biblioitem.publicationyear ) %]"
1656
            - "in [% biblioitem.publicationyear | $raw %]"
1657
            - "[% END %]"
1658
            - "[% IF ( biblioitem.pages ) %]"
1659
            - ", [% biblioitem.pages | $raw %]"
1660
            - "[% END %]"
1661
            - "</span><br/>"
1662
            - "[% END %]"
1663
            - "[% IF ( biblio.seriestitle ) %]"
1664
            - "<span>"
1665
            - "Collection: [% biblio.seriestitle | $raw %]"
1666
            - "</span><br/>"
1667
            - "[% END %]"
1668
            - "[% IF ( biblio.copyrightdate ) %]"
1669
            - "<span>"
1670
            - "Copyright year: [% biblio.copyrightdate | $raw %]"
1671
            - "</span><br/>"
1672
            - "[% END %]"
1673
            - "[% IF ( biblio.notes ) %]"
1674
            - "<span>"
1675
            - "Notes: [% biblio.notes | $raw %]"
1676
            - "</span><br/>"
1677
            - "[% END %]"
1678
            - "[% IF ( biblio.unititle ) %]"
1679
            - "<span>"
1680
            - "Unified title: [% biblio.unititle | $raw %]"
1681
            - "</span><br/>"
1682
            - "[% END %]"
1683
            - "[% IF ( biblio.serial ) %]"
1684
            - "<span>"
1685
            - "Serial: [% biblio.serial | $raw %]"
1686
            - "</span><br/>"
1687
            - "[% END %]"
1688
            - "[% IF ( biblioitem.lccn ) %]"
1689
            - "<span>"
1690
            - "LCCN: [% biblioitem.lccn | $raw %]"
1691
            - "</span><br/>"
1692
            - "[% END %]"
1693
            - "[% IF ( biblioitem.url ) %]"
1694
            - "<span>"
1695
            - "URL: [% biblioitem.url | html %]"
1696
            - "</span>"
1697
            - "[% END %]"
1698
            - "</p>"
1699
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]"
1700
            - "[% IF ( OPACBaseURL ) %]"
1701
            - "<p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>"
1702
            - "[% END %]"
1703
            - "[% IF ( biblio.items.count > 0 ) %]"
1704
            - "<p>Items:"
1705
            - "<ul>"
1706
            - "[% FOREACH item IN biblio.items %]<li>"
1707
            - "[% item.holding_branch.branchname | $raw %]"
1708
            - "[% item.location | $raw %]"
1709
            - "[% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]"
1710
            - "[% item.barcode | $raw %]"
1711
            - "</li>[% END %]"
1712
            - "</ul>"
1713
            - "</p>"
1714
            - "[% END %]"
1715
            - "<hr/>"
1716
            - "</li>"
1717
            - "[% END %]"
1718
            - "</ol>"
(-)a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql (+219 lines)
Lines 316-318 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
316
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');
316
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');
317
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');
317
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');
318
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');
318
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');
319
320
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 -%]
321
<p>Hi,</p>
322
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
323
<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>
324
<hr/>
325
<p>[% comment | $raw %]</p>
326
<hr/>
327
<ol>
328
[% FOREACH biblio IN biblios %]
329
    <li>
330
        <span>
331
            [% biblio.title | $raw %]
332
            [% IF ( biblio.subtitle ) %]
333
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
334
                    [% subtitle | $raw %]
335
                [% END %]
336
            [% END %]
337
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
338
        </span>
339
        <p>
340
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
341
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
342
                [% IF ( biblio.get_authors_from_MARC ) %]
343
                    [% IF ( biblio.author ) %]; [% END %]
344
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
345
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
346
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
347
                        [% END %]
348
                        [% UNLESS ( loop.last ) %];[% END %]
349
                    [% END %]
350
                [% END %]
351
                </span><br/>
352
            [% END %]
353
            [% SET biblioitem = biblio.biblioitem %]
354
            [% IF ( biblioitem.isbn ) %]
355
                <span>
356
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
357
                        [% isbn | $raw %]
358
                        [% UNLESS ( loop.last ) %]; [% END %]
359
                    [% END %]
360
                </span><br/>
361
            [% END %]
362
            [% IF ( biblioitem.publishercode ) %]
363
                <span>
364
                    Published by: [% biblioitem.publishercode | $raw %]
365
                    [% IF ( biblioitem.publicationyear ) %]
366
                        in [% biblioitem.publicationyear | $raw %]
367
                    [% END %]
368
                    [% IF ( biblioitem.pages ) %]
369
                        , [% biblioitem.pages | $raw %]
370
                    [% END %]
371
                </span><br/>
372
            [% END %]
373
            [% IF ( biblio.seriestitle ) %]
374
                <span>
375
                    Collection: [% biblio.seriestitle | $raw %]
376
                </span><br/>
377
            [% END %]
378
            [% IF ( biblio.copyrightdate ) %]
379
                <span>
380
                    Copyright year: [% biblio.copyrightdate | $raw %]
381
                </span><br/>
382
            [% END %]
383
            [% IF ( biblio.notes ) %]
384
                <span>
385
                    Notes: [% biblio.notes | $raw %]
386
                </span><br/>
387
            [% END %]
388
            [% IF ( biblio.unititle ) %]
389
                <span>
390
                    Unified title: [% biblio.unititle | $raw %]
391
                </span><br/>
392
            [% END %]
393
            [% IF ( biblio.serial ) %]
394
                <span>
395
                    Serial: [% biblio.serial | $raw %]
396
                </span><br/>
397
            [% END %]
398
            [% IF ( biblioitem.lccn ) %]
399
                <span>
400
                    LCCN: [% biblioitem.lccn | $raw %]
401
                </span><br/>
402
            [% END %]
403
            [% IF ( biblioitem.url ) %]
404
                <span>
405
                    URL: [% biblioitem.url | html %]
406
                </span>
407
            [% END %]
408
        </p>
409
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
410
        [% IF ( OPACBaseURL ) %]
411
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
412
        [% END %]
413
        [% IF ( biblio.items.count > 0 ) %]
414
            <p>Items:
415
                <ul>
416
                    [% FOREACH item IN biblio.items %]<li>
417
                        [% item.holding_branch.branchname | $raw %]
418
                        [% item.location | $raw %]
419
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
420
                        [% item.barcode | $raw %]
421
                    </li>[% END %]
422
                </ul>
423
            </p>
424
        [% END %]
425
        <hr/>
426
    </li>
427
[% END %]
428
</ol>", 'email','default' ),
429
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
430
<p>Hi,</p>
431
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
432
<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>
433
<hr/>
434
<p>[% comment | $raw %]</p>
435
<hr/>
436
<ol>
437
[% FOREACH biblio IN biblios %]
438
    <li>
439
        <span>
440
            [% biblio.title | $raw %]
441
            [% IF ( biblio.subtitle ) %]
442
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
443
                    [% subtitle | $raw %]
444
                [% END %]
445
            [% END %]
446
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
447
        </span>
448
        <p>
449
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
450
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
451
                [% IF ( biblio.get_authors_from_MARC ) %]
452
                    [% IF ( biblio.author ) %]; [% END %]
453
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
454
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
455
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
456
                        [% END %]
457
                        [% UNLESS ( loop.last ) %];[% END %]
458
                    [% END %]
459
                [% END %]
460
                </span><br/>
461
            [% END %]
462
            [% SET biblioitem = biblio.biblioitem %]
463
            [% IF ( biblioitem.isbn ) %]
464
                <span>
465
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
466
                        [% isbn | $raw %]
467
                        [% UNLESS ( loop.last ) %]; [% END %]
468
                    [% END %]
469
                </span><br/>
470
            [% END %]
471
            [% IF ( biblioitem.publishercode ) %]
472
                <span>
473
                    Published by: [% biblioitem.publishercode | $raw %]
474
                    [% IF ( biblioitem.publicationyear ) %]
475
                        in [% biblioitem.publicationyear | $raw %]
476
                    [% END %]
477
                    [% IF ( biblioitem.pages ) %]
478
                        , [% biblioitem.pages | $raw %]
479
                    [% END %]
480
                </span><br/>
481
            [% END %]
482
            [% IF ( biblio.seriestitle ) %]
483
                <span>
484
                    Collection: [% biblio.seriestitle | $raw %]
485
                </span><br/>
486
            [% END %]
487
            [% IF ( biblio.copyrightdate ) %]
488
                <span>
489
                    Copyright year: [% biblio.copyrightdate | $raw %]
490
                </span><br/>
491
            [% END %]
492
            [% IF ( biblio.notes ) %]
493
                <span>
494
                    Notes: [% biblio.notes | $raw %]
495
                </span><br/>
496
            [% END %]
497
            [% IF ( biblio.unititle ) %]
498
                <span>
499
                    Unified title: [% biblio.unititle | $raw %]
500
                </span><br/>
501
            [% END %]
502
            [% IF ( biblio.serial ) %]
503
                <span>
504
                    Serial: [% biblio.serial | $raw %]
505
                </span><br/>
506
            [% END %]
507
            [% IF ( biblioitem.lccn ) %]
508
                <span>
509
                    LCCN: [% biblioitem.lccn | $raw %]
510
                </span><br/>
511
            [% END %]
512
            [% IF ( biblioitem.url ) %]
513
                <span>
514
                    URL: [% biblioitem.url | html %]
515
                </span>
516
            [% END %]
517
        </p>
518
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
519
        [% IF ( OPACBaseURL ) %]
520
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
521
        [% END %]
522
        [% IF ( biblio.items.count > 0 ) %]
523
            <p>Items:
524
                <ul>
525
                    [% FOREACH item IN biblio.items %]<li>
526
                        [% item.holding_branch.branchname | $raw %]
527
                        [% item.location | $raw %]
528
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
529
                        [% item.barcode | $raw %]
530
                    </li>[% END %]
531
                </ul>
532
            </p>
533
        [% END %]
534
        <hr/>
535
    </li>
536
[% END %]
537
</ol>",'email','default');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql (+219 lines)
Lines 429-431 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
429
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');
429
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');
430
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');
430
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');
431
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');
431
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');
432
433
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 -%]
434
<p>Hi,</p>
435
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
436
<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>
437
<hr/>
438
<p>[% comment | $raw %]</p>
439
<hr/>
440
<ol>
441
[% FOREACH biblio IN biblios %]
442
    <li>
443
        <span>
444
            [% biblio.title | $raw %]
445
            [% IF ( biblio.subtitle ) %]
446
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
447
                    [% subtitle | $raw %]
448
                [% END %]
449
            [% END %]
450
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
451
        </span>
452
        <p>
453
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
454
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
455
                [% IF ( biblio.get_authors_from_MARC ) %]
456
                    [% IF ( biblio.author ) %]; [% END %]
457
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
458
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
459
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
460
                        [% END %]
461
                        [% UNLESS ( loop.last ) %];[% END %]
462
                    [% END %]
463
                [% END %]
464
                </span><br/>
465
            [% END %]
466
            [% SET biblioitem = biblio.biblioitem %]
467
            [% IF ( biblioitem.isbn ) %]
468
                <span>
469
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
470
                        [% isbn | $raw %]
471
                        [% UNLESS ( loop.last ) %]; [% END %]
472
                    [% END %]
473
                </span><br/>
474
            [% END %]
475
            [% IF ( biblioitem.publishercode ) %]
476
                <span>
477
                    Published by: [% biblioitem.publishercode | $raw %]
478
                    [% IF ( biblioitem.publicationyear ) %]
479
                        in [% biblioitem.publicationyear | $raw %]
480
                    [% END %]
481
                    [% IF ( biblioitem.pages ) %]
482
                        , [% biblioitem.pages | $raw %]
483
                    [% END %]
484
                </span><br/>
485
            [% END %]
486
            [% IF ( biblio.seriestitle ) %]
487
                <span>
488
                    Collection: [% biblio.seriestitle | $raw %]
489
                </span><br/>
490
            [% END %]
491
            [% IF ( biblio.copyrightdate ) %]
492
                <span>
493
                    Copyright year: [% biblio.copyrightdate | $raw %]
494
                </span><br/>
495
            [% END %]
496
            [% IF ( biblio.notes ) %]
497
                <span>
498
                    Notes: [% biblio.notes | $raw %]
499
                </span><br/>
500
            [% END %]
501
            [% IF ( biblio.unititle ) %]
502
                <span>
503
                    Unified title: [% biblio.unititle | $raw %]
504
                </span><br/>
505
            [% END %]
506
            [% IF ( biblio.serial ) %]
507
                <span>
508
                    Serial: [% biblio.serial | $raw %]
509
                </span><br/>
510
            [% END %]
511
            [% IF ( biblioitem.lccn ) %]
512
                <span>
513
                    LCCN: [% biblioitem.lccn | $raw %]
514
                </span><br/>
515
            [% END %]
516
            [% IF ( biblioitem.url ) %]
517
                <span>
518
                    URL: [% biblioitem.url | html %]
519
                </span>
520
            [% END %]
521
        </p>
522
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
523
        [% IF ( OPACBaseURL ) %]
524
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
525
        [% END %]
526
        [% IF ( biblio.items.count > 0 ) %]
527
            <p>Items:
528
                <ul>
529
                    [% FOREACH item IN biblio.items %]<li>
530
                        [% item.holding_branch.branchname | $raw %]
531
                        [% item.location | $raw %]
532
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
533
                        [% item.barcode | $raw %]
534
                    </li>[% END %]
535
                </ul>
536
            </p>
537
        [% END %]
538
        <hr/>
539
    </li>
540
[% END %]
541
</ol>", 'email','default' ),
542
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
543
<p>Hi,</p>
544
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
545
<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>
546
<hr/>
547
<p>[% comment | $raw %]</p>
548
<hr/>
549
<ol>
550
[% FOREACH biblio IN biblios %]
551
    <li>
552
        <span>
553
            [% biblio.title | $raw %]
554
            [% IF ( biblio.subtitle ) %]
555
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
556
                    [% subtitle | $raw %]
557
                [% END %]
558
            [% END %]
559
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
560
        </span>
561
        <p>
562
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
563
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
564
                [% IF ( biblio.get_authors_from_MARC ) %]
565
                    [% IF ( biblio.author ) %]; [% END %]
566
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
567
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
568
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
569
                        [% END %]
570
                        [% UNLESS ( loop.last ) %];[% END %]
571
                    [% END %]
572
                [% END %]
573
                </span><br/>
574
            [% END %]
575
            [% SET biblioitem = biblio.biblioitem %]
576
            [% IF ( biblioitem.isbn ) %]
577
                <span>
578
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
579
                        [% isbn | $raw %]
580
                        [% UNLESS ( loop.last ) %]; [% END %]
581
                    [% END %]
582
                </span><br/>
583
            [% END %]
584
            [% IF ( biblioitem.publishercode ) %]
585
                <span>
586
                    Published by: [% biblioitem.publishercode | $raw %]
587
                    [% IF ( biblioitem.publicationyear ) %]
588
                        in [% biblioitem.publicationyear | $raw %]
589
                    [% END %]
590
                    [% IF ( biblioitem.pages ) %]
591
                        , [% biblioitem.pages | $raw %]
592
                    [% END %]
593
                </span><br/>
594
            [% END %]
595
            [% IF ( biblio.seriestitle ) %]
596
                <span>
597
                    Collection: [% biblio.seriestitle | $raw %]
598
                </span><br/>
599
            [% END %]
600
            [% IF ( biblio.copyrightdate ) %]
601
                <span>
602
                    Copyright year: [% biblio.copyrightdate | $raw %]
603
                </span><br/>
604
            [% END %]
605
            [% IF ( biblio.notes ) %]
606
                <span>
607
                    Notes: [% biblio.notes | $raw %]
608
                </span><br/>
609
            [% END %]
610
            [% IF ( biblio.unititle ) %]
611
                <span>
612
                    Unified title: [% biblio.unititle | $raw %]
613
                </span><br/>
614
            [% END %]
615
            [% IF ( biblio.serial ) %]
616
                <span>
617
                    Serial: [% biblio.serial | $raw %]
618
                </span><br/>
619
            [% END %]
620
            [% IF ( biblioitem.lccn ) %]
621
                <span>
622
                    LCCN: [% biblioitem.lccn | $raw %]
623
                </span><br/>
624
            [% END %]
625
            [% IF ( biblioitem.url ) %]
626
                <span>
627
                    URL: [% biblioitem.url | html %]
628
                </span>
629
            [% END %]
630
        </p>
631
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
632
        [% IF ( OPACBaseURL ) %]
633
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
634
        [% END %]
635
        [% IF ( biblio.items.count > 0 ) %]
636
            <p>Items:
637
                <ul>
638
                    [% FOREACH item IN biblio.items %]<li>
639
                        [% item.holding_branch.branchname | $raw %]
640
                        [% item.location | $raw %]
641
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
642
                        [% item.barcode | $raw %]
643
                    </li>[% END %]
644
                </ul>
645
            </p>
646
        [% END %]
647
        <hr/>
648
    </li>
649
[% END %]
650
</ol>",'email','default');
(-)a/installer/data/mysql/it-IT/necessari/notices.sql (+219 lines)
Lines 432-434 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
432
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_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');
433
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_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');
434
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
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');
435
436
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 -%]
437
<p>Hi,</p>
438
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
439
<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>
440
<hr/>
441
<p>[% comment | $raw %]</p>
442
<hr/>
443
<ol>
444
[% FOREACH biblio IN biblios %]
445
    <li>
446
        <span>
447
            [% biblio.title | $raw %]
448
            [% IF ( biblio.subtitle ) %]
449
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
450
                    [% subtitle | $raw %]
451
                [% END %]
452
            [% END %]
453
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
454
        </span>
455
        <p>
456
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
457
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
458
                [% IF ( biblio.get_authors_from_MARC ) %]
459
                    [% IF ( biblio.author ) %]; [% END %]
460
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
461
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
462
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
463
                        [% END %]
464
                        [% UNLESS ( loop.last ) %];[% END %]
465
                    [% END %]
466
                [% END %]
467
                </span><br/>
468
            [% END %]
469
            [% SET biblioitem = biblio.biblioitem %]
470
            [% IF ( biblioitem.isbn ) %]
471
                <span>
472
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
473
                        [% isbn | $raw %]
474
                        [% UNLESS ( loop.last ) %]; [% END %]
475
                    [% END %]
476
                </span><br/>
477
            [% END %]
478
            [% IF ( biblioitem.publishercode ) %]
479
                <span>
480
                    Published by: [% biblioitem.publishercode | $raw %]
481
                    [% IF ( biblioitem.publicationyear ) %]
482
                        in [% biblioitem.publicationyear | $raw %]
483
                    [% END %]
484
                    [% IF ( biblioitem.pages ) %]
485
                        , [% biblioitem.pages | $raw %]
486
                    [% END %]
487
                </span><br/>
488
            [% END %]
489
            [% IF ( biblio.seriestitle ) %]
490
                <span>
491
                    Collection: [% biblio.seriestitle | $raw %]
492
                </span><br/>
493
            [% END %]
494
            [% IF ( biblio.copyrightdate ) %]
495
                <span>
496
                    Copyright year: [% biblio.copyrightdate | $raw %]
497
                </span><br/>
498
            [% END %]
499
            [% IF ( biblio.notes ) %]
500
                <span>
501
                    Notes: [% biblio.notes | $raw %]
502
                </span><br/>
503
            [% END %]
504
            [% IF ( biblio.unititle ) %]
505
                <span>
506
                    Unified title: [% biblio.unititle | $raw %]
507
                </span><br/>
508
            [% END %]
509
            [% IF ( biblio.serial ) %]
510
                <span>
511
                    Serial: [% biblio.serial | $raw %]
512
                </span><br/>
513
            [% END %]
514
            [% IF ( biblioitem.lccn ) %]
515
                <span>
516
                    LCCN: [% biblioitem.lccn | $raw %]
517
                </span><br/>
518
            [% END %]
519
            [% IF ( biblioitem.url ) %]
520
                <span>
521
                    URL: [% biblioitem.url | html %]
522
                </span>
523
            [% END %]
524
        </p>
525
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
526
        [% IF ( OPACBaseURL ) %]
527
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
528
        [% END %]
529
        [% IF ( biblio.items.count > 0 ) %]
530
            <p>Items:
531
                <ul>
532
                    [% FOREACH item IN biblio.items %]<li>
533
                        [% item.holding_branch.branchname | $raw %]
534
                        [% item.location | $raw %]
535
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
536
                        [% item.barcode | $raw %]
537
                    </li>[% END %]
538
                </ul>
539
            </p>
540
        [% END %]
541
        <hr/>
542
    </li>
543
[% END %]
544
</ol>", 'email','default' ),
545
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
546
<p>Hi,</p>
547
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
548
<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>
549
<hr/>
550
<p>[% comment | $raw %]</p>
551
<hr/>
552
<ol>
553
[% FOREACH biblio IN biblios %]
554
    <li>
555
        <span>
556
            [% biblio.title | $raw %]
557
            [% IF ( biblio.subtitle ) %]
558
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
559
                    [% subtitle | $raw %]
560
                [% END %]
561
            [% END %]
562
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
563
        </span>
564
        <p>
565
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
566
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
567
                [% IF ( biblio.get_authors_from_MARC ) %]
568
                    [% IF ( biblio.author ) %]; [% END %]
569
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
570
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
571
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
572
                        [% END %]
573
                        [% UNLESS ( loop.last ) %];[% END %]
574
                    [% END %]
575
                [% END %]
576
                </span><br/>
577
            [% END %]
578
            [% SET biblioitem = biblio.biblioitem %]
579
            [% IF ( biblioitem.isbn ) %]
580
                <span>
581
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
582
                        [% isbn | $raw %]
583
                        [% UNLESS ( loop.last ) %]; [% END %]
584
                    [% END %]
585
                </span><br/>
586
            [% END %]
587
            [% IF ( biblioitem.publishercode ) %]
588
                <span>
589
                    Published by: [% biblioitem.publishercode | $raw %]
590
                    [% IF ( biblioitem.publicationyear ) %]
591
                        in [% biblioitem.publicationyear | $raw %]
592
                    [% END %]
593
                    [% IF ( biblioitem.pages ) %]
594
                        , [% biblioitem.pages | $raw %]
595
                    [% END %]
596
                </span><br/>
597
            [% END %]
598
            [% IF ( biblio.seriestitle ) %]
599
                <span>
600
                    Collection: [% biblio.seriestitle | $raw %]
601
                </span><br/>
602
            [% END %]
603
            [% IF ( biblio.copyrightdate ) %]
604
                <span>
605
                    Copyright year: [% biblio.copyrightdate | $raw %]
606
                </span><br/>
607
            [% END %]
608
            [% IF ( biblio.notes ) %]
609
                <span>
610
                    Notes: [% biblio.notes | $raw %]
611
                </span><br/>
612
            [% END %]
613
            [% IF ( biblio.unititle ) %]
614
                <span>
615
                    Unified title: [% biblio.unititle | $raw %]
616
                </span><br/>
617
            [% END %]
618
            [% IF ( biblio.serial ) %]
619
                <span>
620
                    Serial: [% biblio.serial | $raw %]
621
                </span><br/>
622
            [% END %]
623
            [% IF ( biblioitem.lccn ) %]
624
                <span>
625
                    LCCN: [% biblioitem.lccn | $raw %]
626
                </span><br/>
627
            [% END %]
628
            [% IF ( biblioitem.url ) %]
629
                <span>
630
                    URL: [% biblioitem.url | html %]
631
                </span>
632
            [% END %]
633
        </p>
634
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
635
        [% IF ( OPACBaseURL ) %]
636
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
637
        [% END %]
638
        [% IF ( biblio.items.count > 0 ) %]
639
            <p>Items:
640
                <ul>
641
                    [% FOREACH item IN biblio.items %]<li>
642
                        [% item.holding_branch.branchname | $raw %]
643
                        [% item.location | $raw %]
644
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
645
                        [% item.barcode | $raw %]
646
                    </li>[% END %]
647
                </ul>
648
            </p>
649
        [% END %]
650
        <hr/>
651
    </li>
652
[% END %]
653
</ol>",'email','default');
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql (+219 lines)
Lines 447-449 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
447
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');
447
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');
448
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');
448
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');
449
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');
449
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');
450
451
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 -%]
452
<p>Hi,</p>
453
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
454
<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>
455
<hr/>
456
<p>[% comment | $raw %]</p>
457
<hr/>
458
<ol>
459
[% FOREACH biblio IN biblios %]
460
    <li>
461
        <span>
462
            [% biblio.title | $raw %]
463
            [% IF ( biblio.subtitle ) %]
464
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
465
                    [% subtitle | $raw %]
466
                [% END %]
467
            [% END %]
468
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
469
        </span>
470
        <p>
471
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
472
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
473
                [% IF ( biblio.get_authors_from_MARC ) %]
474
                    [% IF ( biblio.author ) %]; [% END %]
475
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
476
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
477
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
478
                        [% END %]
479
                        [% UNLESS ( loop.last ) %];[% END %]
480
                    [% END %]
481
                [% END %]
482
                </span><br/>
483
            [% END %]
484
            [% SET biblioitem = biblio.biblioitem %]
485
            [% IF ( biblioitem.isbn ) %]
486
                <span>
487
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
488
                        [% isbn | $raw %]
489
                        [% UNLESS ( loop.last ) %]; [% END %]
490
                    [% END %]
491
                </span><br/>
492
            [% END %]
493
            [% IF ( biblioitem.publishercode ) %]
494
                <span>
495
                    Published by: [% biblioitem.publishercode | $raw %]
496
                    [% IF ( biblioitem.publicationyear ) %]
497
                        in [% biblioitem.publicationyear | $raw %]
498
                    [% END %]
499
                    [% IF ( biblioitem.pages ) %]
500
                        , [% biblioitem.pages | $raw %]
501
                    [% END %]
502
                </span><br/>
503
            [% END %]
504
            [% IF ( biblio.seriestitle ) %]
505
                <span>
506
                    Collection: [% biblio.seriestitle | $raw %]
507
                </span><br/>
508
            [% END %]
509
            [% IF ( biblio.copyrightdate ) %]
510
                <span>
511
                    Copyright year: [% biblio.copyrightdate | $raw %]
512
                </span><br/>
513
            [% END %]
514
            [% IF ( biblio.notes ) %]
515
                <span>
516
                    Notes: [% biblio.notes | $raw %]
517
                </span><br/>
518
            [% END %]
519
            [% IF ( biblio.unititle ) %]
520
                <span>
521
                    Unified title: [% biblio.unititle | $raw %]
522
                </span><br/>
523
            [% END %]
524
            [% IF ( biblio.serial ) %]
525
                <span>
526
                    Serial: [% biblio.serial | $raw %]
527
                </span><br/>
528
            [% END %]
529
            [% IF ( biblioitem.lccn ) %]
530
                <span>
531
                    LCCN: [% biblioitem.lccn | $raw %]
532
                </span><br/>
533
            [% END %]
534
            [% IF ( biblioitem.url ) %]
535
                <span>
536
                    URL: [% biblioitem.url | html %]
537
                </span>
538
            [% END %]
539
        </p>
540
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
541
        [% IF ( OPACBaseURL ) %]
542
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
543
        [% END %]
544
        [% IF ( biblio.items.count > 0 ) %]
545
            <p>Items:
546
                <ul>
547
                    [% FOREACH item IN biblio.items %]<li>
548
                        [% item.holding_branch.branchname | $raw %]
549
                        [% item.location | $raw %]
550
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
551
                        [% item.barcode | $raw %]
552
                    </li>[% END %]
553
                </ul>
554
            </p>
555
        [% END %]
556
        <hr/>
557
    </li>
558
[% END %]
559
</ol>", 'email','default' ),
560
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
561
<p>Hi,</p>
562
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
563
<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>
564
<hr/>
565
<p>[% comment | $raw %]</p>
566
<hr/>
567
<ol>
568
[% FOREACH biblio IN biblios %]
569
    <li>
570
        <span>
571
            [% biblio.title | $raw %]
572
            [% IF ( biblio.subtitle ) %]
573
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
574
                    [% subtitle | $raw %]
575
                [% END %]
576
            [% END %]
577
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
578
        </span>
579
        <p>
580
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
581
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
582
                [% IF ( biblio.get_authors_from_MARC ) %]
583
                    [% IF ( biblio.author ) %]; [% END %]
584
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
585
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
586
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
587
                        [% END %]
588
                        [% UNLESS ( loop.last ) %];[% END %]
589
                    [% END %]
590
                [% END %]
591
                </span><br/>
592
            [% END %]
593
            [% SET biblioitem = biblio.biblioitem %]
594
            [% IF ( biblioitem.isbn ) %]
595
                <span>
596
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
597
                        [% isbn | $raw %]
598
                        [% UNLESS ( loop.last ) %]; [% END %]
599
                    [% END %]
600
                </span><br/>
601
            [% END %]
602
            [% IF ( biblioitem.publishercode ) %]
603
                <span>
604
                    Published by: [% biblioitem.publishercode | $raw %]
605
                    [% IF ( biblioitem.publicationyear ) %]
606
                        in [% biblioitem.publicationyear | $raw %]
607
                    [% END %]
608
                    [% IF ( biblioitem.pages ) %]
609
                        , [% biblioitem.pages | $raw %]
610
                    [% END %]
611
                </span><br/>
612
            [% END %]
613
            [% IF ( biblio.seriestitle ) %]
614
                <span>
615
                    Collection: [% biblio.seriestitle | $raw %]
616
                </span><br/>
617
            [% END %]
618
            [% IF ( biblio.copyrightdate ) %]
619
                <span>
620
                    Copyright year: [% biblio.copyrightdate | $raw %]
621
                </span><br/>
622
            [% END %]
623
            [% IF ( biblio.notes ) %]
624
                <span>
625
                    Notes: [% biblio.notes | $raw %]
626
                </span><br/>
627
            [% END %]
628
            [% IF ( biblio.unititle ) %]
629
                <span>
630
                    Unified title: [% biblio.unititle | $raw %]
631
                </span><br/>
632
            [% END %]
633
            [% IF ( biblio.serial ) %]
634
                <span>
635
                    Serial: [% biblio.serial | $raw %]
636
                </span><br/>
637
            [% END %]
638
            [% IF ( biblioitem.lccn ) %]
639
                <span>
640
                    LCCN: [% biblioitem.lccn | $raw %]
641
                </span><br/>
642
            [% END %]
643
            [% IF ( biblioitem.url ) %]
644
                <span>
645
                    URL: [% biblioitem.url | html %]
646
                </span>
647
            [% END %]
648
        </p>
649
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
650
        [% IF ( OPACBaseURL ) %]
651
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
652
        [% END %]
653
        [% IF ( biblio.items.count > 0 ) %]
654
            <p>Items:
655
                <ul>
656
                    [% FOREACH item IN biblio.items %]<li>
657
                        [% item.holding_branch.branchname | $raw %]
658
                        [% item.location | $raw %]
659
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
660
                        [% item.barcode | $raw %]
661
                    </li>[% END %]
662
                </ul>
663
            </p>
664
        [% END %]
665
        <hr/>
666
    </li>
667
[% END %]
668
</ol>",'email','default');
(-)a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql (+219 lines)
Lines 426-428 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
426
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');
426
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');
427
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');
427
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');
428
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');
428
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');
429
430
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 -%]
431
<p>Hi,</p>
432
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
433
<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>
434
<hr/>
435
<p>[% comment | $raw %]</p>
436
<hr/>
437
<ol>
438
[% FOREACH biblio IN biblios %]
439
    <li>
440
        <span>
441
            [% biblio.title | $raw %]
442
            [% IF ( biblio.subtitle ) %]
443
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
444
                    [% subtitle | $raw %]
445
                [% END %]
446
            [% END %]
447
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
448
        </span>
449
        <p>
450
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
451
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
452
                [% IF ( biblio.get_authors_from_MARC ) %]
453
                    [% IF ( biblio.author ) %]; [% END %]
454
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
455
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
456
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
457
                        [% END %]
458
                        [% UNLESS ( loop.last ) %];[% END %]
459
                    [% END %]
460
                [% END %]
461
                </span><br/>
462
            [% END %]
463
            [% SET biblioitem = biblio.biblioitem %]
464
            [% IF ( biblioitem.isbn ) %]
465
                <span>
466
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
467
                        [% isbn | $raw %]
468
                        [% UNLESS ( loop.last ) %]; [% END %]
469
                    [% END %]
470
                </span><br/>
471
            [% END %]
472
            [% IF ( biblioitem.publishercode ) %]
473
                <span>
474
                    Published by: [% biblioitem.publishercode | $raw %]
475
                    [% IF ( biblioitem.publicationyear ) %]
476
                        in [% biblioitem.publicationyear | $raw %]
477
                    [% END %]
478
                    [% IF ( biblioitem.pages ) %]
479
                        , [% biblioitem.pages | $raw %]
480
                    [% END %]
481
                </span><br/>
482
            [% END %]
483
            [% IF ( biblio.seriestitle ) %]
484
                <span>
485
                    Collection: [% biblio.seriestitle | $raw %]
486
                </span><br/>
487
            [% END %]
488
            [% IF ( biblio.copyrightdate ) %]
489
                <span>
490
                    Copyright year: [% biblio.copyrightdate | $raw %]
491
                </span><br/>
492
            [% END %]
493
            [% IF ( biblio.notes ) %]
494
                <span>
495
                    Notes: [% biblio.notes | $raw %]
496
                </span><br/>
497
            [% END %]
498
            [% IF ( biblio.unititle ) %]
499
                <span>
500
                    Unified title: [% biblio.unititle | $raw %]
501
                </span><br/>
502
            [% END %]
503
            [% IF ( biblio.serial ) %]
504
                <span>
505
                    Serial: [% biblio.serial | $raw %]
506
                </span><br/>
507
            [% END %]
508
            [% IF ( biblioitem.lccn ) %]
509
                <span>
510
                    LCCN: [% biblioitem.lccn | $raw %]
511
                </span><br/>
512
            [% END %]
513
            [% IF ( biblioitem.url ) %]
514
                <span>
515
                    URL: [% biblioitem.url | html %]
516
                </span>
517
            [% END %]
518
        </p>
519
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
520
        [% IF ( OPACBaseURL ) %]
521
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
522
        [% END %]
523
        [% IF ( biblio.items.count > 0 ) %]
524
            <p>Items:
525
                <ul>
526
                    [% FOREACH item IN biblio.items %]<li>
527
                        [% item.holding_branch.branchname | $raw %]
528
                        [% item.location | $raw %]
529
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
530
                        [% item.barcode | $raw %]
531
                    </li>[% END %]
532
                </ul>
533
            </p>
534
        [% END %]
535
        <hr/>
536
    </li>
537
[% END %]
538
</ol>", 'email','default' ),
539
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
540
<p>Hi,</p>
541
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
542
<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>
543
<hr/>
544
<p>[% comment | $raw %]</p>
545
<hr/>
546
<ol>
547
[% FOREACH biblio IN biblios %]
548
    <li>
549
        <span>
550
            [% biblio.title | $raw %]
551
            [% IF ( biblio.subtitle ) %]
552
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
553
                    [% subtitle | $raw %]
554
                [% END %]
555
            [% END %]
556
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
557
        </span>
558
        <p>
559
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
560
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
561
                [% IF ( biblio.get_authors_from_MARC ) %]
562
                    [% IF ( biblio.author ) %]; [% END %]
563
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
564
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
565
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
566
                        [% END %]
567
                        [% UNLESS ( loop.last ) %];[% END %]
568
                    [% END %]
569
                [% END %]
570
                </span><br/>
571
            [% END %]
572
            [% SET biblioitem = biblio.biblioitem %]
573
            [% IF ( biblioitem.isbn ) %]
574
                <span>
575
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
576
                        [% isbn | $raw %]
577
                        [% UNLESS ( loop.last ) %]; [% END %]
578
                    [% END %]
579
                </span><br/>
580
            [% END %]
581
            [% IF ( biblioitem.publishercode ) %]
582
                <span>
583
                    Published by: [% biblioitem.publishercode | $raw %]
584
                    [% IF ( biblioitem.publicationyear ) %]
585
                        in [% biblioitem.publicationyear | $raw %]
586
                    [% END %]
587
                    [% IF ( biblioitem.pages ) %]
588
                        , [% biblioitem.pages | $raw %]
589
                    [% END %]
590
                </span><br/>
591
            [% END %]
592
            [% IF ( biblio.seriestitle ) %]
593
                <span>
594
                    Collection: [% biblio.seriestitle | $raw %]
595
                </span><br/>
596
            [% END %]
597
            [% IF ( biblio.copyrightdate ) %]
598
                <span>
599
                    Copyright year: [% biblio.copyrightdate | $raw %]
600
                </span><br/>
601
            [% END %]
602
            [% IF ( biblio.notes ) %]
603
                <span>
604
                    Notes: [% biblio.notes | $raw %]
605
                </span><br/>
606
            [% END %]
607
            [% IF ( biblio.unititle ) %]
608
                <span>
609
                    Unified title: [% biblio.unititle | $raw %]
610
                </span><br/>
611
            [% END %]
612
            [% IF ( biblio.serial ) %]
613
                <span>
614
                    Serial: [% biblio.serial | $raw %]
615
                </span><br/>
616
            [% END %]
617
            [% IF ( biblioitem.lccn ) %]
618
                <span>
619
                    LCCN: [% biblioitem.lccn | $raw %]
620
                </span><br/>
621
            [% END %]
622
            [% IF ( biblioitem.url ) %]
623
                <span>
624
                    URL: [% biblioitem.url | html %]
625
                </span>
626
            [% END %]
627
        </p>
628
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
629
        [% IF ( OPACBaseURL ) %]
630
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
631
        [% END %]
632
        [% IF ( biblio.items.count > 0 ) %]
633
            <p>Items:
634
                <ul>
635
                    [% FOREACH item IN biblio.items %]<li>
636
                        [% item.holding_branch.branchname | $raw %]
637
                        [% item.location | $raw %]
638
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
639
                        [% item.barcode | $raw %]
640
                    </li>[% END %]
641
                </ul>
642
            </p>
643
        [% END %]
644
        <hr/>
645
    </li>
646
[% END %]
647
</ol>",'email','default');
(-)a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql (+219 lines)
Lines 428-430 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
428
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');
428
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');
429
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');
429
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');
430
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');
430
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');
431
432
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 -%]
433
<p>Hi,</p>
434
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</p>
435
<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>
436
<hr/>
437
<p>[% comment | $raw %]</p>
438
<hr/>
439
<ol>
440
[% FOREACH biblio IN biblios %]
441
    <li>
442
        <span>
443
            [% biblio.title | $raw %]
444
            [% IF ( biblio.subtitle ) %]
445
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
446
                    [% subtitle | $raw %]
447
                [% END %]
448
            [% END %]
449
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
450
        </span>
451
        <p>
452
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
453
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
454
                [% IF ( biblio.get_authors_from_MARC ) %]
455
                    [% IF ( biblio.author ) %]; [% END %]
456
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
457
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
458
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
459
                        [% END %]
460
                        [% UNLESS ( loop.last ) %];[% END %]
461
                    [% END %]
462
                [% END %]
463
                </span><br/>
464
            [% END %]
465
            [% SET biblioitem = biblio.biblioitem %]
466
            [% IF ( biblioitem.isbn ) %]
467
                <span>
468
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
469
                        [% isbn | $raw %]
470
                        [% UNLESS ( loop.last ) %]; [% END %]
471
                    [% END %]
472
                </span><br/>
473
            [% END %]
474
            [% IF ( biblioitem.publishercode ) %]
475
                <span>
476
                    Published by: [% biblioitem.publishercode | $raw %]
477
                    [% IF ( biblioitem.publicationyear ) %]
478
                        in [% biblioitem.publicationyear | $raw %]
479
                    [% END %]
480
                    [% IF ( biblioitem.pages ) %]
481
                        , [% biblioitem.pages | $raw %]
482
                    [% END %]
483
                </span><br/>
484
            [% END %]
485
            [% IF ( biblio.seriestitle ) %]
486
                <span>
487
                    Collection: [% biblio.seriestitle | $raw %]
488
                </span><br/>
489
            [% END %]
490
            [% IF ( biblio.copyrightdate ) %]
491
                <span>
492
                    Copyright year: [% biblio.copyrightdate | $raw %]
493
                </span><br/>
494
            [% END %]
495
            [% IF ( biblio.notes ) %]
496
                <span>
497
                    Notes: [% biblio.notes | $raw %]
498
                </span><br/>
499
            [% END %]
500
            [% IF ( biblio.unititle ) %]
501
                <span>
502
                    Unified title: [% biblio.unititle | $raw %]
503
                </span><br/>
504
            [% END %]
505
            [% IF ( biblio.serial ) %]
506
                <span>
507
                    Serial: [% biblio.serial | $raw %]
508
                </span><br/>
509
            [% END %]
510
            [% IF ( biblioitem.lccn ) %]
511
                <span>
512
                    LCCN: [% biblioitem.lccn | $raw %]
513
                </span><br/>
514
            [% END %]
515
            [% IF ( biblioitem.url ) %]
516
                <span>
517
                    URL: [% biblioitem.url | html %]
518
                </span>
519
            [% END %]
520
        </p>
521
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
522
        [% IF ( OPACBaseURL ) %]
523
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
524
        [% END %]
525
        [% IF ( biblio.items.count > 0 ) %]
526
            <p>Items:
527
                <ul>
528
                    [% FOREACH item IN biblio.items %]<li>
529
                        [% item.holding_branch.branchname | $raw %]
530
                        [% item.location | $raw %]
531
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
532
                        [% item.barcode | $raw %]
533
                    </li>[% END %]
534
                </ul>
535
            </p>
536
        [% END %]
537
        <hr/>
538
    </li>
539
[% END %]
540
</ol>", 'email','default' ),
541
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
542
<p>Hi,</p>
543
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
544
<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>
545
<hr/>
546
<p>[% comment | $raw %]</p>
547
<hr/>
548
<ol>
549
[% FOREACH biblio IN biblios %]
550
    <li>
551
        <span>
552
            [% biblio.title | $raw %]
553
            [% IF ( biblio.subtitle ) %]
554
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
555
                    [% subtitle | $raw %]
556
                [% END %]
557
            [% END %]
558
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
559
        </span>
560
        <p>
561
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
562
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
563
                [% IF ( biblio.get_authors_from_MARC ) %]
564
                    [% IF ( biblio.author ) %]; [% END %]
565
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
566
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
567
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
568
                        [% END %]
569
                        [% UNLESS ( loop.last ) %];[% END %]
570
                    [% END %]
571
                [% END %]
572
                </span><br/>
573
            [% END %]
574
            [% SET biblioitem = biblio.biblioitem %]
575
            [% IF ( biblioitem.isbn ) %]
576
                <span>
577
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
578
                        [% isbn | $raw %]
579
                        [% UNLESS ( loop.last ) %]; [% END %]
580
                    [% END %]
581
                </span><br/>
582
            [% END %]
583
            [% IF ( biblioitem.publishercode ) %]
584
                <span>
585
                    Published by: [% biblioitem.publishercode | $raw %]
586
                    [% IF ( biblioitem.publicationyear ) %]
587
                        in [% biblioitem.publicationyear | $raw %]
588
                    [% END %]
589
                    [% IF ( biblioitem.pages ) %]
590
                        , [% biblioitem.pages | $raw %]
591
                    [% END %]
592
                </span><br/>
593
            [% END %]
594
            [% IF ( biblio.seriestitle ) %]
595
                <span>
596
                    Collection: [% biblio.seriestitle | $raw %]
597
                </span><br/>
598
            [% END %]
599
            [% IF ( biblio.copyrightdate ) %]
600
                <span>
601
                    Copyright year: [% biblio.copyrightdate | $raw %]
602
                </span><br/>
603
            [% END %]
604
            [% IF ( biblio.notes ) %]
605
                <span>
606
                    Notes: [% biblio.notes | $raw %]
607
                </span><br/>
608
            [% END %]
609
            [% IF ( biblio.unititle ) %]
610
                <span>
611
                    Unified title: [% biblio.unititle | $raw %]
612
                </span><br/>
613
            [% END %]
614
            [% IF ( biblio.serial ) %]
615
                <span>
616
                    Serial: [% biblio.serial | $raw %]
617
                </span><br/>
618
            [% END %]
619
            [% IF ( biblioitem.lccn ) %]
620
                <span>
621
                    LCCN: [% biblioitem.lccn | $raw %]
622
                </span><br/>
623
            [% END %]
624
            [% IF ( biblioitem.url ) %]
625
                <span>
626
                    URL: [% biblioitem.url | html %]
627
                </span>
628
            [% END %]
629
        </p>
630
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
631
        [% IF ( OPACBaseURL ) %]
632
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
633
        [% END %]
634
        [% IF ( biblio.items.count > 0 ) %]
635
            <p>Items:
636
                <ul>
637
                    [% FOREACH item IN biblio.items %]<li>
638
                        [% item.holding_branch.branchname | $raw %]
639
                        [% item.location | $raw %]
640
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
641
                        [% item.barcode | $raw %]
642
                    </li>[% END %]
643
                </ul>
644
            </p>
645
        [% END %]
646
        <hr/>
647
    </li>
648
[% END %]
649
</ol>",'email','default');
(-)a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql (+219 lines)
Lines 519-521 INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, conten Link Here
519
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');
519
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');
520
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');
520
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');
521
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');
521
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');
522
523
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 -%]
524
<p>Hi,</p>
525
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a list from our online catalog called: [% listname | $raw %].</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' ),
632
('catalog','CART','','Send cart',1,'Your cart',"[%- USE raw -%]
633
<p>Hi,</p>
634
<p>[% borrower.firstname | $raw %] [% borrower.surname | $raw %] sent you a cart from our online catalog.</p>
635
<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>
636
<hr/>
637
<p>[% comment | $raw %]</p>
638
<hr/>
639
<ol>
640
[% FOREACH biblio IN biblios %]
641
    <li>
642
        <span>
643
            [% biblio.title | $raw %]
644
            [% IF ( biblio.subtitle ) %]
645
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
646
                    [% subtitle | $raw %]
647
                [% END %]
648
            [% END %]
649
            [% biblio.part_number | $raw %] [% biblio.part_name | $raw %]
650
        </span>
651
        <p>
652
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
653
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | $raw %][% END %]
654
                [% IF ( biblio.get_authors_from_MARC ) %]
655
                    [% IF ( biblio.author ) %]; [% END %]
656
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
657
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
658
                            [% subfield.separator | $raw %][% subfield.value | $raw %]
659
                        [% END %]
660
                        [% UNLESS ( loop.last ) %];[% END %]
661
                    [% END %]
662
                [% END %]
663
                </span><br/>
664
            [% END %]
665
            [% SET biblioitem = biblio.biblioitem %]
666
            [% IF ( biblioitem.isbn ) %]
667
                <span>
668
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
669
                        [% isbn | $raw %]
670
                        [% UNLESS ( loop.last ) %]; [% END %]
671
                    [% END %]
672
                </span><br/>
673
            [% END %]
674
            [% IF ( biblioitem.publishercode ) %]
675
                <span>
676
                    Published by: [% biblioitem.publishercode | $raw %]
677
                    [% IF ( biblioitem.publicationyear ) %]
678
                        in [% biblioitem.publicationyear | $raw %]
679
                    [% END %]
680
                    [% IF ( biblioitem.pages ) %]
681
                        , [% biblioitem.pages | $raw %]
682
                    [% END %]
683
                </span><br/>
684
            [% END %]
685
            [% IF ( biblio.seriestitle ) %]
686
                <span>
687
                    Collection: [% biblio.seriestitle | $raw %]
688
                </span><br/>
689
            [% END %]
690
            [% IF ( biblio.copyrightdate ) %]
691
                <span>
692
                    Copyright year: [% biblio.copyrightdate | $raw %]
693
                </span><br/>
694
            [% END %]
695
            [% IF ( biblio.notes ) %]
696
                <span>
697
                    Notes: [% biblio.notes | $raw %]
698
                </span><br/>
699
            [% END %]
700
            [% IF ( biblio.unititle ) %]
701
                <span>
702
                    Unified title: [% biblio.unititle | $raw %]
703
                </span><br/>
704
            [% END %]
705
            [% IF ( biblio.serial ) %]
706
                <span>
707
                    Serial: [% biblio.serial | $raw %]
708
                </span><br/>
709
            [% END %]
710
            [% IF ( biblioitem.lccn ) %]
711
                <span>
712
                    LCCN: [% biblioitem.lccn | $raw %]
713
                </span><br/>
714
            [% END %]
715
            [% IF ( biblioitem.url ) %]
716
                <span>
717
                    URL: [% biblioitem.url | html %]
718
                </span>
719
            [% END %]
720
        </p>
721
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
722
        [% IF ( OPACBaseURL ) %]
723
            <p>In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
724
        [% END %]
725
        [% IF ( biblio.items.count > 0 ) %]
726
            <p>Items:
727
                <ul>
728
                    [% FOREACH item IN biblio.items %]<li>
729
                        [% item.holding_branch.branchname | $raw %]
730
                        [% item.location | $raw %]
731
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | $raw %])[% END %]
732
                        [% item.barcode | $raw %]
733
                    </li>[% END %]
734
                </ul>
735
            </p>
736
        [% END %]
737
        <hr/>
738
    </li>
739
[% END %]
740
</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