8eee0a3c5edd2378cfd30be0b2aeb9fb1b4b78a5
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / installer / step3.tt
1 [% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Step 3</title>
2 [% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
3 [% INCLUDE 'installer-doc-head-close.inc' %]
4 <div>
5 <h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 3</h1>
6
7 [% IF ( selectframeworks ) %]
8     <script type="text/javascript">
9     //<![CDATA[
10
11     var surl = unescape(window.location.pathname);
12
13     function doLoad()
14     {
15         // the timeout value should be the same as in the "refresh" meta-tag
16         setTimeout( "refresh()", 2*1000 );
17     }
18
19     function refresh(value)
20     {
21         //  The argument to the location.reload function determines
22         //  if the browser should retrieve the document from the
23         //  web-server.  In our example all we need to do is cause
24         //  the JavaScript block in the document body to be
25         //  re-evaluated.  If we needed to pull the document from
26         //  the web-server again (such as where the document contents
27         //  change dynamically) we would pass the argument as 'true'.
28         //
29         surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value;
30
31         window.location.replace( surl );
32     }
33
34     function selectAllFrameworks()
35     {
36         //  A handy short link that selects all available checkboxes
37         //  on the page.
38         //
39         var checkboxes = document.getElementsByTagName("input");
40         for (var i = 0; i < checkboxes.length; i++)
41         {
42             if (checkboxes[i].type == 'checkbox')
43             {
44                 checkboxes[i].checked = true;
45             }
46         }
47
48         //  Prevent event propergation.
49         return false;
50     }
51
52     function Hide(link)
53     {
54         //  Toggle the display of a given element on the page.
55         //
56         subfield = document.getElementById('bloc'+link);
57         var initstyle = subfield.style.display;
58         if (initstyle == 'block') subfield.style.display = 'none' ;
59         if (initstyle == 'none') subfield.style.display = 'block' ;
60     }
61
62     //]]>
63     </script>
64 [% END %]
65 [% IF ( finish ) %]
66     <h1>Congratulations, installation complete</h1>
67     <p>If this page does not redirect in 5 seconds, click <a href="/">here</a>.</p>
68 [% END %]
69 [% IF ( choosemarc ) %]
70     <h2 align="center">Select your MARC flavor</h2>
71     <form name="frameworkselection" method="post" action="install.pl">
72     <input type="hidden" name="step" value="3" />
73     <input type="hidden" name="op" value="selectframeworks" />
74     <p>
75     [% FOREACH flavourloo IN flavourloop %]
76     <div>
77             [% IF ( flavourloo.checked ) %]
78                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked /> [% flavourloo.label %] <br/>
79             [% ELSE %]
80                 <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %] <br/>
81             [% END %]
82     </div>
83     [% END %]
84     </p>
85     <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
86     </form>
87 [% END %]
88
89 [% IF ( selectframeworks ) %]
90     <h2 align="center">Selecting Default Settings</h2>
91     <script type="text/javascript">
92         document.write('<p><a href="#" onclick="return selectAllFrameworks();">Select all frameworks</a></p>');
93     </script>
94     <form name="frameworkselection" method="post" action="install.pl">
95     <input type="hidden" name="step" value="3" />
96     <input type="hidden" name="op" value="addframeworks" />
97
98     [% IF ( frameworksloop ) %]
99     <h2>MARC frameworks: [% marcflavour %]</h2>
100     [% IF ( en_marc_frameworks ) %]
101         <h4><span class="error">No MARC frameworks are available for your language.
102                 Defaulting to the frameworks supplied for English (en)<span></h4>
103     [% END %]
104     [% FOREACH frameworksloo IN frameworksloop %]
105     <div>
106     <h3>[% frameworksloo.label %]</h3>
107     [% FOREACH framework IN frameworksloo.frameworks %]
108         <table style="border:1px;vertical-align:top;">
109         <tr>
110         <td style="vertical-align:top;">
111             [% IF ( framework.checked ) %]
112                 <input type="checkbox" name="framework" value="[% framework.fwkfile %]" checked="checked" id="[% framework.fwkname %]" />
113             [% ELSE %]
114                 <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
115             [% END %]
116         </td>
117         <td>
118             <label for="[% framework.fwkname %]">
119                 [% framework.fwkdescription %]
120                 <em>([% framework.fwkname %])</em>
121             </label>
122         </td>
123         </table>
124     [% END %]
125     </div>
126     [% END %]
127     <h2>Other data</h2>
128     [% END %]
129     [% IF ( en_sample_data ) %]
130         <h4><span class="error">No sample data and settings are available for your language.
131                 Defaulting to the samples supplied for English (en)<span></h4>
132     [% END %]
133     [% FOREACH levelloo IN levelloop %]
134     <div>
135     <h3>[% levelloo.label %]</h3>
136     [% FOREACH framework IN levelloo.frameworks %]
137         <table style="border:1px;vertical-align:top;">
138         <tr>
139         <td style="vertical-align:top;">
140             [% IF ( framework.checked ) %]
141                 <input type="checkbox" name="framework" value="[% framework.fwkfile %]" checked="checked" id="[% framework.fwkname %]" />
142             [% ELSE %]
143                 <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id="[% framework.fwkname %]" />
144             [% END %]
145         </td>
146         <td>
147             <label for="[% framework.fwkname %]">
148                 [% framework.fwkdescription %]
149                 <em>([% framework.fwkname %])</em>
150             </label>
151         </td>
152         </table>
153     [% END %]
154     </div>
155     [% END %]
156     <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
157     please be patient.</p>
158     <p><input type="submit" value="Import &gt;&gt;" />
159     </p>
160     </form>
161 [% END %]
162
163
164 [% IF ( addframeworks ) %]
165     [% FOREACH lis IN list %]
166     <h3>[% lis.level %] data added</h3>
167     <ul>
168     [% FOREACH fwklis IN lis.fwklist %]
169         <li>[% fwklis.fwkname %][% IF ( fwklis.error ) %]<br /><span class="error">[% fwklis.error %]</span>[% END %] </li>
170     [% END %]
171     </ul>
172     [% END %]
173     <h3>All done!</h3>
174     <p>Installation complete.<br />
175         <p>Click on 'Finish' to complete and load the Koha Staff Interface.
176         <form name="finish">
177         <input type="hidden" name="step" value="3" />
178         <input type="hidden" name="op" value="finish" />
179         <input type="submit" value="Finish" /></form>
180         </p>
181     </p>
182 [% END %]
183
184
185 [% IF ( importdatastructure ) %]
186     [% IF ( error ) %]
187         <p>The following error occurred while importing the database structure:</p>
188         <p class="error">[% error %] </p>
189         <p>Please contact your system administrator</p>
190     [% ELSE %]
191         <h2 align="center">Success</h2>
192         <ul>
193         <li>Database tables created</li>
194         </ul>
195         <form action="install.pl">
196         <input type="hidden" name="step" value="3" />
197             <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
198         </form>
199     [% END %]
200 [% END %]
201
202
203 [% IF ( proposeimport ) %]
204     <p>Now we're ready to create the database tables and fill them with some default data.</p>
205     <form action="install.pl">
206     <input type="hidden" name="step" value="3" />
207     <input type="hidden" name="op" value="importdatastructure" />
208     <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
209     </form>
210 [% END %]
211
212
213 [% IF ( default ) %]
214     [% IF ( upgrading ) %]
215         <p>
216             We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must <a href="install.pl?step=3&amp;op=updatestructure" class="button">update your database</a>
217         </p>
218     [% ELSE %]
219         <p>We are ready to do some basic configuration. Please
220             <a href="install.pl?step=3&amp;op=choosemarc" class="button">install basic configuration settings</a>
221             to continue the installation.
222         </p>
223     [% END %]
224 [% END %]
225
226
227
228 [% IF ( updatestructure ) %]
229   <div><h2 align="center">Updating database structure</h2>
230   [% IF ( has_update_succeeds ) %]
231   <p>Update report :</p>
232     <ul>
233       [% FOREACH update_repor IN update_report %]
234           <li>[% update_repor.line |html %]</li>
235       [% END %]
236     </ul>
237   [% END %]
238   [% IF ( has_update_errors ) %]
239   <p>Update errors :</p>
240     <ul>
241       [% FOREACH update_error IN update_errors %]
242           <li class="update_error">[% update_error.line |html %]</li>
243       [% END %]
244     </ul>
245   [% END %]
246  [% UNLESS ( has_update_errors ) %]
247     <p>Everything went OK, update done.</p>
248   [% END %]
249 <a href="install.pl?step=3&amp;op=finished" class="button">Continue to log in to Koha</a>
250   </div>
251 [% END %]
252
253 </div>
254 </body>
255 </html>