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 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5 <script type="text/javascript">
7 $(document).ready(function() {
8 $("#lettert:has(tbody tr)").tablesorter({
11 headers: { 4: {sorter:false},5: { sorter: false },6: { sorter: false }}
14 $('#branch').change(function() {
16 $('#selectlibrary').submit();
18 $('#newnotice').click(function() {
19 $('#op').val("add_form");
31 function isNotNull(f,noalert) {
32 if (f.value.length ==0) {
39 var x=f.value.toUpperCase();
44 function isNum(v,maybenull) {
45 var n = new Number(v.value);
49 if (maybenull==0 && v.value=='') {
56 var t = Date.parse(f.value);
66 /* if (!(isNotNull(window.document.Aform.code))) {
67 _alertString += "\n- " + _("Code missing");
69 /* if (!(isNotNull(window.document.Aform.name))) {
70 _alertString += "\n- " + _("Name missing");
72 if (_alertString.length==0) {
73 document.Aform.submit();
75 alertString2 = _("Form not submitted because of the following problem(s)");
76 alertString2 += "\n------------------------------------------------------------------------------------\n";
77 alertString2 += _alertString;
81 // GPL code coming from PhpMyAdmin
82 function insertValueQuery() {
83 var myQuery = document.Aform.content;
84 var myListBox = document.Aform.SQLfieldname;
86 if(myListBox.options.length > 0) {
89 for(var i=0; i<myListBox.options.length; i++) {
90 if (myListBox.options[i].selected){
94 chaineAj += myListBox.options[i].value;
99 if (document.selection) {
101 sel = document.selection.createRange();
103 document.Aform.insert.focus();
105 //MOZILLA/NETSCAPE support
106 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
107 var startPos = document.Aform.content.selectionStart;
108 var endPos = document.Aform.content.selectionEnd;
109 var chaineSql = document.Aform.content.value;
110 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
112 myQuery.value += chaineAj;
120 <body id="tools_letter" class="tools">
121 [% INCLUDE 'header.inc' %]
122 [% INCLUDE 'letters-search.inc' %]
124 <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>
126 [% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
132 [% IF ( no_op_set ) %]
133 <h1>Notices and Slips</h1>
134 <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
135 <input type="hidden" name="searchfield" value="[% searchfield %]" />
136 [% UNLESS independant_branch %]
139 <select name="branchcode" id="branch" style="width:20em;">
140 <option value="">All libraries</option>
141 [% FOREACH branchloo IN branchloop %]
142 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
148 <input type="submit" id="newnotice" value="New Notice" />
149 <input type="hidden" id="op" name="op" />
154 <p>You searched for <b>[% searchfield %]</b></p>
156 [% IF ( letter && !independant_branch) %]
157 [% select_for_copy = BLOCK %]
158 <select name="branchcode">
159 [% FOREACH branchloo IN branchloop %]
160 <option value="[% branchloo.value %]">Copy to [% branchloo.branchname %]</option>
176 [% FOREACH lette IN letter %]
177 [% can_edit = lette.branchcode || !independant_branch %]
178 [% UNLESS ( loop.odd ) %]
179 <tr class="highlight">
183 <td>[% lette.branchname || "(All libraries)" %]</td>
184 <td>[% lette.module %]</td>
185 <td>[% lette.code %]</td>
186 <td>[% lette.name %]</td>
188 [% IF !independant_branch || !lette.branchcode %]
189 <form method="post" action="/cgi-bin/koha/tools/letter.pl">
190 <input type="hidden" name="op" value="copy" />
191 <input type="hidden" name="oldbranchcode" value="[% lette.branchcode %]" />
192 <input type="hidden" name="module" value="[% lette.module %]" />
193 <input type="hidden" name="code" value="[% lette.code %]" />
194 [% IF independant_branch %]
195 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
197 [% select_for_copy %]
199 <input type="submit" value="Copy" />
205 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=[% lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Edit</a>
209 [% IF !lette.protected && can_edit %]
210 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&branchcode=[%lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Delete</a>
220 [% IF ( add_form ) %]
221 <h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
222 <form action="?" name="Aform" method="post">
223 <input type="hidden" name="op" id="op" value="add_validate" />
224 <input type="hidden" name="checked" value="0" />
226 <input type="hidden" name="add" value="0" />
228 <input type="hidden" name="add" value="1" />
230 <fieldset class="rows">
231 <input type="hidden" name="oldbranchcode" value="[% branchcode %]" />
232 [% IF independant_branch %]
233 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
237 <label for="branch">Library:</label>
238 <select name="branchcode" id="branch" style="width:20em;">
239 <option value="">All libraries</option>
240 [% FOREACH branchloo IN branchloop %]
241 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
247 <label for="module">Koha module:</label>
248 <input type="hidden" name="oldmodule" value="[% module %]" />
249 [% 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 %]
250 [% IF ( catalogue ) %]
251 <option value="catalogue" selected="selected">Catalog</option>
253 <option value="catalogue" >Catalog</option>
255 [% IF ( circulation ) %]
256 <option value="circulation" selected="selected">Circulation</option>
258 <option value="circulation">Circulation</option>
260 [% IF ( claimacquisition ) %]
261 <option value="claimacquisition" selected="selected">Claim acquisition</option>
263 <option value="claimacquisition">Claim acquisition</option>
265 [% IF ( claimissues ) %]
266 <option value="claimissues" selected="selected">Claim serial issue</option>
268 <option value="claimissues">Claim serial issue</option>
270 [% IF ( reserves ) %]
271 <option value="reserves" selected="selected">Holds</option>
273 <option value="reserves">Holds</option>
276 <option value="members" selected="selected">Members</option>
278 <option value="members">Members</option>
281 <option value="serial" selected="selected">Serials (routing list)</option>
283 <option value="serial">Serials (routing list)</option>
285 [% IF ( suggestions ) %]
286 <option value="suggestions" selected="selected">Suggestions</option>
288 <option value="suggestions">Suggestions</option>
293 <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 %]
296 <label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="[% name %]" />
299 <label for="is_html">HTML message:</label>
301 <input type="checkbox" id="is_html" name="is_html" value="1" checked />
303 <input type="checkbox" id="is_html" name="is_html" value="1" />
307 <label for="title">Message subject:</label><input type="text" id="title" name="title" size="60" value="[% title %]" />
310 <label for="SQLfieldname">Message body:</label>
314 <tr><td><select name="SQLfieldname" id="SQLfieldname" size="9">
315 [% FOREACH SQLfieldnam IN SQLfieldname %]
316 <option value="[% SQLfieldnam.value %]">[% SQLfieldnam.text %]</option>
318 </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>
323 <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>
324 <input type="hidden" name="searchfield" value="[% searchfield %]" />
328 [% IF ( add_validate ) %]
330 <form action="[% action %]" method="post">
331 <input type="submit" value="OK" />
335 [% IF ( delete_confirm ) %]
336 <div class="dialog alert"><h3>Delete notice?</h3>
347 <td>[% branchname %]</td>
348 <td>[% module %]</td>
353 <form action="[% action %]" method="post">
354 <input type="hidden" name="op" value="delete_confirmed">
355 <input type="hidden" name="branchcode" value="[% branchcode %]" />
356 <input type="hidden" name="code" value="[% code %]" />
357 <input type="hidden" name="module" value="[% module %]" />
358 <input type="submit" value="Yes, delete" class="approve" />
361 <form action="[% action %]" method="get">
362 <input type="submit" value="No, do not delete" class="deny" />
368 [% IF ( delete_confirmed ) %]
370 <form action="[% action %]" method="post">
371 <input type="submit" value="OK" />
377 [% UNLESS ( add_form ) %]
378 <div class="yui-b noprint">
379 [% INCLUDE 'tools-menu.inc' %]
383 [% INCLUDE 'intranet-bottom.inc' %]