Bug 12123 - [Alternative patch] HTML notices can break the notice viewer
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / notices.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Sent notices for [% INCLUDE 'patron-title.inc' %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 [% INCLUDE 'datatables.inc' %]
7 <script type="text/javascript">
8 //<![CDATA[
9     $(document).ready(function() {
10     $("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, {
11         "aaSorting": [[ 3, "desc" ]],
12         "aoColumns": [ null,null,null,{ "sType": "title-string" } ],
13         "sPaginationType": "four_button"
14     }));
15
16     $(".notice").hide();
17     $(".notice-title").click(function(e){
18         $(this).next(".notice").toggle();
19         e.preventDefault();
20     });
21     
22     });
23 //]]>
24 </script>
25 <style type="text/css">
26     p.notice { display: none; }
27     a.notice-title { font-weight: bold; display: block; }
28 </style>
29 </head>
30 <body id="pat_notices" class="pat">
31 [% INCLUDE 'header.inc' %]
32 [% INCLUDE 'patron-search.inc' %]
33
34 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Sent notices for [% INCLUDE 'patron-title.inc' %]</div>
35
36 <div id="doc3" class="yui-t2">
37     <div id="bd">
38     <div id="yui-main">
39     <div class="yui-b">
40 [% INCLUDE 'members-toolbar.inc' %]
41 <h1>Sent notices for [% INCLUDE 'patron-title.inc' %]</h1>
42
43 [% IF ( QUEUED_MESSAGES ) %]
44     <table id="noticestable">
45         <thead>
46             <tr>
47                 <th>Notice</th>
48                 <th>Type</th>
49                 <th>Status</th>
50                 <th>Time</th>
51             </tr>
52         </thead>
53         <tbody>
54             [% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %]
55             <tr>
56                 <td>
57             <a class="notice-title" href="#">[% QUEUED_MESSAGE.subject %]</a>
58             <div class="notice">
59                 [% QUEUED_MESSAGE.content FILTER html_line_break %]
60             </div>
61         </td>
62                 <td>
63             [% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]email
64             [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'print' ) %]print
65             [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'feed' ) %]feed
66             [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'sms' ) %]sms
67             [% ELSE %][% QUEUED_MESSAGE.message_transport_type %][% END %]
68         </td>
69                 <td>
70             [% IF ( QUEUED_MESSAGE.status == 'sent' ) %]sent
71             [% ELSIF ( QUEUED_MESSAGE.status == 'pending' ) %]pending
72             [% ELSIF ( QUEUED_MESSAGE.status == 'failed' ) %]failed
73             [% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted
74             [% ELSE %][% QUEUED_MESSAGE.status %][% END %]
75         </td>
76         <td><span title="[% QUEUED_MESSAGE.time_queued %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</span></td>
77             </tr>
78             [% END %]
79         </tbody>
80     </table>
81 [% ELSE %]
82     <div class="dialog message">There is no record of any messages that have been sent to this patron.</div>
83 [% END %]
84
85 </div>
86 </div>
87
88 <div class="yui-b">
89 [% INCLUDE 'circ-menu.inc' %]
90 </div>
91 </div>
92 [% INCLUDE 'intranet-bottom.inc' %]