OAI-PMH second try
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / picture-upload.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Tools &rsaquo; Upload Patron Images</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript">
5 function blah($this){
6     var found=null
7     var els=document.getElementsByName($this.name)
8     for(var i=0;i<els.length;i++){
9         if(els[i]==$this){found=i;break}
10     }
11     if(found==0)return hideCardnumber()
12     if(found==1)return showCardnumber()
13 }
14
15 function showCardnumber(){
16     document.getElementById("cardnum").style.display="block"
17 }
18
19 function hideCardnumber(){
20     document.getElementById("cardnum").style.display="none"
21 }
22 </script>
23 </head>
24 <body>
25
26 <!-- TMPL_INCLUDE NAME="header.inc" -->
27 <!-- TMPL_INCLUDE NAME="patron-search.inc"-->
28
29 <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>
30
31 <div id="doc3" class="yui-t2">
32     <div id="bd">
33         <div id="yui-main">
34 <!-- TMPL_IF name="TOTAL" -->
35     <div class="yui-b">
36         <div class="yui-g">
37             <div class="yui-u first">
38             <!-- TMPL_IF name="ERRORS" -->
39                 <div class="dialog alert">
40                 <h1>Patron Image(s) Uploaded With Some Errors</h1>
41                 </div>
42             <!-- TMPL_ELSE -->
43                 <div class="dialog message">
44                 <h1>Patron Image(s) Successfully Uploaded</h1>
45                 </div>
46             <!-- /TMPL_IF -->
47                 <ul class="data">
48                     <li>Unpacking completed</li>
49                   <li><!-- TMPL_VAR NAME ="TOTAL" --> directories scanned.</li>
50                     <li><!-- TMPL_VAR NAME="HANDLED" --> directories processed.</li>
51                 </ul>
52                 <!-- TMPL_LOOP name="COUNTS" -->
53                     <ul class="data">
54                         <li><!-- TMPL_VAR name="TCOUNTS" --> image(s) moved into the database:</li>
55                         <!-- TMPL_LOOP name="filenames" -->
56                             <li><!-- TMPL_VAR name="source" --> - Cardnumber: <!-- TMPL_VAR name="cardnumber" -->
57                                     <!-- TMPL_IF NAME="filerrors" --><br /> <b>WARNING:</b> This image <i>not</i> imported because 
58                                     <!-- TMPL_LOOP NAME="filerrors" -->
59                                         <!-- TMPL_IF NAME="DBERR" -->the database returned an error. Please refer to the error log for more details.</li><!-- TMPL_ELSE -->
60                                         <!-- TMPL_IF NAME="IMGEXISTS" -->this patron does not exist in the database.</li><!-- TMPL_ELSE -->
61                                         <!-- TMPL_IF NAME="MIMERR" -->the image format is unrecognized.</li><!-- TMPL_ELSE -->
62                                         <!-- TMPL_IF NAME="OPNERR" -->Koha was unable to open the image for reading.</li><!-- TMPL_ELSE -->
63                                         <!-- TMPL_IF NAME="CRDFIL" -->the <!-- TMPL_VAR NAME="CRDFIL" --> is missing.</li><!-- TMPL_ELSE -->
64                                         of an unknown error. Please refer to the error log for more details.</li><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
65                                     <!-- /TMPL_LOOP -->
66                                         <!--TMPL_ELSE --> imported successfully.</li>
67                                     <!-- /TMPL_IF -->
68                         <!-- /TMPL_LOOP -->
69                         </ul>
70                 <!-- /TMPL_LOOP -->
71                 <a id="uploadmore" href="/cgi-bin/koha/tools/picture-upload.pl">Upload More Images</a>
72                 <a id="doneupload" href="/cgi-bin/koha/tools/tools-home.pl">Return to Tools</a>
73             </div>
74 <!-- TMPL_ELSE -->
75     <div class="yui-b">
76         <div class="yui-g">
77             <div class="yui-u first">
78                 <h1>Upload Patron Images</h1>
79                 <!-- TMPL_IF name="ERRORS" -->
80                 <div class="dialog alert">
81                     <!-- TMPL_LOOP name="ERRORS" -->
82                         <!-- 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_ELSE -->
83                         <!-- TMPL_IF name="NOWRITETEMP" --><li><b>This script is not able to create/write to the necessary temporary directory.</b></li><!-- TMPL_ELSE -->
84                         <!-- TMPL_IF name="EMPTYUPLOAD" --><li><b>The upload file appears to be empty.</b></li><!-- TMPL_ELSE -->
85                         <!-- TMPL_IF name="OPNLINK" --><li><b>Cannot open <!-- TMPL_VAR NAME="OPNLINK" --> to read.<br />Please verify that it exists.</b></li><!-- TMPL_ELSE -->
86                         <!-- TMPL_IF name="OPNIMG" --><li><b>Cannot open <!-- TMPL_VAR NAME="OPNIMG" --> to read.<br />Please verify that it exists.</b></li><!-- TMPL_ELSE -->
87                         <!-- TMPL_IF 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_ELSE -->
88                         <!-- TMPL_IF 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 -->
89                         <li><b>An unknown error has occurred.<br />Please review the error log for more details.</b></li><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
90                     <!-- /TMPL_LOOP -->
91                 </div>
92                 <!-- /TMPL_IF -->
93                 <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data">
94                     <fieldset class="brief">
95                         <ol>
96                             <li>
97                                 <input type="radio" id="filetype" name="filetype" onclick="blah(this)" value="zip" checked="checked" /> zip file
98                                 <br />
99                                 <input type="radio" id="filetype" name="filetype" onclick="blah(this)" value="image" /> image file
100                         <ol>
101                             <li>
102                                 <label for="uploadfile">Select the file to upload: </label><input type="file" id="uploadfile" name="uploadfile" />
103                                 <span id="cardnum" style="display: none"><label for="cardnumber">Enter patron cardnumber: </label><input type="text" id="cardnumber" name="cardnumber" size="15" /></span>
104                             </li>
105                         </ol>
106                     </fieldset>
107                     <fieldset class="action"><input type="submit" value="Upload" class="submit" /> <a href="/cgi-bin/koha/tools/picture-upload.pl" class="cancel">Cancel</a>
108                     </fieldset>
109                 </form>
110         
111             </div>      
112 <!-- /TMPL_IF -->
113         </div>
114     </div>
115 </div>
116 <div class="yui-b noprint">
117     <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
118 </div>
119 </div>
120 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->