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="/intranet-tmpl/prog/en/css/datatables.css" />
5 <script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
6 [% INCLUDE 'datatables-strings.inc' %]
7 <script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
8 <script type="text/javascript">
10 $(document).ready(function() {
11 $("#lettert:has(tbody tr)").dataTable($.extend(true, {}, dataTablesDefaults, {
14 { "aTargets": [ -1,-2, -3 ], "bSortable": false, "bSearchable": false }
18 $('#branch').change(function() {
20 $('#selectlibrary').submit();
22 $('#newnotice').click(function() {
23 $('#op').val("add_form");
35 function isNotNull(f,noalert) {
36 if (f.value.length ==0) {
43 var x=f.value.toUpperCase();
48 function isNum(v,maybenull) {
49 var n = new Number(v.value);
53 if (maybenull==0 && v.value=='') {
60 var t = Date.parse(f.value);
70 /* if (!(isNotNull(window.document.Aform.code))) {
71 _alertString += "\n- " + _("Code missing");
73 /* if (!(isNotNull(window.document.Aform.name))) {
74 _alertString += "\n- " + _("Name missing");
76 if (_alertString.length==0) {
77 document.Aform.submit();
79 alertString2 = _("Form not submitted because of the following problem(s)");
80 alertString2 += "\n------------------------------------------------------------------------------------\n";
81 alertString2 += _alertString;
85 // GPL code coming from PhpMyAdmin
86 function insertValueQuery() {
87 var myQuery = document.Aform.content;
88 var myListBox = document.Aform.SQLfieldname;
90 if(myListBox.options.length > 0) {
93 for(var i=0; i<myListBox.options.length; i++) {
94 if (myListBox.options[i].selected){
98 chaineAj += myListBox.options[i].value;
103 if (document.selection) {
105 sel = document.selection.createRange();
107 document.Aform.insert.focus();
109 //MOZILLA/NETSCAPE support
110 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
111 var startPos = document.Aform.content.selectionStart;
112 var endPos = document.Aform.content.selectionEnd;
113 var chaineSql = document.Aform.content.value;
114 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
116 myQuery.value += chaineAj;
124 <body id="tools_letter" class="tools">
125 [% INCLUDE 'header.inc' %]
126 [% INCLUDE 'letters-search.inc' %]
128 <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>
130 [% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
136 [% IF ( no_op_set ) %]
137 <h1>Notices and Slips</h1>
138 <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
139 <input type="hidden" name="searchfield" value="[% searchfield %]" />
140 [% UNLESS independant_branch %]
143 <select name="branchcode" id="branch" style="width:20em;">
144 <option value="">All libraries</option>
145 [% FOREACH branchloo IN branchloop %]
146 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
152 <input type="submit" id="newnotice" value="New Notice" />
153 <input type="hidden" id="op" name="op" />
158 <p>You searched for <b>[% searchfield %]</b></p>
160 [% IF ( letter && !independant_branch) %]
161 [% select_for_copy = BLOCK %]
162 <select name="branchcode">
163 [% FOREACH branchloo IN branchloop %]
164 <option value="[% branchloo.value %]">Copy to [% branchloo.branchname %]</option>
180 [% FOREACH lette IN letter %]
181 [% can_edit = lette.branchcode || !independant_branch %]
182 [% UNLESS ( loop.odd ) %]
183 <tr class="highlight">
187 <td>[% lette.branchname || "(All libraries)" %]</td>
188 <td>[% lette.module %]</td>
189 <td>[% lette.code %]</td>
190 <td>[% lette.name %]</td>
191 <td style="white-space: nowrap">
192 [% IF !independant_branch || !lette.branchcode %]
193 <form method="post" action="/cgi-bin/koha/tools/letter.pl">
194 <input type="hidden" name="op" value="copy" />
195 <input type="hidden" name="oldbranchcode" value="[% lette.branchcode %]" />
196 <input type="hidden" name="module" value="[% lette.module %]" />
197 <input type="hidden" name="code" value="[% lette.code %]" />
198 [% IF independant_branch %]
199 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
201 [% select_for_copy %]
203 <input type="submit" value="Copy" />
209 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=[% lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Edit</a>
213 [% IF !lette.protected && can_edit %]
214 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&branchcode=[%lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Delete</a>
224 [% IF ( add_form ) %]
225 <h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
226 <form action="?" name="Aform" method="post">
227 <input type="hidden" name="op" id="op" value="add_validate" />
228 <input type="hidden" name="checked" value="0" />
230 <input type="hidden" name="add" value="0" />
232 <input type="hidden" name="add" value="1" />
234 <fieldset class="rows">
235 <input type="hidden" name="oldbranchcode" value="[% branchcode %]" />
236 [% IF independant_branch %]
237 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
241 <label for="branch">Library:</label>
242 <select name="branchcode" id="branch" style="width:20em;">
243 <option value="">All libraries</option>
244 [% FOREACH branchloo IN branchloop %]
245 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
251 <label for="module">Koha module:</label>
252 <input type="hidden" name="oldmodule" value="[% module %]" />
253 [% 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 %]
254 [% IF ( catalogue ) %]
255 <option value="catalogue" selected="selected">Catalog</option>
257 <option value="catalogue" >Catalog</option>
259 [% IF ( circulation ) %]
260 <option value="circulation" selected="selected">Circulation</option>
262 <option value="circulation">Circulation</option>
264 [% IF ( claimacquisition ) %]
265 <option value="claimacquisition" selected="selected">Claim acquisition</option>
267 <option value="claimacquisition">Claim acquisition</option>
269 [% IF ( claimissues ) %]
270 <option value="claimissues" selected="selected">Claim serial issue</option>
272 <option value="claimissues">Claim serial issue</option>
274 [% IF ( reserves ) %]
275 <option value="reserves" selected="selected">Holds</option>
277 <option value="reserves">Holds</option>
280 <option value="members" selected="selected">Members</option>
282 <option value="members">Members</option>
285 <option value="serial" selected="selected">Serials (routing list)</option>
287 <option value="serial">Serials (routing list)</option>
289 [% IF ( suggestions ) %]
290 <option value="suggestions" selected="selected">Suggestions</option>
292 <option value="suggestions">Suggestions</option>
297 <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 %]
300 <label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="[% name %]" />
303 <label for="is_html">HTML message:</label>
305 <input type="checkbox" id="is_html" name="is_html" value="1" checked />
307 <input type="checkbox" id="is_html" name="is_html" value="1" />
311 <label for="title">Message subject:</label><input type="text" id="title" name="title" size="60" value="[% title %]" />
314 <label for="SQLfieldname">Message body:</label>
318 <tr><td><select name="SQLfieldname" id="SQLfieldname" size="9">
319 [% FOREACH SQLfieldnam IN SQLfieldname %]
320 <option value="[% SQLfieldnam.value %]">[% SQLfieldnam.text %]</option>
322 </select></td><td><input type="button" name="insert" value=">>" onclick="insertValueQuery()" title="Insert" /></td><td><textarea name="content" cols="80" rows="15">[% content %]</textarea></td></tr></table>
326 [% 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 %]
328 <fieldset class="action"><input type="button" value="Submit" onclick="Check(this.form)" class="button" /> <a class="cancel" href="/cgi-bin/koha/tools/letter.pl">Cancel</a></fieldset>
329 <input type="hidden" name="searchfield" value="[% searchfield %]" />
333 [% IF ( add_validate ) %]
335 <form action="[% action %]" method="post">
336 <input type="submit" value="OK" />
340 [% IF ( delete_confirm ) %]
341 <div class="dialog alert"><h3>Delete notice?</h3>
352 <td>[% branchname %]</td>
353 <td>[% module %]</td>
358 <form action="[% action %]" method="post">
359 <input type="hidden" name="op" value="delete_confirmed">
360 <input type="hidden" name="branchcode" value="[% branchcode %]" />
361 <input type="hidden" name="code" value="[% code %]" />
362 <input type="hidden" name="module" value="[% module %]" />
363 <input type="submit" value="Yes, delete" class="approve" />
366 <form action="[% action %]" method="get">
367 <input type="submit" value="No, do not delete" class="deny" />
373 [% IF ( delete_confirmed ) %]
375 <form action="[% action %]" method="post">
376 <input type="submit" value="OK" />
382 [% UNLESS ( add_form ) %]
383 <div class="yui-b noprint">
384 [% INCLUDE 'tools-menu.inc' %]
388 [% INCLUDE 'intranet-bottom.inc' %]