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

(-)a/basket/sendbasket.pl (-5 / +11 lines)
Lines 112-133 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
        $mail{subject} = $1;
117
        $mail{subject} =~ s|\n?(.*)\n?|$1|;
117
    }
118
    }
118
    else { $mail{'subject'} = "no subject"; }
119
    else { $mail{'subject'} = "no subject"; }
119
120
120
    my $email_header = "";
121
    my $email_header = "";
121
    if ( $template_res =~ /<HEADER>\n(.*)\n<END_HEADER>/s ) {
122
    if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
122
        $email_header = $1;
123
        $email_header = $1;
124
        $email_header =~ s|\n?(.*)\n?|$1|;
123
    }
125
    }
124
126
125
    my $email_file = "basket.txt";
127
    my $email_file = "basket.txt";
126
    if ( $template_res =~ /<FILENAME>\n(.*)\n<END_FILENAME>/s ) {
128
    if ( $template_res =~ /<FILENAME>(.*)<END_FILENAME>/s ) {
127
        $email_file = $1;
129
        $email_file = $1;
130
        $email_file =~ s|\n?(.*)\n?|$1|;
128
    }
131
    }
129
132
130
    if ( $template_res =~ /<MESSAGE>\n(.*)\n<END_MESSAGE>/s ) { $body = encode_qp($1); }
133
    if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
134
        $body = encode_qp($1);
135
        $body =~ s|\n?(.*)\n?|$1|;
136
    }
131
137
132
    my $boundary = "====" . time() . "====";
138
    my $boundary = "====" . time() . "====";
133
139
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt (-30 / +145 lines)
Lines 2-42 Link Here
2
Your cart
2
Your cart
3
<END_SUBJECT>
3
<END_SUBJECT>
4
4
5
[% USE HtmlToText %]
6
[% myhtml FILTER html2text(leftmargin => 0, rightmargin => 0) %]
7
[% myhtmltext | html2text %]
8
5
<HEADER>
9
<HEADER>
6
Hi,
7
10
8
Here is your cart, sent from our online catalog.
11
[% FILTER html2text %]
12
    <p>Hi,</p>
13
14
    <p>Here is your cart, sent from our online catalog.</p>
9
15
10
Please note that the attached file is a MARC bibliographic records file
16
    <p>Please note that the attached file is a MARC bibliographic records file
11
which can be imported into a Personal Bibliographic Software like EndNote,
17
    which can be imported into personal bibliographic software like EndNote,
12
Reference Manager or ProCite.
18
    Reference Manager or ProCite.</p>
19
    <hr/>
20
[% END %]
13
<END_HEADER>
21
<END_HEADER>
14
22
15
<MESSAGE>
23
<MESSAGE>
16
---------------------------------------------
24
[% FILTER html2text %]
17
[% IF ( comment ) %]
25
18
[% comment %]
26
    [% IF comment %]
19
[% END %]
27
        <p>[% comment %]</p>
20
[% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %][% BIBLIO_RESULT.title %][% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %][% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
28
        <hr/>
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 ) %]
29
    [% END %]
22
ISBN: [% BIBLIO_RESULT.ISBN %][% END %]
30
    <ol>
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 ) %]
31
    [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
24
Collection: [% BIBLIO_RESULT.seriestitle %][% END %][% IF ( BIBLIO_RESULT.subject ) %]
32
        <li>
25
Subject: [% BIBLIO_RESULT.subject %][% END %][% IF ( BIBLIO_RESULT.copyrightdate ) %]
33
            <span>
26
Copyright year: [% BIBLIO_RESULT.copyrightdate %][% END %][% IF ( BIBLIO_RESULT.notes ) %]
34
                [% BIBLIO_RESULT.title %]
27
Notes : [% BIBLIO_RESULT.notes %][% END %][% IF ( BIBLIO_RESULT.unititle ) %]
35
                [% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle %][% END %]
28
Unified title: [% BIBLIO_RESULT.unititle %][% END %][% IF ( BIBLIO_RESULT.serial ) %]
36
            </span>
29
Serial: [% BIBLIO_RESULT.serial %][% END %][% IF ( BIBLIO_RESULT.dewey ) %]
37
30
Dewey: [% BIBLIO_RESULT.dewey %][% END %][% IF ( BIBLIO_RESULT.classification ) %]
38
            <p>
31
Classification: [% BIBLIO_RESULT.classification %][% END %][% IF ( BIBLIO_RESULT.lccn ) %]
39
            [% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
32
LCCN: [% BIBLIO_RESULT.lccn %][% END %][% IF ( BIBLIO_RESULT.url ) %]
40
            <span>Author(s): [% IF ( BIBLIO_RESULT.author ) %][% BIBLIO_RESULT.author %][% END %]
33
url : [% BIBLIO_RESULT.url %][% END %]
41
34
In the online catalog:
42
            [% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
35
[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber |url %]
43
                [% IF ( BIBLIO_RESULT.author ) %]; [% END %]
36
Items : [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
44
                [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %]
37
	[% ITEM_RESULT.branchname %] [% ITEM_RESULT.location %] [% IF ( ITEM_RESULT.itemcallnumber ) %]([% ITEM_RESULT.itemcallnumber %])[% END %] [% ITEM_RESULT.barcode %][% END %]
45
                    [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
38
46
                        [% MARCAUTHOR_SUBFIELDS_LOO.separator %][% MARCAUTHOR_SUBFIELDS_LOO.value %]
39
---------------------------------------------
47
                    [% END %]
48
                    [% UNLESS ( loop.last ) %];[% END %]
49
                [% END %]
50
            [% END %]
51
            </span><br/>
52
            [% END %]
53
54
            [% IF ( BIBLIO_RESULT.ISBN ) %]
55
            <span>
56
                ISBN: [% BIBLIO_RESULT.ISBN %]
57
            </span><br/>
58
            [% END %]
59
60
            [% IF BIBLIO_RESULT.publishercode %]
61
            <span>
62
                Published by: [% BIBLIO_RESULT.publishercode %]
63
                [% IF ( BIBLIO_RESULT.publicationyear ) %]
64
                    in [% BIBLIO_RESULT.publicationyear %]
65
                [% END %]
66
                [% IF ( BIBLIO_RESULT.pages ) %]
67
                    , [% BIBLIO_RESULT.pages %]
68
                [% END %]
69
                [% IF BIBLIO_RESULT.size %]
70
                , [% BIBLIO_RESULT.size %]
71
                [% END %]
72
            </span><br/>
73
            [% END %]
74
75
            [% IF BIBLIO_RESULT.collection %]
76
            <span>
77
                Collection: [% BIBLIO_RESULT.seriestitle %]
78
            </span><br/>
79
            [% END %]
80
81
            [% IF ( BIBLIO_RESULT.subject ) %]
82
            <span>
83
                Subject: [% BIBLIO_RESULT.subject %]
84
            <span><br/>
85
            [% END %]
86
87
            [% IF ( BIBLIO_RESULT.copyrightdate ) %]
88
            <span>
89
                Copyright year: [% BIBLIO_RESULT.copyrightdate %]
90
            </span><br/>
91
            [% END %]
92
93
            [% IF ( BIBLIO_RESULT.notes ) %]
94
            <span>
95
                Notes : [% BIBLIO_RESULT.notes %]
96
            </span><br/>
97
            [% END %]
98
99
            [% IF ( BIBLIO_RESULT.unititle ) %]
100
            <span>
101
                Unified title: [% BIBLIO_RESULT.unititle %]
102
            </span><br/>
103
            [% END %]
104
105
            [% IF ( BIBLIO_RESULT.serial ) %]
106
            <span>
107
                Serial: [% BIBLIO_RESULT.serial %]
108
            </span><br/>
109
            [% END %]
110
111
            [% IF ( BIBLIO_RESULT.dewey ) %]
112
            <span>
113
                Dewey: [% BIBLIO_RESULT.dewey %]
114
            </span><br/>
115
            [% END %]
116
117
            [% IF ( BIBLIO_RESULT.classification ) %]
118
            <span>
119
                Classification: [% BIBLIO_RESULT.classification %]
120
            </span><br/>
121
            [% END %]
122
123
            [% IF ( BIBLIO_RESULT.lccn ) %]
124
            <span>
125
                LCCN: [% BIBLIO_RESULT.lccn %]
126
            </span><br/>
127
            [% END %]
128
            [% IF ( BIBLIO_RESULT.url ) %]
129
            <span>
130
                URL: [% BIBLIO_RESULT.url |url %]
131
            </span>
132
            [% END %]
133
            </p>
134
135
            [% IF ( OPACBaseURL ) %]
136
            <p>
137
                In online catalog: [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber %]
138
            </p>
139
            [% END %]
140
            [% IF ( BIBLIO_RESULT.ITEM_RESULTS.size ) %]
141
            <p>Items:
142
            <ul>
143
                [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]<li>
144
                    [% ITEM_RESULT.branchname %]
145
                    [% ITEM_RESULT.location %]
146
                    [% IF ITEM_RESULT.itemcallnumber %]([% ITEM_RESULT.itemcallnumber %])[% END %]
147
                    [% ITEM_RESULT.barcode %]
148
                </li>[% END %]
149
            </ul>
150
            </p>
151
            [% END %]
152
            <hr/>
153
        </li>
154
    [% END %]
155
    </ol>
40
156
41
[% END %]
157
[% END %]
42
<END_MESSAGE>
158
<END_MESSAGE>
43
- 

Return to bug 9218