1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Tools › Notices[% IF ( add_form ) %][% IF ( modify ) %] › Modify notice[% ELSE %] › Add notice[% END %][% END %][% IF ( add_validate ) %] › Notice added[% END %][% IF ( delete_confirm ) %] › Confirm deletion[% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'datatables.inc' %]
6 <script type="text/javascript" src="[% interface %]/[% theme %]/en/lib/jquery/plugins/jquery.insertatcaret.js"></script>
7 <script type="text/javascript">
9 $(document).ready(function() {
10 $("#lettert:has(tbody tr)").dataTable($.extend(true, {}, dataTablesDefaults, {
13 { "aTargets": [ -1,-2, -3 ], "bSortable": false, "bSearchable": false }
18 $('#branch').change(function() {
20 $('#selectlibrary').submit();
22 $('#newnotice').click(function() {
23 $('#op').val("add_form");
28 $("#submit").click( function(event) {
29 $("fieldset.mtt").each( function(){
30 var title = $(this).find('input[name="title"]').val();
31 var content = $(this).find('textarea[name="content"]').val();
33 ( title.length == 0 && content.length > 0 )
34 || ( title.length > 0 && content.length == 0 )
36 var mtt = $(this).find('input[name="message_transport_type"]').val();
37 alert("You must specify a title and a content for " + mtt);
38 event.preventDefault();
45 $("#content_sms").on("keyup", function(){
46 var length = $(this).val().length;
47 $("#sms_counter").html(length + "/" + sms_limit);
48 if ( length > sms_limit ) {
49 $("#sms_counter").css("color", "red");
51 $("#sms_counter").css("color", "black");
63 function isNotNull(f,noalert) {
64 if (f.value.length ==0) {
70 function isNum(v,maybenull) {
71 var n = new Number(v.value);
75 if (maybenull==0 && v.value=='') {
80 function insertValueQuery(mtt_id) {
81 var fieldset = $("#" + mtt_id);
82 var myQuery = $(fieldset).find('textarea[name="content"]');
83 var myListBox = $(fieldset).find('select[name="SQLfieldname"]');
85 if($(myListBox).find('option').length > 0) {
88 $(myListBox).find('option').each( function (){
89 if ( $(this).attr('selected') ) {
93 chaineAj += $(this).val();
96 $(myQuery).insertAtCaret(chaineAj);
103 <body id="tools_letter" class="tools">
104 [% INCLUDE 'header.inc' %]
105 [% INCLUDE 'letters-search.inc' %]
107 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF ( add_form ) %][% IF ( modify ) %]<a href="/cgi-bin/koha/tools/letter.pl">Notices & Slips</a> › Modify notice[% ELSE %] <a href="/cgi-bin/koha/tools/letter.pl">Notices & Slips</a> › Add notice[% END %][% ELSE %][% IF ( add_validate ) %] <a href="/cgi-bin/koha/tools/letter.pl">Notices & Slips</a> › Notice added[% ELSE %][% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/tools/letter.pl">Notices & Slips</a> › Confirm deletion[% ELSE %]Notices & Slips[% END %][% END %][% END %]</div>
109 [% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
115 [% IF ( no_op_set ) %]
116 <h1>Notices and Slips</h1>
117 <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
118 <input type="hidden" name="searchfield" value="[% searchfield %]" />
119 [% UNLESS independant_branch %]
122 <select name="branchcode" id="branch" style="width:20em;">
123 <option value="">All libraries</option>
124 [% FOREACH branchloo IN branchloop %]
125 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
130 <div id="toolbar" class="btn-toolbar">
131 <button type="submit" class="btn btn-small" id="newnotice"><i class="icon-plus"></i> New notice</button>
132 <input type="hidden" id="op" name="op" />
137 <p>You searched for <b>[% searchfield %]</b></p>
139 [% IF ( letter && !independant_branch) %]
140 [% select_for_copy = BLOCK %]
141 <select name="branchcode">
142 [% FOREACH branchloo IN branchloop %]
143 <option value="[% branchloo.value %]">Copy to [% branchloo.branchname %]</option>
162 [% FOREACH lette IN letter %]
163 [% can_edit = lette.branchcode || !independant_branch %]
165 <td>[% IF lette.branchname %][% lette.branchname %][% ELSE %](All libraries)[% END %]</td>
166 <td>[% lette.module %]</td>
167 <td>[% lette.code %]</td>
168 <td>[% lette.name %]</td>
169 <td style="white-space: nowrap">
170 [% IF !independant_branch || !lette.branchcode %]
171 <form method="post" action="/cgi-bin/koha/tools/letter.pl">
172 <input type="hidden" name="op" value="copy" />
173 <input type="hidden" name="oldbranchcode" value="[% lette.branchcode %]" />
174 <input type="hidden" name="module" value="[% lette.module %]" />
175 <input type="hidden" name="code" value="[% lette.code %]" />
176 [% IF independant_branch %]
177 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
179 [% select_for_copy %]
181 <input type="submit" value="Copy" />
187 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=[% lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Edit</a>
191 [% IF !lette.protected && can_edit %]
192 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&branchcode=[%lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Delete</a>
200 <div class="dialog message">
201 [% IF ( branchcode ) %]
202 <p>There are no notices for this library.</p>
204 <p>There are no notices.</p>
211 [% IF ( add_form ) %]
212 <h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
213 <form name="Aform" method="post" enctype="multipart/form-data">
214 <input type="hidden" name="op" id="op" value="add_validate" />
215 <input type="hidden" name="checked" value="0" />
217 <input type="hidden" name="add" value="0" />
219 <input type="hidden" name="add" value="1" />
221 <fieldset class="rows">
222 <input type="hidden" name="oldbranchcode" value="[% branchcode %]" />
223 [% IF independant_branch %]
224 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
228 <label for="branch">Library:</label>
229 <select name="branchcode" id="branch" style="width:20em;">
230 <option value="">All libraries</option>
231 [% FOREACH branchloo IN branchloop %]
232 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
238 <label for="module">Koha module:</label>
239 <input type="hidden" name="oldmodule" value="[% module %]" />
240 [% IF ( modify ) %]<select name="module" id="module">[% END %] [% IF ( adding ) %] <select name="module" id="module" onchange="javascript:window.location.href = unescape(window.location.pathname)+'?op=add_form&module='+this.value+'&content='+window.document.forms['Aform'].elements['content'].value;">[% END %]
241 [% IF ( module == "catalogue" ) %]
242 <option value="catalogue" selected="selected">Catalog</option>
244 <option value="catalogue" >Catalog</option>
246 [% IF ( module == "circulation" ) %]
247 <option value="circulation" selected="selected">Circulation</option>
249 <option value="circulation">Circulation</option>
251 [% IF ( module == "claimacquisition" ) %]
252 <option value="claimacquisition" selected="selected">Claim acquisition</option>
254 <option value="claimacquisition">Claim acquisition</option>
256 [% IF ( module == "claimissues" ) %]
257 <option value="claimissues" selected="selected">Claim serial issue</option>
259 <option value="claimissues">Claim serial issue</option>
261 [% IF ( module == "reserves" ) %]
262 <option value="reserves" selected="selected">Holds</option>
264 <option value="reserves">Holds</option>
266 [% IF ( module == "members" ) %]
267 <option value="members" selected="selected">Members</option>
269 <option value="members">Members</option>
271 [% IF ( module == "serial" ) %]
272 <option value="serial" selected="selected">Serials (routing list)</option>
274 <option value="serial">Serials (routing list)</option>
276 [% IF ( module == "suggestions" ) %]
277 <option value="suggestions" selected="selected">Suggestions</option>
279 <option value="suggestions">Suggestions</option>
284 <span class="label">Code:</span>[% IF ( adding ) %]<input type="text" id="code" name="code" size="20" maxlength="20" />[% ELSE %]<input type="hidden" id="code" name="code" value="[% code %]" />[% code %][% END %]
287 <label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="[% name %]" />
290 [% FOREACH letter IN letters %]
292 <fieldset class="rows mtt" id="[% letter.message_transport_type %]">
293 <legend>[% letter.message_transport_type %]</legend>
296 <input type="hidden" name="message_transport_type" value="[% letter.message_transport_type %]" />
297 <label for="is_html_[% letter.message_transport_type %]">HTML message:</label>
298 [% IF letter.is_html %]
299 <input type="checkbox" name="is_html_[% letter.message_transport_type %]" id="is_html_[% letter.message_transport_type %]" value="1" checked="checked" />
301 <input type="checkbox" name="is_html_[% letter.message_transport_type %]" id="is_html_[% letter.message_transport_type %]" value="1" />
305 <label for="title">Message subject:</label><input type="text" id="title" name="title" size="60" value="[% letter.title %]" />
308 <label for="SQLfieldname">Message body: [% IF letter.message_transport_type == 'sms' %]<span id="sms_counter">[% letter.content.length %]/160</span>[% END %]</label>
312 <select name="SQLfieldname" multiple="multiple" size="9">
313 [% FOREACH SQLfieldnam IN SQLfieldname %]
314 <option value="[% SQLfieldnam.value %]">[% SQLfieldnam.text %]</option>
318 <td><input type="button" name="insert" value=">>" onclick="insertValueQuery('[% letter.message_transport_type %]')" title="Insert" /></td>
319 <td><textarea name="content" id="content_[% letter.message_transport_type %]" cols="80" rows="15">[% letter.content %]</textarea></td>
329 [% IF code.search('DGST') %] <span class="overdue">Warning, this is a template for a Digest, as such, any references to branch data ( e.g. branches.branchname ) will refer to the borrower's home branch.</span> [% END %]
331 <fieldset class="action"><input type="submit" id="submit" value="Submit" class="button" /> <a class="cancel" href="/cgi-bin/koha/tools/letter.pl">Cancel</a></fieldset>
332 <input type="hidden" name="searchfield" value="[% searchfield %]" />
336 [% IF ( add_validate ) %]
338 <form action="[% action %]" method="post">
339 <input type="submit" value="OK" />
343 [% IF ( delete_confirm ) %]
344 <div class="dialog alert"><h3>Delete notice?</h3>
355 <td>[% branchname %]</td>
356 <td>[% module %]</td>
361 <form action="[% action %]" method="post">
362 <input type="hidden" name="op" value="delete_confirmed">
363 <input type="hidden" name="branchcode" value="[% branchcode %]" />
364 <input type="hidden" name="code" value="[% code %]" />
365 <input type="hidden" name="module" value="[% module %]" />
366 <input type="hidden" name="message_transport_type" value="*" />
367 <input type="submit" value="Yes, delete" class="approve" />
370 <form action="[% action %]" method="get">
371 <input type="submit" value="No, do not delete" class="deny" />
377 [% IF ( delete_confirmed ) %]
379 <form action="[% action %]" method="post">
380 <input type="submit" value="OK" />
386 [% UNLESS ( add_form ) %]
387 <div class="yui-b noprint">
388 [% INCLUDE 'tools-menu.inc' %]
392 [% INCLUDE 'intranet-bottom.inc' %]