(MT 3267) Add Homebranch and Holdingbranch search criterion on circulation stat.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / aqbookfund.tmpl
index 6ea9262..eb75a67 100644 (file)
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-<title>Koha &rsaquo; System Administration: Funds and Budgets</title>
+<title>Koha &rsaquo; Administration &rsaquo; Funds and Budgets</title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<script type="text/javascript">
+//<![CDATA[
+<!-- TMPL_IF name="add_form" -->
+       function toUC(f) {
+               f.value=f.value.toUpperCase();
+               return true;
+       }
+
+       function Check(f) {
+               var _alertString="";
+               var alertString2;
+               if (f.bookfundid.value.length==0) {
+                       _alertString += "- bookfundid missing\n";
+               }
+               if (f.bookfundname.value.length==0) {
+                       _alertString += "- bookfundname missing\n";
+               }
+               if (_alertString.length==0) {
+                       document.Aform.submit();
+               } else {
+                       alertString2 = "Form not submitted because of the following problem(s)\n";
+                       alertString2 += "------------------------------------------------------------------------------------\n\n";
+                       alertString2 += _alertString;
+                       alert(alertString2);
+               }
+       }
+<!-- /TMPL_IF -->
+        $(document).ready(function() {
+           new YAHOO.widget.Button("newfund");
+        });
+//]]>
+</script>
+</head>
+<body>
 <!-- TMPL_INCLUDE NAME="header.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
+<!-- TMPL_INCLUDE NAME="bookfund-admin-search.inc" -->
 
-<div id="doc3" class="yui-t2">
-   
-   <div id="bd">
-       <div id="yui-main">
-       <div class="yui-b"><div class="yui-g">
+<div id="breadcrumbs">
+    <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+&rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
+&rsaquo; <a href="/cgi-bin/koha/admin/aqbookfund.pl">Funds and Budgets</a>
+<!-- TMPL_IF name="add_form" -->&rsaquo; Add fund<!-- /TMPL_IF -->
+</div>
 
+<div id="doc3" class="yui-t2">
+  <div id="bd">
+    <div id="yui-main">
+      <div class="yui-b">
+       
 <!-- TMPL_IF name="else" -->
+<div id="toolbar">
+       <ul class="toolbar">
+       <li><a id="newfund" href="/cgi-bin/koha/admin/aqbookfund.pl?op=add_form">New Fund</a></li>
+</ul></div>
 <h1>Funds and budgets administration</h1>
   <!-- TMPL_IF NAME="bookfund" -->
+<form action="aqbudget.pl" method="post">
 <table>
   <tr>
     <th>Code</th>
     <th>Name</th>
-    <th>Branch</th>
-    <th>Actions</th>
+    <th>Library</th>
+    <th colspan="3">Actions</th>
   </tr>
 
-<form action="<!-- TMPL_VAR name="scriptname" -->" method="post">
-  <tr class="filter">
-    <td>
-      <select name="filter_bookfundid">
-        <option value="">----</option>
-    <!-- TMPL_LOOP name="filter_bookfundids" -->
-      <!-- TMPL_IF NAME="selected" -->
-        <option value="<!-- TMPL_VAR name="bookfundid" -->" selected="selected"><!-- TMPL_VAR name="bookfundid" --></option>
-      <!-- TMPL_ELSE -->
-        <option value="<!-- TMPL_VAR name="bookfundid" -->"><!-- TMPL_VAR name="bookfundid" --></option>
-      <!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-      </select>
-    </td>
-    <td>
-      <input type="text" name="filter_bookfundname" value="<!-- TMPL_VAR name="filter_bookfundname" -->" />
-    </td>
-    <td>
-      <select name="filter_branchcode">
-        <option value="">----</option>
-    <!-- TMPL_LOOP name="filter_branches" -->
-      <!-- TMPL_IF NAME="selected" -->
-        <option value="<!-- TMPL_VAR name="code" -->" selected="selected"><!-- TMPL_VAR name="name" --></option>
-      <!-- TMPL_ELSE -->
-        <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
-      <!-- /TMPL_IF -->
-    <!-- /TMPL_LOOP -->
-      </select>
-    </td>
-    <td>
-      <input type="submit" name="filter" value="Filter" />
-    </td>
-  </tr>
-</form>
-
-<form action="aqbudget.pl" method="post">
     <!-- TMPL_LOOP name="bookfund" -->
-      <!-- TMPL_IF NAME="toggle" -->
+      <!-- TMPL_UNLESS NAME="__odd__" -->
   <tr class="highlight">
       <!-- TMPL_ELSE -->
   <tr>
-      <!-- /TMPL_IF -->
-    <td>
-      <!-- TMPL_VAR name="bookfundid" -->
-    </td>
-    <td>
-      <!-- TMPL_VAR name="bookfundname" -->
-    </td>
-    <td>
-      <!-- TMPL_IF NAME="branchname" -->
-      <!-- TMPL_VAR name="branchname" -->
-      <!-- TMPL_ELSE -->
-      None
-      <!-- /TMPL_IF -->
-    </td>
+      <!-- /TMPL_UNLESS -->
+    <td><!-- TMPL_VAR name="bookfundid" --></td>
+    <td><!-- TMPL_VAR name="bookfundname" --></td>
+    <td><!-- TMPL_VAR name="branchname" DEFAULT="" --></td>
     <td>
-      <a href="<!-- TMPL_VAR name="scriptname" -->?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->&amp;branchcode=<!-- TMPL_VAR name="branchcode" -->">Edit</a>
-      <a href="<!-- TMPL_VAR name="scriptname" -->?op=delete_confirm&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->&amp;branchcode=<!-- TMPL_VAR name="branchcode" -->">Delete</a>
+      <a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->&amp;branchcode=<!-- TMPL_VAR name="branchcode" -->">Edit</a></td><td>
+      <a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->&amp;branchcode=<!-- TMPL_VAR name="branchcode" -->">Delete</a></td><td>
       <a href="aqbudget.pl?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" -->&amp;branchcode=<!-- TMPL_VAR name="branchcode" -->">Add budget</a>
       <!-- TMPL_IF NAME="has_budgets" -->
       <a href="aqbudget.pl?filter_bookfundid=<!-- TMPL_VAR name="bookfundid" -->">Show budgets</a>
       <!-- /TMPL_IF -->
     </td>
   </tr>
-
     <!-- /TMPL_LOOP --> <!-- bookfund -->
 </table>
+</form>
 
 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
   <!-- /TMPL_IF --> <!-- bookfund -->
 
 <p>
-  <a href="<!-- TMPL_VAR name="scriptname" -->?op=add_form">Add bookfund</a>
   <a href="aqbudget.pl">Show all budgets</a>
 </p>
 
-</form>
 <!-- /TMPL_IF --> <!-- else -->
 
 <!-- TMPL_IF name="add_form" -->
-<script>
-       //
-       function isNotNull(f,noalert) {
-               if (f.value.length ==0) {
-   return false;
-               }
-               return true;
-       }
-       //
-       function toUC(f) {
-               var x=f.value.toUpperCase();
-               f.value=x;
-               return true;
-       }
-       //
-       function isNum(v,maybenull) {
-       var n = new Number(v.value);
-       if (isNaN(n)) {
-               return false;
-               }
-       if (maybenull==0 && v.value=="") {
-               return false;
-       }
-       return true;
-       }
-       //
-       function isDate(f) {
-               var t = Date.parse(f.value);
-               if (isNaN(t)) {
-                       return false;
-               }
-       }
-       //
-       function Check(f) {
-               var ok=1;
-               var _alertString="";
-               var alertString2;
-               if (f.bookfundid.value.length==0) {
-                       _alertString += "- bookfundid missing\n";
-               }
-               if (f.bookfundname.value.length==0) {
-                       _alertString += "- bookfundname missing\n";
-               }
-               if (_alertString.length==0) {
-                       document.Aform.submit();
-               } else {
-                       alertString2 = "Form not submitted because of the following problem(s)\n";
-                       alertString2 += "------------------------------------------------------------------------------------\n\n";
-                       alertString2 += _alertString;
-                       alert(alertString2);
-               }
-       }
-       </script>
-
 <form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
-  <input type="hidden" name="op" value="add_validate" />
   <input type="hidden" name="checked" value="0" />
 
-  <table>
-    <caption><!-- TMPL_VAR name="header" --></caption>
+<!-- TMPL_IF name="header-is-modify-p" -->
+  <input type="hidden" name="op" value="mod_validate" />
+  <input type="hidden" name="current_branch" value="<!-- TMPL_VAR name="current_branch" -->"/>
+<!-- TMPL_ELSIF name="header-is-add-p" -->
+  <input type="hidden" name="op" value="add_validate" />
+<!-- /TMPL_IF -->
+
+  <fieldset class="rows">
+    <legend><!-- TMPL_IF name="header-is-modify-p" -->Modify book fund<!-- TMPL_ELSIF name="header-is-add-p" -->Add book fund<!-- /TMPL_IF -->
+    </legend>
     
+  <ol>
   <!-- TMPL_IF name="add_or_modify" -->
-    <tr>
-      <th>Book fund</th>
-      <td>
-        <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
+    <li><span class="label">Fund: </span>
+        <input type="hidden" name="bookfundid" id="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
         <!-- TMPL_VAR name="bookfundid" -->
-      </td>
-    </tr>
+    </li>
   <!-- TMPL_ELSE -->
-    <tr>
-      <th>Book fund</th>
-      <td>
-        <input type="text" name="bookfundid" size="5" maxlength="5" onblur="toUC(this)" />
-      </td>
-    </tr>
+    <li><label for="bookfundid">Fund: </label>
+        <input type="text" name="bookfundid" id="bookfundid" size="10" maxlength="10" onblur="toUC(this)" />
+    </li>
   <!-- /TMPL_IF --> <!-- add_or_modify -->
     
-    <tr>
-      <th>Name</th>
-      <td>
-        <input type="text"
-               name="bookfundname"
-               size="40"
-          maxlength="80"
-              value="<!-- TMPL_VAR name="bookfundname" escape="HTML" -->"
-        />
-      </td>
-    </tr>
+    <li><label for="bookfundname">Name: </label>
+           <input type="text" name="bookfundname" id="bookfundname" size="40" maxlength="80" value="<!-- TMPL_VAR name="bookfundname" escape="HTML" -->" />
+    </li>
 
-    <tr>
-      <th>Branch</th>
-      <td>
-        <select name="branchcode">
-          <option value="">None</option>
+    <li><label for="branchcode">Library: </label>
+        <select name="branchcode" id="branchcode">
+          <option value="">----</option>
   <!-- TMPL_LOOP NAME="branches" -->
     <!-- TMPL_IF NAME="selected" -->
           <option value="<!-- TMPL_VAR NAME="branchcode" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
           <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchname" --></option>
     <!-- /TMPL_IF -->
   <!-- /TMPL_LOOP -->
-      </td>
-    </tr>
+       </select>
+    </li>
+  </ol>
     
-  </table>
+  </fieldset>
 
-  <p>
+  <fieldset class="action">
     <input type="button" value="Submit" onclick="Check(this.form); return false;" />
-  </p>
+    <a class="cancel" href="/cgi-bin/koha/admin/aqbookfund.pl">Cancel</a>
+  </fieldset>
 </form>
 <!-- /TMPL_IF --> <!-- add_form -->
 
 <!-- TMPL_IF name="add_validate" -->
-<h3>Data Recorded</h3>
-
+<h3>Fund added</h3>
 <p>
   <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
 </p>
-<!-- /TMPL_IF -->
-
-<!-- TMPL_IF name="delete_confirm" -->
+<!-- TMPL_ELSIF name="mod_validate" -->
+<h3>Fund modified</h3>
+<p>
+  <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
+</p>
+<!-- TMPL_ELSIF name="delete_confirm" -->
+<div class="dialog alert">
 <h3>Confirm Deletion of Fund <em><!-- TMPL_VAR name="bookfundid" --></em></h3>
-<table>
-  <tr>
-    <th>Book fund</th>
-    <td><!-- TMPL_VAR name="bookfundid" --></td>
-  </tr>
-  <tr>
-    <th>Branch</th>
-    <td><!-- TMPL_VAR name="branchcode" --></td>
-  </tr>
-  <tr>
-    <th>Name</th>
-    <td><!-- TMPL_VAR name="bookfundname" --></td>
-  </tr>
-  <tr>
-    <th>Group</th>
-    <td><!-- TMPL_VAR name="bookfundgroup" --></td>
-  </tr>
-</table>
-
 <form action="<!-- TMPL_VAR name="action" -->" method="post">
   <input type="hidden" name="op" value="delete_confirmed" />
   <input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" />
   <input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" -->" />
-
-  <div id="action">
-    <input type="submit" value="Delete this Fund" />
-  </div>
-</form>
-
-<form action="<!-- TMPL_VAR name="action" -->" method="post">
-  <input type="submit" value="Do not Delete" />
+       <table>
+  <tr>
+    <th scope="row">Fund: </th><td>
+    <!-- TMPL_VAR name="bookfundid" --></td></tr>
+  <tr>
+    <th scope="row">Library: </th><td>
+    <!-- TMPL_VAR name="branchcode" --></td></tr>
+  <tr>
+    <th scope="row">Name: </th><td>
+    <!-- TMPL_VAR name="bookfundname" --></td></tr>
+  <tr>
+    <th scope="row">Group: </th><td>
+    <!-- TMPL_VAR name="bookfundgroup" --></td></tr>
+       </table>
+  <input type="submit" class="approve" value="Yes, Delete this Fund" />
 </form>
-<!-- /TMPL_IF --> <!-- delete_confirm -->
+<form action="/cgi-bin/koha/admin/aqbookfund.pl" method="get"><input type="submit" class="deny" value="No, Do not Delete" /></form>
+</div>
 
-<!-- TMPL_IF name="delete_confirmed" -->
-<h3>Data Deleted</h3>
-<form action="<!-- TMPL_VAR name="action" -->" method="post">
-  <input type="submit" value="OK" />
-</form>
+<!-- TMPL_ELSIF name="delete_confirmed" -->
+<div class="dialog message"><h3>Data Deleted</h3>
+<form action="<!-- TMPL_VAR name="action" -->" method="get">
+  <input type="submit" class="approve" value="OK" />
+</form></div>
 <!-- /TMPL_IF --> <!-- delete_confirmed -->
 
 </div>
 </div>
+<div class="yui-b">
+<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
+</div>
 </div>
-
-<!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->