@@ -, +, @@ is redirected to (after authentication) after finishing the web installer. onboarding tool displayed after installer finished. --- installer/onboarding.pl | 64 ++++- .../intranet-tmpl/prog/en/includes/header.inc | 2 + .../prog/en/modules/installer/step3.tt | 4 +- .../intranet-tmpl/prog/en/modules/intranet-main.tt | 2 - .../en/modules/onboarding/.onboardingstep1.tt.swp | Bin 36864 -> 0 bytes .../en/modules/onboarding/.onboardingstep2.tt.swp | Bin 20480 -> 0 bytes .../prog/en/modules/onboarding/onboardingstep1.tt | 76 +++--- .../prog/en/modules/onboarding/onboardingstep2.tt | 301 +++++++++++---------- .../prog/en/modules/onboarding/onboardingstep3.tt | 122 +++++++++ .../prog/en/modules/onboarding/onboardingstep4.tt | 79 ++++++ .../prog/en/modules/onboarding/onboardingstep5.tt | 251 +++++++++++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt | 41 +++ summary.pl | 58 ++++ 13 files changed, 791 insertions(+), 209 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/.onboardingstep1.tt.swp delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/.onboardingstep2.tt.swp create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt create mode 100755 summary.pl --- a/installer/onboarding.pl +++ a/installer/onboarding.pl @@ -5,10 +5,9 @@ use warnings; use diagnostics; -use C4::Koha; -#Pragmas for creating library use Modern::Perl; -use CGI qw (-utf8); +use CGI qw ( -utf8 ); +use C4::Koha; use C4::Auth; use C4::Context; use C4::Output; @@ -18,14 +17,14 @@ use Koha::Libraries; use Koha::LibraryCategories; -use POSIX; -use C4::Templates; -use C4::Languages qw(getAllLanguages getTranslatedLanguages); -use C4::Installer; -use Koha; -use installer::install.pl; +#use POSIX; +#use C4::Templates; +#use C4::Languages qw(getAllLanguages getTranslatedLanguages); +#use C4::Installer; +#use Koha; -#Setting variables from install.pl origin +#Setting variables +my $input = new CGI; my $query = new CGI; my $step = $query->param('step'); @@ -59,11 +58,24 @@ my $dbh = DBI->connect( + my $op = $query->param('op'); + $template->param('op'=>$op); + warn $op; + if ( $op && $op eq 'finish' ) { + print $query->redirect("/cgi-bin/koha/mainpage.pl"); + exit; + } + + #Performing each step of the onboarding tool if ( $step && $step == 1 ) { #This is the Initial step of the onboarding tool to create a library + + my $createlibrary = $query->param('createlibrary'); + $template->param('createlibrary'=>$createlibrary); + #store inputted parameters in variables my $branchcode = $input->param('branchcode'); my $categorycode = $input->param('categorycode'); @@ -126,10 +138,28 @@ if ( $step && $step == 1 ) { $op = 'list'; } - if ($op eq 'list'){ - print redirect(-url=>'koha/cgi-bin/koha/onboarding/onboarding.cgi?step=2'); - } +}elsif ( $step && $step == 2 ){ + + my $createpatroncategory = $query->param('createpatroncategory'); + $template->param('createpatroncategory'=>$createpatroncategory); + +}elsif ( $step && $step == 3 ){ + + my $createpatron = $query->param('createpatron'); + $template->param('createpatron'=>$createpatron); + +}elsif ( $step && $step == 4){ + + my $createitemtype = $query->param('createitemtype'); + $template->param('createitemtype'=>$createitemtype); + +}elsif ( $step && $step == 5){ + + my $createcirculationrule = $query->param('createcirculationrule'); + $template->param('createcirculationrule'=>$createcirculationrule); + + } @@ -138,5 +168,13 @@ if ( $step && $step == 1 ) { +output_html_with_http_headers $input, $cookie, $template->output; + + + + + + + --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -42,6 +42,8 @@
  • Administration
  • [% END %]
  • About Koha
  • +
  • Summary
  • + --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -65,8 +65,8 @@ function Hide(link) [% IF ( finish ) %] -

    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.

    [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -1,5 +1,3 @@ -[% USE Koha %] -[% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha staff client --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep1.tt @@ -1,8 +1,9 @@ - - [% INCLUDE 'doc-head-open.inc' %] +[% IF ( finish ) %][% END %] +[% INCLUDE 'installer-doc-head-close.inc' %] + Welcome › to › Koha @@ -35,24 +36,41 @@ -[% IF ( finish ) %][% END %] -[% INCLUDE 'installer-doc-head-close.inc' %]

    Welcome to Koha

    -

    Koha

    -
    - - Set up my koha +

    Koha

    +

    We're just going to set up a few things

    + + +[% IF (createlibrary) %] + + + +

    New Library

    - -[% IF (setupmyKoha) %] -

    New Library

    +
    +

    Success: Library created!

    +

    To add another library and for more settings,
    + go to Tools->Administration->Libraries and Groups +

    + Next up: + + + + +[% ELSE %] + +

    New Library

    - +
    1. @@ -61,41 +79,15 @@
    2. - + Required
    -
    - -
    +
    +
    -[% END %] - - -[% IF (createlibrary) %] - [% IF (library) %] - -
    - - -

    New Library

    - -
    -

    Success: Library created!


    -

    To add another library and for more settings,
    - go to Tools->Administration->Libraries and Groups -

    - Next up: - -
    - [% ELSE %] -
    -

    Library was not successfully created

    -
    - [% END %] - [% END %] - +[% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt @@ -2,8 +2,11 @@ [% USE Koha %] [% USE KohaDates %] [% USE Price %] + [% INCLUDE 'doc-head-open.inc' %] -[% INCLUDE 'doc-head-close.inc' %] + +[% IF ( finish ) %][% END %] +[% INCLUDE 'installer-doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %] @@ -18,180 +21,178 @@ var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date."); - - [% IF (addpatroncategory) %] - ........ -
    -
    -
    -
    - [% FOR m IN messages %] -
    - [% SWITCH m.code %] - [% CASE 'error_on_insert' %] - An error occurred when inserting this patron category. The patron category might already exist. - [% CASE 'success_on_insert' %] - Patron category inserted successfully. - [% CASE 'already_exists' %] - This patron category already exists. - [% CASE %] - [% m.code %] - [% END %] -
    - [% END %] - -
    +
    +

    Welcome to Koha

    +

    Koha

    +
    + + +[% IF (createpatroncategory) %] + + + +

    New patron category

    +
    +

    Success: Patron category created!

    +

    To add another patron category and for more settings
    + go to More->Administration->Patrons & Circulation->Patron Categories

    +
    + Next up:
    + +
    + +[% ELSE %] +

    New Patron Category

    + +
    +
    - - -

    New Patron Category

    -
    -
    -
      -
    1. - - - Required -
    2. - -
    3. - - - Required -
    4. - -
    5. - - -
    6. - -
    7. - - +
        +
      1. + + + Required +
      2. + +
      3. + + + Required +
      4. + +
      5. + + +
      6. + +
      7. + + - Required -
      8. - -
      9. - - - Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob batch_anonymise.pl which should be set up by your system administrator. -
      10. - -
      11. - Enrollment period: -
        - Choose one -
          -
        1. - - months -
        2. -
        3. - - -
        4. -
        -
        -
      12. - -
        - -
        - - [% END %] - - [% IF (addpatroncategory) %] - [% IF (categorycode) %] -
        ... - -

        New patron category

        -
        . -

        Success: Patron category created!

        -

        To add another patron category and for more settings
        - go to More->Administration->Patrons & Circulation->Patron Categories

        -
        - Next up: - - - [% ELSE %] -

        Patron category was not successfully created

        + [% END %] + + Required + + +
      13. + + +

        Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob batch_anonymise.pl which should be set up by your system administrator.

        +
      14. + + Enrollment period: +
        + Choose one +
          +
        1. + + months +
        2. +
        3. + + +
        4. +
        +
        +
        + +
        +[% END %] + + + --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep3.tt @@ -0,0 +1,122 @@ + +[% INCLUDE 'doc-head-open.inc' %] + +[% IF ( finish ) %][% END %] +[% INCLUDE 'installer-doc-head-close.inc' %] + + +Create Patron + + + + + + + +
        +

        Welcome to Koha

        +

        Koha

        +
        + + +[% IF (createpatron) %] + +
        + +

        New Patron

        + +
        +

        Success: New patron created!

        +

        To create another patron, go to Patrons > New Patron.
        + More > Set Permissions in a user page to gain superlibrarian permissions. +

        + Next up: + +
        +
        +

        Oh no! Patron was not created

        +
        +[% ELSE %] + +

        New Patron

        +
        +
        + + + +
          +

          Patron Identity

          +
        1. + + + Required +
        2. +
        3. + + + Required +
        4. +
        +
          +

          Library Management

          +
        1. + + + Required +
        2. +
        3. + +
        4. +
        5. + +
        6. +
        +
          +

          OPAC/Staff Login

          +
        1. + + + Required +
        2. +
        3. + + + Required +
        4. +
        5. + + + Required +
        6. +
        +
        +
        + +
        +
        +[% END %] + + + + + + + + + + + --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep4.tt @@ -0,0 +1,79 @@ + +[% INCLUDE 'doc-head-open.inc' %] + +[% IF ( finish ) %][% END %] +[% INCLUDE 'installer-doc-head-close.inc' %] + + +Create item type + + + + + + + +
        +

        Welcome to Koha

        +

        Koha

        +
        + + +[% IF (createitemtype) %] + +
        + + +

        New Item type

        + +
        +

        Success: New item type created!

        +

        To create another item type later and for more setttings
        + go to More->Administration->Item types +

        + Next up: + +
        + Or: + +
        +
        +

        Oh no! Patron was not created

        +
        +[% ELSE %] + +

        New Item type

        +
        +
        + + + +
          +
        1. + + + Required +
        2. +
        3. + + + Required +
        4. +
        +
        +
        + +
        +
        +[% END %] + + + + + + + + + + + --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt @@ -0,0 +1,251 @@ + +[% INCLUDE 'doc-head-open.inc' %] + +[% IF ( finish ) %][% END %] +[% INCLUDE 'installer-doc-head-close.inc' %] + + +Create Circulation rule + + + + + + + +
        +

        Welcome to Koha

        +

        Koha

        +
        + +[% IF (finish) %] +

        Congratulations you have finished and ready to use Koha

        +Start using Koha + +[% END %] + + +[% IF (createcirculationrule) %] + +
        + + +

        New Item type

        + +
        +

        Success: New circulation rule created!

        +

        To create circulation rule, go to
        + More->Administration->Circulation and Fine Rules +

        + Next up: + +
        +
        +

        Oh no! Circulation Rule was not created

        +
        + + +[% ELSE %] + +

        New Circulation rule

        +
        +
        + + + +
          +
        1. + + + Required +
        2. + +
        3. + + + Required +
        4. + +
        5. + + + Required +
        6. + +
        7. + + + Required +
        8. + +
        9. + + +
        10. + +
        11. + + + Required +
        12. + +
        13. + + + Required +
        14. + +
        15. + + +
        16. +
        +
        +
        + +
        +
        +[% END %] + + + + + + + + + + + --- a/koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/summary.tt @@ -0,0 +1,41 @@ +[% USE Koha %] +[% INCLUDE 'doc-head-open.inc' %] +Koha Tutorial Summary +[% INCLUDE 'doc-head-close.inc' %] + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] + + + +
        +
        +
        +

        Tutorial Summary Page

        +
        +

        Library

        +

        To add another library and for more settings, go to
        + More > Administration > Libraries and Groups

        + +

        Patron Category

        +

        To add another patron category and for more settings, go to
        + More > Administration > Patrons and Circulation > Patron Categories

        + +

        Patron

        +

        To create another patron, go to Patrons > New Patron. To set the
        + permissions of the patron, go to the patron's page and More > Set Permissions

        + +

        Item Type

        +

        To create another item type and for more settings, go to
        + More > Administration > Item types

        + +

        Circulation Rule

        +

        To create another circulation rule, go to
        + More > Administration > Circulation and Fine Rules + +

        +
        +
        +[% INCLUDE 'intranet-bottom.inc' %] --- a/summary.pl +++ a/summary.pl @@ -0,0 +1,58 @@ +#!/usr/bin/perl + +# Copyright Pat Eyler 2003 +# Copyright Biblibre 2006 +# Parts Copyright Liblime 2008 +# Parts Copyright Chris Nighswonger 2010 +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use CGI qw ( -utf8 ); +use List::MoreUtils qw/ any /; +use LWP::Simple; +use XML::Simple; +use Config; + +use C4::Output; +use C4::Auth; +use C4::Context; +use C4::Installer; + +use Koha; +use Koha::Acquisition::Currencies; +use Koha::Patrons; +use Koha::Caches; +use Koha::Config::SysPrefs; +use C4::Members::Statistics; + +#use Smart::Comments '####'; + +my $query = new CGI; +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "summary.tt", + query => $query, + type => "intranet", + authnotrequired => 0, + flagsrequired => { catalogue => 1 }, + debug => 1, + } +); + + +output_html_with_http_headers $query, $cookie, $template->output; --