Followup : authorities frameworks were not editable
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / authtypes.tmpl
index fd7b6aa..1a21466 100644 (file)
@@ -1,12 +1,14 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-<title>Koha &rsaquo; System Administration</title>
+<title>Koha &rsaquo; Administration &rsaquo; Authority Types
+<!-- TMPL_IF NAME="add_form" -->
+&rsaquo; <!-- TMPL_IF NAME="authtypecode" -->Modify authority type<!-- TMPL_ELSE -->New authority type<!-- /TMPL_IF -->
+<!-- TMPL_ELSIF NAME="delete_confirm" -->
+&rsaquo; Confirm Deletion of Authority Type
+<!-- /TMPL_IF -->
+</title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-
-
-<!-- TMPL_INCLUDE NAME="menus.inc" -->
-<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
-
-<script language="javascript" type="text/javascript">
+<script type="text/javascript">
+//<![CDATA[
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 function isNotNull(f,noalert) {
        if (f.value.length ==0) {
@@ -21,26 +23,7 @@ function toUC(f) {
        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.authtypecode.value.length==0) {
@@ -58,70 +41,113 @@ function Check(f) {
                alert(alertString2);
        }
 }
+
+$(document).ready(function() {
+    new YAHOO.widget.Button("authtype");
+});
+//]]>
 </script>
+</head>
+<body>
+<!-- TMPL_INCLUDE NAME="header.inc" -->
+<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
+
+<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="<!-- TMPL_IF NAME="script_name" -->">Authority Types</a>
+<!-- TMPL_IF NAME="add_form" -->
+&rsaquo; <!-- TMPL_IF NAME="authtypecode" -->Modify<!-- TMPL_ELSE -->New<!-- /TMPL_IF --> Authority Type
+<!-- TMPL_ELSIF NAME="delete_confirm" -->
+&rsaquo; Confirm Deletion of Authority Type
+<!-- /TMPL_IF -->
+</div>
+
+<div id="doc3" class="yui-t2">
+  <div id="bd">
+       <div id="yui-main">
+         <div class="yui-b">
 
 <!-- TMPL_IF NAME="add_form" -->
 
-       <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
-       <table>
-               <!-- TMPL_IF NAME="authtypecode" -->
-               <caption>Modify authority type</caption>
+    <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+    <fieldset class="rows">
+    <legend>
+    <!-- TMPL_IF NAME="authtypecode" -->
+        Modify authority type
        <!-- TMPL_ELSE -->
-               <caption>Add authority type</caption>
+        New authority type
        <!-- /TMPL_IF -->
-                       <!-- TMPL_IF NAME="authtypecode" -->
-                               <tr><td><label for="authtypecode">Authority type<label></td><td><input type="hidden" name="op" value="add_validate" />
-               <input type="hidden" name="checked" value="0" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /><!-- TMPL_VAR NAME="authtypecode" --></td></tr>
-                       <!-- TMPL_ELSE -->
-                               <tr><td><label for="authtypecode">Authority type<label></td><td><input id="authtypecode" type="text" name="authtypecode" size="10" maxlength="10" onblur="toUC(this)" /></td></tr>
-                       <!-- /TMPL_IF -->
-               <tr><td><label for="authtypetext">Description</label></td><td><input type="text" id="authtypetext" name="authtypetext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="authtypetext" ESCAPE="HTML" -->" /></td></tr>
-               <tr><td><label for="summary">Summary</label></td><td><textarea id="summary" name="summary" cols="40" rows="10"><!-- TMPL_VAR NAME="summary" --></textarea></td></tr>
-               <tr><td><label for="auth_tag_to_report">Report tag</label></td><td><input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="<!-- TMPL_VAR NAME="auth_tag_to_report">" />Enter here the number of the tag that will be reported in the biblio (subfield by subfield). For example, in UNIMARC, enter 200 to report every 200 subfield in the 70x biblio</td></tr></table>
-       <input type="hidden" name="op" value="add_validate" />
-       <p><input type="submit" value="OK" onclick="Check(this.form); return false;" />
-                       </p>
+    </legend>
+    <ol>
+        <li>
+    <!-- TMPL_IF NAME="authtypecode" -->
+            <span class="label">Authority type</span>
+            <input type="hidden" name="op" value="add_validate" />
+            <input type="hidden" name="checked" value="0" />
+            <input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /><!-- TMPL_VAR NAME="authtypecode" -->
+    <!-- TMPL_ELSE -->
+            <label for="authtypecode">Authority type: </label>
+            <input id="authtypecode" type="text" name="authtypecode" size="10" maxlength="10" onblur="toUC(this)" />
+    <!-- /TMPL_IF -->
+        </li>
+               <li><label for="authtypetext">Description: </label><input type="text" id="authtypetext" name="authtypetext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="authtypetext" ESCAPE="HTML" -->" /></li>
+               <li><label for="summary">Summary: </label><textarea id="summary" name="summary" cols="55" rows="7"><!-- TMPL_VAR NAME="summary" --></textarea></li>
+               <li>
+               <p class="tip">Note: for 'Authority field to copy', enter the authority field that should be copied from the authority record to the bibliographic record. E.g., in MARC21, field 100 in the authority record should be copied to field 100 in the bibliographic record</p>
+               <label for="auth_tag_to_report">Authority field to copy: </label><input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="<!-- TMPL_VAR NAME="auth_tag_to_report">" />
+               <input type="hidden" name="op" value="add_validate" />
+        <!-- TMPL_IF NAME="authtypecode" -->
+        <input type="hidden" name="modif" value="1" />
+        <!-- /TMPL_IF -->
+        </li>
+    </ol>
+       </fieldset>
+       <fieldset class="action"><input type="submit" value="Submit" onclick="Check(this.form); return false;" />
+        <a class="cancel" href="<!-- TMPL_VAR NAME="script_name" -->">Cancel</a>
+    </fieldset>
        </form>
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF NAME="delete_confirm" -->
-<div>
-       <h2>Authority structure definition for <!-- TMPL_VAR NAME="authtypetext" --> (<!-- TMPL_VAR NAME="authtypecode" -->)</h2>
+               <div class="dialog alert"><h3>Confirm Deletion of authority structure definition for <span class="ex">'<!-- TMPL_VAR NAME="authtypetext" -->' (<!-- TMPL_VAR NAME="authtypecode" -->)</span></h3>
        <!-- TMPL_IF NAME="total" -->
-               <p>
-                       This record is used <!-- TMPL_VAR NAME="total" --> times
-               </p>
-       <!-- /TMPL_IF -->
-       <p>CONFIRM DELETION</p>
-       <p>
-               <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                       <input type="hidden" name="op" value="delete_confirmed" />
+               <p>This record is used <strong><!-- TMPL_VAR NAME="total" --></strong> times</p>
+       <!-- /TMPL_IF -->               
+                       <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" />
                        <input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
-                       <input type="submit" value="YES" />
-               </form>
-               <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-                       <input type="submit" value="NO" />
+                       <fieldset class="action"><input type="submit" class="approve" value="Yes, Delete" />
                </form>
-       </p>
-
+               <form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="submit" class="deny" value="No, Do Not Delete" /></form>
+               </div>
 <!-- /TMPL_IF -->
 
 <!-- TMPL_IF NAME="else" -->
-<h1>Auth type Admin</h1>
+
+<div id="toolbar">
+       <ul class="toolbar">
+       <li><a id="authtype" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Authority Type</a></li>
+</ul></div>
+
+<h1>Authority Types</h1>
 <p>Define authority types, then authority MARC structure in the same way you define itemtypes and biblio MARC tag structure. Authority values are managed through plugins</p>
 <table>
        <tr>
                <th>Code</th>
                <th>Description</th>
                <th>Summary</th>
-               <th>Tag reported</th>
+               <th>Auth field copied</th>
                <th>&nbsp;</th>
                <th>Edit</th>
                <th>Delete</th>
        </tr>
        
        <!-- TMPL_LOOP NAME="loop" -->
+        <!-- TMPL_IF NAME="__odd__" -->
                <tr>
+        <!-- TMPL_ELSE -->
+        <tr class="highlight">
+        <!-- /TMPL_IF -->
                        <td><!-- TMPL_VAR NAME="authtypecode" --></td>
                        <td><!-- TMPL_VAR NAME="authtypetext" --></td>
                        <td><!-- TMPL_VAR NAME="summary" --></td>
@@ -132,12 +158,15 @@ function Check(f) {
                </tr>
        <!-- /TMPL_LOOP -->
 </table>
-<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
-       <input type="hidden" name="op" value="add_form" />
-       <input type="submit" value="Add authority type" />
-       <td width="33%"><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF --></td>
-       <td width="33%"><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF --></td>
-</form>
+
+       <!-- TMPL_IF NAME="previous" --><p><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a></p><!-- /TMPL_IF -->
+       <!-- TMPL_IF NAME="next" --><p><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a></p><!-- /TMPL_IF -->
 
 <!-- /TMPL_IF -->
+</div>
+</div>
+<div class="yui-b">
+<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
+</div>
+</div>
 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->