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: { 3: {sorter:false},4: { 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 <form method="get" action="?" id="selectlibrary">
134 <input type="hidden" name="searchfield" value="[% searchfield %]" />
135 [% UNLESS independant_branch %]
138 <select name="branchcode" id="branch" style="width:20em;">
139 <option value="">All libraries</option>
140 [% FOREACH branchloo IN branchloop %]
141 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
147 <input type="submit" id="newnotice" value="New Notice" />
148 <input type="hidden" id="op" name="op" />
153 <p>You Searched for <b>[% searchfield %]</b></p>
155 [% IF ( letter && !independant_branch) %]
156 [% select_for_copy = BLOCK %]
157 <select name="branchcode">
158 [% FOREACH branchloo IN branchloop %]
159 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
175 [% FOREACH lette IN letter %]
176 [% can_edit = lette.branchcode || !independant_branch %]
177 [% UNLESS ( loop.odd ) %]
178 <tr class="highlight">
182 <td>[% lette.branchname || "(All libraries)" %]</td>
183 <td>[% lette.module %]</td>
184 <td>[% lette.code %]</td>
185 <td>[% lette.name %]</td>
188 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=[% lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Edit</a>
192 [% IF !independant_branch || !lette.branchcode %]
193 <form method="post" action="?">
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" />
208 [% IF !lette.protected && can_edit %]
209 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&branchcode=[%lette.branchcode %]&module=[% lette.module %]&code=[% lette.code %]">Delete</a>
219 [% IF ( add_form ) %]
221 <form action="?" name="Aform" method="post">
222 <input type="hidden" name="op" id="op" value="add_validate" />
223 <input type="hidden" name="checked" value="0" />
225 <input type="hidden" name="add" value="0" />
227 <input type="hidden" name="add" value="1" />
229 <fieldset class="rows">
230 <legend>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</legend>
232 <input type="hidden" name="oldbranchcode" value="[% branchcode %]" />
233 [% IF independant_branch %]
234 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
237 <label for="branchcode">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" /></fieldset>
324 <fieldset class="action"><input type="button" value="Cancel" onclick="cancel(this.form)" class="button" /></fieldset>
325 <input type="hidden" name="searchfield" value="[% searchfield %]" />
329 [% IF ( add_validate ) %]
331 <form action="[% action %]" method="post">
332 <input type="submit" value="OK" />
336 [% IF ( delete_confirm ) %]
337 <div class="dialog alert"><h3>Delete Notice?</h3>
348 <td>[% branchname %]</td>
349 <td>[% module %]</td>
354 <form action="[% action %]" method="post">
355 <input type="hidden" name="op" value="delete_confirmed">
356 <input type="hidden" name="branchcode" value="[% branchcode %]" />
357 <input type="hidden" name="code" value="[% code %]" />
358 <input type="hidden" name="module" value="[% module %]" />
359 <input type="submit" value="Yes, Delete" class="approve" />
362 <form action="[% action %]" method="get">
363 <input type="submit" value="No, Do Not Delete" class="deny" />
369 [% IF ( delete_confirmed ) %]
371 <form action="[% action %]" method="post">
372 <input type="submit" value="OK" />
378 [% UNLESS ( add_form ) %]
379 <div class="yui-b noprint">
380 [% INCLUDE 'tools-menu.inc' %]
384 [% INCLUDE 'intranet-bottom.inc' %]