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

(-)a/basket/sendbasket.pl (-2 / +5 lines)
Lines 56-62 if ( $email_add ) { Link Here
56
            token  => scalar $query->param('csrf_token'),
56
            token  => scalar $query->param('csrf_token'),
57
        });
57
        });
58
58
59
    my $patron = Koha:::Patrons->find( $borrowernumber );
59
    my $patron = Koha::Patrons->find( $borrowernumber );
60
    my $user_email = $patron->first_valid_email_address;
60
61
61
    my $comment = $query->param('comment');
62
    my $comment = $query->param('comment');
62
63
Lines 71-76 if ( $email_add ) { Link Here
71
    if ( !defined $iso2709 ) {
72
    if ( !defined $iso2709 ) {
72
        carp "Error sending mail: empty basket";
73
        carp "Error sending mail: empty basket";
73
        $template->param( error => 1 );
74
        $template->param( error => 1 );
75
    } elsif ( !defined $user_email or $user_email eq '' ) {
76
        carp "Error sending mail: sender's email address is invalid";
77
        $template->param( error => 1 );
74
    } else {
78
    } else {
75
        my %loops = (
79
        my %loops = (
76
            biblio => \@bibs,
80
            biblio => \@bibs,
Lines 98-104 if ( $email_add ) { Link Here
98
            content => Encode::encode("UTF-8", $iso2709),
102
            content => Encode::encode("UTF-8", $iso2709),
99
        };
103
        };
100
104
101
        my $user_email = $patron->first_valid_email_address || C4::Context->preference('KohaAdminEmailAddress');
102
        C4::Letters::EnqueueLetter({
105
        C4::Letters::EnqueueLetter({
103
            letter => $letter,
106
            letter => $letter,
104
            message_transport_type => 'email',
107
            message_transport_type => 'email',
(-)a/installer/data/mysql/atomicupdate/bug_3150_-_add_LIST_and_CART_notices.perl (-216 / +48 lines)
Lines 1-222 Link Here
1
$DBversion = 'XXX';
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
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
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 %]',"<p>Hi,</p>
4
('catalog','LIST','','Send list',0,'Your list: [% listname | html %]',"Hi,
5
<p>[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %].</p>
5
[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %].
6
<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>
6
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.
7
<hr/>
7
<hr/>[% comment | html %]<hr/>
8
<p>[% comment | html %]</p>
8
<ol>[% FOREACH biblio IN biblios %]<li>
9
<hr/>
9
    [% biblio.title | html %]
10
<ol>
10
    [% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %]
11
[% FOREACH biblio IN biblios %]
11
    [% biblio.part_number | html %] [% biblio.part_name | html %]
12
    <li>
12
    [% IF ( biblio.author || biblio.get_marc_authors ) %]Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %][% IF ( biblio.get_marc_authors ) %][% IF ( biblio.author ) %]; [% END %][% FOREACH author IN biblio.get_marc_authors %][% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %][% subfield.separator | html %][% subfield.value | html %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %][% END %]
13
        <span>
13
    [% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %]
14
            [% biblio.title | html %]
14
    [% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %]
15
            [% IF ( biblio.subtitle ) %]
15
    [% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %]
16
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
16
    [% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %]
17
                    [% subtitle | html %]
17
    [% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %]
18
                [% END %]
18
    [% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %]
19
            [% END %]
19
    [% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %]
20
            [% biblio.part_number | html %] [% biblio.part_name | html %]
20
    [% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %]
21
        </span>
21
    [% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %]
22
        <p>
22
    [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %]
23
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
23
    [% IF ( biblio.items.count > 0 ) %]Items: <ul>[% FOREACH item IN biblio.items %]<li>[% item.holding_branch.branchname | html %]
24
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %]
24
    [% item.location | html %]
25
                [% IF ( biblio.get_authors_from_MARC ) %]
25
    [% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %]
26
                    [% IF ( biblio.author ) %]; [% END %]
26
    [% item.barcode | html %]</li>[% END %]</ul>[% END %]
27
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
27
<hr/></li>[% END %]</ol>", 'email','default' ),
28
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
28
        ('catalog','CART','','Send cart',0,'Your cart',"Hi,
29
                            [% subfield.separator | html %][% subfield.value | html %]
29
[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog.
30
                        [% END %]
30
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.
31
                        [% UNLESS ( loop.last ) %];[% END %]
31
<hr/>[% comment | html %]<hr/>
32
                    [% END %]
32
<ol>[% FOREACH biblio IN biblios %]<li>
33
                [% END %]
33
    [% biblio.title | html %]
34
                </span><br/>
34
    [% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %]
35
            [% END %]
35
    [% biblio.part_number | html %] [% biblio.part_name | html %]
36
            [% SET biblioitem = biblio.biblioitem %]
36
    [% IF ( biblio.author || biblio.get_marc_authors ) %]Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %][% IF ( biblio.get_marc_authors ) %][% IF ( biblio.author ) %]; [% END %][% FOREACH author IN biblio.get_marc_authors %][% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %][% subfield.separator | html %][% subfield.value | html %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %][% END %]
37
            [% IF ( biblioitem.isbn ) %]
37
    [% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %]
38
                <span>
38
    [% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %]
39
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
39
    [% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %]
40
                        [% isbn | html %]
40
    [% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %]
41
                        [% UNLESS ( loop.last ) %]; [% END %]
41
    [% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %]
42
                    [% END %]
42
    [% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %]
43
                </span><br/>
43
    [% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %]
44
            [% END %]
44
    [% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %]
45
            [% IF ( biblioitem.publishercode ) %]
45
    [% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %]
46
                <span>
46
    [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %]
47
                    Published by: [% biblioitem.publishercode | html %]
47
    [% IF ( biblio.items.count > 0 ) %]Items: <ul>[% FOREACH item IN biblio.items %]<li>[% item.holding_branch.branchname | html %]
48
                    [% IF ( biblioitem.publicationyear ) %]
48
    [% item.location | html %]
49
                        in [% biblioitem.publicationyear | html %]
49
    [% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %]
50
                    [% END %]
50
    [% item.barcode | html %]</li>[% END %]</ul>[% END %]
51
                    [% IF ( biblioitem.pages ) %]
51
<hr/></li>[% END %]</ol>",'email','default') });
52
                        , [% biblioitem.pages | html %]
53
                    [% END %]
54
                </span><br/>
55
            [% END %]
56
            [% IF ( biblio.seriestitle ) %]
57
                <span>
58
                    Collection: [% biblio.seriestitle | html %]
59
                </span><br/>
60
            [% END %]
61
            [% IF ( biblio.copyrightdate ) %]
62
                <span>
63
                    Copyright year: [% biblio.copyrightdate | html %]
64
                </span><br/>
65
            [% END %]
66
            [% IF ( biblio.notes ) %]
67
                <span>
68
                    Notes: [% biblio.notes | html %]
69
                </span><br/>
70
            [% END %]
71
            [% IF ( biblio.unititle ) %]
72
                <span>
73
                    Unified title: [% biblio.unititle | html %]
74
                </span><br/>
75
            [% END %]
76
            [% IF ( biblio.serial ) %]
77
                <span>
78
                    Serial: [% biblio.serial | html %]
79
                </span><br/>
80
            [% END %]
81
            [% IF ( biblioitem.lccn ) %]
82
                <span>
83
                    LCCN: [% biblioitem.lccn | html %]
84
                </span><br/>
85
            [% END %]
86
            [% IF ( biblioitem.url ) %]
87
                <span>
88
                    URL: [% biblioitem.url | html %]
89
                </span>
90
            [% END %]
91
        </p>
92
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
93
        [% IF ( OPACBaseURL ) %]
94
            <p>In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
95
        [% END %]
96
        [% IF ( biblio.items.count > 0 ) %]
97
            <p>Items:
98
                <ul>
99
                    [% FOREACH item IN biblio.items %]<li>
100
                        [% item.holding_branch.branchname | html %]
101
                        [% item.location | html %]
102
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %]
103
                        [% item.barcode | html %]
104
                    </li>[% END %]
105
                </ul>
106
            </p>
107
        [% END %]
108
        <hr/>
109
    </li>
110
[% END %]
111
</ol>", 'email','default' ),
112
        ('catalog','CART','','Send cart',1,'Your cart',"<p>Hi,</p>
113
<p>[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog.</p>
114
<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>
115
<hr/>
116
<p>[% comment | html %]</p>
117
<hr/>
118
<ol>
119
[% FOREACH biblio IN biblios %]
120
    <li>
121
        <span>
122
            [% biblio.title | html %]
123
            [% IF ( biblio.subtitle ) %]
124
                [% FOREACH subtitle IN biblio.subtitle.split(' | ') %]
125
                    [% subtitle | html %]
126
                [% END %]
127
            [% END %]
128
            [% biblio.part_number | html %] [% biblio.part_name | html %]
129
        </span>
130
        <p>
131
            [% IF ( biblio.author || biblio.get_authors_from_MARC ) %]
132
                <span>Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %]
133
                [% IF ( biblio.get_authors_from_MARC ) %]
134
                    [% IF ( biblio.author ) %]; [% END %]
135
                    [% FOREACH author IN biblio.get_authors_from_MARC %]
136
                        [% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]
137
                            [% subfield.separator | html %][% subfield.value | html %]
138
                        [% END %]
139
                        [% UNLESS ( loop.last ) %];[% END %]
140
                    [% END %]
141
                [% END %]
142
                </span><br/>
143
            [% END %]
144
            [% SET biblioitem = biblio.biblioitem %]
145
            [% IF ( biblioitem.isbn ) %]
146
                <span>
147
                    ISBN: [% FOREACH isbn IN biblioitem.isbn %]
148
                        [% isbn | html %]
149
                        [% UNLESS ( loop.last ) %]; [% END %]
150
                    [% END %]
151
                </span><br/>
152
            [% END %]
153
            [% IF ( biblioitem.publishercode ) %]
154
                <span>
155
                    Published by: [% biblioitem.publishercode | html %]
156
                    [% IF ( biblioitem.publicationyear ) %]
157
                        in [% biblioitem.publicationyear | html %]
158
                    [% END %]
159
                    [% IF ( biblioitem.pages ) %]
160
                        , [% biblioitem.pages | html %]
161
                    [% END %]
162
                </span><br/>
163
            [% END %]
164
            [% IF ( biblio.seriestitle ) %]
165
                <span>
166
                    Collection: [% biblio.seriestitle | html %]
167
                </span><br/>
168
            [% END %]
169
            [% IF ( biblio.copyrightdate ) %]
170
                <span>
171
                    Copyright year: [% biblio.copyrightdate | html %]
172
                </span><br/>
173
            [% END %]
174
            [% IF ( biblio.notes ) %]
175
                <span>
176
                    Notes: [% biblio.notes | html %]
177
                </span><br/>
178
            [% END %]
179
            [% IF ( biblio.unititle ) %]
180
                <span>
181
                    Unified title: [% biblio.unititle | html %]
182
                </span><br/>
183
            [% END %]
184
            [% IF ( biblio.serial ) %]
185
                <span>
186
                    Serial: [% biblio.serial | html %]
187
                </span><br/>
188
            [% END %]
189
            [% IF ( biblioitem.lccn ) %]
190
                <span>
191
                    LCCN: [% biblioitem.lccn | html %]
192
                </span><br/>
193
            [% END %]
194
            [% IF ( biblioitem.url ) %]
195
                <span>
196
                    URL: [% biblioitem.url | html %]
197
                </span>
198
            [% END %]
199
        </p>
200
        [% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]
201
        [% IF ( OPACBaseURL ) %]
202
            <p>In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>
203
        [% END %]
204
        [% IF ( biblio.items.count > 0 ) %]
205
            <p>Items:
206
                <ul>
207
                    [% FOREACH item IN biblio.items %]<li>
208
                        [% item.holding_branch.branchname | html %]
209
                        [% item.location | html %]
210
                        [% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %]
211
                        [% item.barcode | html %]
212
                    </li>[% END %]
213
                </ul>
214
            </p>
215
        [% END %]
216
        <hr/>
217
    </li>
218
[% END %]
219
</ol>",'email','default') });
220
52
221
    NewVersion( $DBversion, 3150, 'Add LIST and CART notices' );
53
    NewVersion( $DBversion, 3150, 'Add LIST and CART notices' );
222
}
54
}
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-216 / +41 lines)
Lines 1703-1936 tables: Link Here
1703
          code: LIST
1703
          code: LIST
1704
          branchcode: ""
1704
          branchcode: ""
1705
          name: "Send list"
1705
          name: "Send list"
1706
          is_html: 1
1706
          is_html: 0
1707
          title: "Your list: [% listname | html %]"
1707
          title: "Your list: [% listname | html %]"
1708
          message_transport_type: email
1708
          message_transport_type: email
1709
          lang: default
1709
          lang: default
1710
          content:
1710
          content:
1711
            - "<p>Hi,</p>"
1711
            - "Hi,"
1712
            - "<p>[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %].</p>"
1712
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %]."
1713
            - "<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>"
1713
            - "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."
1714
            - "<hr/>"
1714
            - "<hr/>[% comment | html %]<hr/>"
1715
            - "<p>[% comment | html %]</p>"
1715
            - "<ol>[% FOREACH biblio IN biblios %]<li>"
1716
            - "<hr/>"
1717
            - "<ol>"
1718
            - "[% FOREACH biblio IN biblios %]"
1719
            - "<li>"
1720
            - "<span>"
1721
            - "[% biblio.title | html %]"
1716
            - "[% biblio.title | html %]"
1722
            - "[% IF ( biblio.subtitle ) %]"
1717
- "[% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% biblio.part_number | html %] [% biblio.part_name | html %]"
1723
            - "[% FOREACH subtitle IN biblio.subtitle.split(' | ') %]"
1718
            - "[% IF ( biblio.author || biblio.get_marc_authors ) %]Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %][% IF ( biblio.get_marc_authors ) %][% IF ( biblio.author ) %]; [% END %][% FOREACH author IN biblio.get_marc_authors %][% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %][% subfield.separator | html %][% subfield.value | html %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %][% END %]"
1724
            - "[% subtitle | html %]"
1719
            - "[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %]"
1725
            - "[% END %]"
1720
            - "[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %]"
1726
            - "[% END %]"
1721
            - "[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %]"
1727
            - "[% biblio.part_number | html %] [% biblio.part_name | html %]"
1722
            - "[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %]"
1728
            - "</span>"
1723
            - "[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %]"
1729
            - "<p>"
1724
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %]"
1730
            - "[% IF ( biblio.author || biblio.get_authors_from_MARC ) %]"
1725
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %]"
1731
            - "<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %]"
1726
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %]"
1732
            - "[% IF ( biblio.get_authors_from_MARC ) %]"
1727
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %]"
1733
            - "[% IF ( biblio.author ) %]; [% END %]"
1728
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %]"
1734
            - "[% FOREACH author IN biblio.get_authors_from_MARC %]"
1729
            - "[% IF ( biblio.items.count > 0 ) %]Items: <ul>[% FOREACH item IN biblio.items %]<li>[% item.holding_branch.branchname | html %][% item.location | html %][% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %][% item.barcode | html %]</li>[% END %]</ul>[% END %]"
1735
            - "[% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]"
1730
            - "<hr/></li>[% END %]</ol>"
1736
            - "[% subfield.separator | html %][% subfield.value | html %]"
1737
            - "[% END %]"
1738
            - "[% UNLESS ( loop.last ) %];[% END %]"
1739
            - "[% END %]"
1740
            - "[% END %]"
1741
            - "</span><br/>"
1742
            - "[% END %]"
1743
            - "[% SET biblioitem = biblio.biblioitem %]"
1744
            - "[% IF ( biblioitem.isbn ) %]"
1745
            - "<span>"
1746
            - "ISBN: [% FOREACH isbn IN biblioitem.isbn %]"
1747
            - "[% isbn | html %]"
1748
            - "[% UNLESS ( loop.last ) %]; [% END %]"
1749
            - "[% END %]"
1750
            - "</span><br/>"
1751
            - "[% END %]"
1752
            - "[% IF ( biblioitem.publishercode ) %]"
1753
            - "<span>"
1754
            - "Published by: [% biblioitem.publishercode | html %]"
1755
            - "[% IF ( biblioitem.publicationyear ) %]"
1756
            - "in [% biblioitem.publicationyear | html %]"
1757
            - "[% END %]"
1758
            - "[% IF ( biblioitem.pages ) %]"
1759
            - ", [% biblioitem.pages | html %]"
1760
            - "[% END %]"
1761
            - "</span><br/>"
1762
            - "[% END %]"
1763
            - "[% IF ( biblio.seriestitle ) %]"
1764
            - "<span>"
1765
            - "Collection: [% biblio.seriestitle | html %]"
1766
            - "</span><br/>"
1767
            - "[% END %]"
1768
            - "[% IF ( biblio.copyrightdate ) %]"
1769
            - "<span>"
1770
            - "Copyright year: [% biblio.copyrightdate | html %]"
1771
            - "</span><br/>"
1772
            - "[% END %]"
1773
            - "[% IF ( biblio.notes ) %]"
1774
            - "<span>"
1775
            - "Notes: [% biblio.notes | html %]"
1776
            - "</span><br/>"
1777
            - "[% END %]"
1778
            - "[% IF ( biblio.unititle ) %]"
1779
            - "<span>"
1780
            - "Unified title: [% biblio.unititle | html %]"
1781
            - "</span><br/>"
1782
            - "[% END %]"
1783
            - "[% IF ( biblio.serial ) %]"
1784
            - "<span>"
1785
            - "Serial: [% biblio.serial | html %]"
1786
            - "</span><br/>"
1787
            - "[% END %]"
1788
            - "[% IF ( biblioitem.lccn ) %]"
1789
            - "<span>"
1790
            - "LCCN: [% biblioitem.lccn | html %]"
1791
            - "</span><br/>"
1792
            - "[% END %]"
1793
            - "[% IF ( biblioitem.url ) %]"
1794
            - "<span>"
1795
            - "URL: [% biblioitem.url | html %]"
1796
            - "</span>"
1797
            - "[% END %]"
1798
            - "</p>"
1799
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]"
1800
            - "[% IF ( OPACBaseURL ) %]"
1801
            - "<p>In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>"
1802
            - "[% END %]"
1803
            - "[% IF ( biblio.items.count > 0 ) %]"
1804
            - "<p>Items:"
1805
            - "<ul>"
1806
            - "[% FOREACH item IN biblio.items %]<li>"
1807
            - "[% item.holding_branch.branchname | html %]"
1808
            - "[% item.location | html %]"
1809
            - "[% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %]"
1810
            - "[% item.barcode | html %]"
1811
            - "</li>[% END %]"
1812
            - "</ul>"
1813
            - "</p>"
1814
            - "[% END %]"
1815
            - "<hr/>"
1816
            - "</li>"
1817
            - "[% END %]"
1818
            - "</ol>"
1819
1731
1820
        - module: catalog
1732
        - module: catalog
1821
          code: CART
1733
          code: CART
1822
          branchcode: ""
1734
          branchcode: ""
1823
          name: "Send cart"
1735
          name: "Send cart"
1824
          is_html: 1
1736
          is_html: 0
1825
          title: "Your cart"
1737
          title: "Your cart"
1826
          message_transport_type: email
1738
          message_transport_type: email
1827
          lang: default
1739
          lang: default
1828
          content:
1740
          content:
1829
            - "<p>Hi,</p>"
1741
            - "Hi,"
1830
            - "<p>[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog.</p>"
1742
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog."
1831
            - "<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>"
1743
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %]."
1832
            - "<hr/>"
1744
            - "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."
1833
            - "<p>[% comment | html %]</p>"
1745
            - "<hr/>[% comment | html %]<hr/>"
1834
            - "<hr/>"
1746
            - "<ol>[% FOREACH biblio IN biblios %]<li>"
1835
            - "<ol>"
1836
            - "[% FOREACH biblio IN biblios %]"
1837
            - "<li>"
1838
            - "<span>"
1839
            - "[% biblio.title | html %]"
1747
            - "[% biblio.title | html %]"
1840
            - "[% IF ( biblio.subtitle ) %]"
1748
- "[% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% biblio.part_number | html %] [% biblio.part_name | html %]"
1841
            - "[% FOREACH subtitle IN biblio.subtitle.split(' | ') %]"
1749
            - "[% IF ( biblio.author || biblio.get_marc_authors ) %]Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %][% IF ( biblio.get_marc_authors ) %][% IF ( biblio.author ) %]; [% END %][% FOREACH author IN biblio.get_marc_authors %][% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %][% subfield.separator | html %][% subfield.value | html %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %][% END %]"
1842
            - "[% subtitle | html %]"
1750
            - "[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %]"
1843
            - "[% END %]"
1751
            - "[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %]"
1844
            - "[% END %]"
1752
            - "[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %]"
1845
            - "[% biblio.part_number | html %] [% biblio.part_name | html %]"
1753
            - "[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %]"
1846
            - "</span>"
1754
            - "[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %]"
1847
            - "<p>"
1755
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %]"
1848
            - "[% IF ( biblio.author || biblio.get_authors_from_MARC ) %]"
1756
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %]"
1849
            - "<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %]"
1757
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %]"
1850
            - "[% IF ( biblio.get_authors_from_MARC ) %]"
1758
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %]"
1851
            - "[% IF ( biblio.author ) %]; [% END %]"
1759
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %]"
1852
            - "[% FOREACH author IN biblio.get_authors_from_MARC %]"
1760
            - "[% IF ( biblio.items.count > 0 ) %]Items: <ul>[% FOREACH item IN biblio.items %]<li>[% item.holding_branch.branchname | html %][% item.location | html %][% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %][% item.barcode | html %]</li>[% END %]</ul>[% END %]"
1853
            - "[% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]"
1761
            - "<hr/></li>[% END %]</ol>"
1854
            - "[% subfield.separator | html %][% subfield.value | html %]"
1855
            - "[% END %]"
1856
            - "[% UNLESS ( loop.last ) %];[% END %]"
1857
            - "[% END %]"
1858
            - "[% END %]"
1859
            - "</span><br/>"
1860
            - "[% END %]"
1861
            - "[% SET biblioitem = biblio.biblioitem %]"
1862
            - "[% IF ( biblioitem.isbn ) %]"
1863
            - "<span>"
1864
            - "ISBN: [% FOREACH isbn IN biblioitem.isbn %]"
1865
            - "[% isbn | html %]"
1866
            - "[% UNLESS ( loop.last ) %]; [% END %]"
1867
            - "[% END %]"
1868
            - "</span><br/>"
1869
            - "[% END %]"
1870
            - "[% IF ( biblioitem.publishercode ) %]"
1871
            - "<span>"
1872
            - "Published by: [% biblioitem.publishercode | html %]"
1873
            - "[% IF ( biblioitem.publicationyear ) %]"
1874
            - "in [% biblioitem.publicationyear | html %]"
1875
            - "[% END %]"
1876
            - "[% IF ( biblioitem.pages ) %]"
1877
            - ", [% biblioitem.pages | html %]"
1878
            - "[% END %]"
1879
            - "</span><br/>"
1880
            - "[% END %]"
1881
            - "[% IF ( biblio.seriestitle ) %]"
1882
            - "<span>"
1883
            - "Collection: [% biblio.seriestitle | html %]"
1884
            - "</span><br/>"
1885
            - "[% END %]"
1886
            - "[% IF ( biblio.copyrightdate ) %]"
1887
            - "<span>"
1888
            - "Copyright year: [% biblio.copyrightdate | html %]"
1889
            - "</span><br/>"
1890
            - "[% END %]"
1891
            - "[% IF ( biblio.notes ) %]"
1892
            - "<span>"
1893
            - "Notes: [% biblio.notes | html %]"
1894
            - "</span><br/>"
1895
            - "[% END %]"
1896
            - "[% IF ( biblio.unititle ) %]"
1897
            - "<span>"
1898
            - "Unified title: [% biblio.unititle | html %]"
1899
            - "</span><br/>"
1900
            - "[% END %]"
1901
            - "[% IF ( biblio.serial ) %]"
1902
            - "<span>"
1903
            - "Serial: [% biblio.serial | html %]"
1904
            - "</span><br/>"
1905
            - "[% END %]"
1906
            - "[% IF ( biblioitem.lccn ) %]"
1907
            - "<span>"
1908
            - "LCCN: [% biblioitem.lccn | html %]"
1909
            - "</span><br/>"
1910
            - "[% END %]"
1911
            - "[% IF ( biblioitem.url ) %]"
1912
            - "<span>"
1913
            - "URL: [% biblioitem.url | html %]"
1914
            - "</span>"
1915
            - "[% END %]"
1916
            - "</p>"
1917
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]"
1918
            - "[% IF ( OPACBaseURL ) %]"
1919
            - "<p>In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>"
1920
            - "[% END %]"
1921
            - "[% IF ( biblio.items.count > 0 ) %]"
1922
            - "<p>Items:"
1923
            - "<ul>"
1924
            - "[% FOREACH item IN biblio.items %]<li>"
1925
            - "[% item.holding_branch.branchname | html %]"
1926
            - "[% item.location | html %]"
1927
            - "[% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %]"
1928
            - "[% item.barcode | html %]"
1929
            - "</li>[% END %]"
1930
            - "</ul>"
1931
            - "</p>"
1932
            - "[% END %]"
1933
            - "<hr/>"
1934
            - "</li>"
1935
            - "[% END %]"
1936
            - "</ol>"
(-)a/opac/opac-sendbasket.pl (-1 / +4 lines)
Lines 58-63 if ( $email_add ) { Link Here
58
    });
58
    });
59
59
60
    my $patron = Koha::Patrons->find( $borrowernumber );
60
    my $patron = Koha::Patrons->find( $borrowernumber );
61
    my $user_email = $patron->first_valid_email_address;
61
62
62
    my $comment    = $query->param('comment');
63
    my $comment    = $query->param('comment');
63
64
Lines 72-77 if ( $email_add ) { Link Here
72
    if ( !defined $iso2709 ) {
73
    if ( !defined $iso2709 ) {
73
        carp "Error sending mail: empty basket";
74
        carp "Error sending mail: empty basket";
74
        $template->param( error => 1 );
75
        $template->param( error => 1 );
76
    } elsif ( !defined $user_email or $user_email eq '' ) {
77
        carp "Error sending mail: sender's email address is invalid";
78
        $template->param( error => 1 );
75
    } else {
79
    } else {
76
        my %loops = (
80
        my %loops = (
77
            biblio => \@bibs,
81
            biblio => \@bibs,
Lines 99-105 if ( $email_add ) { Link Here
99
            content => Encode::encode("UTF-8", $iso2709),
103
            content => Encode::encode("UTF-8", $iso2709),
100
        };
104
        };
101
105
102
        my $user_email = $patron->first_valid_email_address || C4::Context->preference('KohaAdminEmailAddress');
103
        C4::Letters::EnqueueLetter({
106
        C4::Letters::EnqueueLetter({
104
            letter => $letter,
107
            letter => $letter,
105
            message_transport_type => 'email',
108
            message_transport_type => 'email',
(-)a/opac/opac-sendshelf.pl (-2 / +5 lines)
Lines 73-79 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { Link Here
73
    );
73
    );
74
74
75
    my $patron = Koha::Patrons->find( $borrowernumber );
75
    my $patron = Koha::Patrons->find( $borrowernumber );
76
76
    my $user_email = $patron->first_valid_email_address;
77
    my $shelf = Koha::Virtualshelves->find( $shelfid );
77
    my $shelf = Koha::Virtualshelves->find( $shelfid );
78
    my $contents = $shelf->get_contents;
78
    my $contents = $shelf->get_contents;
79
    my $iso2709;
79
    my $iso2709;
Lines 87-92 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { Link Here
87
    if ( !defined $iso2709 ) {
87
    if ( !defined $iso2709 ) {
88
        carp "Error sending mail: empty list";
88
        carp "Error sending mail: empty list";
89
        $template->param( error => 1 );
89
        $template->param( error => 1 );
90
    } elsif ( !defined $user_email or $user_email eq '' ) {
91
        carp "Error sending mail: sender's email address is invalid";
92
        $template->param( error => 1 );
90
    } else {
93
    } else {
91
         my %loops = (
94
         my %loops = (
92
             biblio => \@biblionumbers,
95
             biblio => \@biblionumbers,
Lines 120-126 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { Link Here
120
            message_transport_type => 'email',
123
            message_transport_type => 'email',
121
            borrowernumber => $patron->borrowernumber,
124
            borrowernumber => $patron->borrowernumber,
122
            to_address => $email,
125
            to_address => $email,
123
            reply_address => $patron->first_valid_email_address,
126
            reply_address => $user_email,
124
            attachments => [$attachment],
127
            attachments => [$attachment],
125
        });
128
        });
126
129
(-)a/virtualshelves/sendshelf.pl (-2 / +5 lines)
Lines 70-75 if ($to_address) { Link Here
70
    );
70
    );
71
71
72
    my $patron = Koha:::Patrons->find( $borrowernumber );
72
    my $patron = Koha:::Patrons->find( $borrowernumber );
73
    my $user_email = $patron->first_valid_email_address;
73
    my $contents = $shelf->get_contents;
74
    my $contents = $shelf->get_contents;
74
    my @biblionumbers;
75
    my @biblionumbers;
75
    my $iso2709;
76
    my $iso2709;
Lines 83-88 if ($to_address) { Link Here
83
    if ( !defined $iso2709 ) {
84
    if ( !defined $iso2709 ) {
84
        carp "Error sending mail: empty basket";
85
        carp "Error sending mail: empty basket";
85
        $template->param( error => 1 );
86
        $template->param( error => 1 );
87
    } elsif ( !defined $user_email or $user_email eq '' ) {
88
        carp "Error sending mail: sender's email address is invalid";
89
        $template->param( error => 1 );
86
    } else {
90
    } else {
87
        my %loops = (
91
        my %loops = (
88
            biblio => \@biblionumbers,
92
            biblio => \@biblionumbers,
Lines 116-122 if ($to_address) { Link Here
116
            message_transport_type => 'email',
120
            message_transport_type => 'email',
117
            borrowernumber => $patron->borrowernumber,
121
            borrowernumber => $patron->borrowernumber,
118
            to_address => $to_address,
122
            to_address => $to_address,
119
            reply_address => $patron->first_valid_email_address,
123
            reply_address => $user_email,
120
            attachments => [$attachment],
124
            attachments => [$attachment],
121
        });
125
        });
122
126
123
- 

Return to bug 3150