Fixes to make all label/patron card templates uniform
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / picture-upload.tmpl
index 3c55468..92e478c 100644 (file)
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->\r
-<title>Koha &rsaquo; Tools &rsaquo; Upload Patron Images</title>\r
-<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->\r
-</head>\r
-<body>\r
-<!-- TMPL_INCLUDE NAME="header.inc" -->\r
-<!-- TMPL_INCLUDE NAME="patron-search.inc"-->\r
-\r
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Upload Patron Images </div>\r
-\r
-<div id="doc3" class="yui-t2">\r
-\r
-   <div id="bd">\r
-    <div id="yui-main">\r
-    <div class="yui-b">\r
-<div class="yui-g">\r
-<div class="yui-u first">\r
-<h1>Upload Patron Images</h1>\r
-\r
-<!-- TMPL_IF name="total" -->\r
-       <ul class="data">\r
-               <li>Unpacking completed</li>\r
-       </ul>\r
-    <!-- TMPL_VAR NAME="total" --> Scanned\r
-    <!-- TMPL_VAR NAME="handled" --> Processed\r
-    <!-- TMPL_LOOP name="counts" -->\r
-        <!-- TMPL_VAR name="count" -->         Images moved from <!-- TMPL_VAR name="source" --> to <!-- TMPL_VAR name="dest" -->\r
-        <!-- TMPL_LOOP name="filenames" -->\r
-            <!-- TMPL_VAR name="source" --> To <!-- TMPL_VAR name="dest" -->\r
-        <!-- /TMPL_LOOP -->\r
-    <!-- /TMPL_LOOP -->\r
-<!-- TMPL_ELSE -->\r
-\r
-    <!-- TMPL_IF name="errors" -->\r
-        <!-- TMPL_LOOP name="errors" -->\r
-        <ul class="error">\r
-        <!-- TMPL_IF name="NOTZIP" -->\r
-            <li>The upload file does not appear to be a zip file.  The extention is not '.zip'.</li>\r
-        <!-- /TMPL_IF -->\r
-        <!-- TMPL_IF name="NOWRITETEMP" -->\r
-            <li>This script is not able to create/write to the necessary temporary directory.</li>\r
-        <!-- /TMPL_IF -->\r
-        <!-- TMPL_IF name="NOWRITEDEST" -->\r
-            <li>This script is not able to write to the patronpictures holding directory.</li>\r
-        <!-- /TMPL_IF -->\r
-        <!-- TMPL_IF name="EMPTYUPLOAD" -->\r
-            <li>The upload file appears to be empty.</li>\r
-        <!-- /TMPL_IF -->\r
-        <!-- /TMPL_LOOP -->\r
-    <!-- /TMPL_IF -->\r
-    <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data">\r
-    <ul>\r
-        <li>Select a file to upload to the server. Each .jpg file contained therein will be copied to the appropriate place on the server for patron pictures.</li>\r
-        <li>You can include multiple pictures in a .zip file.</li>\r
-        <li>There should be a DATALINK.TXT or IDLINK.TXT file for each group of pictures that has the cardnumber of the patron and the file containing that patrons picture.  One patron per line seperated by either ,'s or tabs.  Quotes around the fields are ignored.</li>\r
-    </ul>\r
-    <table>\r
-        <tr>\r
-            <th><label for="uploadfile">Select the .zip file to unpack: </label></th>\r
-            <td>\r
-                <input type="file" id="uploadfile" name="uploadfile" /><br />\r
-            </td>\r
-        </tr>\r
-    </table>\r
-        <input type="submit" value="Unpack" class="submit" />\r
-    </form>\r
-    \r
-<!-- /TMPL_IF -->\r
-\r
-</div>\r
-</div>\r
-</div>\r
-</div>\r
-<div class="yui-b">\r
-<!-- TMPL_INCLUDE NAME="tools-menu.inc" -->\r
-</div>\r
-</div>\r
-<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->\r
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
+<title>Koha &rsaquo; Tools &rsaquo; Upload Patron Images</title>
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<script type="text/javascript">
+ $(document).ready(function() {
+       $("#zipfile").click(function(){
+               $("#cardnum").hide();
+       });
+       $("#image").click(function(){
+               $("#cardnum").show();
+       });
+});
+</script>
+</head>
+<body>
+
+<!-- TMPL_INCLUDE NAME="header.inc" -->
+<!-- TMPL_INCLUDE NAME="patron-search.inc"-->
+
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Upload Patron Images </div>
+
+<div id="doc3" class="yui-t2">
+    <div id="bd">
+        <div id="yui-main">
+<!-- TMPL_IF name="TOTAL" -->
+    <div class="yui-b">
+        <div class="yui-g">
+            <div class="yui-u first">
+            <!-- TMPL_IF name="ERRORS" -->
+                <div class="dialog alert">
+                <h1>Patron Image(s) Uploaded With Some Errors</h1>
+                </div>
+            <!-- TMPL_ELSE -->
+                <div class="dialog message">
+                <h1>Patron Image(s) Successfully Uploaded</h1>
+                </div>
+            <!-- /TMPL_IF -->
+               <ul class="data">
+                   <li>Unpacking completed</li>
+                  <li><!-- TMPL_VAR NAME ="TOTAL" --> directories scanned.</li>
+                    <li><!-- TMPL_VAR NAME="HANDLED" --> directories processed.</li>
+                </ul>
+                <!-- TMPL_LOOP name="COUNTS" -->
+                   <ul class="data">
+                        <li><!-- TMPL_VAR name="TCOUNTS" --> image(s) moved into the database:</li>
+                        <!-- TMPL_LOOP name="filenames" -->
+                            <li><!-- TMPL_VAR name="source" --> - Cardnumber: <!-- TMPL_VAR name="cardnumber" -->
+                                    <!-- TMPL_IF NAME="filerrors" --><br /> <b>WARNING:</b> This image <i>not</i> imported because 
+                                    <!-- TMPL_LOOP NAME="filerrors" -->
+                                        <!-- TMPL_IF NAME="DBERR" -->the database returned an error. Please refer to the error log for more details.</li>
+                                        <!-- TMPL_ELSIF NAME="IMGEXISTS" -->this patron does not exist in the database.</li>
+                                        <!-- TMPL_ELSIF NAME="MIMERR" -->the image format is unrecognized.</li>
+                                        <!-- TMPL_ELSIF NAME="OPNERR" -->Koha was unable to open the image for reading.</li>
+                                        <!-- TMPL_ELSIF NAME="CRDFIL" -->the <!-- TMPL_VAR NAME="CRDFIL" --> is missing.</li>
+                                        <!-- TMPL_ELSE -->of an unknown error. Please refer to the error log for more details.</li><!-- /TMPL_IF -->
+                                    <!-- /TMPL_LOOP -->
+                                        <!--TMPL_ELSE --> imported successfully.</li>
+                                    <!-- /TMPL_IF -->
+                        <!-- /TMPL_LOOP -->
+                        </ul>
+                <!-- /TMPL_LOOP -->
+                <a id="uploadmore" href="/cgi-bin/koha/tools/picture-upload.pl">Upload More Images</a>
+                <a id="doneupload" href="/cgi-bin/koha/tools/tools-home.pl">Return to Tools</a>
+            </div>
+<!-- TMPL_ELSE -->
+    <div class="yui-b">
+        <div class="yui-g">
+            <div class="yui-u first">
+                <h1>Upload Patron Images</h1>
+                <!-- TMPL_IF name="ERRORS" -->
+                <div class="dialog alert">
+                    <!-- TMPL_LOOP name="ERRORS" -->
+                        <!-- TMPL_IF name="NOTZIP" --><li><b>The upload file does not appear to be a zip file.  The extention is not '.zip'.</b></li>
+                        <!-- TMPL_ELSIF name="NOWRITETEMP" --><li><b>This script is not able to create/write to the necessary temporary directory.</b></li>
+                        <!-- TMPL_ELSIF name="EMPTYUPLOAD" --><li><b>The upload file appears to be empty.</b></li>
+                        <!-- TMPL_ELSIF name="OPNLINK" --><li><b>Cannot open <!-- TMPL_VAR NAME="OPNLINK" --> to read.<br />Please verify that it exists.</b></li>
+                        <!-- TMPL_ELSIF name="OPNIMG" --><li><b>Cannot open <!-- TMPL_VAR NAME="OPNIMG" --> to read.<br />Please verify that it exists.</b></li>
+                        <!-- TMPL_ELSIF name="DELERR" --><li><b>Unrecognized or missing field delimeter.<br />Please verify that you are using either a single quote or a tab.</b></li>
+                        <!-- TMPL_ELSIF name="UZIPFAIL" --><li><b><!-- TMPL_VAR name="UZIPFAIL" --> failed to unpack.<br />Please verify the integrity of the zip file and retry.</b></li>
+                        <!-- TMPL_ELSE --><li><b>An unknown error has occurred.<br />Please review the error log for more details.</b></li><!-- /TMPL_IF -->
+                    <!-- /TMPL_LOOP -->
+                </div>
+                <!-- /TMPL_IF -->
+               <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data">
+                   <fieldset class="brief">
+                        <ol class="radio">
+                            <li class="radio">
+                                <label for="zipfile"><input type="radio" id="zipfile" name="filetype" value="zip" checked="checked" /> zip file</label></li>
+                                <li>
+                                <label for="image">
+                                                               <!-- TMPL_IF EXPR="filetype eq 'image'" --><input type="radio" id="image" name="filetype" value="image" checked="checked" /><!-- TMPL_ELSE --><input type="radio" id="image" name="filetype" value="image" /><!-- /TMPL_IF -->
+                                                                image file</label>
+                       <ol>
+                            <li>
+                                <label for="uploadfile">Select the file to upload: </label><input type="file" id="uploadfile" name="uploadfile" />
+                                <!-- TMPL_IF EXPR="filetype eq 'image'" --><span id="cardnum"><!-- TMPL_ELSE --><span id="cardnum" style="display: none"><!-- /TMPL_IF --><label for="cardnumber">Enter patron cardnumber: </label><input type="text" id="cardnumber" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" size="15" /></span>
+                            </li>
+                       </ol>
+                                       </li></ol>
+                   </fieldset>
+                    <fieldset class="action">
+                        <input type="submit" name="op" value="Upload" class="submit" />
+                        <input type="submit" name="op" value="Cancel" class="submit" />
+                    </fieldset>
+                </form>
+       
+            </div>     
+<!-- /TMPL_IF -->
+        </div>
+    </div>
+</div>
+<div class="yui-b noprint">
+    <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->