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