|
Line 0
Link Here
|
|
|
1 |
[% USE raw %] |
| 2 |
[% USE Asset %] |
| 3 |
[% USE KohaDates %] |
| 4 |
[% SET footerjs = 1 %] |
| 5 |
[% INCLUDE 'doc-head-open.inc' %] |
| 6 |
<title>Notices management › Tools › Koha</title> |
| 7 |
[% INCLUDE 'doc-head-close.inc' %] |
| 8 |
<style> |
| 9 |
.notice { display: none; } |
| 10 |
</style> |
| 11 |
</head> |
| 12 |
|
| 13 |
<body id="tools_notices_mgmt" class="tools"> |
| 14 |
[% WRAPPER 'header.inc' %] |
| 15 |
[% INCLUDE 'circ-search.inc' %] |
| 16 |
[% END %] |
| 17 |
|
| 18 |
[% WRAPPER 'sub-header.inc' %] |
| 19 |
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> |
| 20 |
<ol> |
| 21 |
<li> |
| 22 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> |
| 23 |
</li> |
| 24 |
<li> |
| 25 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> |
| 26 |
</li> |
| 27 |
<li> |
| 28 |
<a href="#" aria-current="page"> |
| 29 |
Notices management |
| 30 |
</a> |
| 31 |
</li> |
| 32 |
</ol> |
| 33 |
</nav> |
| 34 |
[% END %] |
| 35 |
|
| 36 |
<div class="main container-fluid"> |
| 37 |
<div class="row"> |
| 38 |
<div class="col-sm-10 col-sm-push-2"> |
| 39 |
<main> |
| 40 |
|
| 41 |
<h1>Notices management</h1> |
| 42 |
|
| 43 |
[% IF notices %] |
| 44 |
|
| 45 |
<table id="notices"> |
| 46 |
<thead> |
| 47 |
<tr> |
| 48 |
<th>Time created</th> |
| 49 |
<th>Patron</th> |
| 50 |
<th>Notice</th> |
| 51 |
<th>Type</th> |
| 52 |
<th>Status</th> |
| 53 |
<th>Updated on</th> |
| 54 |
<th>Actions</th> |
| 55 |
</tr> |
| 56 |
</thead> |
| 57 |
<tbody> |
| 58 |
[% FOREACH notice IN notices %] |
| 59 |
<tr> |
| 60 |
<td>[% notice.time_queued | $KohaDates with_hours = 1 %]</td> |
| 61 |
<td>[% INCLUDE 'patron-title.inc' patron=notice.patron hide_patron_infos_if_needed=1 %]</td> |
| 62 |
<!-- <td>[% notice.subject | html %]</td>--> |
| 63 |
<td> |
| 64 |
<a class="notice-title" data-noticeid="[% notice.message_id | html %]" href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% notice.borrowernumber | uri %]&noticeid=[% notice.message_id | uri %]">[% notice.subject | html %]</a> |
| 65 |
<iframe class="notice" id="notice[% notice.message_id | html %]" srcdoc="[% notice.content | html | html_line_break %]"></iframe> |
| 66 |
</td> |
| 67 |
<td>[% notice.message_transport_type | html %]</td> |
| 68 |
<td>[% notice.status | html %]</td> |
| 69 |
<td>[% notice.updated_on | $KohaDates with_hours = 1 %]</td> |
| 70 |
<td class="actions"><button class="btn btn-default btn-xs print"><i class="fa fa-print"></i> Print</button></td> |
| 71 |
</tr> |
| 72 |
[% END %] |
| 73 |
</tbody> |
| 74 |
</table> |
| 75 |
|
| 76 |
[% ELSE %] |
| 77 |
|
| 78 |
<div class="dialog message"> |
| 79 |
There are no notices. |
| 80 |
</div> |
| 81 |
|
| 82 |
[% END %] |
| 83 |
|
| 84 |
</main> |
| 85 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
| 86 |
|
| 87 |
<div class="col-sm-2 col-sm-pull-10"> |
| 88 |
<aside> |
| 89 |
[% INCLUDE 'tools-menu.inc' %] |
| 90 |
</aside> |
| 91 |
</div> <!-- /.col-sm-2.col-sm-pull-10 --> |
| 92 |
</div> <!-- /.row --> |
| 93 |
|
| 94 |
<!-- Modal --> |
| 95 |
<div class="modal" id="noticeModal" tabindex="-1" aria-labelledby="noticeModalLabel" aria-hidden="true"> |
| 96 |
<div class="modal-dialog"> |
| 97 |
<div class="modal-content"> |
| 98 |
<div class="modal-header"> |
| 99 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"> |
| 100 |
<span aria-hidden="true">×</span> |
| 101 |
</button> |
| 102 |
<h5 class="modal-title" id="noticeModalLabel">Notice</h5> |
| 103 |
</div> |
| 104 |
<div class="modal-body"> |
| 105 |
... |
| 106 |
</div> |
| 107 |
<div class="modal-footer"> |
| 108 |
<button type="button" class="btn btn-default deny cancel" data-dismiss="modal"><i class="fa fa-remove"></i> Close</button> |
| 109 |
</div> |
| 110 |
</div> <!-- /.modal-content --> |
| 111 |
</div> <!-- /.modal-dialog --> |
| 112 |
</div> <!-- /.modal --> |
| 113 |
|
| 114 |
[% MACRO jsinclude BLOCK %] |
| 115 |
[% Asset.js("js/tools-menu.js") | $raw %] |
| 116 |
[% INCLUDE 'calendar.inc' %] |
| 117 |
[% INCLUDE 'datatables.inc' %] |
| 118 |
|
| 119 |
<script> |
| 120 |
$(document).ready(function() { |
| 121 |
$("#notices").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 122 |
"aaSorting": [[ 3, "desc" ]], |
| 123 |
"sPaginationType": "full" |
| 124 |
})); |
| 125 |
|
| 126 |
$("#notices").on("click", ".notice-title", function(e){ |
| 127 |
e.preventDefault(); |
| 128 |
var title = $(this).text(); |
| 129 |
var noticeid = $(this).data("noticeid"); |
| 130 |
var body = $("#notice" + noticeid ).attr("srcdoc"); |
| 131 |
$("#noticeModalLabel").text( title ); |
| 132 |
$("#noticeModal .modal-body").html( body ); |
| 133 |
$("#noticeModal").modal("show"); |
| 134 |
}); |
| 135 |
|
| 136 |
$("#noticeModal").on("hide.bs.modal", function(){ |
| 137 |
$("#noticeModalLabel").text(""); |
| 138 |
$("#noticeModal .modal-body").html(""); |
| 139 |
}); |
| 140 |
}); |
| 141 |
</script> |
| 142 |
|
| 143 |
[% END %] |
| 144 |
|
| 145 |
[% INCLUDE 'intranet-bottom.inc' %] |