1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Tools › Notices<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF name="modify" --> › Modify notice<!-- TMPL_ELSE --> › Add notice<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" --> › Notice added<!-- /TMPL_IF --><!-- TMPL_IF NAME="delete_confirm" --> › Confirm Deletion<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5 <script type="text/javascript">
7 $(document).ready(function() {
8 $("#lettert").tablesorter({
11 headers: { 3: {sorter:false},4: { sorter: false }}
14 <!-- TMPL_IF NAME="add_form" -->
16 function isNotNull(f,noalert) {
17 if (f.value.length ==0) {
24 var x=f.value.toUpperCase();
29 function isNum(v,maybenull) {
30 var n = new Number(v.value);
34 if (maybenull==0 && v.value=='') {
41 var t = Date.parse(f.value);
51 /* if (!(isNotNull(window.document.Aform.code))) {
52 _alertString += "\n- " + _("Code missing");
54 /* if (!(isNotNull(window.document.Aform.name))) {
55 _alertString += "\n- " + _("Name missing");
57 if (_alertString.length==0) {
58 document.Aform.submit();
60 alertString2 = _("Form not submitted because of the following problem(s)");
61 alertString2 += "\n------------------------------------------------------------------------------------\n";
62 alertString2 += _alertString;
66 // GPL code coming from PhpMyAdmin
67 function insertValueQuery() {
68 var myQuery = document.Aform.content;
69 var myListBox = document.Aform.SQLfieldname;
71 if(myListBox.options.length > 0) {
74 for(var i=0; i<myListBox.options.length; i++) {
75 if (myListBox.options[i].selected){
79 chaineAj += myListBox.options[i].value;
84 if (document.selection) {
86 sel = document.selection.createRange();
88 document.Aform.insert.focus();
90 //MOZILLA/NETSCAPE support
91 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
92 var startPos = document.Aform.content.selectionStart;
93 var endPos = document.Aform.content.selectionEnd;
94 var chaineSql = document.Aform.content.value;
95 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
97 myQuery.value += chaineAj;
106 <!-- TMPL_INCLUDE NAME="header.inc" -->
107 <!-- TMPL_INCLUDE NAME="letters-search.inc" -->
109 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF name="modify" --><a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Modify notice<!-- TMPL_ELSE --> <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Add notice<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_IF NAME="add_validate" --> <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Notice added<!-- TMPL_ELSE --><!-- TMPL_IF NAME="delete_confirm" --> <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Confirm Deletion<!-- TMPL_ELSE -->Notices<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF --></div>
111 <!-- TMPL_IF NAME="add_form" --><div id="doc" class="yui-t7"><!-- TMPL_ELSE --><div id="doc3" class="yui-t2"><!-- /TMPL_IF -->
117 <!-- TMPL_IF NAME="no_op_set" -->
119 <script type="text/javascript">
121 // prepare DOM for YUI Toolbar
122 $(document).ready(function() {
125 // YUI Toolbar Functions
126 function yuiToolbar() {
127 new YAHOO.widget.Button("newnotice");
132 <li><a id="newnotice" href="/cgi-bin/koha/tools/letter.pl?op=add_form">New Notice</a></li>
135 <!-- TMPL_IF NAME="search" -->
136 <p>You Searched for <b><!-- TMPL_VAR NAME="searchfield" --></b></p>
138 <!-- TMPL_IF NAME="letter" --><table id="lettert">
146 <tbody><!-- TMPL_LOOP NAME="letter" -->
147 <!-- TMPL_UNLESS NAME="__odd__" -->
148 <tr class="highlight">
151 <!-- /TMPL_UNLESS -->
152 <td><!-- TMPL_VAR NAME="module" --></td>
153 <td><!-- TMPL_VAR NAME="code" --></td>
154 <td><!-- TMPL_VAR NAME="name" --></td>
156 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=<!-- TMPL_VAR name="module" -->&code=<!-- TMPL_VAR NAME="code" -->">Edit</a>
159 <!-- TMPL_IF NAME="protected" -->
162 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&module=<!-- TMPL_VAR name="module"-->&code=<!-- TMPL_VAR NAME="code" -->">Delete</a>
166 <!-- /TMPL_LOOP --></tbody>
172 <!-- TMPL_IF NAME="add_form" -->
174 <form action="/cgi-bin/koha/tools/letter.pl" name="Aform" method="post">
175 <input type="hidden" name="op" value="add_validate" />
176 <input type="hidden" name="checked" value="0" />
177 <!-- TMPL_IF name="modify" -->
178 <input type="hidden" name="add" value="0" />
180 <input type="hidden" name="add" value="1" />
182 <fieldset class="rows">
183 <legend><!-- TMPL_IF name="modify" -->Modify notice<!-- TMPL_ELSE -->Add notice<!-- /TMPL_IF --></legend>
186 <label for="module">Koha module:</label>
187 <!-- TMPL_IF NAME="modify" --><select name="module" id="module"><!-- /TMPL_IF --> <!-- TMPL_IF NAME="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;"><!--/TMPL_IF-->
188 <!--TMPL_IF Name="catalogue"-->
189 <option value="catalogue" selected="selected">Catalog</option>
191 <option value="catalogue" >Catalog</option>
193 <!--TMPL_IF Name="circulation"-->
194 <option value="circulation" selected="selected">Circulation</option>
196 <option value="circulation">Circulation</option>
198 <!--TMPL_IF Name="claimacquisition"-->
199 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
201 <option value="claimacquisition">Claim Acquisition</option>
203 <!--TMPL_IF Name="claimissues"-->
204 <option value="claimissues" selected="selected">Claim Serial Issue</option>
206 <option value="claimissues">Claim Serial Issue</option>
208 <!--TMPL_IF Name="reserves"-->
209 <option value="reserves" selected="selected">Holds</option>
211 <option value="reserves">Holds</option>
213 <!--TMPL_IF Name="members"-->
214 <option value="members" selected="selected">Members</option>
216 <option value="members">Members</option>
218 <!--TMPL_IF Name="serial"-->
219 <option value="serial" selected="selected">Serials (Routing List)</option>
221 <option value="serial">Serials (Routing List)</option>
223 <!--TMPL_IF Name="suggestions"-->
224 <option value="suggestions" selected="selected">Suggestions</option>
226 <option value="suggestions">Suggestions</option>
231 <span class="label">Code:</span><!--TMPL_IF Name="adding"--><input type="text" id="code" name="code" size="20" maxlength="20" /><!--TMPL_ELSE--><input type="hidden" id="code" name="code" value="<!-- TMPL_VAR NAME="code" -->" /><!-- TMPL_VAR NAME="code" --><!--/TMPL_IF-->
234 <label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="<!-- TMPL_VAR NAME="name" -->" />
237 <label for="title">Message Subject:</label><input type="text" id="title" name="title" size="60" value="<!-- TMPL_VAR NAME="title" -->" />
240 <label for="SQLfieldname">Message Body:</label>
244 <tr><td><select name="SQLfieldname" id="SQLfieldname" size="9">
245 <!-- TMPL_LOOP name="SQLfieldname" -->
246 <option value="<!-- TMPL_VAR name="value"-->"><!-- TMPL_VAR name="text"--></option>
248 </select></td><td><input type="button" name="insert" value=">>" onclick="insertValueQuery()" title="Insert" /></td><td><textarea name="content" cols="80" rows="15"><!-- TMPL_VAR NAME="content" --></textarea></td></tr></table>
253 <fieldset class="action"><input type="button" value="Submit" onclick="Check(this.form)" class="button" /></fieldset>
257 <!-- TMPL_IF NAME="add_validate" -->
259 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
260 <input type="submit" value="OK" />
264 <!-- TMPL_IF NAME="delete_confirm" -->
265 <div class="dialog alert"><h3>Delete Notice?</h3>
275 <td><!-- TMPL_VAR NAME="module"--></td>
276 <td><!-- TMPL_VAR NAME="code" --></td>
277 <td><!-- TMPL_VAR NAME="name" --></td>
280 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
281 <input type="hidden" name="op" value="delete_confirmed">
282 <input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->" />
283 <input type="hidden" name="module" value="<!-- TMPL_VAR NAME="module" -->" />
284 <input type="submit" value="Yes, Delete" class="approve" />
287 <form action="<!-- TMPL_VAR NAME="action" -->" method="get">
288 <input type="submit" value="No, Do Not Delete" class="deny" />
294 <!-- TMPL_IF NAME="delete_confirmed" -->
296 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
297 <input type="submit" value="OK" />
303 <!-- TMPL_UNLESS NAME="add_form" -->
304 <div class="yui-b noprint">
305 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
307 <!-- /TMPL_UNLESS -->
309 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->