Owen Leonard
98d9df517c
This patch modifies several tools templates to use the Bootstrap grid instead of YUI. This patch also removes obsolete "text/javascript" attributes from <script> tags and "text/css" attributes from <style> tags in the modified templates. To test, apply the patch and view the following pages, confirming that they look correct at various browser widths: - Tools -> MARC modification templates - View and edit templates - Tools -> Batch patron modification - Test each step of the process - Tools -> Overdue notice/status triggers - Tools -> Upload patron images - Test each step of the upload process - Tools -> Quote editor -> Quote uploader - Import quotes Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
181 lines
8.1 KiB
Text
181 lines
8.1 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% USE Branches %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › Overdue notice/status triggers</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</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> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Overdue notice/status triggers</div>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
|
|
<h1>Defining [% IF ( branch ) %]overdue actions for [% Branches.GetName( branch ) | html %][% 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>
|
|
[% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
|
|
</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 | html %] for [% BORERR | html %] 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 | html %] for [% BORERR | html %] 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 | html %]</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 | html %]" />
|
|
<h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) | html %][% 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 | uri %]" class="tab [% tab.id | html %]" data-number="[% tab.number | html %]"></a></li>
|
|
[% END %]
|
|
</ul>
|
|
[% FOR tab IN tabs %]
|
|
<div id="[% tab.id | html %]">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th> </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 | html %]
|
|
[% END %]
|
|
</th>
|
|
[% END %]
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH value IN tab.values %]
|
|
<tr>
|
|
<th scope="row">[% value.line | html %]</th>
|
|
<td>
|
|
<input type="number" min="1" name="delay[% tab.number | html %]-[% value.overduename | html %]" value="[% value.delay | html %]" />
|
|
</td>
|
|
<td>
|
|
<select name="letter[% tab.number | html %]-[% value.overduename | html %]">
|
|
<option value="">No notice</option>
|
|
[% FOREACH letter IN letters %]
|
|
[% IF letter.code == value.selected_lettercode %]
|
|
<option value="[% letter.code | html %]" selected="selected">[% letter.name | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% letter.code | html %]">[% letter.name | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
<td>
|
|
[% IF ( value.debarred ) %]
|
|
<input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" checked="checked" value="1" />
|
|
[% ELSE %]
|
|
<input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" value="1" />
|
|
[% END %]
|
|
</td>
|
|
[% FOREACH mtt IN value.message_transport_types %]
|
|
<td>
|
|
[% IF mtt.selected %]
|
|
<input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" checked="checked" />
|
|
[% ELSE %]
|
|
[% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %]
|
|
<input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
|
|
[% ELSIF mtt.value == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %]
|
|
<input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
|
|
[% ELSE %]
|
|
<input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" />
|
|
[% 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 %]
|
|
|
|
</main>
|
|
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
|
|
|
<div class="col-sm-2 col-sm-pull-10">
|
|
<aside>
|
|
[% INCLUDE 'tools-menu.inc' %]
|
|
</aside>
|
|
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
|
</div> <!-- /.row -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/tools-menu.js") | $raw %]
|
|
<script>
|
|
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>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|