Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
Owen Leonard 047ca33a93 Bug 19641: Move patron templates to the footer
This patch modifies the staff client patron module templates so that
JavaScript is included in the footer instead of the header.

This patch touches a lot of files because the changes are all
interdependent, affecting a couple of module-wide include files.

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

Patrons -> Patrons home, patron search results
  -> Manage pending modification requests
  -> Patron detail page
    -> Edit patron
      -> Set guarantor
    -> Fines
       -> Account, Pay fines, Create manual invoice, Create manual
          credit
       -> Print receipts for different kinds of charges
    -> Routing lists
    -> Circulation history
    -> Holds history
    -> Notices
    -> Statistics
    -> Files
    -> Purchase suggestions
    -> Discharges
    -> Housebound
    -> Set permissions
    -> Change password
    -> Print summary, slips, and overdues
    -> Update child to adult patron type

Patron toolbar and patron search bar operations should work correctly on
all pages.

This patch also updates the template for searching the Norwegian
national patron database, but it has NOT been tested.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Zoe Bennett <zoebennett1308@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-15 13:30:23 -03:00

112 lines
4.2 KiB
Text

[% USE Koha %]
[% USE AuthorisedValues %]
[% USE Branches %]
[% USE KohaDates %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Sent notices for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
<style type="text/css">
.notice { display: none; }
.notice-title { font-weight: bold; display: block; }
</style>
</head>
<body id="pat_notices" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
<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>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% INCLUDE 'members-toolbar.inc' %]
<h1>Sent notices for [% INCLUDE 'patron-title.inc' %]</h1>
[% IF ( QUEUED_MESSAGES ) %]
<table id="noticestable">
<thead>
<tr>
<th>Notice</th>
<th>Type</th>
<th>Status</th>
<th>Time</th>
</tr>
</thead>
<tbody>
[% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %]
<tr>
<td>
<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 %]
</div>
</td>
<td>
[% IF ( QUEUED_MESSAGE.message_transport_type == 'email' ) %]email
[% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'print' ) %]print
[% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'feed' ) %]feed
[% ELSIF ( QUEUED_MESSAGE.message_transport_type == 'sms' ) %]sms
[% ELSE %][% QUEUED_MESSAGE.message_transport_type %][% END %]
</td>
<td>
[% IF ( QUEUED_MESSAGE.status == 'sent' ) %]sent
[% ELSIF ( QUEUED_MESSAGE.status == 'pending' ) %]pending
[% 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>
[% END %]
</tbody>
</table>
[% ELSE %]
<div class="dialog message">There is no record of any messages that have been sent to this patron.</div>
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
[% MACRO jsinclude BLOCK %]
<script type="text/javascript" src="[% interface %]/[% theme %]/js/members-menu_[% KOHA_VERSION %].js"></script>
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
$(document).ready(function() {
$("#noticestable").dataTable($.extend(true, {}, dataTablesDefaults, {
"aaSorting": [[ 3, "desc" ]],
"aoColumns": [ null,null,null,{ "sType": "title-string" } ],
"sPaginationType": "four_button"
}));
$("#noticestable").on("click", ".notice-title", function(e){
e.preventDefault();
var rowid = $(this).data("noticeid");
$("#notice"+rowid).toggle();
$("#resend_notice"+rowid).toggle();
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]