From 7f4c6d8335b38c6d2b52683e9da78ecaf63be355 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Wed, 3 Oct 2007 12:08:47 +0200 Subject: [PATCH] #1449: Installer improved to add a zebra/Nozebra screen + some minor changes in html Signed-off-by: Chris Cormack --- installer/install.pl | 153 ++++----- .../en/includes/installer-doc-head-close.inc | 5 +- .../prog/en/modules/installer/step1.tmpl | 3 +- .../prog/en/modules/installer/step2.tmpl | 3 +- .../prog/en/modules/installer/step3.tmpl | 297 ++++++++++-------- 5 files changed, 248 insertions(+), 213 deletions(-) diff --git a/installer/install.pl b/installer/install.pl index f1e74317e9..f8a687a084 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -238,38 +238,44 @@ elsif ( $step && $step == 3 ) { # # my $op = $query->param('op'); - if ( $op && $op eq 'finish' ) { - my $kohaversion=C4::Context::KOHAVERSION; - # remove the 3 last . to have a Perl number - $kohaversion =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/; - if (C4::Context->preference('Version')) { - warn "UPDATE Version"; - my $finish=$dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='Version'"); - $finish->execute($kohaversion); - } else { - warn "INSERT Version"; - my $finish=$dbh->prepare("INSERT into systempreferences (variable,value,explanation) values ('Version',?,'The Koha database version. Don t change this value manually, it s holded by the webinstaller')"); - $finish->execute($kohaversion); + if ( $op && $op eq 'finished' ) { + # + # we have finished, just redirect to mainpage. + # + print $query->redirect("/cgi-bin/koha/mainpage.pl"); + exit 1; } + elsif ( $op && $op eq 'finish' ) { + my $kohaversion=C4::Context::KOHAVERSION; + # remove the 3 last . to have a Perl number + $kohaversion =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/; + if (C4::Context->preference('Version')) { + warn "UPDATE Version"; + my $finish=$dbh->prepare("UPDATE systempreferences SET value=? WHERE variable='Version'"); + $finish->execute($kohaversion); + } else { + warn "INSERT Version"; + my $finish=$dbh->prepare("INSERT into systempreferences (variable,value,explanation) values ('Version',?,'The Koha database version. Don t change this value manually, it s holded by the webinstaller')"); + $finish->execute($kohaversion); + } - # Installation is finished. - # We just deny anybody acess to install - # And we redirect people to mainpage. - # The installer wil have to relogin since we donot pass cookie to redirection. + # Installation is finished. + # We just deny anybody acess to install + # And we redirect people to mainpage. + # The installer wil have to relogin since we donot pass cookie to redirection. $template->param( "$op" => 1 ); } - elsif ( $op && $op eq 'finished' ) { - # - # - # we have finished, just redirect to mainpage. - # - # - print $query->redirect("/cgi-bin/koha/mainpage.pl"); - exit 1; + elsif ( $op && $op eq 'Nozebra' ) { + if ($query->param('Nozebra')) { + $dbh->do("UPDATE systempreferences SET value=1 WHERE variable='NoZebra'"); + } else { + $dbh->do("UPDATE systempreferences SET value=0 WHERE variable='NoZebra'"); + } + $template->param( "$op" => 1 ); } elsif ( $op && $op eq 'addframeworks' ) { # - # 1ST install : insert the SQL files the user has selected + # 1ST install, 3rd sub-step : insert the SQL files the user has selected # #Framework importing and reports @@ -285,7 +291,7 @@ elsif ( $step && $step == 3 ) { $dbh->do('SET FOREIGN_KEY_CHECKS=0'); my $request = $dbh->prepare( -"SELECT value FROM systempreferences WHERE variable='FrameworksLoaded'" + "SELECT value FROM systempreferences WHERE variable='FrameworksLoaded'" ); $request->execute; my ($systempreference) = $request->fetchrow; @@ -331,11 +337,11 @@ elsif ( $step && $step == 3 ) { } my $updateflag = $dbh->do( -"UPDATE systempreferences set value=\"$systempreference\" where variable='FrameworksLoaded'" + "UPDATE systempreferences set value=\"$systempreference\" where variable='FrameworksLoaded'" ); unless ( $updateflag == 1 ) { my $string = -"INSERT INTO systempreferences (value, variable, explanation, type) VALUES (\"$systempreference\",'FrameworksLoaded','Frameworks loaded through webinstaller','choice')"; + "INSERT INTO systempreferences (value, variable, explanation, type) VALUES (\"$systempreference\",'FrameworksLoaded','Frameworks loaded through webinstaller','choice')"; my $rq = $dbh->prepare($string); $rq->execute; } @@ -347,23 +353,23 @@ elsif ( $step && $step == 3 ) { $dbh->do('SET FOREIGN_KEY_CHECKS=1'); } elsif ( $op && $op eq 'selectframeworks' ) { -# -# -# 1ST install : show the user the sql datas he can insert in the database. -# -# -# (note that the term "selectframeworks is not correct. The user can select various files, not only frameworks) - -#Framework Selection -#sql data for import are supposed to be located in installer/data// -# Where is en|fr or any international abbreviation (provided language hash is updated... This will be a problem with internationlisation.) -# Where is a category of requirement : required, recommended optional -# level should contain : -# SQL File for import With a readable name. -# txt File taht explains what this SQL File is meant for. -# Could be VERY useful to have A Big file for a kind of library. -# But could also be useful to have some Authorised values data set prepared here. -# Framework Selection is achieved through checking boxes. + # + # + # 1ST install, 2nd sub-step : show the user the sql datas he can insert in the database. + # + # + # (note that the term "selectframeworks is not correct. The user can select various files, not only frameworks) + + #Framework Selection + #sql data for import are supposed to be located in installer/data// + # Where is en|fr or any international abbreviation (provided language hash is updated... This will be a problem with internationlisation.) + # Where is a category of requirement : required, recommended optional + # level should contain : + # SQL File for import With a readable name. + # txt File taht explains what this SQL File is meant for. + # Could be VERY useful to have A Big file for a kind of library. + # But could also be useful to have some Authorised values data set prepared here. + # Framework Selection is achieved through checking boxes. my $langchoice = $query->param('fwklanguage'); $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice); my $dir = C4::Context->config('intranetdir') . "/installer/data/"; @@ -391,7 +397,7 @@ elsif ( $step && $step == 3 ) { my @levellist; my $request = $dbh->prepare( -"SELECT value FROM systempreferences WHERE variable='FrameworksLoaded'" + "SELECT value FROM systempreferences WHERE variable='FrameworksLoaded'" ); $request->execute; my ($frameworksloaded) = $request->fetchrow; @@ -444,30 +450,12 @@ elsif ( $step && $step == 3 ) { $template->param( "levelloop" => \@levellist ); $template->param( "$op" => 1 ); } - elsif ( $op && $op eq 'updatestructure' ) { - - #Do updatedatabase And report - my $execstring = - C4::Context->config("intranetdir") . "/updater/updatedatabase"; - undef $/; - my $string = qx|$execstring 2>&1|; - if ($string) { - $string =~ s/\n|\r/
/g; - $string =~ -s/(DBD::mysql.*? failed: .*? line [0-9]*.|=================.*?====================)/$1<\/font>/g; - $template->param( "updatereport" => $string ); - } - $template->param( $op => 1 ); - } elsif ( $op && $op eq 'importdatastructure' ) { - # - # - # UPDATE (not 1st install) run updatedatabase - # - # - - #Import data structure and show errors if any - #Uses DBI to read the file [MJR 2007-07-01] + # + # + # 1st install, 1st "sub-step" : import kohastructure + # + # my $dbh = DBI->connect( "DBI:$info{dbms}:$info{dbname}:$info{hostname}" . ( $info{port} ? ":$info{port}" : "" ), @@ -485,11 +473,30 @@ s/(DBD::mysql.*? failed: .*? line [0-9]*.|=================.*?================== ); $dbh->disconnect; } + elsif ( $op && $op eq 'updatestructure' ) { + # + # Not 1st install, the only sub-step : update database + # + #Do updatedatabase And report + my $execstring = + C4::Context->config("intranetdir") . "/updater/updatedatabase"; + undef $/; + my $string = qx|$execstring 2>&1|; + if ($string) { + $string =~ s/\n|\r/
/g; + $string =~ + s/(DBD::mysql.*? failed: .*? line [0-9]*.|=================.*?====================)/$1<\/font>/g; + $template->param( "updatereport" => $string ); + } + $template->param( $op => 1 ); + } else { - -#Check if there are enough tables. -# Paul has cleaned up tables so reduced the count -#I put it there because it implied a data import if condition was not satisfied. + # + # check wether it's a 1st install or an update + # + #Check if there are enough tables. + # Paul has cleaned up tables so reduced the count + #I put it there because it implied a data import if condition was not satisfied. my $dbh = DBI->connect( "DBI:$info{dbms}:$info{dbname}:$info{hostname}" . ( $info{port} ? ":$info{port}" : "" ), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc index aa2c019b03..d6237d3bf3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc @@ -22,8 +22,9 @@ body { h1 { color: #006; - font-size: 18px; - font-weight: lighter; + font-size: 2em; + font-weight: normal; + vertical-align:middle; } h2 { font-size: 16px; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tmpl index f081adee5c..6189788118 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tmpl @@ -2,8 +2,7 @@ Koha › Web Installer › Step 1
-

Koha

-

Koha › Web Installer › Step 1

+

Koha Web Installer › Step 1

You are about to install Koha.

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tmpl index bb50ae2222..b3cdec6d92 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tmpl @@ -1,8 +1,7 @@ Koha › Web Installer › Step 2
-

Koha

-

Koha › Web Installer › Step 2

+

Koha Web Installer › Step 2

Database settings:

  • database name :
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tmpl index 5fc7bc954f..a60a4663bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tmpl @@ -2,148 +2,177 @@
    -

    Koha

    -

    Koha › Web Installer › Step 3

    - - - - - - - - - + function doLoad() + { + // the timeout value should be the same as in the "refresh" meta-tag + setTimeout( "refresh()", 2*1000 ); + } + + function refresh(value) + { + // This version of the refresh function will cause a new + // entry in the visitor's history. It is provided for + // those browsers that only support JavaScript 1.0. + // + sURL=sURL+'?step=3&op=selectframeworks&fwklanguage='+value; + window.location.href = sURL; + } + + //--> + + + + + + + + -

    Congratulations, Installation complete

    -

    If this page does not redirect in 5 seconds, click here.

    +

    Congratulations, Installation complete

    +

    If this page does not redirect in 5 seconds, click here.

    -

    Selecting Default Settings

    -
    - - -

    Each language has a set of default settings that cover a wide range of configuration options. Please select a language from the dropdown or use the default lanaguage already selected.

    - -

    -

    -

    - -

    -

    - -
    -

    - " checked="checked" /> - " /> +

    Selecting Default Settings

    + + + +

    Each language has a set of default settings that cover a wide range of configuration options. Please select a language from the dropdown or use the default lanaguage already selected.

    + +

    +

    + +

    +

    + + + + + +
    + + " checked="checked" /> + + " /> + + + + () +
    +
    - -
    -

    - -

    When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete, - please be patient.

    -

    -

    - -

    +

    + +

    When you've made your selections, please click 'Import' below to begin the process. It may take a while to complete, + please be patient.

    +

    +

    + +

    -

    Results of installation:

    -

    Language :

    - -

    data added

    -

    -

      - -

    • - -
    -

    - -

    Installation complete.
    -

    Click on Finish to complete and load the Koha Staff Interface. -

    - - -
    + +

    data added

    +
      + +

    • + +
    + +

    Zebra or Nozebra ?

    +

    Koha comes in 2 flavours : Zebra and NoZebra. You will now decide the version you need

    +

    some directions to help you choose:

    +

    Zebra version

    +
      +
    • is highly scalable (can support easily more than 300 000 items on a public library with an OPAC widely accessed on the web : see http://catalog.ccfls.org/cgi-bin/koha/opac-main.pl or http://www.mediathequeouestprovence.fr/)
    • +
    • provide a public (external) z3950 server
    • +
    • is complex to configure and administrate
    • +
    +

    NoZebra version

    +
      +
    • is available immediatly once Koha is installed
    • +
    • is probably not that speedy for catalogue with more than 100 000 items
    • +
    • does not provide a public (external) z3950 server
    • +
    +

    Whatever you choose now, you can always change your mind and setup the other version.

    +

    Note that, if you choose "Zebra", you won't have a working koha, you must set up zebra first (catalogue search won't work, the rest will)

    +

    What do you choose ?

    +
    + + +

    Nozebra: my catalogue is not that large and I want something simple to setup

    +

    Zebra: I have a large catalogue, I'm not afraid having to setup more software on my server

    +
    + + + + +

    Installation complete.
    +

    Click on Finish to complete and load the Koha Staff Interface. +

    + + +
    +

    -

    @@ -159,19 +188,19 @@ function Hide(link) {
-

Click Next to continue

+

Click Next to continue

-

Now we're ready to create the database tables and fill them with some default data.

-
- - -

Click Next to continue

-
+

Now we're ready to create the database tables and fill them with some default data.

+
+ + +

Click Next to continue

+
-- 2.39.5