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">
8 $(document).ready(function() {
9 $("#lettert:has(tbody tr)").dataTable($.extend(true, {}, dataTablesDefaults, {
12 { "aTargets": [ -1,-2, -3 ], "bSortable": false, "bSearchable": false }
17 $('#branch').change(function() {
19 $('#selectlibrary').submit();
21 $('#newnotice').click(function() {
22 $('#op').val("add_form");
35 function isNotNull(f,noalert) {
36 if (f.value.length ==0) {
42 function isNum(v,maybenull) {
43 var n = new Number(v.value);
47 if (maybenull==0 && v.value=='') {
57 /* if (!(isNotNull(window.document.Aform.code))) {
58 _alertString += "\n- " + _("Code missing");
60 /* if (!(isNotNull(window.document.Aform.name))) {
61 _alertString += "\n- " + _("Name missing");
63 if (_alertString.length==0) {
64 document.Aform.submit();
66 alertString2 = _("Form not submitted because of the following problem(s)");
67 alertString2 += "\n------------------------------------------------------------------------------------\n";
68 alertString2 += _alertString;
72 // GPL code coming from PhpMyAdmin
73 function insertValueQuery() {
74 var myQuery = document.Aform.content;
75 var myListBox = document.Aform.SQLfieldname;
77 if(myListBox.options.length > 0) {
80 for(var i=0; i<myListBox.options.length; i++) {
81 if (myListBox.options[i].selected){
85 chaineAj += myListBox.options[i].value;
90 if (document.selection) {
92 sel = document.selection.createRange();
94 document.Aform.insert.focus();
96 //MOZILLA/NETSCAPE support
97 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
98 var startPos = document.Aform.content.selectionStart;
99 var endPos = document.Aform.content.selectionEnd;
100 var chaineSql = document.Aform.content.value;
101 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
103 myQuery.value += chaineAj;
111 <body id="tools_letter" class="tools">
112 [% INCLUDE 'header.inc' %]
113 [% INCLUDE 'letters-search.inc' %]
115 <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>
117 [% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
123 [% IF ( no_op_set ) %]
124 <h1>Notices and Slips</h1>
125 <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
126 <input type="hidden" name="searchfield" value="[% searchfield %]" />
127 [% UNLESS independant_branch %]
130 <select name="branchcode" id="branch" style="width:20em;">
131 <option value="">All libraries</option>
132 [% FOREACH branchloo IN branchloop %]
133 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
139 <input type="submit" id="newnotice" value="New Notice" />
140 <input type="hidden" id="op" name="op" />
145 <p>You searched for <b>[% searchfield %]</b></p>
147 [% IF ( letter && !independant_branch) %]
148 [% select_for_copy = BLOCK %]
149 <select name="branchcode">
150 [% FOREACH branchloo IN branchloop %]
151 <option value="[% branchloo.value %]">Copy to [% branchloo.branchname %]</option>
169 [% FOREACH lette IN letter %]
170 [% can_edit = lette.branchcode || !independant_branch %]
171 [% UNLESS ( loop.odd ) %]
172 <tr class="highlight">
176 <td>[% lette.branchname || "(All libraries)" %]</td>
177 <td>[% lette.module %]</td>
178 <td>[% lette.code %]</td>
179 <td>[% lette.name %]</td>
180 <td style="white-space: nowrap">
181 [% IF !independant_branch || !lette.branchcode %]
182 <form method="post" action="/cgi-bin/koha/tools/letter.pl">
183 <input type="hidden" name="op" value="copy" />
184 <input type="hidden" name="oldbranchcode" value="[% lette.branchcode %]" />
185 <input type="hidden" name="module" value="[% lette.module %]" />
186 <input type="hidden" name="code" value="[% lette.code %]" />
187 [% IF independant_branch %]
188 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
190 [% select_for_copy %]
192 <input type="submit" value="Copy" />
198 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=[% lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Edit</a>
202 [% IF !lette.protected && can_edit %]
203 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&branchcode=[%lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Delete</a>
211 <div class="dialog message">
212 [% IF ( branchcode ) %]
213 <p>There are no notices for this library.</p>
215 <p>There are no notices.</p>
222 [% IF ( add_form ) %]
223 <h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
224 <form action="?" name="Aform" method="post">
225 <input type="hidden" name="op" id="op" value="add_validate" />
226 <input type="hidden" name="checked" value="0" />
228 <input type="hidden" name="add" value="0" />
230 <input type="hidden" name="add" value="1" />
232 <fieldset class="rows">
233 <input type="hidden" name="oldbranchcode" value="[% branchcode %]" />
234 [% IF independant_branch %]
235 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
239 <label for="branch">Library:</label>
240 <select name="branchcode" id="branch" style="width:20em;">
241 <option value="">All libraries</option>
242 [% FOREACH branchloo IN branchloop %]
243 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
249 <label for="module">Koha module:</label>
250 <input type="hidden" name="oldmodule" value="[% module %]" />
251 [% 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 %]
252 [% IF ( catalogue ) %]
253 <option value="catalogue" selected="selected">Catalog</option>
255 <option value="catalogue" >Catalog</option>
257 [% IF ( circulation ) %]
258 <option value="circulation" selected="selected">Circulation</option>
260 <option value="circulation">Circulation</option>
262 [% IF ( claimacquisition ) %]
263 <option value="claimacquisition" selected="selected">Claim acquisition</option>
265 <option value="claimacquisition">Claim acquisition</option>
267 [% IF ( claimissues ) %]
268 <option value="claimissues" selected="selected">Claim serial issue</option>
270 <option value="claimissues">Claim serial issue</option>
272 [% IF ( reserves ) %]
273 <option value="reserves" selected="selected">Holds</option>
275 <option value="reserves">Holds</option>
278 <option value="members" selected="selected">Members</option>
280 <option value="members">Members</option>
283 <option value="serial" selected="selected">Serials (routing list)</option>
285 <option value="serial">Serials (routing list)</option>
287 [% IF ( suggestions ) %]
288 <option value="suggestions" selected="selected">Suggestions</option>
290 <option value="suggestions">Suggestions</option>
295 <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 %]
298 <label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="[% name %]" />
301 <label for="is_html">HTML message:</label>
303 <input type="checkbox" id="is_html" name="is_html" value="1" checked />
305 <input type="checkbox" id="is_html" name="is_html" value="1" />
309 <label for="title">Message subject:</label><input type="text" id="title" name="title" size="60" value="[% title %]" />
312 <label for="SQLfieldname">Message body:</label>
316 <tr><td><select name="SQLfieldname" id="SQLfieldname" size="9">
317 [% FOREACH SQLfieldnam IN SQLfieldname %]
318 <option value="[% SQLfieldnam.value %]">[% SQLfieldnam.text %]</option>
320 </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>
324 [% 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 %]
326 <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>
327 <input type="hidden" name="searchfield" value="[% searchfield %]" />
331 [% IF ( add_validate ) %]
333 <form action="[% action %]" method="post">
334 <input type="submit" value="OK" />
338 [% IF ( delete_confirm ) %]
339 <div class="dialog alert"><h3>Delete notice?</h3>
350 <td>[% branchname %]</td>
351 <td>[% module %]</td>
356 <form action="[% action %]" method="post">
357 <input type="hidden" name="op" value="delete_confirmed">
358 <input type="hidden" name="branchcode" value="[% branchcode %]" />
359 <input type="hidden" name="code" value="[% code %]" />
360 <input type="hidden" name="module" value="[% module %]" />
361 <input type="submit" value="Yes, delete" class="approve" />
364 <form action="[% action %]" method="get">
365 <input type="submit" value="No, do not delete" class="deny" />
371 [% IF ( delete_confirmed ) %]
373 <form action="[% action %]" method="post">
374 <input type="submit" value="OK" />
380 [% UNLESS ( add_form ) %]
381 <div class="yui-b noprint">
382 [% INCLUDE 'tools-menu.inc' %]
386 [% INCLUDE 'intranet-bottom.inc' %]