first go at moving templates to a modules/ dir
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / biblio_framework.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; 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 --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <!-- TMPL_INCLUDE NAME="menus.inc" -->
6 <!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
7
8 <script language="javascript" type="text/javascript">
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     <h1><!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF --></h1>
64     <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
65         <input type="hidden" name="op" value="add_validate" />
66         <input type="hidden" name="checked" value="0" />
67         <!-- TMPL_IF NAME="frameworkcode" -->
68             <p><label for="frameworkcode">Framework Code</label><input type="hidden" id="frameworkcode" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!-- TMPL_VAR NAME="frameworkcode" --></p>
69         <!-- TMPL_ELSE -->
70             <p><label for="frameworkcode">Framework Code</label><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></p>
71         <!-- /TMPL_IF -->
72         <p><label for="description">Description</label>
73         <input type="text" name="frameworktext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="frameworktext" escape=HTML -->" /></p>
74         <p>     <input type="button" value="Submit" class="submit" onclick="Check(this.form)" /></p>
75     </form>
76 <!-- /TMPL_IF -->
77
78 <!-- TMPL_IF NAME="delete_confirm" -->
79 <h3>Delete ramework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?</h3>
80     <!-- TMPL_IF NAME="total" -->
81         <div class="error">This framework is used <!-- TMPL_VAR NAME="total" --> times
82     <!-- /TMPL_IF -->
83     <p>
84         <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!" />
85         </form>
86         <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete!" /></form>
87     </p>
88 <!-- /TMPL_IF -->
89
90 <!-- TMPL_IF NAME="else" -->
91 <h1>Biblio framework</h1>
92 <p>Framework name, then go to MARC biblio to set MARC editor parameters</p>
93 <table>
94     <tr>
95         <th>Code</th>
96         <th>Description</th>
97         <th>&nbsp;</th>
98         <th>Edit</th>
99         <th>Delete</th>
100     </tr>
101     <tr>
102         <td>&nbsp;</td>
103         <td>Default framework</td>
104         <td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->">MARC structure</td>
105         <td>&nbsp;</td>
106         <td>&nbsp;</td>
107     </tr>
108     
109     <!-- TMPL_LOOP NAME="loop" -->
110         <tr>
111             <td><!-- TMPL_VAR name="frameworkcode" --></td>
112             <td><!-- TMPL_VAR name="frameworktext" --></td>
113             <td><a href="marctagstructure.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->" >MARC structure</a></td>
114             <td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Edit</a></td>
115             <td><a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Delete</a></td>
116         </tr>
117     <!-- /TMPL_LOOP -->
118 </table>
119 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
120     <input type="hidden" name="op" value="add_form" />
121     <input type="submit" value="Add framework" />
122     <td><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF --></td>
123     <td><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF --></td>
124 </form>
125
126 <!-- /TMPL_IF -->
127 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->