memberentryC.tmpl:add test to modify link name
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / acqui.simple / additem.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: Items for Bibliographic Record <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
2
3
4
5 <h1>Items for <!-- TMPL_VAR name="title" --> <!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR name="author" --><!-- /TMPL_IF --> (Record #<!-- TMPL_VAR NAME="biblionumber" -->)</h1>
6
7 <ul>
8         <li>            <form action="/cgi-bin/koha/acqui.simple/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" /><input type="submit" value="Edit Bibliographic Record" /></form></li>
9         <li><form action="/cgi-bin/koha/detail.pl" method="get"><input type="hidden" name="bib" value="<!-- TMPL_VAR name="biblionumber" -->" /> <input type="submit" value="View in Catalog" /></form></li>
10         <li><form action="/cgi-bin/koha/MARCdetail.pl" method="get"><input type="hidden" name="bib" value="<!-- TMPL_VAR name="biblionumber" -->" /> <input type="submit" value="View MARC in Catalog" /></form></li>
11         <li> <form action="/cgi-bin/koha/ISBDdetail.pl" method="get"><input type="hidden" name="bib" value="<!-- TMPL_VAR name="biblionumber" -->" /> <input type="submit" value="View ISBD in Catalog" /></form></li>
12 </ul>
13
14         <form method="post" action="additem.pl" name="f">
15         <input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->" />
16         <input type="hidden" name="bibid" value="<!-- TMPL_VAR NAME="bibid" -->" />
17         <!-- TMPL_IF name="item_loop" -->
18                         <div name="10XX" id="10XX">
19                         <table>
20                         <caption>Existing items</caption>
21                                 <tr>
22                                         <!-- TMPL_LOOP NAME="item_header_loop" -->
23                                                 <th>
24                                                         <!-- TMPL_VAR NAME="header_value" -->
25                                                 </th>
26                                         <!-- /TMPL_LOOP -->
27                                         <th colspan="2">&nbsp;</th>
28                                 </tr>
29                                         <!-- TMPL_LOOP NAME="item_loop" -->
30                                         <tr>
31                                                 <!-- TMPL_VAR NAME="item_value" -->
32                                                 <td><a href="additem.pl?op=edititem&amp;bibid=<!-- TMPL_VAR NAME="bibid" -->&amp;itemnum=<!-- TMPL_VAR NAME="itemnum" -->">Edit</a></td>
33                                                 <td><a href="javascript:confirm_deletion(<!-- TMPL_VAR NAME="bibid" -->,<!-- TMPL_VAR NAME="itemnum" -->)">Delete</a></td>
34                                         </tr>
35                                         <!-- /TMPL_LOOP -->
36                         </table>
37                         </div>
38         <!-- /TMPL_IF -->
39
40
41         <table>
42         <!-- TMPL_IF name="opisadd" -->
43                 <caption>Add Item</caption>
44         <!-- TMPL_ELSE -->
45                 <caption>Edit Item</caption>
46         <!-- /TMPL_IF -->       
47                 <!-- TMPL_LOOP NAME="item" -->
48                         <tr>
49                                         <th><label><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *<!-- /TMPL_IF --></label></th>
50                                         <td><!-- TMPL_VAR NAME="marc_value" -->
51                                         <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
52                                         <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
53                                         <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" /></td>
54                 </tr>
55                 <!-- /tmpl_loop -->
56                 </table>
57         <input type="hidden" name="itemnum" value="<!-- TMPL_VAR NAME="itemnum" -->" />
58         <!-- TMPL_IF name="barcode_not_unique" -->
59                 ERROR : Barcode already exists !</div>
60         <!-- /TMPL_IF -->
61         <!-- TMPL_IF name="opisadd" -->
62         <input type="button" value="Add item"  onClick="Check(this.form)" accesskey="w" />
63         <!-- TMPL_ELSE -->
64         <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->" />
65         <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->" />
66         <input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnum" -->" />
67         <input type="button" value="Save Changes" onClick="Check(this.form)" accesskey="w" />
68         <!-- /TMPL_IF -->
69         </form>
70
71 <script language="JavaScript" type="text/javascript">
72 function _(s) { return s } // dummy function for gettext
73 function active(numlayer)
74 {
75         for (i=10; i < 11 ; i++ ) {
76                 ong = i+"XX";
77                         link = "link"+i;
78                 if (numlayer==i) {
79                         document.getElementById(ong).style.visibility="visible";
80                         document.getElementById(link).style.backgroundColor="#11AA11";
81                         document.getElementById(link).style.backgroundImage="url(<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif)";
82                 } else {
83                         document.getElementById(ong).style.visibility="hidden";
84                         document.getElementById(link).style.backgroundColor="#FFFFFF";
85                         document.getElementById(link).style.backgroundImage="";
86                 }
87         }
88 }
89 function Check(f) {
90         var total_errors=0;
91 //      alert(f.field_value.length);
92         for (i=0 ; i<f.field_value.length ; i++) {
93 //      alert (f.field_value[i].value);
94                 if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
95                         document.getElementById("error"+i).style.backgroundColor="#FF0000";
96                         total_errors++;
97                 } else {
98 //                      document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
99                 }
100         }
101         var alertString2;
102         if (total_errors==0) {
103                 document.f.submit();
104         } else {
105                 alertString2  = _("Form not submitted because of the following problem(s)");
106                 alertString2 += "\n------------------------------------------------------------------------------------\n";
107                 alertString2 += "\n- "+ total_errors+_(" mandatory fields empty (see bold subfields)");
108                 alert(alertString2);
109         }
110 }
111 function Dopop(link,i) {
112         defaultvalue=document.forms[0].field_value[i].value;
113         newin=window.open(link+"&result="+defaultvalue,"value builder",'width=500,height=400,toolbar=false,scrollbars=yes');
114 }
115 function confirm_deletion(bibid,itemnum) {
116         var is_confirmed = confirm(_('Are you sure you want to delete this item?'));
117         if (is_confirmed) {
118         window.location = "additem.pl?op=delitem&bibid="+bibid+"&itemnum="+itemnum;
119         }
120 }
121 </script>
122 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->