Lines 10-16
Link Here
|
10 |
[% INCLUDE 'doc-head-close.inc' %] |
10 |
[% INCLUDE 'doc-head-close.inc' %] |
11 |
<style> |
11 |
<style> |
12 |
.notice { display: none; } |
12 |
.notice { display: none; } |
13 |
.notice-title { font-weight: bold; display: block; } |
|
|
14 |
</style> |
13 |
</style> |
15 |
</head> |
14 |
</head> |
16 |
|
15 |
|
Lines 58-67
Link Here
|
58 |
[% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %] |
57 |
[% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %] |
59 |
<tr> |
58 |
<tr> |
60 |
<td> |
59 |
<td> |
61 |
<a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id | html %]" href="#">[% QUEUED_MESSAGE.subject | html %]</a> |
60 |
<a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id | html %]" href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | uri %]&noticeid=[% QUEUED_MESSAGE.message_id | uri %]">[% QUEUED_MESSAGE.subject | html %]</a> |
62 |
<div id="notice[% QUEUED_MESSAGE.message_id | html %]" class="notice"> |
61 |
<iframe class="notice" id="notice[% QUEUED_MESSAGE.message_id | html %]" srcdoc="[% QUEUED_MESSAGE.content | html | html_line_break %]"></iframe> |
63 |
<iframe srcdoc="[% QUEUED_MESSAGE.content | html | html_line_break %]"></iframe> |
|
|
64 |
</div> |
65 |
</td> |
62 |
</td> |
66 |
<td> |
63 |
<td> |
67 |
[% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]email |
64 |
[% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]email |
Lines 77-90
Link Here
|
77 |
[% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted |
74 |
[% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted |
78 |
[% ELSE %][% QUEUED_MESSAGE.status | html %][% END %] |
75 |
[% ELSE %][% QUEUED_MESSAGE.status | html %][% END %] |
79 |
[% IF ( QUEUED_MESSAGE.status != 'pending' ) %] |
76 |
[% IF ( QUEUED_MESSAGE.status != 'pending' ) %] |
80 |
<div id="resend_notice[% QUEUED_MESSAGE.message_id | html %]" class="notice"> |
77 |
<div class="notice"> |
81 |
<form action="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | html %]" method="POST"> |
78 |
<form id="resend_notice[% QUEUED_MESSAGE.message_id | html %]" action="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber | html %]" method="POST"> |
82 |
<input type="hidden" name="op" value="resend_notice" /> |
79 |
<input type="hidden" name="op" value="resend_notice" /> |
83 |
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" /> |
80 |
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" /> |
84 |
<input type="hidden" name="message_id" value="[% QUEUED_MESSAGE.message_id | html %]" /> |
81 |
<input type="hidden" name="message_id" value="[% QUEUED_MESSAGE.message_id | html %]" /> |
85 |
<fieldset class="action"> |
|
|
86 |
<button class="btn btn-default btn-xs" type="submit">Resend</button> |
87 |
</fieldset> |
88 |
</form> |
82 |
</form> |
89 |
</div> |
83 |
</div> |
90 |
[% END %] |
84 |
[% END %] |
Lines 124-129
Link Here
|
124 |
</div> <!-- /.col-sm-2.col-sm-pull-10 --> |
118 |
</div> <!-- /.col-sm-2.col-sm-pull-10 --> |
125 |
</div> <!-- /.row --> |
119 |
</div> <!-- /.row --> |
126 |
|
120 |
|
|
|
121 |
<!-- Modal --> |
122 |
<div class="modal" id="noticeModal" tabindex="-1" aria-labelledby="noticeModalLabel" aria-hidden="true"> |
123 |
<div class="modal-dialog"> |
124 |
<div class="modal-content"> |
125 |
<div class="modal-header"> |
126 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"> |
127 |
<span aria-hidden="true">×</span> |
128 |
</button> |
129 |
<h5 class="modal-title" id="noticeModalLabel">Notice</h5> |
130 |
</div> |
131 |
<div class="modal-body"> |
132 |
... |
133 |
</div> |
134 |
<div class="modal-footer"> |
135 |
<button type="button" id="resend-notice" class="btn btn-default" style="display:none"><i class="fa fa-refresh" aria-hidden="true"></i> Resend</button> |
136 |
<button type="button" class="btn btn-default deny cancel" data-dismiss="modal"><i class="fa fa-remove"></i> Close</button> |
137 |
</div> |
138 |
</div> <!-- /.modal-content --> |
139 |
</div> <!-- /.modal-dialog --> |
140 |
</div> <!-- /.modal --> |
141 |
|
127 |
[% MACRO jsinclude BLOCK %] |
142 |
[% MACRO jsinclude BLOCK %] |
128 |
[% INCLUDE 'datatables.inc' %] |
143 |
[% INCLUDE 'datatables.inc' %] |
129 |
<script> |
144 |
<script> |
Lines 135-151
Link Here
|
135 |
|
150 |
|
136 |
$("#noticestable").on("click", ".notice-title", function(e){ |
151 |
$("#noticestable").on("click", ".notice-title", function(e){ |
137 |
e.preventDefault(); |
152 |
e.preventDefault(); |
138 |
var rowid = $(this).data("noticeid"); |
153 |
var title = $(this).text(); |
139 |
$("#notice"+rowid).toggle(); |
154 |
var noticeid = $(this).data("noticeid"); |
140 |
$("#resend_notice"+rowid).toggle(); |
155 |
var body = $("#notice" + noticeid ).attr("srcdoc"); |
141 |
var iframe = $("#notice"+rowid).children('iframe'); |
156 |
if( $("#resend_notice" + noticeid ).length ){ |
142 |
// Adding some padding to the height and width to remove scrollbars |
157 |
$("#resend-notice").show(); |
143 |
var height = iframe.get(0).contentWindow.document.body.scrollHeight + 25; |
158 |
} |
144 |
var width = iframe.get(0).contentWindow.document.body.scrollWidth + 25; |
159 |
$("#resend-notice").data("noticeid", noticeid ); |
145 |
iframe.css({ |
160 |
$("#noticeModalLabel").text( title ); |
146 |
'width': width + 'px', |
161 |
$("#noticeModal .modal-body").html( body ); |
147 |
'height': height + 'px' |
162 |
$("#noticeModal").modal("show"); |
148 |
}); |
163 |
}); |
|
|
164 |
|
165 |
$("#resend-notice").on("click", function(e){ |
166 |
e.preventDefault(); |
167 |
var noticeid = $(this).data("noticeid"); |
168 |
$("#resend_notice" + noticeid ).submit(); |
169 |
}); |
170 |
|
171 |
$("#noticeModal").on("hide.bs.modal", function(){ |
172 |
$("#resend-notice").removeData("noticeid").hide(); |
173 |
$("#noticeModalLabel").text(""); |
174 |
$("#noticeModal .modal-body").html(""); |
149 |
}); |
175 |
}); |
150 |
}); |
176 |
}); |
151 |
</script> |
177 |
</script> |
152 |
- |
|
|