From e964dac59caa499088ab311d5d44d29b97052d42 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Fri, 21 Jul 2017 22:43:38 +0000 Subject: [PATCH] Bug 18645 -Koha feature release change tool This tool is displayed at the end of the update process to display all the new system preferences added during the update so that the administrator can view and modify their default values if neccessary Link to the release notes for the most recent installed release are also provided by this tool. Test plan: 1. Go to Administrator->global system preferences->Local use 2. Set the version number to 16.1200033 (Note: only 1 decimal place) and save 3. Go through the update process and notice that after submitting the 'Update database structure" page you are prompted to login and the main page appears if you logged in with the correct credentials 4. Apply patch 5. Repeat steps 1, and 2 6. Notice the button text on the 'Update database structure' page has changed and now it says 'Continue to feature release tool' 7. The feature release tool will be displayed. Click on the 'New Syspref information' tab and notice that the system preferences (names, explanations and (editable) default values) installed in the update process are displayed 8. Change the value of TranslateNotices syspref and click the 'Save all preferences' button 9. Refresh the page manually and click on the 'New syspref information' tab and notice the value of the TranslateNotices syspref has been altered 10. Click on the 'Release notes' tab and open the release note link which is 17.05 release notes 11. Leave the feature release change tool by clicking the 'Next and submit' button 12. You are prompted to login, after entering the correct credentials the intranet main page is displayed Sponsored-by: Catalyst IT https://bugs.koha-community.org/show_bug.cgi?id=19247 --- admin/preferences.pl | 119 +++--- admin/systempreferences.pl | 1 + ...g_version_column_to_systempreferences_table.sql | 80 ++++ installer/featurereleasetool.pl | 186 ++++++++++ installer/install.pl | 19 +- koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 7 + .../intranet-tmpl/prog/en/includes/newsform.inc | 94 +++++ .../intranet-tmpl/prog/en/includes/prefs-table.inc | 114 ++++++ koha-tmpl/intranet-tmpl/prog/en/includes/team.inc | 403 ++++++++++++++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 404 +-------------------- .../prog/en/modules/admin/preferences.tt | 112 +----- .../en/modules/installer/featurereleasetool.tt | 151 ++++++++ .../prog/en/modules/installer/step3.tt | 4 +- .../prog/en/modules/tools/koha-news.tt | 76 +--- tools/koha-news.pl | 4 +- 15 files changed, 1122 insertions(+), 652 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/18645_adding_version_column_to_systempreferences_table.sql create mode 100755 installer/featurereleasetool.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/newsform.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/prefs-table.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/team.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/installer/featurereleasetool.tt diff --git a/admin/preferences.pl b/admin/preferences.pl index 032789f..4476e75 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -33,6 +33,7 @@ use File::Spec; use IO::File; use YAML::Syck qw(); use List::MoreUtils qw(any); +use C4::Sysprefs; $YAML::Syck::ImplicitTyping = 1; $YAML::Syck::ImplicitUnicode = 1; our $lang; @@ -58,74 +59,74 @@ sub GetTab { } sub _get_chunk { - my ( $value, %options ) = @_; + my ( $value, %options ) = @_; - my $name = $options{'pref'}; - my $chunk = { name => $name, value => $value, type => $options{'type'} || 'input', class => $options{'class'} }; + my $name = $options{'pref'}; + my $chunk = { name => $name, value => $value, type => $options{'type'} || 'input', class => $options{'class'} }; - if ( $options{'class'} && $options{'class'} eq 'password' ) { - $chunk->{'input_type'} = 'password'; - } elsif ( $options{'class'} && $options{'class'} eq 'date' ) { - $chunk->{'dateinput'} = 1; - } elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) { - my $current_languages = { map { +$_, 1 } split( /\s*,\s*/, $value ) }; + if ( $options{'class'} && $options{'class'} eq 'password' ) { + $chunk->{'input_type'} = 'password'; + } elsif ( $options{'class'} && $options{'class'} eq 'date' ) { + $chunk->{'dateinput'} = 1; + } elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) { + my $current_languages = { map { +$_, 1 } split( /\s*,\s*/, $value ) }; - my $theme; - my $interface; - if ( $options{'type'} eq 'opac-languages' ) { + my $theme; + my $interface; + if ( $options{'type'} eq 'opac-languages' ) { # this is the OPAC - $interface = 'opac'; - $theme = C4::Context->preference('opacthemes'); - } else { - # this is the staff client - $interface = 'intranet'; - $theme = C4::Context->preference('template'); - } - $chunk->{'languages'} = getTranslatedLanguages( $interface, $theme, $lang, $current_languages ); - $chunk->{'type'} = 'languages'; - } elsif ( $options{ 'choices' } ) { - if ( $options{'choices'} && ref( $options{ 'choices' } ) eq '' ) { - if ( $options{'choices'} eq 'class-sources' ) { - my $sources = GetClassSources(); - $options{'choices'} = { map { $_ => $sources->{$_}->{'description'} } keys %$sources }; - } elsif ( $options{'choices'} eq 'opac-templates' ) { - $options{'choices'} = { map { $_ => $_ } getallthemes( 'opac' ) } - } elsif ( $options{'choices'} eq 'staff-templates' ) { - $options{'choices'} = { map { $_ => $_ } getallthemes( 'intranet' ) } - } else { - die 'Unrecognized source of preference values: ' . $options{'choices'}; - } - } - - $value ||= 0; + $interface = 'opac'; + $theme = C4::Context->preference('opacthemes'); + } else { + # this is the staff client + $interface = 'intranet'; + $theme = C4::Context->preference('template'); + } + $chunk->{'languages'} = getTranslatedLanguages( $interface, $theme, $lang, $current_languages ); + $chunk->{'type'} = 'languages'; + } elsif ( $options{ 'choices' } ) { + if ( $options{'choices'} && ref( $options{ 'choices' } ) eq '' ) { + if ( $options{'choices'} eq 'class-sources' ) { + my $sources = GetClassSources(); + $options{'choices'} = { map { $_ => $sources->{$_}->{'description'} } keys %$sources }; + } elsif ( $options{'choices'} eq 'opac-templates' ) { + $options{'choices'} = { map { $_ => $_ } getallthemes( 'opac' ) } + } elsif ( $options{'choices'} eq 'staff-templates' ) { + $options{'choices'} = { map { $_ => $_ } getallthemes( 'intranet' ) } + } else { + die 'Unrecognized source of preference values: ' . $options{'choices'}; + } + } + + $value ||= 0; $chunk->{'type'} = 'select'; - $chunk->{'CHOICES'} = [ - sort { $a->{'text'} cmp $b->{'text'} } - map { { text => $options{'choices'}->{$_}, value => $_, selected => ( $_ eq $value || ( $_ eq '' && ( $value eq '0' || !$value ) ) ) } } - keys %{ $options{'choices'} } - ]; - } elsif ( $options{'multiple'} ) { - my @values; - @values = split /,/, $value if defined($value); - $chunk->{type} = 'multiple'; - $chunk->{CHOICES} = [ - sort { $a->{'text'} cmp $b->{'text'} } - map { - my $option_value = $_; - { - text => $options{multiple}->{$option_value}, - value => $option_value, - selected => (grep /^$option_value$/, @values) ? 1 : 0, - } - } - keys %{ $options{multiple} } - ]; - } + $chunk->{'CHOICES'} = [ + sort { $a->{'text'} cmp $b->{'text'} } + map { { text => $options{'choices'}->{$_}, value => $_, selected => ( $_ eq $value || ( $_ eq '' && ( $value eq '0' || !$value ) ) ) } } + keys %{ $options{'choices'} } + ]; + } elsif ( $options{'multiple'} ) { + my @values; + @values = split /,/, $value if defined($value); + $chunk->{type} = 'multiple'; + $chunk->{CHOICES} = [ + sort { $a->{'text'} cmp $b->{'text'} } + map { + my $option_value = $_; + { + text => $options{multiple}->{$option_value}, + value => $option_value, + selected => (grep /^$option_value$/, @values) ? 1 : 0, + } + } + keys %{ $options{multiple} } + ]; + } $chunk->{ 'type_' . $chunk->{'type'} } = 1; - return $chunk; + return $chunk; } sub TransformPrefsToHTML { diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 67e0638..223c41b 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -339,6 +339,7 @@ if ( $op eq 'add_form' ) { unless C4::Context->config('demo'); print $input->redirect("/cgi-bin/koha/admin/systempreferences.pl?tab="); exit; + ################## DELETE_CONFIRM ################################## # called by default form, used to confirm deletion of data in DB } elsif ( $op eq 'delete_confirm' ) { diff --git a/installer/data/mysql/atomicupdate/18645_adding_version_column_to_systempreferences_table.sql b/installer/data/mysql/atomicupdate/18645_adding_version_column_to_systempreferences_table.sql new file mode 100644 index 0000000..b89f681 --- /dev/null +++ b/installer/data/mysql/atomicupdate/18645_adding_version_column_to_systempreferences_table.sql @@ -0,0 +1,80 @@ +ALTER TABLE systempreferences ADD version varchar(12) DEFAULT NULL; +UPDATE systempreferences SET version="16.06.00.003" WHERE variable ="MaxItemsToProcessForBatchMod"; +UPDATE systempreferences SET version="16.06.00.003" WHERE variable ="MaxItemsToDisplayForBatchDel"; +UPDATE systempreferences SET version="16.06.00.004" WHERE variable ="OPACXSLTListsDisplay"; +UPDATE systempreferences SET version="16.06.00.004" WHERE variable ="XSLTListsDisplay"; +UPDATE systempreferences SET version="16.06.00.005" WHERE variable ="XSLTListsDisplay"; +UPDATE systempreferences SET version="16.06.00.006" WHERE variable="RefundLostOnReturnControl"; +UPDATE systempreferences SET version="16.06.00.007" WHERE variable="PatronQuickAddFields"; +UPDATE systempreferences SET version="16.06.00.008" WHERE variable="CheckPrevCheckout"; +UPDATE systempreferences SET version="16.06.00.009" WHERE variable="IntranetCatalogSearchPulldown"; +UPDATE systempreferences SET version="16.06.00.010" WHERE variable="MaxOpenSuggestions"; +UPDATE systempreferences SET version="16.06.00.011" WHERE variable="NovelistSelectStaffEnabled"; +UPDATE systempreferences SET version="16.06.00.011" WHERE variable="NovelistSelectStaffView"; +UPDATE systempreferences SET version="16.06.00.013" WHERE variable="OPACResultsLibrary"; +UPDATE systempreferences SET version="16.06.00.015" WHERE variable="HoldsLog"; +UPDATE systempreferences SET version="16.06.00.020" WHERE variable="SwitchOnSiteCheckouts"; +UPDATE systempreferences SET version="16.06.00.027" WHERE variable="TrackLastPatronActivity"; +UPDATE systempreferences SET version="16.06.00.021" WHERE variable="PatronSelfRegistrationEmailMustBeUnique"; +UPDATE systempreferences SET version="16.06.00.023" WHERE variable="timeout"; +UPDATE systempreferences SET version="16.06.00.025" WHERE variable="makePreviousSerialAvailable"; +UPDATE systempreferences SET version="16.06.00.026" WHERE variable="PatronSelfRegistrationLibraryList"; +UPDATE systempreferences SET version="16.06.00.027" WHERE variable="TrackLastPatronActivity"; +UPDATE systempreferences SET version="16.06.00.029" WHERE variable="UsageStatsLibraryType"; +UPDATE systempreferences SET version="16.06.00.029" WHERE variable="UsageStatsCountry"; +UPDATE systempreferences SET version="16.06.00.030" WHERE variable="OPACHoldingsDefaultSortField"; +UPDATE systempreferences SET version="16.06.00.031" WHERE variable="PatronSelfRegistrationPrefillForm"; +UPDATE systempreferences SET version="16.06.00.035" WHERE variable="AllowItemsOnHoldCheckoutSCO"; +UPDATE systempreferences SET version="16.06.00.036" WHERE variable="HouseboundModule"; +UPDATE systempreferences SET version="16.06.00.037" WHERE variable="ArticleRequests"; +UPDATE systempreferences SET version="16.06.00.037" WHERE variable="ArticleRequestsMandatoryFields"; +UPDATE systempreferences SET version="16.06.00.037" WHERE variable="ArticleRequestsMandatoryFieldsItemsOnly"; +UPDATE systempreferences SET version="16.06.00.037" WHERE variable="ArticleRequestsMandatoryFieldsRecordOnly"; +UPDATE systempreferences SET version="16.06.00.038" WHERE variable="DefaultPatronSearchFields"; +UPDATE systempreferences SET version="16.06.00.041" WHERE variable="AggressiveMatchOnISSN"; +UPDATE systempreferences SET version="16.06.00.045" WHERE variable="BorrowerRenewalPeriodBase"; +UPDATE systempreferences SET version="16.06.00.049" WHERE variable="ReplytoDefault"; +UPDATE systempreferences SET version="16.06.00.049" WHERE variable="ReturnpathDefault"; +UPDATE systempreferences SET version="16.12.00.005" WHERE variable="AuthorityMergeMode"; +UPDATE systempreferences SET version="16.12.00.008" WHERE variable="MarcItemFieldsToOrder"; +UPDATE systempreferences SET version="16.12.00.009" WHERE variable="OPACHoldsIfAvailableAtPickup"; +UPDATE systempreferences SET version="16.12.00.009" WHERE variable="OPACHoldsIfAvailableAtPickupExceptions"; +UPDATE systempreferences SET version="16.12.00.010" WHERE variable="OverDriveCirculation"; +UPDATE systempreferences SET version="16.12.00.012" WHERE variable="OpacNewsLibrarySelect"; +UPDATE systempreferences SET version="16.12.00.013" WHERE variable="CircSidebar"; +UPDATE systempreferences SET version="16.12.00.014" WHERE variable="LoadSearchHistoryToTheFirstLoggedUser"; +UPDATE systempreferences SET version="16.12.00.015" WHERE variable="UsageStatsGeolocation"; +UPDATE systempreferences SET version="16.12.00.015" WHERE variable="UsageStatsLibrariesInfo"; +UPDATE systempreferences SET version="16.12.00.015" WHERE variable="UsageStatsPublicID"; +UPDATE systempreferences SET version="16.12.00.017" WHERE variable="CumulativeRestrictionPeriods"; +UPDATE systempreferences SET version="16.12.00.020" WHERE variable="HoldFeeMode"; +UPDATE systempreferences SET version="16.12.00.021" WHERE variable="RenewalLog"; +UPDATE systempreferences SET version="16.12.00.023" WHERE variable="AuthorityMergeLimit"; +UPDATE systempreferences SET version="16.12.00.024" WHERE variable="OverdueNoticeBcc"; +UPDATE systempreferences SET version="16.12.00.025" WHERE variable="UploadPurgeTemporaryFilesDays"; +UPDATE systempreferences SET version="16.12.00.028" WHERE variable="AddressFormat"; +UPDATE systempreferences SET version="16.12.00.029" WHERE variable="AllowCheckoutNotes"; +UPDATE systempreferences SET version="16.12.00.032" WHERE variable="ExcludeHolidaysFromMaxPickUpDelay"; +UPDATE systempreferences SET version="16.12.00.033" WHERE variable="TranslateNotices"; +UPDATE systempreferences SET version="16.12.00.034" WHERE variable="OPACFineNoRenewalsBlockAutoRenew"; +UPDATE systempreferences SET version="16.12.00.036" WHERE variable="NumSavedReports"; +UPDATE systempreferences SET version="16.12.00.037" WHERE variable="FailedLoginAttempts"; +UPDATE systempreferences SET version="16.12.00.038" WHERE variable="ExportRemoveFields"; +UPDATE systempreferences SET version="16.12.00.039" WHERE variable="TalkingTechItivaPhoneNotification"; + + + + + + + + + + + + + + + + + diff --git a/installer/featurereleasetool.pl b/installer/featurereleasetool.pl new file mode 100755 index 0000000..18fb546 --- /dev/null +++ b/installer/featurereleasetool.pl @@ -0,0 +1,186 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# Copyright (C) 2017 Catalyst IT +# +# 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 strict; +use warnings; +use diagnostics; + +use C4::InstallAuth; +use CGI qw ( -utf8 ); +use POSIX qw(strftime); + +use C4::Context; +use C4::Output; +use C4::Templates; +use C4::Languages qw(getAllLanguages getTranslatedLanguages); +use C4::Installer; +use C4::NewsChannels; +use Koha; +use Data::Dumper; +use Koha::DateUtils; +use Date::Calc qw/Date_to_Days Today/; +use C4::NewsChannels; + + +my $query = new CGI; +my $step = $query->param('step'); +my $kohaversion = $query->param('kohaversion'); #Retrieve kohaversion number from url +my $dbversion = $query->param('dbversion'); +my $dbh = C4::Context->dbh; +my $op = $query->param('op'); +my $language = $query->param('language'); +my ( $template, $loggedinuser, $cookie ); + +my $all_languages = getAllLanguages(); + +if ( defined($language) ) { + C4::Templates::setlanguagecookie( $query, $language, "install.pl?step=1" ); +} + +#Set featurereleasetool.tt as template +( $template, $loggedinuser, $cookie ) = get_template_and_user( + { + template_name => "installer/featurereleasetool.tt", + query => $query, + type => "intranet", + authnotrequired => 0, + debug => 1, + } +); + +#Database settings +my $installer = C4::Installer->new(); +my %info; +$info{'dbname'} = C4::Context->config("database"); +$info{'dbms'} = ( + C4::Context->config("db_scheme") + ? C4::Context->config("db_scheme") + : "mysql" +); +$info{'hostname'} = C4::Context->config("hostname"); +$info{'port'} = C4::Context->config("port"); +$info{'user'} = C4::Context->config("user"); +$info{'password'} = C4::Context->config("pass"); +$info{'tls'} = C4::Context->config("tls"); + if ($info{'tls'} && $info{'tls'} eq 'yes'){ + $info{'ca'} = C4::Context->config('ca'); + $info{'cert'} = C4::Context->config('cert'); + $info{'key'} = C4::Context->config('key'); + $info{'tlsoptions'} = ";mysql_ssl=1;mysql_ssl_client_key=".$info{key}.";mysql_ssl_client_cert=".$info{cert}.";mysql_ssl_ca_file=".$info{ca}; + $info{'tlscmdline'} = " --ssl-cert ". $info{cert} . " --ssl-key " . $info{key} . " --ssl-ca ".$info{ca}." " + } + +my $location = "feature"; + +$template->param( + 'kohaversion' => $kohaversion, + 'dbversion' => $dbversion, + 'location' => $location, +); + +my $logdir = C4::Context->config('logdir'); +my @logs = `cd $logdir && ls -t | grep "updatedatabase_2*"`; + +my $filename_suffix = $logs[0]; +my $path = $logdir . '/' . $filename_suffix; +my $fh; +my $file; +my $count = 0; +my $version; +$file = `cat $path`; +$file = `echo "$file" | grep -Eo '?[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+?'`; + +my @prefsloop; +my @lines = split /\n/, $file; +foreach my $line (@lines) { + my $query = qq| + SELECT variable, value, options, explanation from systempreferences WHERE version= ? |; + my $sth = $dbh->prepare($query); + $sth->execute($line); + while (my ($variable, $value, $options, $explanation) =$sth->fetchrow) { + push @prefsloop, { + variable => $variable, + value => $value, + options => $options, + explanation => $explanation, + }; + } +}; + +$template->param( prefs => \@prefsloop, submitted_form => $op ); + +#If the user has finished using the feature release change tool then redirect to mainpage +if ( $op && $op eq 'finished' ) { + print $query->redirect("/cgi-bin/koha/mainpage.pl"); + exit; +} +elsif ( $op && $op eq 'save' ) { #Submit changed systempreferences + unless ( C4::Context->config( 'demo' ) ) { + foreach my $param ( $query->param() ) { + my ( $prefname ) = ( $param =~ /pref_(.*)/ ); + next if ( !defined( $prefname ) ); + + my $wholevalue = join( ',', $query->param($param) ); + my ($name, $value) = split(/,/,$wholevalue); + C4::Context->set_preference( $name, $value ); + } + } +} + + +#Submit news item +my $id = $query->param('id'); +my $title = $query->param('title'); +my $content = $query->param('featurecontent'); +my $expirationdate; +if ( $query->param('expirationdate') ) { + $expirationdate = output_pref({ dt => dt_from_string( scalar $query->param('expirationdate') ), dateformat => 'iso', dateonly => 1 } ); +} +my $timestamp = output_pref({ dt => dt_from_string( scalar $query->param('timestamp') ), dateformat => 'iso', dateonly => 1 }); +my $number = $query->param('number'); +my $lang = $query->param('lang'); +my $branchcode = $query->param('branch'); + +my $error_message = $query->param('error_message'); +$branchcode = undef if (defined($branchcode) && $branchcode eq ''); + +$template->param( error_message => $error_message ) if $error_message; + +my $new_detail = get_opac_new($id); + +if ($title) { + my $newsposting = add_opac_new( + { + title => $title, + content => $content, + lang => $lang, + expirationdate => $expirationdate, + timestamp => $timestamp, + number => $number, + branchcode => $branchcode, + borrowernumber => $loggedinuser, + } + ); + if ($newsposting) { + $template->param( newsposted => $newsposting ); + } +} + +output_html_with_http_headers $query, $cookie, $template->output; + diff --git a/installer/install.pl b/installer/install.pl index ac43214..97e9d99 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -237,6 +237,11 @@ elsif ( $step && $step == 3 ) { # And we redirect people to mainpage. # The installer will have to relogin since we do not pass cookie to redirection. $template->param( "$op" => 1 ); + }elsif ( $op && $op eq 'featurereleasetool' ) { + warn my $dbversion = $query->param('dbversion'); + warn my $kohaversion = $query->param('kohaversion'); + print $query->redirect("/cgi-bin/koha/installer/featurereleasetool.pl?dbversion=$dbversion&kohaversion=$kohaversion"); + exit; } elsif ( $op && $op eq 'addframeworks' ) { @@ -378,10 +383,15 @@ elsif ( $step && $step == 3 ) { my $now = POSIX::strftime( "%Y-%m-%dT%H:%M:%S", localtime() ); my $logdir = C4::Context->config('logdir'); - my $dbversion = C4::Context->preference('Version'); + warn my $dbversion = C4::Context->preference('Version'); my $kohaversion = Koha::version; $kohaversion =~ s/(.*\..*)\.(.*)\.(.*)/$1$2$3/; + $template->param( + "dbversion" => $dbversion, + "kohaversion" => $kohaversion + ); + my $filename_suffix = join '_', $now, $dbversion, $kohaversion; my ( $logfilepath, $logfilepath_errors ) = ( chk_log( $logdir, "updatedatabase_$filename_suffix" ), @@ -396,11 +406,12 @@ elsif ( $step && $step == 3 ) { my $fh; open( $fh, "<", $logfilepath ) or die "Cannot open log file $logfilepath: $!"; - my @report = <$fh>; + warn my @report = <$fh>; close $fh; if (@report) { $template->param( update_report => - [ map { { line => $_ } } split( /\n/, join( '', @report ) ) ] + [ map { { line => $_ } } split( /\n/, join( '', @report ) ) ], + raw_report => @report ); $template->param( has_update_succeeds => 1 ); } @@ -467,7 +478,7 @@ elsif ( $step && $step == 3 ) { # if there is none, then we need to install the database # if ( C4::Context->preference('Version') ) { - my $dbversion = C4::Context->preference('Version'); + warn my $dbversion = C4::Context->preference('Version'); $dbversion =~ /(.*)\.(..)(..)(...)/; $dbversion = "$1.$2.$3.$4"; $template->param( diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css index fb09d51..619822a 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -3007,3 +3007,10 @@ fieldset.rows + fieldset.action { #patron_search #filters { display: none; } + +#news_posted { + width: 50%; + background-color: #F1F1F1; +} + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/newsform.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/newsform.inc new file mode 100644 index 0000000..f2e740f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/newsform.inc @@ -0,0 +1,94 @@ +
+ [% IF location == "feature" %] +
+ [% ELSIF location == "intranet" %] + + [% END %] + + + + +
+ OPAC and Koha news +
  1. + + +
  2. +
  3. + + +
  4. +
  5. + + Required +
  6. +
  7. + + +
    [% INCLUDE 'date-format.inc' %]
    +
  8. +
  9. + + +
    [% INCLUDE 'date-format.inc' %]
    +
  10. +
  11. + + [% IF ( new_detail.number ) %] + + [% ELSE %] + + [% END %] +
  12. +
  13. + [% IF location=="feature" %] +

    +
    + Our institution is proud to announce that we have upgraded our Koha library management system to Koha version [%kohaversion%]. This new Koha version comes with many new exciting features. +
    +

    Read about the enhancements here: Koha 17.05 release notes link

    +

    During the upgrade the following new systempreferences were also installed:

    + [% FOREACH pref IN prefs %] + [% pref.variable %] + [% pref.value %] + [% END %] +
    +
    + [% ELSIF location=="intranet" %] + + [% END %] +
  14. +
+ +
+
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-table.inc new file mode 100644 index 0000000..b2d1eff --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-table.inc @@ -0,0 +1,114 @@ + [% FOREACH TAB IN TABS %] +
+

[% TAB.tab_title %] preferences

+
+ [% UNLESS ( searchfield ) %]
[% END %] + + + + [% FOREACH LINE IN TAB.LINES %] + [% IF ( LINE.is_group_title ) %] + [% UNLESS ( loop.first ) %][% END %] +

[% LINE.title %]

+ + + [% UNLESS ( loop.last ) %][% END %] + [% ELSE %] + [% IF ( loop.first ) %]
PreferenceValue
[% END %] + + + + + [% IF ( loop.last ) %]
PreferenceValue
+ + [% FOREACH NAME IN LINE.NAMES %] + + [% UNLESS ( loop.last ) %]
[% END %] + [% END %] +
+
+ [% FOREACH CHUNK IN LINE.CHUNKS %] + [% IF ( CHUNK.type_text ) %] + [% CHUNK.contents %] + [% ELSIF ( CHUNK.type_input ) %] + [% IF ( CHUNK.dateinput ) %][% INCLUDE 'date-format.inc' %][% END %] + [% ELSIF ( CHUNK.type_select ) %] + + [% ELSIF ( CHUNK.type_multiple ) %] + + [% ELSIF ( CHUNK.type_textarea ) || ( CHUNK.type_htmlarea )%] + [% IF ( CHUNK.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %] + + [% ELSE %] + + + + [% END %] + [% ELSIF ( CHUNK.type_languages ) %] +
+ [% FOREACH language IN CHUNK.languages %] + [% IF ( language.plural ) %] +
+ [% IF ( language.native_description ) %][% language.native_description %][% ELSE %][% language.rfc4646_subtag %][% END %] +
+ [% FOREACH sublanguages_loo IN language.sublanguages_loop %] +
+ + [% IF ( sublanguages_loo.enabled ) %] + + [% ELSE %] + + [% END %] +
+ [% END %] + [% ELSE %] +
+ + [% IF ( language.group_enabled ) %] + + [% ELSE %] + + [% END %] +
+ [% END %] + [% END %] +
+ [% END %] + [% END %] +
[% END %] + [% END %] + [% END %] + [% IF screen == 'preferences' %] +
Cancel
+ [% ELSIF screen == 'featurereleasetool' %] +
Cancel
+ [% END %] +
+
+ [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/team.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/team.inc new file mode 100644 index 0000000..ce64b1e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/team.inc @@ -0,0 +1,403 @@ +
+

Special thanks to the following organizations

+ + +

Koha 17.05 release team

+ + +

Koha development team

+ +

Contributing companies and institutions

+
    +
  • BibLibre, France
  • +
  • Bibliotheksservice-Zentrum Baden-Württemberg (BSZ), Germany
  • +
  • ByWater Solutions, USA
  • +
  • Calyx, Australia
  • +
  • Catalyst IT, New Zealand
  • +
  • C & P Bibliography Services, USA
  • +
  • Hochschule für Gesundheit (hsg), Germany
  • +
  • Katipo Communications, New Zealand
  • +
  • KEEP SOLUTIONS, Portugal
  • +
  • KohaAloha, New Zealand
  • +
  • LibLime, USA
  • +
  • Libriotech, Norway
  • +
  • Nelsonville Public Library, Ohio, USA
  • +
  • Prosentient Systems, Australia
  • +
  • PTFS, Maryland, USA
  • +
  • PTFS Europe Ltd, United Kingdom
  • +
  • Rijksmuseum, Amsterdam, The Netherlands
  • +
  • SAN-Ouest Provence, France
  • +
  • software.coop, United Kingdom
  • +
  • Tamil, France
  • +
  • Universidad Nacional de Córdoba, Argentina
  • +
  • Xercode, Spain
  • +
+ +

Additional thanks to...

+
    +
  • Irma Birchall
  • +
  • Rachel Hamilton-Williams (Kaitiaki from 2004 to present)
  • +
  • Stephen Hedges (early Documentation Manager)
  • +
  • Brooke Johnson
  • +
  • Jo Ransom
  • +
  • Nicholas Rosasco (Documentation Compiler)
  • +
  • Regula Sebastiao
  • +
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index e4fa6ed..911c69c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -349,409 +349,7 @@ [% END %] -
-

Special thanks to the following organizations

- - -

Koha 17.05 release team

- - -

Koha development team

- -

Contributing companies and institutions

-
    -
  • BibLibre, France
  • -
  • Bibliotheksservice-Zentrum Baden-Württemberg (BSZ), Germany
  • -
  • ByWater Solutions, USA
  • -
  • Calyx, Australia
  • -
  • Catalyst IT, New Zealand
  • -
  • C & P Bibliography Services, USA
  • -
  • Hochschule für Gesundheit (hsg), Germany
  • -
  • Katipo Communications, New Zealand
  • -
  • KEEP SOLUTIONS, Portugal
  • -
  • KohaAloha, New Zealand
  • -
  • LibLime, USA
  • -
  • Libriotech, Norway
  • -
  • Nelsonville Public Library, Ohio, USA
  • -
  • Prosentient Systems, Australia
  • -
  • PTFS, Maryland, USA
  • -
  • PTFS Europe Ltd, United Kingdom
  • -
  • Rijksmuseum, Amsterdam, The Netherlands
  • -
  • SAN-Ouest Provence, France
  • -
  • software.coop, United Kingdom
  • -
  • Tamil, France
  • -
  • Universidad Nacional de Córdoba, Argentina
  • -
  • Xercode, Spain
  • -
- -

Additional thanks to...

-
    -
  • Irma Birchall
  • -
  • Rachel Hamilton-Williams (Kaitiaki from 2004 to present)
  • -
  • Stephen Hedges (early Documentation Manager)
  • -
  • Brooke Johnson
  • -
  • Jo Ransom
  • -
  • Nicholas Rosasco (Documentation Compiler)
  • -
  • Regula Sebastiao
  • -
-
+ [% INCLUDE 'team.inc' %]

Koha

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt index 28ccddc..b83a4a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -77,117 +77,9 @@ No system preferences matched your search for: [% searchfield |html %]
[% END %] - [% FOREACH TAB IN TABS %] -
-

[% TAB.tab_title %] preferences

-
- [% UNLESS ( searchfield ) %]
[% END %] - - - - [% FOREACH LINE IN TAB.LINES %] - [% IF ( LINE.is_group_title ) %] - [% UNLESS ( loop.first ) %][% END %] -

[% LINE.title %]

- - - [% UNLESS ( loop.last ) %][% END %] - [% ELSE %] - [% IF ( loop.first ) %]
PreferenceValue
[% END %] - - - - - [% IF ( loop.last ) %]
PreferenceValue
- - [% FOREACH NAME IN LINE.NAMES %] - - [% UNLESS ( loop.last ) %]
[% END %] - [% END %] -
-
- [% FOREACH CHUNK IN LINE.CHUNKS %] - [% IF ( CHUNK.type_text ) %] - [% CHUNK.contents %] - [% ELSIF ( CHUNK.type_input ) %] - [% IF ( CHUNK.dateinput ) %][% INCLUDE 'date-format.inc' %][% END %] - [% ELSIF ( CHUNK.type_select ) %] - - [% ELSIF ( CHUNK.type_multiple ) %] - - [% ELSIF ( CHUNK.type_textarea ) || ( CHUNK.type_htmlarea )%] - [% IF ( CHUNK.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %] - - [% ELSE %] - - - - [% END %] - [% ELSIF ( CHUNK.type_languages ) %] -
- [% FOREACH language IN CHUNK.languages %] - [% IF ( language.plural ) %] -
- [% IF ( language.native_description ) %][% language.native_description %][% ELSE %][% language.rfc4646_subtag %][% END %] -
- [% FOREACH sublanguages_loo IN language.sublanguages_loop %] -
- - [% IF ( sublanguages_loo.enabled ) %] - - [% ELSE %] - - [% END %] -
- [% END %] - [% ELSE %] -
- - [% IF ( language.group_enabled ) %] - - [% ELSE %] - - [% END %] -
- [% END %] - [% END %] -
- [% END %] - [% END %] -
[% END %] - [% END %] - [% END %] -
Cancel
-
+ [% screen = 'preferences' %] + [% INCLUDE 'prefs-table.inc' %]
- [% END %] -
[% INCLUDE 'prefs-menu.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/featurereleasetool.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/featurereleasetool.tt new file mode 100644 index 0000000..c1778a7 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/featurereleasetool.tt @@ -0,0 +1,151 @@ +[% INCLUDE 'doc-head-open.inc' %] + +Koha › Web installer › Feature Release Change Tool + + + +[% IF ( finish ) %][% END %] +[% INCLUDE 'installer-doc-head-close.inc' %] + + + +
+
+
+

Koha

+
+ + +
+ +
+

New sysprefs added to Koha since [% dbversion %]

+
+
+ + + + + + + + [% FOREACH pref IN prefs %] + + + + + [% END %] +
Preference DescriptionValue
+ + [% pref.variable %] + + [% pref.explanation %] + + [% IF (pref.value != '') %] + + [% ELSE %] + No default value + [% END %] +
+ [% IF !(submitted_form) %] + + [% END %] +
+
+
+ +
+

Koha version [% kohaversion %] release notes

+ Koha 17.05 release notes link +
+
+

Next and submit

+
+
+
+ + + + +[% INCLUDE 'intranet-bottom.inc' %] 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 34d5e7d..9af8e6e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt @@ -226,7 +226,7 @@ [% END # / IF default %] [% IF ( updatestructure ) %] -

Updating database structure

+

Updating database structure from [%dbversion%] to [%kohaversion%]

[% IF ( has_update_succeeds ) %]

Update report :

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt index dd1ae84..f62985e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt @@ -96,79 +96,9 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %] [% IF ( op == 'add' ) %][% default_lang = lang %] [% ELSE %][% default_lang = new_detail.lang %] [% END %] -
- - -
- OPAC and Koha news -
  1. - - -
  2. -
  3. - - -
  4. -
  5. - - Required -
  6. -
  7. - - -
    [% INCLUDE 'date-format.inc' %]
    -
  8. -
  9. - - -
    [% INCLUDE 'date-format.inc' %]
    -
  10. -
  11. - - [% IF ( new_detail.number ) %] - - [% ELSE %] - - [% END %] -
  12. -
  13. - -
  14. -
-
- -
Cancel
-
+ + [% INCLUDE 'newsform.inc' %] + [% ELSE %]
diff --git a/tools/koha-news.pl b/tools/koha-news.pl index 61c3ec6..2515884 100755 --- a/tools/koha-news.pl +++ b/tools/koha-news.pl @@ -83,8 +83,10 @@ foreach my $language ( @$tlangs ) { } } +my $location = "intranet"; $template->param( lang_list => \@lang_list, - branchcode => $branchcode ); + branchcode => $branchcode, + location => $location ); my $op = $cgi->param('op') // ''; -- 2.1.4