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