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

(-)a/basket/sendbasket.pl (-2 / +5 lines)
Lines 55-61 if ( $email_add ) { Link Here
55
            token  => scalar $query->param('csrf_token'),
55
            token  => scalar $query->param('csrf_token'),
56
        });
56
        });
57
57
58
    my $patron = Koha:::Patrons->find( $borrowernumber );
58
    my $patron = Koha::Patrons->find( $borrowernumber );
59
    my $user_email = $patron->first_valid_email_address;
59
60
60
    my $comment = $query->param('comment');
61
    my $comment = $query->param('comment');
61
62
Lines 70-75 if ( $email_add ) { Link Here
70
    if ( !defined $iso2709 ) {
71
    if ( !defined $iso2709 ) {
71
        carp "Error sending mail: empty basket";
72
        carp "Error sending mail: empty basket";
72
        $template->param( error => 1 );
73
        $template->param( error => 1 );
74
    } elsif ( !defined $user_email or $user_email eq '' ) {
75
        carp "Error sending mail: sender's email address is invalid";
76
        $template->param( error => 1 );
73
    } else {
77
    } else {
74
        my %loops = (
78
        my %loops = (
75
            biblio => \@bibs,
79
            biblio => \@bibs,
Lines 97-103 if ( $email_add ) { Link Here
97
            content => Encode::encode("UTF-8", $iso2709),
101
            content => Encode::encode("UTF-8", $iso2709),
98
        };
102
        };
99
103
100
        my $user_email = $patron->first_valid_email_address || C4::Context->preference('KohaAdminEmailAddress');
101
        C4::Letters::EnqueueLetter({
104
        C4::Letters::EnqueueLetter({
102
            letter => $letter,
105
            letter => $letter,
103
            message_transport_type => 'email',
106
            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 1750-1983 tables: Link Here
1750
          code: LIST
1750
          code: LIST
1751
          branchcode: ""
1751
          branchcode: ""
1752
          name: "Send list"
1752
          name: "Send list"
1753
          is_html: 1
1753
          is_html: 0
1754
          title: "Your list: [% listname | html %]"
1754
          title: "Your list: [% listname | html %]"
1755
          message_transport_type: email
1755
          message_transport_type: email
1756
          lang: default
1756
          lang: default
1757
          content:
1757
          content:
1758
            - "<p>Hi,</p>"
1758
            - "Hi,"
1759
            - "<p>[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %].</p>"
1759
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %]."
1760
            - "<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>"
1760
            - "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."
1761
            - "<hr/>"
1761
            - "<hr/>[% comment | html %]<hr/>"
1762
            - "<p>[% comment | html %]</p>"
1762
            - "<ol>[% FOREACH biblio IN biblios %]<li>"
1763
            - "<hr/>"
1764
            - "<ol>"
1765
            - "[% FOREACH biblio IN biblios %]"
1766
            - "<li>"
1767
            - "<span>"
1768
            - "[% biblio.title | html %]"
1763
            - "[% biblio.title | html %]"
1769
            - "[% IF ( biblio.subtitle ) %]"
1764
- "[% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% biblio.part_number | html %] [% biblio.part_name | html %]"
1770
            - "[% FOREACH subtitle IN biblio.subtitle.split(' | ') %]"
1765
            - "[% 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 %]"
1771
            - "[% subtitle | html %]"
1766
            - "[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %]"
1772
            - "[% END %]"
1767
            - "[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %]"
1773
            - "[% END %]"
1768
            - "[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %]"
1774
            - "[% biblio.part_number | html %] [% biblio.part_name | html %]"
1769
            - "[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %]"
1775
            - "</span>"
1770
            - "[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %]"
1776
            - "<p>"
1771
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %]"
1777
            - "[% IF ( biblio.author || biblio.get_authors_from_MARC ) %]"
1772
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %]"
1778
            - "<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %]"
1773
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %]"
1779
            - "[% IF ( biblio.get_authors_from_MARC ) %]"
1774
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %]"
1780
            - "[% IF ( biblio.author ) %]; [% END %]"
1775
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %]"
1781
            - "[% FOREACH author IN biblio.get_authors_from_MARC %]"
1776
            - "[% 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 %]"
1782
            - "[% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]"
1777
            - "<hr/></li>[% END %]</ol>"
1783
            - "[% subfield.separator | html %][% subfield.value | html %]"
1784
            - "[% END %]"
1785
            - "[% UNLESS ( loop.last ) %];[% END %]"
1786
            - "[% END %]"
1787
            - "[% END %]"
1788
            - "</span><br/>"
1789
            - "[% END %]"
1790
            - "[% SET biblioitem = biblio.biblioitem %]"
1791
            - "[% IF ( biblioitem.isbn ) %]"
1792
            - "<span>"
1793
            - "ISBN: [% FOREACH isbn IN biblioitem.isbn %]"
1794
            - "[% isbn | html %]"
1795
            - "[% UNLESS ( loop.last ) %]; [% END %]"
1796
            - "[% END %]"
1797
            - "</span><br/>"
1798
            - "[% END %]"
1799
            - "[% IF ( biblioitem.publishercode ) %]"
1800
            - "<span>"
1801
            - "Published by: [% biblioitem.publishercode | html %]"
1802
            - "[% IF ( biblioitem.publicationyear ) %]"
1803
            - "in [% biblioitem.publicationyear | html %]"
1804
            - "[% END %]"
1805
            - "[% IF ( biblioitem.pages ) %]"
1806
            - ", [% biblioitem.pages | html %]"
1807
            - "[% END %]"
1808
            - "</span><br/>"
1809
            - "[% END %]"
1810
            - "[% IF ( biblio.seriestitle ) %]"
1811
            - "<span>"
1812
            - "Collection: [% biblio.seriestitle | html %]"
1813
            - "</span><br/>"
1814
            - "[% END %]"
1815
            - "[% IF ( biblio.copyrightdate ) %]"
1816
            - "<span>"
1817
            - "Copyright year: [% biblio.copyrightdate | html %]"
1818
            - "</span><br/>"
1819
            - "[% END %]"
1820
            - "[% IF ( biblio.notes ) %]"
1821
            - "<span>"
1822
            - "Notes: [% biblio.notes | html %]"
1823
            - "</span><br/>"
1824
            - "[% END %]"
1825
            - "[% IF ( biblio.unititle ) %]"
1826
            - "<span>"
1827
            - "Unified title: [% biblio.unititle | html %]"
1828
            - "</span><br/>"
1829
            - "[% END %]"
1830
            - "[% IF ( biblio.serial ) %]"
1831
            - "<span>"
1832
            - "Serial: [% biblio.serial | html %]"
1833
            - "</span><br/>"
1834
            - "[% END %]"
1835
            - "[% IF ( biblioitem.lccn ) %]"
1836
            - "<span>"
1837
            - "LCCN: [% biblioitem.lccn | html %]"
1838
            - "</span><br/>"
1839
            - "[% END %]"
1840
            - "[% IF ( biblioitem.url ) %]"
1841
            - "<span>"
1842
            - "URL: [% biblioitem.url | html %]"
1843
            - "</span>"
1844
            - "[% END %]"
1845
            - "</p>"
1846
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]"
1847
            - "[% IF ( OPACBaseURL ) %]"
1848
            - "<p>In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>"
1849
            - "[% END %]"
1850
            - "[% IF ( biblio.items.count > 0 ) %]"
1851
            - "<p>Items:"
1852
            - "<ul>"
1853
            - "[% FOREACH item IN biblio.items %]<li>"
1854
            - "[% item.holding_branch.branchname | html %]"
1855
            - "[% item.location | html %]"
1856
            - "[% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %]"
1857
            - "[% item.barcode | html %]"
1858
            - "</li>[% END %]"
1859
            - "</ul>"
1860
            - "</p>"
1861
            - "[% END %]"
1862
            - "<hr/>"
1863
            - "</li>"
1864
            - "[% END %]"
1865
            - "</ol>"
1866
1778
1867
        - module: catalog
1779
        - module: catalog
1868
          code: CART
1780
          code: CART
1869
          branchcode: ""
1781
          branchcode: ""
1870
          name: "Send cart"
1782
          name: "Send cart"
1871
          is_html: 1
1783
          is_html: 0
1872
          title: "Your cart"
1784
          title: "Your cart"
1873
          message_transport_type: email
1785
          message_transport_type: email
1874
          lang: default
1786
          lang: default
1875
          content:
1787
          content:
1876
            - "<p>Hi,</p>"
1788
            - "Hi,"
1877
            - "<p>[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog.</p>"
1789
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog."
1878
            - "<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>"
1790
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %]."
1879
            - "<hr/>"
1791
            - "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."
1880
            - "<p>[% comment | html %]</p>"
1792
            - "<hr/>[% comment | html %]<hr/>"
1881
            - "<hr/>"
1793
            - "<ol>[% FOREACH biblio IN biblios %]<li>"
1882
            - "<ol>"
1883
            - "[% FOREACH biblio IN biblios %]"
1884
            - "<li>"
1885
            - "<span>"
1886
            - "[% biblio.title | html %]"
1794
            - "[% biblio.title | html %]"
1887
            - "[% IF ( biblio.subtitle ) %]"
1795
- "[% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% biblio.part_number | html %] [% biblio.part_name | html %]"
1888
            - "[% FOREACH subtitle IN biblio.subtitle.split(' | ') %]"
1796
            - "[% 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 %]"
1889
            - "[% subtitle | html %]"
1797
            - "[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %]"
1890
            - "[% END %]"
1798
            - "[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %]"
1891
            - "[% END %]"
1799
            - "[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %]"
1892
            - "[% biblio.part_number | html %] [% biblio.part_name | html %]"
1800
            - "[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %]"
1893
            - "</span>"
1801
            - "[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %]"
1894
            - "<p>"
1802
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %]"
1895
            - "[% IF ( biblio.author || biblio.get_authors_from_MARC ) %]"
1803
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %]"
1896
            - "<span>Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %]"
1804
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %]"
1897
            - "[% IF ( biblio.get_authors_from_MARC ) %]"
1805
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %]"
1898
            - "[% IF ( biblio.author ) %]; [% END %]"
1806
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %]"
1899
            - "[% FOREACH author IN biblio.get_authors_from_MARC %]"
1807
            - "[% 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 %]"
1900
            - "[% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %]"
1808
            - "<hr/></li>[% END %]</ol>"
1901
            - "[% subfield.separator | html %][% subfield.value | html %]"
1902
            - "[% END %]"
1903
            - "[% UNLESS ( loop.last ) %];[% END %]"
1904
            - "[% END %]"
1905
            - "[% END %]"
1906
            - "</span><br/>"
1907
            - "[% END %]"
1908
            - "[% SET biblioitem = biblio.biblioitem %]"
1909
            - "[% IF ( biblioitem.isbn ) %]"
1910
            - "<span>"
1911
            - "ISBN: [% FOREACH isbn IN biblioitem.isbn %]"
1912
            - "[% isbn | html %]"
1913
            - "[% UNLESS ( loop.last ) %]; [% END %]"
1914
            - "[% END %]"
1915
            - "</span><br/>"
1916
            - "[% END %]"
1917
            - "[% IF ( biblioitem.publishercode ) %]"
1918
            - "<span>"
1919
            - "Published by: [% biblioitem.publishercode | html %]"
1920
            - "[% IF ( biblioitem.publicationyear ) %]"
1921
            - "in [% biblioitem.publicationyear | html %]"
1922
            - "[% END %]"
1923
            - "[% IF ( biblioitem.pages ) %]"
1924
            - ", [% biblioitem.pages | html %]"
1925
            - "[% END %]"
1926
            - "</span><br/>"
1927
            - "[% END %]"
1928
            - "[% IF ( biblio.seriestitle ) %]"
1929
            - "<span>"
1930
            - "Collection: [% biblio.seriestitle | html %]"
1931
            - "</span><br/>"
1932
            - "[% END %]"
1933
            - "[% IF ( biblio.copyrightdate ) %]"
1934
            - "<span>"
1935
            - "Copyright year: [% biblio.copyrightdate | html %]"
1936
            - "</span><br/>"
1937
            - "[% END %]"
1938
            - "[% IF ( biblio.notes ) %]"
1939
            - "<span>"
1940
            - "Notes: [% biblio.notes | html %]"
1941
            - "</span><br/>"
1942
            - "[% END %]"
1943
            - "[% IF ( biblio.unititle ) %]"
1944
            - "<span>"
1945
            - "Unified title: [% biblio.unititle | html %]"
1946
            - "</span><br/>"
1947
            - "[% END %]"
1948
            - "[% IF ( biblio.serial ) %]"
1949
            - "<span>"
1950
            - "Serial: [% biblio.serial | html %]"
1951
            - "</span><br/>"
1952
            - "[% END %]"
1953
            - "[% IF ( biblioitem.lccn ) %]"
1954
            - "<span>"
1955
            - "LCCN: [% biblioitem.lccn | html %]"
1956
            - "</span><br/>"
1957
            - "[% END %]"
1958
            - "[% IF ( biblioitem.url ) %]"
1959
            - "<span>"
1960
            - "URL: [% biblioitem.url | html %]"
1961
            - "</span>"
1962
            - "[% END %]"
1963
            - "</p>"
1964
            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %]"
1965
            - "[% IF ( OPACBaseURL ) %]"
1966
            - "<p>In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]</p>"
1967
            - "[% END %]"
1968
            - "[% IF ( biblio.items.count > 0 ) %]"
1969
            - "<p>Items:"
1970
            - "<ul>"
1971
            - "[% FOREACH item IN biblio.items %]<li>"
1972
            - "[% item.holding_branch.branchname | html %]"
1973
            - "[% item.location | html %]"
1974
            - "[% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %]"
1975
            - "[% item.barcode | html %]"
1976
            - "</li>[% END %]"
1977
            - "</ul>"
1978
            - "</p>"
1979
            - "[% END %]"
1980
            - "<hr/>"
1981
            - "</li>"
1982
            - "[% END %]"
1983
            - "</ol>"
(-)a/opac/opac-sendbasket.pl (-1 / +4 lines)
Lines 55-60 if ( $email_add ) { Link Here
55
    });
55
    });
56
56
57
    my $patron = Koha::Patrons->find( $borrowernumber );
57
    my $patron = Koha::Patrons->find( $borrowernumber );
58
    my $user_email = $patron->first_valid_email_address;
58
59
59
    my $comment    = $query->param('comment');
60
    my $comment    = $query->param('comment');
60
61
Lines 68-73 if ( $email_add ) { Link Here
68
    if ( !defined $iso2709 ) {
69
    if ( !defined $iso2709 ) {
69
        carp "Error sending mail: empty basket";
70
        carp "Error sending mail: empty basket";
70
        $template->param( error => 1 );
71
        $template->param( error => 1 );
72
    } elsif ( !defined $user_email or $user_email eq '' ) {
73
        carp "Error sending mail: sender's email address is invalid";
74
        $template->param( error => 1 );
71
    } else {
75
    } else {
72
        my %loops = (
76
        my %loops = (
73
            biblio => \@bibs,
77
            biblio => \@bibs,
Lines 95-101 if ( $email_add ) { Link Here
95
            content => Encode::encode("UTF-8", $iso2709),
99
            content => Encode::encode("UTF-8", $iso2709),
96
        };
100
        };
97
101
98
        my $user_email = $patron->first_valid_email_address || C4::Context->preference('KohaAdminEmailAddress');
99
        C4::Letters::EnqueueLetter({
102
        C4::Letters::EnqueueLetter({
100
            letter => $letter,
103
            letter => $letter,
101
            message_transport_type => 'email',
104
            message_transport_type => 'email',
(-)a/opac/opac-sendshelf.pl (-2 / +5 lines)
Lines 70-76 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { Link Here
70
    );
70
    );
71
71
72
    my $patron = Koha::Patrons->find( $borrowernumber );
72
    my $patron = Koha::Patrons->find( $borrowernumber );
73
73
    my $user_email = $patron->first_valid_email_address;
74
    my $shelf = Koha::Virtualshelves->find( $shelfid );
74
    my $shelf = Koha::Virtualshelves->find( $shelfid );
75
    my $contents = $shelf->get_contents;
75
    my $contents = $shelf->get_contents;
76
    my $iso2709;
76
    my $iso2709;
Lines 84-89 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { Link Here
84
    if ( !defined $iso2709 ) {
84
    if ( !defined $iso2709 ) {
85
        carp "Error sending mail: empty list";
85
        carp "Error sending mail: empty list";
86
        $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 );
87
    } else {
90
    } else {
88
         my %loops = (
91
         my %loops = (
89
             biblio => \@biblionumbers,
92
             biblio => \@biblionumbers,
Lines 117-123 if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) { Link Here
117
            message_transport_type => 'email',
120
            message_transport_type => 'email',
118
            borrowernumber => $patron->borrowernumber,
121
            borrowernumber => $patron->borrowernumber,
119
            to_address => $email,
122
            to_address => $email,
120
            reply_address => $patron->first_valid_email_address,
123
            reply_address => $user_email,
121
            attachments => [$attachment],
124
            attachments => [$attachment],
122
        });
125
        });
123
126
(-)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