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

(-)a/basket/sendbasket.pl (-14 / +23 lines)
Lines 112-144 if ( $email_add ) { Link Here
112
    my $body;
112
    my $body;
113
113
114
    # Analysing information and getting mail properties
114
    # Analysing information and getting mail properties
115
    if ( $template_res =~ /<SUBJECT>\n(.*)\n<END_SUBJECT>/s ) {
115
    if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) {
116
        $mail{'subject'} = $1;
116
        my $subject = $1;
117
        $subject =~ s/\n?(.*)\n?/$1/;
118
        $mail{'subject'} = $subject;
117
    }
119
    }
118
    else { $mail{'subject'} = "no subject"; }
120
    else { $mail{'subject'} = "no subject"; }
119
121
120
    my $email_header = "";
122
    my $email_header = "";
121
    if ( $template_res =~ /<HEADER>\n(.*)\n<END_HEADER>/s ) {
123
    if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
122
        $email_header = $1;
124
        my $tmp_header = $1;
125
        $tmp_header =~ s|\n||g;
126
        $email_header = $tmp_header;
127
        while ($tmp_header =~ m|(<PARAGRAPH>)(.*?)(</PARAGRAPH>)|gs) {
128
            my $text = $2;
129
            $email_header =~ s|<PARAGRAPH>\Q$text\E</PARAGRAPH>|$text\n|;
130
        }
123
    }
131
    }
124
132
125
    my $email_file = "basket.txt";
133
    my $email_file = "basket.txt";
126
    if ( $template_res =~ /<FILENAME>\n(.*)\n<END_FILENAME>/s ) {
134
    if ( $template_res =~ /<FILENAME>(.*)<END_FILENAME>/s ) {
127
        $email_file = $1;
135
        $email_file = $1;
136
        $email_file =~ s/\n?(.*)\n?/$1/;
128
    }
137
    }
129
138
130
    if ( $template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s ) { $body = encode_qp($1); }
139
    if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
140
        my $tmp_body = $1;
141
        $tmp_body =~ s|\n||g;
142
        $body = $tmp_body;
143
        while ($tmp_body =~ m|(<PARAGRAPH>)(.*?)(</PARAGRAPH>)|gs) {
144
            my $text = $2;
145
            $body =~ s|<PARAGRAPH>\Q$text\E</PARAGRAPH>|$text\n|;
146
        }
147
    }
131
148
132
    my $boundary = "====" . time() . "====";
149
    my $boundary = "====" . time() . "====";
133
150
134
    #     $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
135
    #
136
    #     $email_header = encode_qp($email_header);
137
    #
138
    #     $boundary = "--".$boundary;
139
    #
140
    #     # Writing mail
141
    #     $mail{body} =
142
    $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
151
    $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
143
    my $isofile = encode_base64(encode("UTF-8", $iso2709));
152
    my $isofile = encode_base64(encode("UTF-8", $iso2709));
144
    $boundary = '--' . $boundary;
153
    $boundary = '--' . $boundary;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt (-30 / +33 lines)
Lines 3-42 Your cart Link Here
3
<END_SUBJECT>
3
<END_SUBJECT>
4
4
5
<HEADER>
5
<HEADER>
6
Hi,
6
<PARAGRAPH>Hi,</PARAGRAPH>
7
7
<PARAGRAPH>Here is your cart, sent from our online catalog.</PARAGRAPH>
8
Here is your cart, sent from our online catalog.
8
<PARAGRAPH></PARAGRAPH>
9
9
<PARAGRAPH>Please note that the attached file is a MARC bibliographic records file
10
Please note that the attached file is a MARC bibliographic records file
11
which can be imported into a Personal Bibliographic Software like EndNote,
10
which can be imported into a Personal Bibliographic Software like EndNote,
12
Reference Manager or ProCite.
11
Reference Manager or ProCite.</PARAGRAPH>
13
<END_HEADER>
12
<END_HEADER>
14
13
15
<MESSAGE>
14
<MESSAGE>
16
---------------------------------------------
15
<PARAGRAPH></PARAGRAPH>
16
<PARAGRAPH>---------------------------------------------</PARAGRAPH>
17
<PARAGRAPH></PARAGRAPH>
17
[% IF ( comment ) %]
18
[% IF ( comment ) %]
18
[% comment %]
19
<PARAGRAPH>[% comment %]</PARAGRAPH>
19
[% END %]
20
[% END %]
20
[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %][% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
21
<PARAGRAPH></PARAGRAPH>
21
Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author %][% END %][% IF ( BIBLIO_RESULT.MARCAUTHORS ) %][% IF ( BIBLIO_RESULT.author ) %]; [% END %][% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %][% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %][% END %][% END %][% END %][% END %][% IF ( BIBLIO_RESULT.ISBN ) %]
22
[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
22
ISBN: [% BIBLIO_RESULT.ISBN %][% END %]
23
<PARAGRAPH>[% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %]</PARAGRAPH>
23
[% IF ( BIBLIO_RESULT.publishercode ) %]Published by: [% BIBLIO_RESULT.publishercode %][% END %][% IF ( BIBLIO_RESULT.publicationyear ) %] in [% END %][% BIBLIO_RESULT.publicationyear %][% IF ( BIBLIO_RESULT.pages ) %], [% END %][% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.size ) %], [% END %][% BIBLIO_RESULT.size %][% IF ( BIBLIO_RESULT.collection ) %]
24
[% IF ( BIBLIO_RESULT.HASAUTHORS ) %]<PARAGRAPH>Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author %][% END %][% IF ( BIBLIO_RESULT.MARCAUTHORS ) %][% IF ( BIBLIO_RESULT.author ) %]; [% END %][% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %][% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% MARCAUTHOR_SUBFIELDS_LOO.separator %][% MARCAUTHOR_SUBFIELDS_LOO.value %][% END %][% UNLESS ( loop.last ) %]; [% ELSE %][% END %][% END %][% END %]</PARAGRAPH>[% END %]
24
Collection: [% BIBLIO_RESULT.seriestitle %][% END %][% IF ( BIBLIO_RESULT.subject ) %]
25
[% IF ( BIBLIO_RESULT.ISBN ) %]<PARAGRAPH>ISBN: [% BIBLIO_RESULT.ISBN %]</PARAGRAPH>[% END %]
25
Subject: [% BIBLIO_RESULT.subject %][% END %][% IF ( BIBLIO_RESULT.copyrightdate ) %]
26
<PARAGRAPH>[% IF ( BIBLIO_RESULT.publishercode ) %]Published by: [% BIBLIO_RESULT.publishercode %][% END %][% IF ( BIBLIO_RESULT.publicationyear ) %] in [% END %][% BIBLIO_RESULT.publicationyear %][% IF ( BIBLIO_RESULT.pages ) %], [% END %][% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.size ) %], [% END %][% BIBLIO_RESULT.size %]</PARAGRAPH>
26
Copyright year: [% BIBLIO_RESULT.copyrightdate %][% END %][% IF ( BIBLIO_RESULT.notes ) %]
27
[% IF ( BIBLIO_RESULT.collection ) %]<PARAGRAPH>Collection: [% BIBLIO_RESULT.seriestitle %]</PARAGRAPH>[% END %]
27
Notes : [% BIBLIO_RESULT.notes %][% END %][% IF ( BIBLIO_RESULT.unititle ) %]
28
[% IF ( BIBLIO_RESULT.subject ) %]<PARAGRAPH>Subject: [% BIBLIO_RESULT.subject %]</PARAGRAPH>[% END %]
28
Unified title: [% BIBLIO_RESULT.unititle %][% END %][% IF ( BIBLIO_RESULT.serial ) %]
29
[% IF ( BIBLIO_RESULT.copyrightdate ) %]<PARAGRAPH>Copyright year: [% BIBLIO_RESULT.copyrightdate %]</PARAGRAPH>[% END %]
29
Serial: [% BIBLIO_RESULT.serial %][% END %][% IF ( BIBLIO_RESULT.dewey ) %]
30
[% IF ( BIBLIO_RESULT.notes ) %]<PARAGRAPH>Notes : [% BIBLIO_RESULT.notes %]</PARAGRAPH>[% END %]
30
Dewey: [% BIBLIO_RESULT.dewey %][% END %][% IF ( BIBLIO_RESULT.classification ) %]
31
[% IF ( BIBLIO_RESULT.unititle ) %]<PARAGRAPH>Unified title: [% BIBLIO_RESULT.unititle %][% END %]
31
Classification: [% BIBLIO_RESULT.classification %][% END %][% IF ( BIBLIO_RESULT.lccn ) %]
32
[% IF ( BIBLIO_RESULT.serial ) %]<PARAGRAPH>Serial: [% BIBLIO_RESULT.serial %]</PARAGRAPH>[% END %]
32
LCCN: [% BIBLIO_RESULT.lccn %][% END %][% IF ( BIBLIO_RESULT.url ) %]
33
[% IF ( BIBLIO_RESULT.dewey ) %]<PARAGRAPH>Dewey: [% BIBLIO_RESULT.dewey %]</PARAGRAPH>[% END %]
33
url : [% BIBLIO_RESULT.url %][% END %]
34
[% IF ( BIBLIO_RESULT.classification ) %]<PARAGRAPH>Classification: [% BIBLIO_RESULT.classification %]</PARAGRAPH>[% END %]
34
In the online catalog:
35
[% IF ( BIBLIO_RESULT.lccn ) %]<PARAGRAPH>LCCN: [% BIBLIO_RESULT.lccn %]</PARAGRAPH>[% END %]
35
[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %]
36
[% IF ( BIBLIO_RESULT.url ) %]<PARAGRAPH>url : [% BIBLIO_RESULT.url %]</PARAGRAPH>[% END %]
36
Items : [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
37
<PARAGRAPH>In the online catalog:</PARAGRAPH>
37
	[% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %][% END %]
38
<PARAGRAPH>[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %]</PARAGRAPH>
38
39
<PARAGRAPH>Items : </PARAGRAPH>
39
---------------------------------------------
40
[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
40
41
<PARAGRAPH>	[% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %]</PARAGRAPH>
42
[% END %]
43
<PARAGRAPH>---------------------------------------------</PARAGRAPH>
44
<PARAGRAPH></PARAGRAPH>
41
[% END %]
45
[% END %]
42
<END_MESSAGE>
46
<END_MESSAGE>
43
- 

Return to bug 9218