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="[% interface %]/[% theme %]/en/css/datatables.css" />
5 <script type="text/javascript" src="[% interface %]/[% theme %]/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
6 [% INCLUDE 'datatables-strings.inc' %]
7 <script type="text/javascript" src="[% interface %]/[% theme %]/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 }
19 $('#branch').change(function() {
21 $('#selectlibrary').submit();
23 $('#newnotice').click(function() {
24 $('#op').val("add_form");
37 function isNotNull(f,noalert) {
38 if (f.value.length ==0) {
45 var x=f.value.toUpperCase();
50 function isNum(v,maybenull) {
51 var n = new Number(v.value);
55 if (maybenull==0 && v.value=='') {
62 var t = Date.parse(f.value);
72 /* if (!(isNotNull(window.document.Aform.code))) {
73 _alertString += "\n- " + _("Code missing");
75 /* if (!(isNotNull(window.document.Aform.name))) {
76 _alertString += "\n- " + _("Name missing");
78 if (_alertString.length==0) {
79 document.Aform.submit();
81 alertString2 = _("Form not submitted because of the following problem(s)");
82 alertString2 += "\n------------------------------------------------------------------------------------\n";
83 alertString2 += _alertString;
87 // GPL code coming from PhpMyAdmin
88 function insertValueQuery() {
89 var myQuery = document.Aform.content;
90 var myListBox = document.Aform.SQLfieldname;
92 if(myListBox.options.length > 0) {
95 for(var i=0; i<myListBox.options.length; i++) {
96 if (myListBox.options[i].selected){
100 chaineAj += myListBox.options[i].value;
105 if (document.selection) {
107 sel = document.selection.createRange();
109 document.Aform.insert.focus();
111 //MOZILLA/NETSCAPE support
112 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
113 var startPos = document.Aform.content.selectionStart;
114 var endPos = document.Aform.content.selectionEnd;
115 var chaineSql = document.Aform.content.value;
116 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
118 myQuery.value += chaineAj;
126 <body id="tools_letter" class="tools">
127 [% INCLUDE 'header.inc' %]
128 [% INCLUDE 'letters-search.inc' %]
130 <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>
132 [% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
138 [% IF ( no_op_set ) %]
139 <h1>Notices and Slips</h1>
140 <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
141 <input type="hidden" name="searchfield" value="[% searchfield %]" />
142 [% UNLESS independant_branch %]
145 <select name="branchcode" id="branch" style="width:20em;">
146 <option value="">All libraries</option>
147 [% FOREACH branchloo IN branchloop %]
148 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
154 <input type="submit" id="newnotice" value="New Notice" />
155 <input type="hidden" id="op" name="op" />
160 <p>You searched for <b>[% searchfield %]</b></p>
162 [% IF ( letter && !independant_branch) %]
163 [% select_for_copy = BLOCK %]
164 <select name="branchcode">
165 [% FOREACH branchloo IN branchloop %]
166 <option value="[% branchloo.value %]">Copy to [% branchloo.branchname %]</option>
184 [% FOREACH lette IN letter %]
185 [% can_edit = lette.branchcode || !independant_branch %]
186 [% UNLESS ( loop.odd ) %]
187 <tr class="highlight">
191 <td>[% lette.branchname || "(All libraries)" %]</td>
192 <td>[% lette.module %]</td>
193 <td>[% lette.code %]</td>
194 <td>[% lette.name %]</td>
195 <td style="white-space: nowrap">
196 [% IF !independant_branch || !lette.branchcode %]
197 <form method="post" action="/cgi-bin/koha/tools/letter.pl">
198 <input type="hidden" name="op" value="copy" />
199 <input type="hidden" name="oldbranchcode" value="[% lette.branchcode %]" />
200 <input type="hidden" name="module" value="[% lette.module %]" />
201 <input type="hidden" name="code" value="[% lette.code %]" />
202 [% IF independant_branch %]
203 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
205 [% select_for_copy %]
207 <input type="submit" value="Copy" />
213 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=[% lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Edit</a>
217 [% IF !lette.protected && can_edit %]
218 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&branchcode=[%lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Delete</a>
226 <div class="dialog message">
227 [% IF ( branchcode ) %]
228 <p>There are no notices for this library.</p>
230 <p>There are no notices.</p>
237 [% IF ( add_form ) %]
238 <h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
239 <form action="?" name="Aform" method="post">
240 <input type="hidden" name="op" id="op" value="add_validate" />
241 <input type="hidden" name="checked" value="0" />
243 <input type="hidden" name="add" value="0" />
245 <input type="hidden" name="add" value="1" />
247 <fieldset class="rows">
248 <input type="hidden" name="oldbranchcode" value="[% branchcode %]" />
249 [% IF independant_branch %]
250 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
254 <label for="branch">Library:</label>
255 <select name="branchcode" id="branch" style="width:20em;">
256 <option value="">All libraries</option>
257 [% FOREACH branchloo IN branchloop %]
258 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
264 <label for="module">Koha module:</label>
265 <input type="hidden" name="oldmodule" value="[% module %]" />
266 [% 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 %]
267 [% IF ( catalogue ) %]
268 <option value="catalogue" selected="selected">Catalog</option>
270 <option value="catalogue" >Catalog</option>
272 [% IF ( circulation ) %]
273 <option value="circulation" selected="selected">Circulation</option>
275 <option value="circulation">Circulation</option>
277 [% IF ( claimacquisition ) %]
278 <option value="claimacquisition" selected="selected">Claim acquisition</option>
280 <option value="claimacquisition">Claim acquisition</option>
282 [% IF ( claimissues ) %]
283 <option value="claimissues" selected="selected">Claim serial issue</option>
285 <option value="claimissues">Claim serial issue</option>
287 [% IF ( reserves ) %]
288 <option value="reserves" selected="selected">Holds</option>
290 <option value="reserves">Holds</option>
293 <option value="members" selected="selected">Members</option>
295 <option value="members">Members</option>
298 <option value="serial" selected="selected">Serials (routing list)</option>
300 <option value="serial">Serials (routing list)</option>
302 [% IF ( suggestions ) %]
303 <option value="suggestions" selected="selected">Suggestions</option>
305 <option value="suggestions">Suggestions</option>
310 <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 %]
313 <label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="[% name %]" />
316 <label for="is_html">HTML message:</label>
318 <input type="checkbox" id="is_html" name="is_html" value="1" checked />
320 <input type="checkbox" id="is_html" name="is_html" value="1" />
324 <label for="title">Message subject:</label><input type="text" id="title" name="title" size="60" value="[% title %]" />
327 <label for="SQLfieldname">Message body:</label>
331 <tr><td><select name="SQLfieldname" id="SQLfieldname" size="9">
332 [% FOREACH SQLfieldnam IN SQLfieldname %]
333 <option value="[% SQLfieldnam.value %]">[% SQLfieldnam.text %]</option>
335 </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>
339 [% 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 %]
341 <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>
342 <input type="hidden" name="searchfield" value="[% searchfield %]" />
346 [% IF ( add_validate ) %]
348 <form action="[% action %]" method="post">
349 <input type="submit" value="OK" />
353 [% IF ( delete_confirm ) %]
354 <div class="dialog alert"><h3>Delete notice?</h3>
365 <td>[% branchname %]</td>
366 <td>[% module %]</td>
371 <form action="[% action %]" method="post">
372 <input type="hidden" name="op" value="delete_confirmed">
373 <input type="hidden" name="branchcode" value="[% branchcode %]" />
374 <input type="hidden" name="code" value="[% code %]" />
375 <input type="hidden" name="module" value="[% module %]" />
376 <input type="submit" value="Yes, delete" class="approve" />
379 <form action="[% action %]" method="get">
380 <input type="submit" value="No, do not delete" class="deny" />
386 [% IF ( delete_confirmed ) %]
388 <form action="[% action %]" method="post">
389 <input type="submit" value="OK" />
395 [% UNLESS ( add_form ) %]
396 <div class="yui-b noprint">
397 [% INCLUDE 'tools-menu.inc' %]
401 [% INCLUDE 'intranet-bottom.inc' %]