Bugzilla – Attachment 58659 Details for
Bug 17855
New onboarding tool feature to guide users through setting up Koha, and minor web installer UI improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17855 - Implemented basic and advanced setup modes in the web installer avalable on the MARC flavour selection page of step 3.
Bug-17855---Implemented-basic-and-advanced-setup-m.patch (text/plain), 11.41 KB, created by
Alex Buckley
on 2017-01-08 23:26:09 UTC
(
hide
)
Description:
Bug 17855 - Implemented basic and advanced setup modes in the web installer avalable on the MARC flavour selection page of step 3.
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-01-08 23:26:09 UTC
Size:
11.41 KB
patch
obsolete
>From 247153b2db27f556cf8fd1dc91883abb872dbfdf Mon Sep 17 00:00:00 2001 >From: Mika Smith <mikasmith@catalyst.net.nz> >Date: Mon, 12 Dec 2016 22:16:40 +0000 >Subject: [PATCH] Bug 17855 - Implemented basic and advanced setup modes in the > web installer avalable on the MARC flavour selection page of step 3. > >The two setup modes change how the data installation page of step 3 >looks: >Basic setup displays all default data values with bulletpoints, and >optional data values with a checkbox. > >Advanced setup displays default and optional data values with a checkbox. > >Conflicts: > koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >--- > installer/install.pl | 6 + > .../prog/en/modules/installer/step3.tt | 183 +++++++++++---------- > 2 files changed, 105 insertions(+), 84 deletions(-) > >diff --git a/installer/install.pl b/installer/install.pl >index 512ca3c..17d01e9 100755 >--- a/installer/install.pl >+++ b/installer/install.pl >@@ -199,6 +199,7 @@ elsif ( $step && $step == 3 ) { > # The installer will have to relogin since we do not pass cookie to redirection. > $template->param( "$op" => 1 ); > } >+ > elsif ( $op && $op eq 'addframeworks' ) { > # > # 1ST install, 3rd sub-step : insert the SQL files the user has selected >@@ -250,6 +251,10 @@ elsif ( $step && $step == 3 ) { > $template->param( "en_sample_data" => $sample_defaulted_to_en); > $template->param( "levelloop" => $levellist ); > $template->param( "$op" => 1 ); >+ >+ my $setup = $query->param('setup'); >+ $template->param( "setup"=> $setup ); >+ > } > elsif ( $op && $op eq 'choosemarc' ) { > # >@@ -270,6 +275,7 @@ elsif ( $step && $step == 3 ) { > # But could also be useful to have some Authorised values data set prepared here. > # Marcflavour Selection is achieved through radiobuttons. > my $langchoice = $query->param('fwklanguage'); >+ > $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice); > $langchoice =~ s/[^a-zA-Z_-]*//g; > my $dir = >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >index a601443..e4e5d1a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >@@ -6,72 +6,85 @@ > > [% IF ( selectframeworks ) %] > <script type="text/javascript"> >- //<![CDATA[ >+//<![CDATA[ > >- var surl = unescape(window.location.pathname); >+var surl = unescape(window.location.pathname); > >- function doLoad() >- { >- // the timeout value should be the same as in the "refresh" meta-tag >- setTimeout( "refresh()", 2*1000 ); >- } >+function doLoad() >+{ >+ // the timeout value should be the same as in the "refresh" meta-tag >+ setTimeout( "refresh()", 2*1000 ); >+} > >- function refresh(value) >- { >- // The argument to the location.reload function determines >- // if the browser should retrieve the document from the >- // web-server. In our example all we need to do is cause >- // the JavaScript block in the document body to be >- // re-evaluated. If we needed to pull the document from >- // the web-server again (such as where the document contents >- // change dynamically) we would pass the argument as 'true'. >- // >- surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value; >- >- window.location.replace( surl ); >- } >+function refresh(value) >+{ >+ // The argument to the location.reload function determines >+ // if the browser should retrieve the document from the >+ // web-server. In our example all we need to do is cause >+ // the JavaScript block in the document body to be >+ // re-evaluated. If we needed to pull the document from >+ // the web-server again (such as where the document contents >+ // change dynamically) we would pass the argument as 'true'. >+ // >+ surl=surl+'?step=3&op=selectframeworks&fwklanguage='+value; >+ >+ window.location.replace( surl ); >+} > >- function selectAllFrameworks() >+function selectAllFrameworks() >+{ >+ // A handy short link that selects all available checkboxes >+ // on the page. >+ // >+ var checkboxes = document.getElementsByTagName("input"); >+ for (var i = 0; i < checkboxes.length; i++) > { >- // A handy short link that selects all available checkboxes >- // on the page. >- // >- var checkboxes = document.getElementsByTagName("input"); >- for (var i = 0; i < checkboxes.length; i++) >+ if (checkboxes[i].type == 'checkbox') > { >- if (checkboxes[i].type == 'checkbox') >- { >- checkboxes[i].checked = true; >- } >+ checkboxes[i].checked = true; > } >- >- // Prevent event propergation. >- return false; > } > >- function Hide(link) >- { >- // Toggle the display of a given element on the page. >- // >- subfield = document.getElementById('bloc'+link); >- var initstyle = subfield.style.display; >- if (initstyle == 'block') subfield.style.display = 'none' ; >- if (initstyle == 'none') subfield.style.display = 'block' ; >- } >+ // Prevent event propergation. >+ return false; >+} > >- //]]> >- </script> >+function Hide(link) >+{ >+ // Toggle the display of a given element on the page. >+ // >+ subfield = document.getElementById('bloc'+link); >+ var initstyle = subfield.style.display; >+ if (initstyle == 'block') subfield.style.display = 'none' ; >+ if (initstyle == 'none') subfield.style.display = 'block' ; >+} >+ >+//]]> >+</script> > [% END %] >+ >+ > [% IF ( finish ) %] > <h1>Congratulations, installation complete</h1> > <p>If this page does not redirect in 5 seconds, click <a href="/cgi-bin/koha/installer/onboarding.pl">here</a>.</p> > [% END %] >+ >+ > [% IF ( choosemarc ) %] >- <h2 align="center">Select your MARC flavor</h2> >- <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> >+ <h2 align="center">Choose your setup</h2> >+ <p>Basic setup selects recommended settings by default.</p> > <form name="frameworkselection" method="post" action="install.pl"> > <input type="hidden" name="step" value="3" /> > <input type="hidden" name="op" value="selectframeworks"/> >+ >+ <div> >+ <input type="radio" name="setup" value="Basic" checked="checked">Basic<br/> >+ <input type="radio" name="setup" value="Advanced"/>Advanced<br/> >+ </div> >+ >+ <h2 align="center">Select your MARC flavor</h2> >+ <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> >+ > <p> > [% FOREACH flavourloo IN flavourloop %] > <div> >@@ -82,13 +95,19 @@ > [% END %] > </div> > [% END %] >- </p> >- <p> Click 'Next' to continue <input value="Next >>" type="submit" /></p> >+ >+ </p> >+ <p>Click 'Next' to continue <input value="Next >>" type="submit" /></p> >+ > </form> >+ > [% END %] > >+ > [% IF ( selectframeworks ) %] >+ <h2 align= "center"> [% setup %] setup</h2> > <h2 align="center">Selecting Default Settings</h2> >+ > <script type="text/javascript"> > var linklabel = _("Select all options"); > document.write('<p><a href="#" onclick="return selectAllFrameworks();"><button>'+linklabel+'</button></a></p>'); >@@ -97,33 +116,34 @@ > <input type="hidden" name="step" value="3" /> > <input type="hidden" name="op" value="addframeworks" /> > >- [% IF ( frameworksloop ) %] >- <h2>MARC frameworks: [% marcflavour %]</h2> >- [% IF ( en_marc_frameworks ) %] >- <h4><span class="error">No MARC frameworks are available for your language. Defaulting to the frameworks supplied for English (en)<span></h4> >- [% END %] >- [% FOREACH frameworksloo IN frameworksloop %] >- <div> >- <h3>[% frameworksloo.label %]</h3> >- [% FOREACH framework IN frameworksloo.frameworks %] >- <table style="border:1px;vertical-align:top;"> >- <tr> >- <td style = "border:1px; vertical-align:top;"> >- [% IF (frameworksloo.label == "Default" ) %] >- <input type="hidden" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" /> >- [% ELSE %] >- <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" /> >- [% END %] >- </td> >- <td> >- [% IF (frameworksloo.label == "Default" ) %] >- <ul> >- <label for="[% framework.fwkname %]"> >- <li> [% framework.fwkdescription %]</li> >- <em>([% framework.fwkname %])</em> >- </label> >- </ul> >+ [% IF ( frameworksloop ) %] >+ <h2>MARC frameworks: [% marcflavour %]</h2> >+ [% IF ( en_marc_frameworks ) %] >+ <h4><span class="error">No MARC frameworks are available for your language. >+ Defaulting to the frameworks supplied for English (en)<span></h4> >+ [% END %] >+ [% FOREACH frameworksloo IN frameworksloop %] >+ <div> >+ <h3>[% frameworksloo.label %]</h3> >+ [% FOREACH framework IN frameworksloo.frameworks %] >+ <table style="border:1px;vertical-align:top;"> >+ <tr> >+ <td style = "border:1px; vertical-align:top;"> >+ [% IF (frameworksloo.label == "Default") && (setup=="Basic") %] >+ <input type="hidden" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" /> >+ [% ELSE %] >+ <input type="checkbox" name="framework" value="[% framework.fwkfile %]" id =="[%framework.fwkname%]" /> >+ [% END %] > </td> >+ <td> >+ [% IF (frameworksloo.label == "Default") && (setup=="Basic") %] >+ <ul> >+ <label for="[% framework.fwkname %]"> >+ <li> [% framework.fwkdescription %]</li> >+ <em>([% framework.fwkname %])</em> >+ </label> >+ </ul> >+ </td> > [% ELSE %] > <td> > <label for= "[% framework.fwkname %]"> >@@ -150,20 +170,15 @@ > <table style="border:1px;vertical-align:top;"> > <tr> > <td style="vertical-align:top;"> >- [% IF (levelloo.label == "Default" ) %] >-<<<<<<< HEAD >+ [% IF (levelloo.label == "Default" ) && (setup=="Basic")%] > <input type="hidden" name="framework" value="[% framework.fwkfile %]" id="[%framework.fwkname %]" /> >-======= >- <ul> >- </ul> >->>>>>>> 9e47b85... Removed test text > [% ELSE %] > <input type="checkbox" name="framework" value="[%framework.fwkfile %]" id=="[%framework.fwkname%]"/> > [% END %] > </td> > <td> >- [% IF (levelloo.label == "Default") %] >- <ul> >+ [% IF (levelloo.label == "Default") && (setup=="Basic")%] >+ <ul> > <label for="[% framework.fwkname %]"> > <li> [% framework.fwkdescription %]</li> > <em>([% framework.fwkname %])</em> >@@ -253,7 +268,7 @@ > <br> > <br> > <a href="install.pl?step=3&op=choosemarc" class="button"><button>Install Basic Configuration Settings</button></a> >- </p> >+ > [% END %] > [% END %] > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17855
:
58657
|
58658
|
58659
|
58660
|
58661
|
58662
|
58663
|
58664
|
58665
|
58666
|
58667
|
58668
|
58669
|
58781
|
58782
|
58783
|
58784
|
58785
|
58792
|
58793
|
58794
|
58846
|
58860
|
58861
|
58862
|
58886
|
58892
|
58893
|
58894
|
58895
|
58896
|
58897
|
58898
|
58899
|
58900
|
58901
|
58902
|
58903
|
58904
|
58905
|
58906
|
58907
|
59037
|
59051
|
59140
|
59141
|
59174
|
59188
|
59277
|
59279
|
59280
|
59281
|
59628
|
59703
|
59705
|
59706
|
59707
|
59708
|
59709
|
59710
|
59711
|
59712
|
59742
|
59826
|
59830
|
59840
|
59841
|
59842
|
59856
|
59857
|
60092
|
61667
|
61668
|
61986
|
62186
|
62191
|
62192
|
62193
|
62220
|
62221
|
62222
|
62223
|
62231
|
62233
|
62234
|
62235
|
62236
|
62237
|
62238
|
62239
|
62240
|
62241
|
62242
|
62243
|
62251
|
62252
|
62253
|
62254
|
62255
|
62256
|
62257
|
62258
|
62259
|
62260
|
62261
|
62262
|
62263
|
62281
|
62282
|
62283
|
62284
|
62285
|
62286
|
62287
|
62288
|
62668
|
62669
|
62670
|
62671
|
62672
|
62673
|
62674
|
62675