Bug 5917 : Converted templates
[koha.git] / koha-tt / intranet-tmpl / prog / en / modules / admin / biblio_framework.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; MARC Frameworks
3 [% IF ( add_form ) %]
4 &rsaquo; [% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]
5 [% ELSIF ( delete_confirm ) %]
6 &rsaquo; Delete Framework for [% frameworktext %] ([% frameworkcode %])?
7 [% END %]
8 </title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 <script type="text/javascript">
11 //<![CDATA[
12
13 function isNotNull(f,noalert) {
14     if (f.value.length ==0) {
15         return false;
16     }
17     return true;
18 }
19 function toUC(f) {
20     f.value = f.value.toUpperCase();
21     return true;
22 }
23 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
24 function Check(f) {
25     var ok=1;
26     var _alertString="";
27     var alertString2;
28     if (f.frameworkcode.value.length==0) {
29         _alertString += "\n- " + _("Framework code missing");
30     }
31     if (!(isNotNull(window.document.Aform.frameworktext))) {
32         _alertString += "\n- " + _("Description missing");
33     }
34     if (_alertString.length==0) {
35         document.Aform.submit();
36     } else {
37         alertString2  = _("Form not submitted because of the following problem(s)");
38         alertString2 += "\n------------------------------------------------------------------------------------\n";
39         alertString2 += _alertString;
40         alert(alertString2);
41         return false;
42     }
43     return true;
44 }
45
46 $(document).ready(function() {
47     new YAHOO.widget.Button("newframework");
48 });
49 //]]>
50 </script>
51 </head>
52 <body>
53 [% INCLUDE 'header.inc' %]
54 [% INCLUDE 'cat-search.inc' %]
55
56 <div id="breadcrumbs">
57         <a href="/cgi-bin/koha/mainpage.pl">Home</a>
58 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
59 &rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC Frameworks</a>
60 [% IF ( add_form ) %]
61 &rsaquo; [% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]
62 [% ELSIF ( delete_confirm ) %]
63 &rsaquo; Delete Framework for [% frameworktext %] ([% frameworkcode %])?
64 [% END %]
65 </div>
66
67 <div id="doc3" class="yui-t2">
68   <div id="bd">
69     <div id="yui-main">
70       <div class="yui-b">
71         
72 [% IF ( else ) %]<div id="toolbar">
73         <ul class="toolbar">
74         <li><a id="newframework" href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form">New Framework</a></li>
75 </ul></div>[% END %]
76
77 [% IF ( add_form ) %]
78     <h1>[% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
79     <form action="[% script_name %]" name="Aform" method="post" onsubmit="return Check(this);">
80         <input type="hidden" name="op" value="add_validate" />
81     <fieldset class="rows">
82     <ol>
83         [% IF ( frameworkcode ) %]
84         <li><span class="label">Framework Code</span><input type="hidden" id="frameworkcode" name="frameworkcode" value="[% frameworkcode %]" />[% frameworkcode %]
85             <input type="hidden" name="modif" value="1" />
86         </li>
87         [% ELSE %]
88         <li><label for="frameworkcode">Framework Code</label><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></li>
89         [% END %]
90         <li><label for="description">Description</label>
91         <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% frameworktext |html %]" /></li></ol></fieldset>
92         <fieldset class="action">       <input type="submit" value="Submit" class="submit" /></fieldset>
93     </form>
94 [% END %]
95
96 [% IF ( delete_confirm ) %]
97 <div class="dialog alert">
98     <h3>Delete framework for [% frameworktext %] ([% frameworkcode %])?</h3>
99     [% IF ( total ) %]
100        <p><strong>This framework is used [% total %] times</strong>.</p>
101     [% END %]
102     <form class="inline" action="[% script_name %]" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /><input type="submit" class="approve" value="Yes, Delete this Framework!" />
103     </form>
104     <form class="inline" action="[% script_name %]" method="get"><input type="submit" class="deny" value="No, Do not Delete!" /></form>
105 </div>
106 [% END %]
107
108 [% IF ( else ) %]
109 <h1>MARC Frameworks</h1>
110 <p>Framework name, then go to MARC biblio to set MARC editor parameters</p>
111 <table>
112     <tr>
113         <th>Code</th>
114         <th>Description</th>
115         <th>&nbsp;</th>
116         <th>Edit</th>
117         <th>Delete</th>
118     </tr>
119     <tr>
120         <td>&nbsp;</td>
121         <td>Default framework</td>
122         <td><a href="marctagstructure.pl?frameworkcode=[% frameworkcode %]">MARC structure</a></td>
123         <td>&nbsp;</td>
124         <td>&nbsp;</td>
125     </tr>
126     <!-- note highlight assignment appears backwards because we already have a normal row for Default -->
127     [% FOREACH loo IN loop %]
128     [% IF ( loop.odd ) %]<tr class="highlight">
129     [% ELSE %]<tr>
130     [% END %]
131             <td>[% loo.frameworkcode %]</td>
132             <td>[% loo.frameworktext %]</td>
133             <td><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]" >MARC structure</a></td>
134             <td><a href="[% loo.script_name %]?op=add_form&amp;frameworkcode=[% loo.frameworkcode |html %]">Edit</a></td>
135             <td><a href="[% loo.script_name %]?op=delete_confirm&amp;frameworkcode=[% loo.frameworkcode |html %]">Delete</a></td>
136         </tr>
137     [% END %]
138 </table>
139     [% IF ( previous ) %]<a href="[% previous %]">&lt;&lt; Previous</a>[% END %]
140     [% IF ( next ) %]<a href="[% next %]">Next &gt;&gt;</a>[% END %]
141
142 [% END %]
143     </div>
144   </div>
145 <div class="yui-b">
146 [% INCLUDE 'admin-menu.inc' %]
147   </div>
148 </div>
149 [% INCLUDE 'intranet-bottom.inc' %]