[HEAD](bug #3318) Granular renew permissions
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / itemtypes.tmpl
index 0789e5e..fbdb62c 100644 (file)
@@ -1,24 +1,21 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-<title>Koha &rsaquo; Administration &rsaquo;<!-- TMPL_IF name="add_form" -->
+<title>Koha &rsaquo; Administration &rsaquo; Item Types <!-- TMPL_IF name="add_form" -->&rsaquo; 
   <!-- TMPL_IF name="itemtype" -->
-Modify item type '<!-- TMPL_VAR name="itemtype" -->'
+Modify Item Type '<!-- TMPL_VAR name="itemtype" -->'
   <!-- TMPL_ELSE -->
-Add item type
+Add Item Type
   <!-- /TMPL_IF -->
 <!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirm" -->
+<!-- TMPL_IF name="delete_confirm" -->&rsaquo; 
   <!-- TMPL_IF name="total" -->
 Cannot Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'
   <!-- TMPL_ELSE -->
 Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'?
   <!-- /TMPL_IF -->
 <!-- /TMPL_IF -->
-<!-- TMPL_IF name="delete_confirmed" -->
+<!-- TMPL_IF name="delete_confirmed" -->&rsaquo; 
 Data Deleted
 <!-- /TMPL_IF -->
-<!-- TMPL_IF name="else" -->
-Item Types Administration
-<!-- /TMPL_IF -->
 </title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" --><script type="text/javascript">
 //<![CDATA[
@@ -76,8 +73,16 @@ function Check(f) {
                alert(alertString2);
        }
 }
+     $(document).ready(function() {
+        $('#icons > ul').tabs();
+     });
 //]]>
 </script>
+<style type="text/css">
+       fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
+       fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-selected {background-color : transparent; }
+       fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
+</style>
 </head>
 <body>
 <!-- TMPL_INCLUDE NAME="header.inc" -->
@@ -85,20 +90,20 @@ function Check(f) {
 
 <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; <!-- TMPL_IF name="add_form" -->
   <!-- TMPL_IF name="itemtype" -->
-Modify item type '<!-- TMPL_VAR name="itemtype" -->'
+<a href="/cgi-bin/koha/admin/itemtypes.pl">Item Types</a> &rsaquo; Modify Item Type '<!-- TMPL_VAR name="itemtype" -->'
   <!-- TMPL_ELSE -->
-Add item type
+<a href="/cgi-bin/koha/admin/itemtypes.pl">Item Types</a> &rsaquo; Add Item Type
   <!-- /TMPL_IF -->
 <!-- /TMPL_IF -->
 <!-- TMPL_IF name="delete_confirm" -->
   <!-- TMPL_IF name="total" -->
-Cannot Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'
+<a href="/cgi-bin/koha/admin/itemtypes.pl">Item Types</a> &rsaquo; Cannot Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'
   <!-- TMPL_ELSE -->
-Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'?
+<a href="/cgi-bin/koha/admin/itemtypes.pl">Item Types</a> &rsaquo; Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'?
   <!-- /TMPL_IF -->
 <!-- /TMPL_IF -->
 <!-- TMPL_IF name="delete_confirmed" -->
-Data Deleted
+<a href="/cgi-bin/koha/admin/itemtypes.pl">Item Types</a> &rsaquo;Data Deleted
 <!-- /TMPL_IF -->
 <!-- TMPL_IF name="else" -->
 Item Types Administration
@@ -109,52 +114,79 @@ Item Types Administration
    <div id="bd">
        <div id="yui-main">
        <div class="yui-b">
+       
+<!-- TMPL_IF NAME="else" --><div id="toolbar">
+       <script type="text/javascript">
+       //<![CDATA[
+
+       // prepare DOM for YUI Toolbar
+
+        $(document).ready(function() {
+           yuiToolbar();
+        });
+
+       // YUI Toolbar Functions
+
+       function yuiToolbar() {
+           new YAHOO.widget.Button("newitemtype");
+       }
+
+       //]]>
+       </script>
+       <ul class="toolbar">
+       <li><a id="newitemtype" href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form">New Item Type</a></li>
+</ul></div><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
 
 <!-- TMPL_IF name="add_form" -->
   <!-- TMPL_IF name="itemtype" -->
-      <h3>Modify item type</h3>
+      <h3>Modify Item Type</h3>
   <!-- TMPL_ELSE -->
-      <h3>Add item type</h3>
+      <h3>Add Item Type</h3>
   <!-- /TMPL_IF -->
 <form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
   <input type="hidden" name="op" value="add_validate" />
     <input type="hidden" name="checked" value="0" />
                
-    <table>
+    <fieldset class="rows">
+       <ol>
   <!-- TMPL_IF name="itemtype" -->
-      <tr>
-        <th>
-          <label>Item type</label>
-        </th>
-        <td>
-          <input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->" />
+      <li>
+          <span class="label">Item type</span> <input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->" />
           <!-- TMPL_VAR name="itemtype" -->
-        </td>
-      </tr>
+     </li>
   <!-- TMPL_ELSE -->
-      <tr>
-        <th>
-          <label for="itemtype">Item type</label>
-        </th>
-        <td>
-          <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" />
-        </td>
-      </tr>
+      <li>
+          <label for="itemtype">Item type</label> <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" />
+      </li>
   <!-- /TMPL_IF -->
-      <tr>
-        <th>
-          <label for="description">Description</label>
-        </th>
-       <td>
-          <input type="text" id="description" name="description" size="48" maxlength="80" value="<!-- TMPL_VAR name="description" escape="HTML" -->" />
-        </td>
-      </tr>
-      <tr>
-        <th>Image</th>
-        <td>
-          <p>
-  <!-- TMPL_LOOP NAME="IMAGESLOOP" -->
-            <label>
+      <li>
+          <label for="description">Description</label><input type="text" id="description" name="description" size="48" maxlength="80" value="<!-- TMPL_VAR name="description" escape="HTML" -->" />      </li>
+     <!-- TMPL_IF NAME="noItemTypeImages" -->
+        <li><span class="label">Image: </span>Item type images are disabled. To enable them, turn off the <a href="/cgi-bin/koha/admin/systempreferences.pl?tab=all&searchfield=noItemTypeImages">noItemTypeImages system preference</a></li></ol>
+        <!-- TMPL_ELSE --></ol>
+               <div id="icons" class="toptabs">
+               <h5 style="margin-left:10px;">Choose an Icon:</h5>
+                       <ul>
+                                       <li><a href="/cgi-bin/koha/admin/itemtypes.pl#none">None</a></li>
+                                 <!-- TMPL_LOOP NAME="imagesets" -->
+                                       <li><a href="/cgi-bin/koha/admin/itemtypes.pl#<!-- TMPL_VAR NAME="imagesetname" -->"><!-- TMPL_VAR name="imagesetname" --></a></li>
+                                 <!-- /TMPL_LOOP -->
+                                 <li><a href="/cgi-bin/koha/admin/itemtypes.pl#remote">Remote Image</a></li>
+                       </ul>
+               </div>
+  <div id="none"><ul>
+  <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
+  </ul>
+  <br class="clear" /></div>
+        
+  <!-- TMPL_LOOP NAME="imagesets" -->
+  <div id="<!-- TMPL_VAR NAME="imagesetname" -->"><ul>
+  <!-- TMPL_LOOP NAME="images" -->
+                       <li style="float: none; display: inline; clear : none; width: auto;">
+            <label> <!-- TMPL_IF NAME="StaffImageUrl" -->
+              <img src="<!-- TMPL_VAR name="StaffImageUrl" -->" alt="<!-- TMPL_VAR name="StaffImageUrl" -->" title="<!-- TMPL_VAR name="StaffImageUrl" -->" />
+        <!-- TMPL_ELSE -->
+        <!-- /TMPL_IF -->
     <!-- TMPL_IF name="checked" -->
               <input type="radio" name="image" value="<!-- TMPL_VAR name="KohaImage" -->" checked="checked" />
     <!-- TMPL_ELSE -->
@@ -162,104 +194,86 @@ Item Types Administration
               <input type="radio" name="image" value="<!-- TMPL_VAR name="KohaImage" -->" />
               <!-- /TMPL_IF -->
     <!-- /TMPL_IF -->
-        <!-- TMPL_IF NAME="KohaImageSrc" -->
-              <img src="<!-- TMPL_VAR name="KohaImageSrc" -->" alt="<!-- TMPL_VAR name="KohaImageSrc" -->" title="<!-- TMPL_VAR name="KohaImageSrc" -->" />
-        <!-- TMPL_ELSE -->
-              <br />
-        <!-- /TMPL_IF -->
             </label>
+                       </li>
   <!-- /TMPL_LOOP -->
-          </p>
-
-          <p>
-            <label>
+  </ul>
+  <br class="clear" />
+  </div>
+  <!-- /TMPL_LOOP -->
+<div id="remote"><ul>
+<li> <label for="remote_image_check"> Remote image:</label>
   <!-- TMPL_IF name="remote_image" -->
             <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
   <!-- TMPL_ELSE -->
             <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
-  <!-- /TMPL_IF -->
-            remote image
-            </label>
-            <input type="text" name="remoteImage" size="48" maxlength="200" value="<!-- TMPL_VAR name="remote_image" -->" onmousedown="document.getElementById('remote_image_check').checked = true;" />
-
-  <!-- TMPL_IF name="remote_image" -->
+  <!-- /TMPL_IF --><input type="text" name="remoteImage" size="48" maxlength="200" value="<!-- TMPL_VAR name="remote_image" -->" onmousedown="document.getElementById('remote_image_check').checked = true;" /> <!-- TMPL_IF name="remote_image" -->
             <img src="<!-- TMPL_VAR name="remote_image" -->" alt="" />
-  <!-- /TMPL_IF -->
-          </p>
-          <hr />
-          <p>
-            <label><input type="radio" name="image" value="removeImage" /> remove image</label>
-          </p>
-        </td>
-      </tr>
-      <tr>
-        <th>
-          <label for="notforloan">Not for loan</label>
-        </th>
-        <td>
-            <!-- TMPL_IF name="notforloan" -->
+  <!-- /TMPL_IF --></li>
+</ul>
+  <br class="clear" />
+</div>
+<!-- /TMPL_IF -->
+<ol>
+      <li>
+          <label for="notforloan">Not for loan</label>   <!-- TMPL_IF name="notforloan" -->
                 <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
             <!-- TMPL_ELSE -->
                 <input type="checkbox" id="notforloan" name="notforloan" value="1" />
             <!-- /TMPL_IF -->
           (if checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item)
-        </td>
-      </tr>
-      <tr>
-        <th>
-          <label for="renewalsallowed">Renewals</label>
-        </th>
-        <td>
-                 <input type="text" id="renewalsallowed" name="renewalsallowed" size="3" maxlength="3" value="<!-- TMPL_VAR NAME="renewalsallowed" -->" />
-        </td>
-      </tr>
-      <tr>
-        <th>
-          <label for="rentalcharge">Rental charge</label>
-        </th>
-        <td>
-          <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="<!-- TMPL_VAR name="rentalcharge" -->" />
-        </td>
-      </tr>
-      <tr>
-        <th>
-          <label for="rentalcharge">Summary</label>
-        </th>
-        <td><p>Enter a summary that will overwrite the default one in search results lists</p>
-          <p><textarea id="summary" name="summary" cols="40" rows="10"><!-- TMPL_VAR NAME="summary" --></textarea></p>
-          <p>Example, for a website itemtype : </p>
+        
+      </li>
+      <li>
+          <label for="renewalsallowed">Renewals: </label>
+                 <input type="text" id="renewalsallowed" name="renewalsallowed" size="3" maxlength="3" value="<!-- TMPL_VAR NAME="renewalsallowed" -->" />
+        </li>
+      <li>
+          <label for="rentalcharge">Rental charge: </label>
+                 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="<!-- TMPL_VAR name="rentalcharge" -->" />
+         </li>
+      <li>
+          <label for="summary">Summary: </label>
+         <textarea id="summary" name="summary" cols="55" rows="5"><!-- TMPL_VAR NAME="summary" --></textarea>
+          <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
           <p><b>&lt;a href="[856u]"&gt;open site&lt;/a&gt;</b> will show the link just below the title</p>
-        </td>
-      </tr>
-    </table>
+      </li>
+         </ol>
+    </fieldset>
 
-    <p id="action">
+    <fieldset class="action">
       <input type="button" value="Save Changes" onclick="Check(this.form)" />
-      <input type="button" value="Cancel" onclick="history.back();" />
-    </p>
+         <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
+    </fieldset>
 </form>
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF name="delete_confirm" -->
-<!-- TMPL_IF name="total" --><div class="error">This record is used <!-- TMPL_VAR name="total" --> times. Deletion is not possible.<!-- /TMPL_IF -->
-<div class="table details">    <table>
-       <caption><!-- TMPL_IF name="total" -->Cannot Delete Item Type<!-- TMPL_ELSE -->Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'?<!-- /TMPL_IF --></caption>
+<!-- TMPL_IF name="total" --><div class="dialog message">
+<h3>Cannot Delete Item Type</h3>
+<p><strong>This record is used <!-- TMPL_VAR name="total" --> times</strong>. Deletion is not possible.</p>
+<!-- TMPL_ELSE --><div class="dialog alert">
+<h3>Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'?</h3>
+<!-- /TMPL_IF -->
+<table>
                <tr>
-                       <th>Item type</th>
+                       <th scope="row">Item type</th>
                        <td><!-- TMPL_VAR name="itemtype" --></td>
                </tr>
 
-       <tr><th>Description</th><td><!-- TMPL_VAR name="description" --></td></tr>
-       <tr><th>Loan length</th><td><!-- TMPL_VAR name="loanlength" --></td></tr>
-       <tr><th>Renewals</th><td><!-- TMPL_IF name="renewalsallowed" -->Allowed<!-- TMPL_ELSE -->Not allowed<!-- /TMPL_IF --></td></tr>
-<!-- Hide from NPL  --><tr><th>Rental charge</th><td><!-- TMPL_VAR name="rentalcharge" --></td></tr><!-- Hide from NPL --></table>
+       <tr><th scope="row">Description</th><td><!-- TMPL_VAR name="description" --></td></tr>
+       <tr><th scope="row">Loan length</th><td><!-- TMPL_VAR name="loanlength" --></td></tr>
+       <tr><th scope="row">Renewals</th><td><!-- TMPL_IF name="renewalsallowed" -->Allowed<!-- TMPL_ELSE -->Not allowed<!-- /TMPL_IF --></td></tr>
+<tr><th scope="row">Rental charge</th><td><!-- TMPL_VAR name="rentalcharge" --></td></tr></table>
                <form action="<!-- TMPL_VAR name="script_name" -->" method="post">
                <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->" /><!-- TMPL_IF name="total" -->
-               </form><form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" value="OK" /></form>
+               </form>
+               
+               <form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" class="approve" value="OK" /></form>
        <!-- TMPL_ELSE -->
-               <input type="submit" value="Delete this Item Type" /></form> <form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" value="Do Not Delete" /></form>
+               <input type="submit" class="approve" value="Delete this Item Type" /></form> <form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" class="deny" value="Do Not Delete" /></form>
        <!-- /TMPL_IF -->
-
+</div>
        
 <!-- /TMPL_IF -->
 
@@ -267,21 +281,20 @@ Item Types Administration
 <h2>Item Types Administration</h2>
 <table>
   <tr>
-    <th>image</th>
+    <!-- TMPL_UNLESS NAME="noItemTypeImages" --><th>Image</th><!-- /TMPL_UNLESS -->
     <th>Code</th>
     <th>Description</th>
-    <th>Not for Loan</th>
-    <th>Renewable</th>
+    <th>Not for loan</th>
     <th>Charge</th>
     <th>Actions</th>
   </tr>
   <!-- TMPL_LOOP name="loop" -->
-    <!-- TMPL_IF NAME="toggle" -->
-  <tr>
-    <!-- TMPL_ELSE -->
+    <!-- TMPL_UNLESS name="__odd__" -->
   <tr class="highlight">
+    <!-- TMPL_ELSE -->
+  <tr>
     <!-- /TMPL_IF -->
-    <td><img src="<!-- TMPL_VAR name="imageurl" -->" alt="" /></td>
+   <!-- TMPL_UNLESS NAME="noItemTypeImages" --> <td><img src="<!-- TMPL_VAR name="imageurl" -->" alt="" /></td><!-- /TMPL_UNLESS -->
     <td>
       <a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;itemtype=<!-- TMPL_VAR name="itemtype" escape="HTML" -->">
         <!-- TMPL_VAR name="itemtype" -->
@@ -290,13 +303,6 @@ Item Types Administration
     <td><!-- TMPL_VAR name="description" --></td>
     <td><!-- TMPL_IF NAME="notforloan" -->Yes<!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
     <td>
-    <!-- TMPL_IF NAME="renewalsallowed" -->
-      <!-- TMPL_VAR name="renewalsallowed" --> time(s)
-    <!-- TMPL_ELSE -->
-      No
-    <!-- /TMPL_IF -->
-    </td>
-    <td>
     <!-- TMPL_UNLESS name="notforloan" -->
       <!-- TMPL_VAR NAME="rentalcharge" -->
     <!-- /TMPL_UNLESS -->
@@ -311,7 +317,6 @@ Item Types Administration
 
 <div class="paginationBar"><!-- TMPL_VAR NAME="pagination_bar" --></div>
 
-<p><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form">Add Item type</a></p>
 <!-- /TMPL_IF -->