Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt
Rocio Dressler a589879f49 Bug 16537 - Overdue and Status triggers grammar
Test plan:

1) Go to the staff client
2) Click on Tools - Overdue notice/status triggers
3) Confirm that the first sentence reads "a" checkout rather than "an" checkout

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-06-04 09:50:44 +00:00

178 lines
7.7 KiB
Text

[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Notice triggers</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
var tab_map = { "1" : _("First"), "2" : _("Second"), "3" : _("Third")};
$(document).ready(function() {
$('#selectlibrary').find("input:submit").hide();
$('#branch').change(function() {
$('#selectlibrary').submit();
});
$("li>a.tab").each( function(){
var id = $(this).attr("data-number");
$(this).html(tab_map[id]);
} );
$('#rulestabs').tabs();
});
//]]>
</script>
</head>
<body id="tools_overduerules" class="tools">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Notice triggers</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h1>Defining [% IF ( branch ) %]overdue actions for [% branch %][% ELSE %]default overdue actions[% END %]</h1>
<div class="help">
<p>Delay is the number of days after a checkout is due before an action is triggered. </p>
<p>If you want Koha to trigger an action (send a letter or restrict a member), a delay value is required.</p>
<p>Columns must be filled left to right: if the first column is blank, other columns will be ignored. </p>
</div>
<form method="post" action="/cgi-bin/koha/tools/overduerules.pl" id="selectlibrary">
<label for="branch">Select a library:</label>
<select id="branch" name="branch">
<option value="">Default</option>
[% FOREACH branchloo IN branchloop %]
[% IF ( branchloo.selected ) %]
<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
[% ELSE %]
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
[% END %]
[% END %]
</select>
<input type="submit" value="Select" />
</form>
[% IF ( ERROR ) %]
<div class="dialog alert">
<h3>Data error</h3>
<p>The following errors were found. Please correct them and submit again:</p>
<ul>
[% IF ( ERRORDELAY ) %]
<li>Delay [% ERRORDELAY %] for [% BORERR %] patron category has some unexpected characters. There should be only numerical characters. </li>
[% END %]
[% IF ( ERRORUSELESSDELAY ) %]
<li>No letter or restriction action specified for delay [% ERRORUSELESSDELAY %] for [% BORERR %] patron category. If a delay is supplied, either a letter, restrict action, or both should be specified.</li>
[% END %]
[% IF ( ERRORORDER ) %]
<li>The first notice's delay should be less than the second, which should be less than the third for the <strong>[% BORERR %]</strong> patron category </li>
[% END %]
</ul>
</div>
[% END %]
[% IF ( table ) %]
<form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
<input type="hidden" name="op" value="save" />
<input type="hidden" name="branch" value="[% branch %]" />
<h3>Rules for overdue actions: [% IF ( branch ) %][% branch %][% ELSE %] default library [% END %]</h3>
[% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %]
<div id="rulestabs" class="toptabs">
<ul class="ui-tabs-nav">
[% FOR tab IN tabs %]
<li><a href="#[% tab.id %]" class="tab [% tab.id %]" data-number="[% tab.number %]"></a></li>
[% END %]
</ul>
[% FOR tab IN tabs %]
<div id="[% tab.id %]">
<table>
<thead>
<tr>
<th>&nbsp;</th>
<th scope="col">Delay</th>
<th scope="col">Letter</th>
<th scope="col">Restrict</th>
[% FOREACH mtt IN message_transport_types %]
<th scpre="col">
[% SWITCH mtt %]
[% CASE 'email' %]
Email
[% CASE 'print' %]
Print
[% CASE 'sms' %]
SMS
[% CASE 'feed' %]
Feed
[% CASE 'phone' %]
Phone
[% CASE %]
[% mtt %]
[% END %]
</th>
[% END %]
</tr>
</thead>
<tbody>
[% FOREACH value IN tab.values %]
<tr>
<th scope="row">[% value.line %]</th>
<td>
<input type="text" name="delay[% tab.number %]-[% value.overduename %]" size="5" value="[% value.delay %]" />
</td>
<td>
<select name="letter[% tab.number %]-[% value.overduename %]">
<option value="">No notice</option>
[% FOREACH letter IN letters %]
[% IF letter.code == value.selected_lettercode %]
<option value="[% letter.code %]" selected="selected">[% letter.name %]</option>
[% ELSE %]
<option value="[% letter.code %]">[% letter.name %]</option>
[% END %]
[% END %]
</select>
</td>
<td>
[% IF ( value.debarred ) %]
<input type="checkbox" name="debarred[% tab.number %]-[% value.overduename %]" checked="checked" value="1" />
[% ELSE %]
<input type="checkbox" name="debarred[% tab.number %]-[% value.overduename %]" value="1" />
[% END %]
</td>
[% FOREACH mtt IN value.message_transport_types %]
<td>
[% IF mtt.selected %]
<input type="checkbox" name="mtt[% tab.number %]-[% value.overduename %]" value="[% mtt.value %]" checked="checked" />
[% ELSE %]
[% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %]
<input type="checkbox" name="mtt[% tab.number %]-[% value.overduename %]" value="[% mtt.value %]" disabled="disabled" />
[% ELSIF mtt.value == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %]
<input type="checkbox" name="mtt[% tab.number %]-[% value.overduename %]" value="[% mtt.value %]" disabled="disabled" />
[% ELSE %]
<input type="checkbox" name="mtt[% tab.number %]-[% value.overduename %]" value="[% mtt.value %]" />
[% END %]
[% END %]
</td>
[% END %]
</tr>
[% END %]
</tbody>
</table>
</div>
[% END %]
</div>
<fieldset class="action"><input type="submit" value="Save changes" /></fieldset>
</form>
[% ELSE %]
<div class="warning">You don't have patron categories defined, or the patron categories are not set to receive overdue notices.</div>
<div class="warning">If this is not what you were expecting, go to <a href="../admin/categories.pl">patron categories</p></div>
[% END %]
</div>
</div>
<div class="yui-b noprint">
[% INCLUDE 'tools-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]