3 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Sent notices for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% Asset.css("css/datatables.css") %]
11 <style type="text/css">
12 .notice { display: none; }
13 .notice-title { font-weight: bold; display: block; }
17 <body id="pat_notices" class="pat">
18 [% INCLUDE 'header.inc' %]
19 [% INCLUDE 'patron-search.inc' %]
21 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Sent notices for [% INCLUDE 'patron-title.inc' %]</div>
23 <div id="doc3" class="yui-t2">
27 [% INCLUDE 'members-toolbar.inc' %]
28 <h1>Sent notices for [% INCLUDE 'patron-title.inc' %]</h1>
30 [% IF ( QUEUED_MESSAGES ) %]
31 <table id="noticestable">
41 [% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %]
44 <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id %]" href="#">[% QUEUED_MESSAGE.subject %]</a>
45 <div id="notice[% QUEUED_MESSAGE.message_id %]" class="notice">
46 <iframe srcdoc="[% QUEUED_MESSAGE.content FILTER html_line_break FILTER html %]"></iframe>
50 [% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]email
51 [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'print' ) %]print
52 [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'feed' ) %]feed
53 [% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'sms' ) %]sms
54 [% ELSE %][% QUEUED_MESSAGE.message_transport_type %][% END %]
57 [% IF ( QUEUED_MESSAGE.status == 'sent' ) %]sent
58 [% ELSIF ( QUEUED_MESSAGE.status == 'pending' ) %]pending
59 [% ELSIF ( QUEUED_MESSAGE.status == 'failed' ) %]failed
60 [% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted
61 [% ELSE %][% QUEUED_MESSAGE.status %][% END %]
62 [% IF ( QUEUED_MESSAGE.status != 'pending' ) %]
63 <div id="resend_notice[% QUEUED_MESSAGE.message_id %]" class="notice">
64 <form action="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber %]" method="POST">
65 <input type="hidden" name="op" value="resend_notice" />
66 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
67 <input type="hidden" name="message_id" value="[% QUEUED_MESSAGE.message_id %]" />
68 <fieldset class="action">
69 <button class="btn btn-default btn-xs" type="submit">Resend</button>
75 <td><span title="[% QUEUED_MESSAGE.time_queued %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</span></td>
81 <div class="dialog message">There is no record of any messages that have been sent to this patron.</div>
88 [% INCLUDE 'circ-menu.inc' %]
92 [% MACRO jsinclude BLOCK %]
93 [% INCLUDE 'datatables.inc' %]
94 <script type="text/javascript">
96 /* Set some variables needed in members-menu.js */
97 var borrowernumber = "[% patron.borrowernumber %]";
98 var advsearch = "[% advsearch %]";
99 var dateformat = "[% dateformat %]";
100 var NorwegianPatronDBEnable = "[% NorwegianPatronDBEnable %]";
101 var CATCODE_MULTI = "[% CATCODE_MULTI %]";
102 var catcode = "[% catcode %]";
103 var destination = "[% destination %]";
104 var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers %]";
106 $(document).ready(function() {
107 $("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, {
108 "aaSorting": [[ 3, "desc" ]],
109 "aoColumns": [ null,null,null,{ "sType": "title-string" } ],
110 "sPaginationType": "four_button"
113 $("#noticestable").on("click", ".notice-title", function(e){
115 var rowid = $(this).data("noticeid");
116 $("#notice"+rowid).toggle();
117 $("#resend_notice"+rowid).toggle();
118 var iframe = $("#notice"+rowid).children('iframe');
119 // Adding some padding to the height and width to remove scrollbars
120 var height = iframe.get(0).contentWindow.document.body.scrollHeight + 25;
121 var width = iframe.get(0).contentWindow.document.body.scrollWidth + 25;
123 'width': width + 'px',
124 'height': height + 'px'
129 [% Asset.js("js/members-menu.js") %]
132 [% INCLUDE 'intranet-bottom.inc' %]