+[% USE Koha %]
+[% USE AuthorisedValues %]
+[% USE Branches %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Sent notices for [% INCLUDE 'patron-title.inc' %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
-[% INCLUDE 'datatables-strings.inc' %]
-<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
+[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, {
"aaSorting": [[ 3, "desc" ]],
"aoColumns": [ null,null,null,{ "sType": "title-string" } ],
- "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
- "iDisplayLength": 20,
"sPaginationType": "four_button"
}));
- $(".notice").hide();
- $(".notice-title").click(function(e){
- $(this).next(".notice").toggle();
- e.preventDefault();
- });
-
+ $("#noticestable").on("click", ".notice-title", function(e){
+ e.preventDefault();
+ var rowid = $(this).data("noticeid");
+ $("#notice"+rowid).toggle();
+ $("#resend_notice"+rowid).toggle();
+ });
+
});
//]]>
</script>
<style type="text/css">
- p.notice { display: none; }
- a.notice-title { font-weight: bold; display: block; }
+ .notice { display: none; }
+ .notice-title { font-weight: bold; display: block; }
</style>
</head>
<body id="pat_notices" class="pat">
[% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %]
<tr>
<td>
- <a class="notice-title" href="#">[% QUEUED_MESSAGE.subject %]</a>
- <p class="notice">
+ <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id %]" href="#">[% QUEUED_MESSAGE.subject %]</a>
+ <div id="notice[% QUEUED_MESSAGE.message_id %]" class="notice">
[% QUEUED_MESSAGE.content FILTER html_line_break %]
- </p>
+ </div>
</td>
<td>
[% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]email
[% ELSIF ( QUEUED_MESSAGE.status == 'failed' ) %]failed
[% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted
[% ELSE %][% QUEUED_MESSAGE.status %][% END %]
+ [% IF ( QUEUED_MESSAGE.status != 'pending' ) %]
+ <div id="resend_notice[% QUEUED_MESSAGE.message_id %]" class="notice">
+ <form action="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber %]" method="POST">
+ <input type="hidden" name="op" value="resend_notice" />
+ <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+ <input type="hidden" name="message_id" value="[% QUEUED_MESSAGE.message_id %]" />
+ <fieldset class="action">
+ <button class="btn btn-default btn-xs" type="submit">Resend</button>
+ </fieldset>
+ </form>
+ </div>
+ [% END %]
</td>
<td><span title="[% QUEUED_MESSAGE.time_queued %]">[% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %]</span></td>
</tr>