Bug 17855: Onboarding tool
[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="5; url=/cgi-bin/koha/installer/onboarding.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" /> Koha 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
66
67 [% IF ( finish ) %]
68     <h1>Congratulations, installation complete</h1>
69     <p>If this page does not redirect in 10 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">Start onboarding process</a>.</p>
70 [% END %]
71
72
73 [% IF ( choosemarc ) %]
74     <h2 align="center">Choose your setup</h2>
75     <p>Basic setup selects recommended settings by default.</p>
76     <form name="frameworkselection" method="post" action="install.pl">
77     <input type="hidden" name="step" value="3" />
78     <input type="hidden" name="op" value="selectframeworks"/>
79
80     <div>
81         <input type="radio" name="setup" value="Basic" checked="checked">Basic<br/>
82         <input type="radio" name="setup" value="Advanced"/>Advanced<br/>
83     </div>
84
85     <h2 align="center">Select your MARC flavor</h2>
86     <p>MARC stands for Machine Readable Cataloging, containing information about a bibliographic record. MARC21 is more commonly used globally, whereas UNIMARC tends to be used in Europe. </p>
87
88     [% FOREACH flavourloo IN flavourloop %]
89     <div>
90             [% IF ( flavourloo.label == "Unimarc") %]
91                  <input type="radio" name="marcflavour" value="[% flavourloo.code %]" /> [% flavourloo.label %]<br/>
92             [% ELSE %]
93                  <input type="radio" name="marcflavour" value="[% flavourloo.code %]" checked="checked" /> [% flavourloo.label %] <br/>
94             [% END %]
95     </div>
96     [% END %]
97
98         <p>Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
99
100     </form>
101
102 [% END %]
103
104 [% IF ( selectframeworks ) %]
105         <h2 align= "center"> [% setup %] setup</h2>
106         <h2 align="center">Selecting Default Settings</h2>
107
108         [% IF setup == "Advanced" %]
109             <script type="text/javascript">
110                 var linklabel = _("Select all options");
111                 document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>');
112             </script>
113         [% END %]
114         <form name="frameworkselection" method="post" action="install.pl">
115             <input type="hidden" name="step" value="3" />
116             <input type="hidden" name="op" value="addframeworks" />
117     [% IF ( frameworksloop ) %]
118         <h2>MARC frameworks: [% marcflavour %]</h2>
119         [% IF ( en_marc_frameworks ) %]
120             <h4><span class="error">No MARC frameworks are available for your language.
121                     Defaulting to the frameworks supplied for English (en)<span></h4>
122         [% END %]
123         [% FOREACH frameworksloo IN frameworksloop %]
124            <div>
125            <h3>[% frameworksloo.label %]</h3>
126            [% FOREACH framework IN frameworksloo.frameworks %]
127                 <table style="border:1px;vertical-align:top;">
128                 <tr>
129                     <td style = "border:1px; vertical-align:top;">
130                         [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
131                             <input type="hidden" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
132                         [% ELSE %]
133                             <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id ="[%framework.fwkname%]" />
134                         [% END %]
135                     </td>
136                     <td>
137                     [% IF (frameworksloo.label == "Default") && (setup=="Basic") %]
138                         <ul>
139                             <li>
140                                 <label for="[% framework.fwkname %]">
141                                     [% framework.fwkdescription %]
142                                     <em>([% framework.fwkname %])</em>
143                                 </label>
144                             </li>
145                         </ul>
146                     </td>
147                     [% ELSE %]
148                     <td>
149                         <label for= "[% framework.fwkname %]">
150                             [% framework.fwkdescription %]
151                             <em>([% framework.fwkname %])</em>
152                         </label>
153                     </td>
154                     [% END %]
155                 </tr>
156                 </table>
157            [% END %]
158            </div>
159         [% END %]
160     <h2>Other data</h2>
161     [% END %]
162     [% IF ( en_sample_data ) %]
163         <h4><span class="error">No sample data and settings are available for your language.
164                 Defaulting to the samples supplied for English (en)<span></h4>
165     [% END %]
166     [% FOREACH levelloo IN levelloop %]
167         <div>
168         <h3>[% levelloo.label %]</h3>
169
170         [% IF (setup == "Basic" && levelloo.label == "Optional") %]
171             <script type="text/javascript">
172                 var linklabel = _("Select all options");
173                 document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>');
174             </script>
175         [% END %]
176
177         [% FOREACH framework IN levelloo.frameworks %]
178             <table style="border:1px;vertical-align:top;">
179             <tr>
180                 <td style="vertical-align:top;">
181                 [% IF (levelloo.label == "Default" ) && (setup=="Basic")%]
182                      <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" />
183                 [% ELSE %]
184                      <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id="[%framework.fwkname%]"/>
185                 [% END %]
186                 </td>
187                 <td>
188                 [% IF (levelloo.label == "Default") && (setup=="Basic")%]
189                 <ul>
190                     <li>
191                         <label for="[% framework.fwkname %]">
192                             [% framework.fwkdescription %]
193                             <em>([% framework.fwkname %])</em>
194                         </label>
195                     </li>
196                 </ul>
197                 </td>
198                 [% ELSE %]
199                 <td>
200                     <label for= "[% framework.fwkname %]">
201                         [% framework.fwkdescription %]
202                         <em>([% framework.fwkname %])</em>
203                     </label>
204                 </td>
205                 [% END %]
206             </tr>
207             </table>
208         [% END %]
209         </div>
210     [% END %]
211     <p>When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete,
212     please be patient.</p>
213     <p><input type="submit" value="Import &gt;&gt;" />
214     </p>
215     </form>
216 [% END %]
217
218
219 [% IF ( addframeworks ) %]
220     [% FOREACH lis IN list %]
221     <h3>[% lis.level %] data added</h3>
222     <ul>
223     [% FOREACH fwklis IN lis.fwklist %]
224         <li>[% fwklis.fwkname %][% IF ( fwklis.error ) %]<br /><span class="error">[% fwklis.error %]</span>[% END %] </li>
225     [% END %]
226     </ul>
227     [% END %]
228     <h3>All done!</h3>
229     <p>Installation complete.<br />
230         <p>
231             You can help the Koha community by sharing your statistics with us.
232             <br>If you wish to share some of your data, please enable the functionality in the "Share your usage statistics" section of the admin module.
233         </p>
234         <p>Click on 'Set up Koha with the onboarding tool' to complete and load the Koha onboarding tool.
235         <form name="finish">
236         <input type="hidden" name="step" value="3" />
237         <input type="hidden" name="op" value="finish" />
238         <input type="submit" value="Set up Koha with the onboarding tool"/>
239         </form>
240         </p>
241     </p>
242 [% END %]
243
244
245 [% IF ( importdatastructure ) %]
246     [% IF ( error ) %]
247         <p>The following error occurred while importing the database structure:</p>
248         <p class="error">[% error %] </p>
249         <p>Please contact your system administrator</p>
250     [% ELSE %]
251         <h2 align="center">Success</h2>
252         <ul>
253         <li>Database tables created</li>
254         </ul>
255         <form action="install.pl">
256         <input type="hidden" name="step" value="3" />
257             <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
258         </form>
259     [% END %]
260 [% END %]
261
262
263 [% IF ( proposeimport ) %]
264     <p>Now we're ready to create the database tables and fill them with some default data.</p>
265     <form action="install.pl">
266     <input type="hidden" name="step" value="3" />
267     <input type="hidden" name="op" value="importdatastructure" />
268     <p> Click 'Next' to continue <input value="Next &gt;&gt;" type="submit" /></p>
269     </form>
270 [% END %]
271
272 [% IF ( default ) %]
273     [% IF ( upgrading ) %]
274         <p>
275             We are upgrading from Koha [% dbversion %] to [% kohaversion %], you must update your database.
276         <br>
277         <a href="install.pl?step=3&amp;op=updatestructure" class="button"><button>Update Database</button></a>
278         </p>
279     [% ELSE %]
280         <p>We are ready to do some basic configuration. Please install some basic configuration settings to continue the installation:
281         <br>
282         <br>
283             <a href="install.pl?step=3&amp;op=choosemarc" class="button"><button>Install Basic Configuration Settings</button></a>
284
285     [% END %]
286 [% END %]
287
288 [% IF ( updatestructure ) %]
289   <div><h2 align="center">Updating database structure</h2>
290   [% IF ( has_update_succeeds ) %]
291   <p>Update report :</p>
292     <ul>
293       [% FOREACH update_repor IN update_report %]
294           <li>[% update_repor.line |html %]</li>
295       [% END %]
296     </ul>
297   [% END %]
298   [% IF ( has_update_errors ) %]
299   <p>Update errors :</p>
300     <ul>
301       [% FOREACH update_error IN update_errors %]
302           <li class="update_error">[% update_error.line |html %]</li>
303       [% END %]
304     </ul>
305   [% END %]
306  [% UNLESS ( has_update_errors ) %]
307     <p>Everything went OK, update done.</p>
308   [% END %]
309 <a href="install.pl?step=3&amp;op=choosemarc" class="button"><button>Back to Installation</button></a>
310   </div>
311 [% END %]
312
313 </div>
314 </body>
315 </html>