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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/preview_letter.tt (-2 / +5 lines)
Lines 12-17 Link Here
12
                    [% CASE 'preview_not_available' %]Preview is not available for letters '[% m.letter_code %]'.
12
                    [% CASE 'preview_not_available' %]Preview is not available for letters '[% m.letter_code %]'.
13
                    [% CASE 'not_checked_in_yet' %]Do not forget that the issue has not been checked in yet.
13
                    [% CASE 'not_checked_in_yet' %]Do not forget that the issue has not been checked in yet.
14
                    [% CASE 'not_checked_out_yet' %]Do not forget that the issue has not been checked out yet.
14
                    [% CASE 'not_checked_out_yet' %]Do not forget that the issue has not been checked out yet.
15
                    [% CASE 'no_checkout' %]This item is not checked out.
16
                    [% CASE 'no_item_or_no_patron' %]The item or the patron does not exist.
17
                    [% CASE 'no_hold' %]No hold is placed by this patron on this bibliographic record.
15
                    [% CASE %][% m.code %]
18
                    [% CASE %][% m.code %]
16
                    [% END %]
19
                    [% END %]
17
                </div>
20
                </div>
Lines 28-34 Link Here
28
                </fieldset>
31
                </fieldset>
29
            [% END %]
32
            [% END %]
30
33
31
            [% IF tt_content %]
34
            [% IF rendered_tt_message %]
32
                <fieldset class="brief">
35
                <fieldset class="brief">
33
                    <legend>Converted version</legend>
36
                    <legend>Converted version</legend>
34
                    <pre>[% tt_content | html %]</pre>
37
                    <pre>[% tt_content | html %]</pre>
Lines 41-47 Link Here
41
            [% END %]
44
            [% END %]
42
        </div>
45
        </div>
43
46
44
        [% IF tt_content %]
47
        [% IF rendered_tt_message %]
45
            [% IF messages_are_similar %]
48
            [% IF messages_are_similar %]
46
                <div class="dialog message">The generated notices are exactly the same!</div>
49
                <div class="dialog message">The generated notices are exactly the same!</div>
47
            [% ELSE %]
50
            [% ELSE %]
(-)a/svc/letters/preview (-5 / +6 lines)
Lines 169-175 if ( $code eq 'CHECKIN' ) { Link Here
169
        push @messages, { code => 'not_checked_in_yet', type => 'message' };
169
        push @messages, { code => 'not_checked_in_yet', type => 'message' };
170
    }
170
    }
171
    else {
171
    else {
172
        warn "No checkout";
172
        push @messages, { code => 'no_checkout', type => 'alert' };
173
        $letter_params = {};
173
    }
174
    }
174
}
175
}
175
elsif ( $code eq 'CHECKOUT' ) {
176
elsif ( $code eq 'CHECKOUT' ) {
Lines 193-199 elsif ( $code eq 'CHECKOUT' ) { Link Here
193
        push @messages, { code => 'not_checked_out_yet', type => 'message' };
194
        push @messages, { code => 'not_checked_out_yet', type => 'message' };
194
    }
195
    }
195
    else {
196
    else {
196
        warn "No item or no patron";
197
        push @messages, { code => 'no_item_or_no_patron', type => 'alert' };
198
        $letter_params = {};
197
    }
199
    }
198
}
200
}
199
elsif ( $code eq 'HOLD_SLIP' ) {
201
elsif ( $code eq 'HOLD_SLIP' ) {
Lines 212-222 elsif ( $code eq 'HOLD_SLIP' ) { Link Here
212
        };
214
        };
213
    }
215
    }
214
    else {
216
    else {
215
        warn "No hold placed by this patron on this bibliographic record.";
217
        push @messages, { code => 'no_hold', type => 'alert' };
218
        $letter_params = {};
216
    }
219
    }
217
}
220
}
218
else {
221
else {
219
    warn "Preview for letter code $code is not available";
220
    push @messages, { type => 'alert', code => 'preview_not_available', letter_code => $code, };
222
    push @messages, { type => 'alert', code => 'preview_not_available', letter_code => $code, };
221
}
223
}
222
224
223
- 

Return to bug 17981