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

(-)a/Koha/Notice/Message.pm (+34 lines)
Lines 32-37 Koha::Notice::Message - Koha notice message Object class, related to the message Link Here
32
32
33
=cut
33
=cut
34
34
35
=head3 html_content
36
37
  my $wrapped_content = $message->html_content;
38
39
This method returns the message content approprately wrapped 
40
with html headers and css includes for html formatted notices.
41
42
=cut
43
44
sub html_content {
45
    my ($self) = @_;
46
47
    my $title = $self->subject;
48
    my $content = $self->content;
49
    my $css = C4::Context->preference("NoticeCSS") || '';
50
    $css = qq{<link rel="stylesheet" type="text/css" href="$css">} if $css;
51
52
    return <<EOS;
53
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
54
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
55
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
56
  <head>
57
    <title>$title</title>
58
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
59
    $css
60
  </head>
61
  <body>
62
  $content
63
  </body>
64
</html>
65
EOS
66
67
}
68
35
=head3 type
69
=head3 type
36
70
37
=cut
71
=cut
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt (-2 / +1 lines)
Lines 67-73 Link Here
67
                                            <td>
67
                                            <td>
68
                                                <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id | html %]" href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | uri %]&amp;noticeid=[% QUEUED_MESSAGE.message_id | uri %]">[% QUEUED_MESSAGE.subject | html %]</a>
68
                                                <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id | html %]" href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | uri %]&amp;noticeid=[% QUEUED_MESSAGE.message_id | uri %]">[% QUEUED_MESSAGE.subject | html %]</a>
69
                                                [% IF QUEUED_MESSAGE.content_type.search('html') %]
69
                                                [% IF QUEUED_MESSAGE.content_type.search('html') %]
70
                                                <iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.content | html %]"></iframe>
70
                                                <iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.html_content | html %]"></iframe>
71
                                                [% ELSE %]
71
                                                [% ELSE %]
72
                                                <iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.content | html | html_line_break %]"></iframe>
72
                                                <iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.content | html | html_line_break %]"></iframe>
73
                                                [% END %]
73
                                                [% END %]
74
- 

Return to bug 30287