91707908d777ff7518278305e5856fd5b938bc1a
[koha_gimpoz] / koha-tmpl / intranet-tmpl / prog / en / parameters / biblio_framework.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF NAME="delete_confirm" -->Delete Framework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?<!-- /TMPL_IF --><!-- TMPL_IF NAME="else" -->Biblio Framework<!-- /TMPL_IF -->
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3
4
5 <script language="javascript" type="text/javascript">
6 function _(s) { return s } // dummy function for gettext
7 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
8 function isNotNull(f,noalert) {
9         if (f.value.length ==0) {
10                 return false;
11         }
12         return true;
13 }
14 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
15 function toUC(f) {
16         var x=f.value.toUpperCase();
17         f.value=x;
18         return true;
19 }
20 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
21 function isNum(v,maybenull) {
22 var n = new Number(v.value);
23 if (isNaN(n)) {
24         return false;
25         }
26 if (maybenull==0 && v.value=='') {
27         return false;
28 }
29 return true;
30 }
31 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
32 function isDate(f) {
33         var t = Date.parse(f.value);
34         if (isNaN(t)) {
35                 return false;
36         }
37 }
38 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
39 function Check(f) {
40         var ok=1;
41         var _alertString="";
42         var alertString2;
43         if (f.frameworkcode.value.length==0) {
44                 _alertString += "\n- " + _("Framework code missing");
45         }
46         if (!(isNotNull(window.document.Aform.frameworktext,1))) {
47                 _alertString += "\n- " + _("Description missing");
48         }
49         if (_alertString.length==0) {
50                 document.Aform.submit();
51         } else {
52                 alertString2  = _("Form not submitted because of the following problem(s)");
53                 alertString2 += "\n------------------------------------------------------------------------------------\n";
54                 alertString2 += _alertString;
55                 alert(alertString2);
56         }
57 }
58 </script>
59
60 <!-- TMPL_IF NAME="add_form" -->
61         <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
62                 <input type="hidden" name="op" value="add_validate" />
63                 <input type="hidden" name="checked" value="0" />
64         <table>
65         <caption><!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF --></caption>
66         <tr>
67                         <!-- TMPL_IF NAME="frameworkcode" -->
68                                 <td><label for="frameworkcode">Framework Code<label></td><td><input type="hidden" id="frameworkcode" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!-- TMPL_VAR NAME="frameworkcode" --></td>
69                         <!-- TMPL_ELSE -->
70                                 <td><label for="frameworkcode">Framework Code<label></td><td><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></td>
71                         <!-- /TMPL_IF -->
72                         </tr>
73                         <tr>
74                                 <td><label for="description">Description</label></td><td>
75                                 <input type="text" name="frameworktext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="frameworktext" escape=HTML -->" /></td>
76 </tr></table>
77                         <p>     <input type="button" value="Submit"class="submit" onclick="Check(this.form)" /></p>
78         </form>
79 <!-- /TMPL_IF -->
80
81 <!-- TMPL_IF NAME="delete_confirm" -->
82 <h3>Delete ramework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?</h3>
83         <!-- TMPL_IF NAME="total" -->
84                 <div class="error">This framework is used <!-- TMPL_VAR NAME="total" --> times
85         <!-- /TMPL_IF -->
86         <p>
87                 <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" value="Yes, Delete this Framework!" />
88                 </form>
89                 <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete!" /></form>
90         </p>
91 <!-- /TMPL_IF -->
92
93 <!-- TMPL_IF NAME="else" -->
94 <h1>Biblio framework</h1>
95 <p>Framework name, then go to MARC biblio to set MARC editor parameters</p>
96 <table>
97         <tr>
98                 <th>Code</th>
99                 <th>Description</th>
100                 <th>&nbsp;</th>
101                 <th>Edit</th>
102                 <th>Delete</th>
103         </tr>
104         <tr>
105                 <td>&nbsp;</td>
106                 <td>Default framework</td>
107                 <td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->">MARC structure</td>
108                 <td>&nbsp;</td>
109                 <td>&nbsp;</td>
110         </tr>
111         
112         <!-- TMPL_LOOP NAME="loop" -->
113                 <tr>
114                         <td><!-- TMPL_VAR name="frameworkcode" --></td>
115                         <td><!-- TMPL_VAR name="frameworktext" --></td>
116                         <td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->" >MARC structure</a></td>
117                         <td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Edit</a></td>
118                         <td><a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Delete</a></td>
119                 </tr>
120         <!-- /TMPL_LOOP -->
121 </table>
122 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
123         <input type="hidden" name="op" value="add_form" />
124         <input type="submit" value="Add framework" />
125         <td><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF --></td>
126         <td><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF --></td>
127 </form>
128
129 <!-- /TMPL_IF -->
130 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->