Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / checkmarc.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Administration &rsaquo; MARC check
6 [% IF ( total ) %] :[% total | html %] errors found[% ELSE %] : Configuration OK![% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9 <body id="admin_checkmarc" class="admin">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'prefs-admin-search.inc' %]
12
13 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; MARC check
14 [% IF ( total ) %]: [% total | html %] errors found[% ELSE %] : Configuration OK![% END %]</div>
15
16 <div id="doc3" class="yui-t2">
17    
18    <div id="bd">
19         <div id="yui-main">
20         <div class="yui-b">
21
22 <h1>MARC bibliographic framework test</h1>
23 <table>
24     <tr>
25         <th>Test</th>
26         <th>Result</th>
27     </tr>
28 <!-- -->
29 [% IF ( itemnum ) %]
30     <tr>
31         <td>itemnum</td>
32         <td><ul><li>The field itemnum MUST be mapped </li>
33             <li>The corresponding subfield MUST be in with -1 (ignore) tab</li></ul></td>
34     </tr>
35 [% ELSE %]
36     <tr>
37         <td>OK</td>
38         <td>itemnum : the field itemnumber is mapped to a field in tab -1</td>
39     </tr>
40 [% END %]
41 <!-- -->
42 [% IF ( itemfields ) %]
43     <tr>
44         <td>item fields</td>
45         <td>ALL items fields MUST :<br />
46             <ul><li>be mapped to the same tag,</li>
47             <li>and they must all be in the 10 (items) tab</li></ul></td>
48     </tr>
49 [% ELSE %]
50     <tr>
51         <td>OK</td>
52         <td>All item fields are in the same tag and in item tab</td>
53     </tr>
54 [% END %]
55 <!-- -->
56     [% IF ( itemtags ) %]
57         <tr>
58             <td>Item tag</td>
59             <td>There is more than 1 MARC tag related to items tab (10) : [% itemtags | html %]</td>
60         </tr>
61     [% ELSE %]
62         <tr>
63             <td>OK</td>
64             <td>Only 1 MARC tag mapped to items</td>
65         </tr>
66     [% END %]
67     <!--  -->
68 [% IF ( itemtype ) %]
69     <tr>
70         <td>itemtype NOT mapped</td>
71         <td>the biblioitems.itemtype field MUST :<br />
72             <ul><li>be mapped to a MARC subfield, </li>
73             <li>the corresponding subfield MUST have "Authorized value" set to "itemtype"</li></ul></td>
74     </tr>
75 [% ELSE %]
76     <tr>
77         <td>OK</td>
78         <td>biblioitems.itemtype defined</td>
79     </tr>
80 [% END %]
81 <!-- -->
82 [% IF ( branch ) %]
83     <tr>
84         <td>homebranch NOT mapped</td>
85         <td>the items.homebranch field MUST :<br />
86             <ul><li>be mapped to a MARC subfield,</li>
87             <li>the corresponding subfield MUST have "Authorized value" set to "branches"</li></ul></td>
88     </tr>
89 [% ELSE %]
90     <tr>
91         <td>OK</td>
92         <td>homebranch defined</td>
93     </tr>
94 [% END %]
95 <!-- -->
96 [% IF ( holdingbranch ) %]
97     <tr>
98         <td>holdingbranch NOT mapped</td>
99         <td>the items.holdingbranch field MUST :<br />
100             <ul><li>be mapped to a MARC subfield, </li>
101             <li>the corresponding subfield MUST have "Authorized value" set to "branches"</li></ul></td>
102     </tr>
103 [% ELSE %]
104     <tr>
105         <td>OK</td>
106         <td>holdingbranch defined</td>
107     </tr>
108 [% END %]
109 <!-- -->
110 [% IF ( itemtypes_empty ) %]
111     <tr>
112         <td>item type not defined</td>
113         <td>at least 1 item type must be defined</td>
114     </tr>
115 [% ELSE %]
116     <tr>
117         <td>OK</td>
118         <td>at least 1 item type defined</td>
119     </tr>
120 [% END %]
121 <!-- -->
122 [% IF ( branches_empty ) %]
123     <tr>
124         <td>library not defined</td>
125         <td>at least 1 library must be defined</td>
126     </tr>
127 [% ELSE %] 
128     <tr>
129         <td>OK</td>             
130         <td>at least 1 library defined</td>
131     </tr>                                       
132 [% END %]
133 <!-- -->
134 [% IF ( biblionumber ) %]
135     <tr>
136         <td>biblio and biblionumber</td>
137         <td>The biblio.biblionumber and biblioitems.biblioitemnumber fields be mapped to a MARC subfield,</td>
138     </tr>
139 [% ELSE %]
140     <tr>
141         <td>OK</td>
142         <td>biblionumber and biblioitemnumber mapped correctly</td>
143     </tr>
144 [% END %]
145
146     [% IF ( frameworknull ) %]
147         <tr>
148             <td>framework values</td>
149             <td>there is a null value in a frameworkcode. Check the following tables<br />
150                 <li>select * from marc_subfield_structure where frameworkcode is NULL</li>
151                 <li>select * from marc_tag_structure where frameworkcode is NULL</li>
152             </td>
153         </tr>
154     [% ELSE %]
155         <tr>
156             <td>OK</td>
157             <td>no NULL value in frameworkcode</td>
158         </tr>
159     [% END %]
160
161     [% IF ( inconsistent_tabs ) %]
162         <tr>
163             <td style="vertical-align:top;">subfields not in same tabs</td>
164             <td>Not all subfields for the following tags are in the same tab (or marked 'ignored').
165                 <table>
166                     <tr>
167                         <th>Code</th>
168                         <th>Description</th>
169                         <th>Tag</th>
170                         <th>Tabs in use</th>
171                     </tr>
172                     [% FOREACH tab_inf IN tab_info %]
173                         <tr>
174                             <td>[% tab_inf.frameworkcode | html %]</td>
175                             [% IF ( tab_inf.frameworkcode ) %]
176                                 <td>[% tab_inf.frameworktext | html %]</td>
177                             [% ELSE %]
178                                 <td>Default framework</td>
179                             [% END %]
180                             <td>[% tab_inf.tagfield | html %]</td>
181                             <td>[% tab_inf.tabs | html %]</td>
182                         </tr>
183                     [% END %]
184                 </table>
185             </td>
186         </tr>
187     [% ELSE %]
188         <tr>
189             <td>OK</td>
190             <td>all subfields for each tag are in the same tab (or ignored)</td>
191         </tr>
192     [% END %]
193
194     [% IF ( invalid_authtypecodes ) %]
195         <tr>
196             <td style="vertical-align:top;">invalid authority types</td>
197             <td>Not all authority types referred to by the frameworks are defined.
198                 <table>
199                     <tr>
200                         <th>Framework code</th>
201                         <th>Framework description</th>
202                         <th>Tag</th>
203                         <th>Subfield</th>
204                         <th>Invalid authority type</th>
205                     </tr>
206                     [% FOREACH authtypecode_inf IN authtypecode_info %]
207                         <tr>
208                             <td>[% authtypecode_inf.frameworkcode | html %]</td>
209                             [% IF ( authtypecode_inf.frameworkcode ) %]
210                                 <td>[% authtypecode_inf.frameworktext | html %]</td>
211                             [% ELSE %]
212                                 <td>Default framework</td>
213                             [% END %]
214                             <td>[% authtypecode_inf.tagfield | html %]</td>
215                             <td>[% authtypecode_inf.tagsubfield | html %]</td>
216                             <td>[% authtypecode_inf.authtypecode | html %]</td>
217                         </tr>
218                     [% END %]
219                 </table>
220             </td>
221         </tr>
222     [% ELSE %]
223         <tr>
224             <td>OK</td>
225             <td>all authority types used in the frameworks are defined</td>
226         </tr>
227     [% END %]
228
229     [% IF ( permanent_location_mapped ) %]
230         <tr>
231             <td style="vertical-align:top;">items.permanent_location mapped</td>
232             <td>The following mappings exist for items.permanent_location, and they shouldn't.
233                 <table>
234                     <tr>
235                         <th>Framework code</th>
236                         <th>Framework description</th>
237                         <th>Tag</th>
238                         <th>Subfield</th>
239                     </tr>
240                     [% FOREACH mapped_perm_loc IN mapped_permanent_location %]
241                         <tr>
242                             <td>[% mapped_perm_loc.frameworkcode | html %]</td>
243                             [% IF ( mapped_perm_loc.frameworkcode ) %]
244                                 <td>[% mapped_perm_loc.frameworktext | html %]</td>
245                             [% ELSE %]
246                                 <td>Default framework</td>
247                             [% END %]
248                             <td>[% mapped_perm_loc.tagfield | html %]</td>
249                             <td>[% mapped_perm_loc.tagsubfield | html %]</td>
250                         </tr>
251                     [% END %]
252                 </table>
253             </td>
254         </tr>
255     [% ELSE %]
256         <tr>
257             <td>OK</td>
258             <td>items.permanent_location is not mapped on the frameworks</td>
259         </tr>
260     [% END %]
261
262 <!-- -->
263 [% IF ( total ) %]
264     <tr>
265         <td>TOTAL</td>
266         <td>You have [% total | html %] error(s) in your MARC configuration. Please fix them before using Koha</td>
267     </tr>
268 </table>
269 [% ELSE %]
270     </table>
271         <p><b>Configuration OK, you don't have errors in your MARC parameters table</b></p>
272 [% END %]
273
274
275
276 </div>
277 </div>
278 <div class="yui-b">
279 [% INCLUDE 'admin-menu.inc' %]
280 </div>
281 </div>
282
283 [% MACRO jsinclude BLOCK %]
284     [% Asset.js("js/admin-menu.js") | $raw %]
285 [% END %]
286 [% INCLUDE 'intranet-bottom.inc' %]