Compare commits

...

27 Commits

Author SHA1 Message Date
Martin Renvoize f05e6296bd Bug 27114: (QA follow-up) Add missing POD 3 years ago
Fridolin Somers 20bbaf12a6 Bug 27114: Use Template Toolkit plugin for Koha plugins hook 'intranet_catalog_biblio_tab' 3 years ago
Tomás Cohen Arazi 3d2658c12e Bug 28190: Fix columns_settings.yml itemtypes entry 3 years ago
Martin Renvoize ccfa471dab Bug 14300: Add %P to SIP LogPattern 3 years ago
Fridolin Somers 697d5e4a72 Bug 21883: Show authorized value description for withdrawn in check-in 3 years ago
Martin Renvoize b5d4d0979f Bug 21883: Pass the item to the template 4 years ago
Caroline Cyr La Rose 5bf03017ac Bug 27852: Link YES_NO authorized value category to 942dev in Default framework 3 years ago
Fridolin Somers 8eae9c1797 Bug 27830: Compiled CSS 3 years ago
Owen Leonard 012a1544f0 Bug 27830: (follow-up) Merge DE and FR address formats 3 years ago
Owen Leonard 4ea78c4e06 Bug 27830: OPAC library list does not use AddressFormat 3 years ago
Lucas Gass b4ccde1133 Bug 27282: fix all occurrences 3 years ago
Lucas Gass 5fe3e6592d Bug 27282: Add window.onafterprint function 3 years ago
Jonathan Druart e3bb144435 Bug 27232: Add missing space between : and </label> in member-alt-contact-style.inc 3 years ago
Aleisha Amohia c62ca48c56 Bug 26533: Fix 'is exactly' search for authorities 3 years ago
Jonathan Druart 712d93cb6e Bug 20854: DBRev 20.12.00.034 3 years ago
Katrin Fischer a54e729319 Bug 20854: (QA follow-up) Rephrase of the new casServerVersion pref description 3 years ago
Tomás Cohen Arazi 9b3538678e Bug 20854: (QA follow-up) Improve readability 3 years ago
Tomás Cohen Arazi 225517a0f3 Bug 20854: Add more CAS tests 3 years ago
Matthias Meusburger 26e7262963 Bug 20854: Allow correct redirect on logout for Cas servers 3.0 and superior. 4 years ago
Jonathan Druart 689e3ac5fc Bug 28028: Remove misc/migration_tools/fix_onloan.pl 3 years ago
Jonathan Druart 0ee81947ec Bug 26940: DBRev 20.11.05.001 3 years ago
Jonathan Druart 8986198c02 Bug 26940: Take empty strings into account 3 years ago
Jonathan Druart 382779ee4c Bug 26940: Put in sync borrowers.debarredcomment with comments from borrower_debarment 3 years ago
Didier Gautheron 1d1e123fe3 Bug 26940: don't reset debarredcomment on patron update 4 years ago
Colin Campbell bb6161029f Bug 26989: Safeguard Order Messages from unwanted characters 4 years ago
Joonas Kylmälä 32721535a9 Bug 27836: Document that CirControl changes which calendar is being used 3 years ago
Fridolin Somers fa0af2da9f Bug 27861: Warning in C4/XSLT.pm - use of uninitialized value in numeric eq (==) 3 years ago
  1. 17
      C4/Auth_with_cas.pm
  2. 1
      C4/XSLT.pm
  3. 2
      Koha.pm
  4. 6
      Koha/Edifact/Order.pm
  5. 49
      Koha/Template/Plugin/KohaPlugins.pm
  6. 4
      admin/columns_settings.yml
  7. 23
      catalogue/detail.pl
  8. 6
      circ/returns.pl
  9. 2
      debian/koha-common.postinst
  10. 2
      debian/koha-core.postinst
  11. 2
      debian/templates/log4perl-site.conf.in
  12. 3
      etc/log4perl.conf
  13. 4
      installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml
  14. 1
      installer/data/mysql/mandatory/sysprefs.sql
  15. 34
      installer/data/mysql/updatedatabase.pl
  16. 24
      koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc
  17. 26
      koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc
  18. 18
      koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style.inc
  19. 5
      koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc
  20. 8
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref
  21. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
  22. 13
      koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
  23. 22
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
  24. 5
      koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
  25. 2
      koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css
  26. 2
      koha-tmpl/opac-tmpl/bootstrap/css/opac.css
  27. 4
      koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
  28. 81
      koha-tmpl/opac-tmpl/bootstrap/en/includes/display-library-address.inc
  29. 5
      koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc
  30. 2
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt
  31. 45
      koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt
  32. 4
      members/memberentry.pl
  33. 19
      misc/migration_tools/fix_onloan.pl
  34. 59
      t/db_dependent/Auth_with_cas.t

17
C4/Auth_with_cas.pm

@ -68,12 +68,21 @@ sub getMultipleAuth {
# Logout from CAS
sub logout_cas {
my ($query, $type) = @_;
my ( $cas, $uri ) = _get_cas_and_service($query, undef, $type);
$uri =~ s/\?logout\.x=1//; # We don't want to keep triggering a logout, if we got here, the borrower is already logged out of Koha
print $query->redirect( $cas->logout_url(url => $uri));
my ( $query, $type ) = @_;
my ( $cas, $uri ) = _get_cas_and_service( $query, undef, $type );
# We don't want to keep triggering a logout, if we got here,
# the borrower is already logged out of Koha
$uri =~ s/\?logout\.x=1//;
my $logout_url = $cas->logout_url( url => $uri );
$logout_url =~ s/url=/service=/
if C4::Context->preference('casServerVersion') eq '3';
print $query->redirect($logout_url);
}
# Login to CAS
sub login_cas {
my ($query, $type) = @_;

1
C4/XSLT.pm

@ -347,6 +347,7 @@ sub buildKohaItemsNamespace {
$substatus = exists $descs{$item->notforloan} ? $descs{$item->notforloan}->{opac_description} : "Not for loan_".$item->notforloan;
}
elsif ( exists $itemtypes->{ $item->effective_itemtype }
&& $itemtypes->{ $item->effective_itemtype }->{notforloan}
&& $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 )
{
$status = "reference";

2
Koha.pm

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "20.11.05.000";
$VERSION = "20.11.05.002";
sub version {
return $VERSION;

6
Koha/Edifact/Order.pm

@ -104,6 +104,10 @@ sub encode {
$self->{transmission} .= $self->user_data_message_segments();
$self->{transmission} .= $self->trailing_service_segments();
# Guard against CR LF etc being added in data from DB
$self->{transmission}=~s/[\r\n\t]//g;
return $self->{transmission};
}
@ -406,7 +410,9 @@ sub order_line {
my $ol_fields = { budget_code => $budget->{budget_code}, };
if ( $orderline->order_vendornote ) {
$ol_fields->{servicing_instruction} = $orderline->order_vendornote;
chomp $ol_fields->{servicing_instruction};
}
my $item_fields = [];
for my $item (@items) {
push @{$item_fields},

49
Koha/Template/Plugin/KohaPlugins.pm

@ -21,6 +21,8 @@ use Modern::Perl;
use base qw( Template::Plugin );
use Try::Tiny;
use Koha::Plugins;
=head1 NAME
@ -145,4 +147,51 @@ sub get_plugins_intranet_js {
return join( "\n", @data );
}
=head3 get_plugins_intranet_catalog_biblio_tab
[% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab %]
[% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
<li><a href="#[% plugins_intranet_catalog_biblio_tab.id | uri %]">[% plugins_intranet_catalog_biblio_tab.title | html %]</a></li>
[% END %]
This method collects the output of all plugins with a intranet_catalog_biblio_tab
method to output to the list of extra cataloguing tabs on intranet pages.
=cut
sub get_plugins_intranet_catalog_biblio_tab {
my $tabs = [];
return $tabs unless C4::Context->config("enable_plugins");
my $p = Koha::Plugins->new();
return $tabs unless $p;
my @plugins = $p->GetPlugins(
{
method => 'intranet_catalog_biblio_tab',
}
);
foreach my $plugin (@plugins) {
try {
my @newtabs = $plugin->intranet_catalog_biblio_tab();
foreach my $newtab (@newtabs) {
# Add a unique HTML id
my $html_id = 'tab-'. $plugin->{class} . '-' . $newtab->title;
# Using characters except ASCII letters, digits, '_', '-' and '.' may cause compatibility problems
$html_id =~ s/[^0-9A-Za-z]+/-/g;
$newtab->id($html_id);
}
push @$tabs, @newtabs;
}
catch {
warn "Error calling 'intranet_catalog_biblio_tab' on the " . $plugin->{class} . "plugin ($_)";
};
}
return $tabs;
}
1;

4
admin/columns_settings.yml

@ -217,10 +217,12 @@ modules:
columns:
-
columnname: image
-
columnname: description
-
columnname: code
-
columnname: description
columnname: parent_code
-
columnname: search_category
-

23
catalogue/detail.pl

@ -70,31 +70,8 @@ if ( C4::Context->config('enable_plugins') ) {
my @plugins = Koha::Plugins->new()->GetPlugins({
method => 'intranet_catalog_biblio_enhancements_toolbar_button'
});
my @tab_plugins = Koha::Plugins->new()->GetPlugins({
method => 'intranet_catalog_biblio_tab',
});
my @tabs;
foreach my $tab_plugin (@tab_plugins) {
my @biblio_tabs;
try {
@biblio_tabs = $tab_plugin->intranet_catalog_biblio_tab();
foreach my $tab (@biblio_tabs) {
my $tab_id = 'tab-' . $tab->title;
$tab_id =~ s/[^0-9A-Za-z]+/-/g;
$tab->id( $tab_id );
push @tabs, $tab,
}
}
catch {
warn "Error calling 'intranet_catalog_biblio_tab' on the " . $tab_plugin->{class} . "plugin ($_)";
};
}
$template->param(
plugins => \@plugins,
tabs => \@tabs,
);
}

6
circ/returns.pl

@ -268,17 +268,13 @@ if ($barcode) {
my $biblio = $item->biblio;
$template->param(
title => $biblio->title,
homebranch => $item->homebranch,
holdingbranch => $item->holdingbranch,
returnbranch => $returnbranch,
author => $biblio->author,
itembarcode => $item->barcode,
itemtype => $item->effective_itemtype,
ccode => $item->ccode,
itembiblionumber => $biblio->biblionumber,
biblionumber => $biblio->biblionumber,
additional_materials => $materials,
issue => $checkout,
item => $item,
);
} # FIXME else we should not call AddReturn but set BadBarcode directly instead

2
debian/koha-common.postinst

@ -182,7 +182,7 @@ log4perl.appender.SIP=Log::Log4perl::Appender::File
log4perl.appender.SIP.filename=/var/log/koha/$site/sip.log
log4perl.appender.SIP.mode=append
log4perl.appender.SIP.layout=PatternLayout
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %m %l %n
log4perl.appender.SIP.utf8=1
EOF

2
debian/koha-core.postinst

@ -182,7 +182,7 @@ log4perl.appender.SIP=Log::Log4perl::Appender::File
log4perl.appender.SIP.filename=/var/log/koha/$site/sip.log
log4perl.appender.SIP.mode=append
log4perl.appender.SIP.layout=PatternLayout
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %m %l %n
log4perl.appender.SIP.utf8=1
EOF

2
debian/templates/log4perl-site.conf.in

@ -35,7 +35,7 @@ log4perl.appender.SIP=Log::Log4perl::Appender::File
log4perl.appender.SIP.filename=__LOG_DIR__/sip.log
log4perl.appender.SIP.mode=append
log4perl.appender.SIP.layout=PatternLayout
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %m %l %n
log4perl.appender.SIP.utf8=1

3
etc/log4perl.conf

@ -35,10 +35,9 @@ log4perl.appender.SIP=Log::Log4perl::Appender::File
log4perl.appender.SIP.filename=__LOG_DIR__/sip.log
log4perl.appender.SIP.mode=append
log4perl.appender.SIP.layout=PatternLayout
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %m %l %n
log4perl.appender.SIP.utf8=1
log4perl.logger.plack-opac = WARN, PLACKOPAC
log4perl.appender.PLACKOPAC=Log::Log4perl::Appender::File
log4perl.appender.PLACKOPAC.filename=__LOG_DIR__/plack-opac-error.log

4
installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml

@ -320,7 +320,7 @@ tables:
mandatory: 0
kohafield:
tab: 9
authorised_value: ""
authorised_value: YES_NO
authtypecode: ""
value_builder: ""
isurl: 0
@ -328,7 +328,7 @@ tables:
frameworkcode: ""
seealso: ""
link: ""
defaultvalue:
defaultvalue: 0
- tagfield: "942"
tagsubfield: "s"

1
installer/data/mysql/mandatory/sysprefs.sql

@ -119,6 +119,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('casAuthentication','0','','Enable or disable CAS authentication','YesNo'),
('casLogout','0','','Does a logout from Koha should also log the user out of CAS?','YesNo'),
('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'),
('casServerVersion','2', '2|3','Version of the CAS server Koha will connect to.','Choice'),
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
('ChargeFinesOnClosedDays','0',NULL,'Charge fines on days the library is closed.','YesNo'),

34
installer/data/mysql/updatedatabase.pl

@ -23525,6 +23525,40 @@ if( CheckVersion( $DBversion ) ) {
NewVersion( $DBversion, "", "Koha 20.11.05 release" );
}
$DBversion = '20.11.05.001';
if( CheckVersion( $DBversion ) ) {
my $debar = $dbh->selectall_arrayref(q|
SELECT d.borrowernumber, GROUP_CONCAT(comment SEPARATOR '\n') AS comment
FROM borrower_debarments d
LEFT JOIN borrowers b ON b.borrowernumber=d.borrowernumber
WHERE ( b.debarredcomment IS NULL OR b.debarredcomment = "" ) AND ( expiration > CURRENT_DATE() OR expiration IS NULL )
GROUP BY d.borrowernumber
|, { Slice => {} });
my $update_sth = $dbh->prepare(q|
UPDATE borrowers
SET debarredcomment=?
WHERE borrowernumber=?
|);
for my $d ( @$debar ) {
$update_sth->execute($d->{comment}, $d->{borrowernumber});
}
NewVersion( $DBversion, 26940, "Put in sync borrowers.debarredcomment with comments from borrower_debarments");
}
$DBversion = '20.11.05.002';
if( CheckVersion( $DBversion ) ) {
$dbh->do(q{
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
VALUES ('casServerVersion', '2', '2|3', 'Version of the CAS server Koha will connect to.', 'Choice');
});
NewVersion( $DBversion, 20854, "Add new system preference casServerVersion");
}
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/';

24
koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc

@ -31,10 +31,10 @@
[% ELSE %]
<option value="start">starts with</option>
[% END %]
[% IF ( operator_mainstr == 'is' ) %]
<option value="is" selected="selected">is exactly</option>
[% IF ( operator_mainstr == 'exact' ) %]
<option value="exact" selected="selected">is exactly</option>
[% ELSE %]
<option value="is">is exactly</option>
<option value="exact">is exactly</option>
[% END %]
</select>
<input id="value_mainstr" style="width:400px;" type="text" name="value_mainstr" value="[% value_mainstr | html %]" />
@ -57,10 +57,10 @@
[% ELSE %]
<option value="start">starts with</option>
[% END %]
[% IF ( operator_main == 'is' ) %]
<option value="is" selected="selected">is exactly</option>
[% IF ( operator_main == 'exact' ) %]
<option value="exact" selected="selected">is exactly</option>
[% ELSE %]
<option value="is">is exactly</option>
<option value="exact">is exactly</option>
[% END %]
</select>
<input id="value_main" style="width:400px;" type="text" name="value_main" value="[% value_main | html %]" />
@ -82,10 +82,10 @@
[% ELSE %]
<option value="start">starts with</option>
[% END %]
[% IF ( operator_match == 'is' ) %]
<option value="is" selected="selected">is exactly</option>
[% IF ( operator_match == 'exact' ) %]
<option value="exact" selected="selected">is exactly</option>
[% ELSE %]
<option value="is">is exactly</option>
<option value="exact">is exactly</option>
[% END %]
</select>
<input type="text" name="value_match" value="[% value_match | html %]" />
@ -106,10 +106,10 @@
[% ELSE %]
<option value="start">starts with</option>
[% END %]
[% IF ( operator_any == 'is' ) %]
<option value="is" selected="selected">is exactly</option>
[% IF ( operator_any == 'exact' ) %]
<option value="exact" selected="selected">is exactly</option>
[% ELSE %]
<option value="is">is exactly</option>
<option value="exact">is exactly</option>
[% END %]
</select>
<input id="value_any" style="width:400px;" type="text" name="value_any" value="[% value_any | html %]" />

26
koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc

@ -31,10 +31,10 @@
[% ELSE %]
<option value="start">starts with</option>
[% END %]
[% IF ( operator == 'is' ) %]
<option value="is" selected="selected">is exactly</option>
[% IF ( operator == 'exact' ) %]
<option value="exact" selected="selected">is exactly</option>
[% ELSE %]
<option value="is">is exactly</option>
<option value="exact">is exactly</option>
[% END %]
</select>
<input id="value_mainentry" type="text" name="value" value="[% value | html %]" class="head-searchbox" />
@ -87,10 +87,10 @@
[% ELSE %]
<option value="start">starts with</option>
[% END %]
[% IF ( operator == 'is' ) %]
<option value="is" selected="selected">is exactly</option>
[% IF ( operator == 'exact' ) %]
<option value="exact" selected="selected">is exactly</option>
[% ELSE %]
<option value="is">is exactly</option>
<option value="exact">is exactly</option>
[% END %]
</select>
<input id="value_mainheading" type="text" name="value" value="[% value | html %]" class="head-searchbox" />
@ -129,7 +129,7 @@
[% END %]
[% END %]
</select>
<input type="hidden" name="marclist" value="match" />
<input type="hidden" name="marclist" value="exact" />
<select name="operator">
[% IF ( operator == 'contains' ) %]
<option value="contains" selected="selected">contains</option>
@ -141,10 +141,10 @@
[% ELSE %]
<option value="start">starts with</option>
[% END %]
[% IF ( operator == 'is' ) %]
<option value="is" selected="selected">is exactly</option>
[% IF ( operator == 'exact' ) %]
<option value="exact" selected="selected">is exactly</option>
[% ELSE %]
<option value="is">is exactly</option>
<option value="exact">is exactly</option>
[% END %]
</select>
<input id="value_matchheading" type="text" name="value" value="[% value | html %]" class="head-searchbox" />
@ -197,10 +197,10 @@
[% ELSE %]
<option value="start">starts with</option>
[% END %]
[% IF ( operator == 'is' ) %]
<option value="is" selected="selected">is exactly</option>
[% IF ( operator == 'exact' ) %]
<option value="exact" selected="selected">is exactly</option>
[% ELSE %]
<option value="is">is exactly</option>
<option value="exact">is exactly</option>
[% END %]
</select>
<input id="value_anywhere" type="text" name="value" value="[% value | html %]" class="head-searchbox" />

18
koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style.inc

@ -56,7 +56,7 @@
[% ELSE %]
<label for="altcontactsurname">
[% END %]
Surname:</label>
Surname: </label>
<input type="text" name="altcontactsurname" id="altcontactsurname" value="[% patron.altcontactsurname | html %]" />
[% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %]
</li>
@ -71,7 +71,7 @@
[% ELSE %]
<label for="altcontactfirstname">
[% END %]
First name:</label>
First name: </label>
<input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% patron.altcontactfirstname | html %]" />
[% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %]
</li>
@ -86,7 +86,7 @@
[% ELSE %]
<label for="altcontactaddress1">
[% END %]
Address:</label>
Address: </label>
<input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% patron.altcontactaddress1 | html %]" size="40" />
[% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
</li>
@ -101,7 +101,7 @@
[% ELSE %]
<label for="altcontactaddress2">
[% END %]
Address 2:</label>
Address 2: </label>
<input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% patron.altcontactaddress2 | html %]" size="40" />
[% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %]
</li>
@ -116,7 +116,7 @@
[% ELSE %]
<label for="altcontactzipcode">
[% END %]
ZIP/Postal code:</label>
ZIP/Postal code: </label>
<input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% patron.altcontactzipcode | html %]" size="5" />
[% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
</li>
@ -131,7 +131,7 @@
[% ELSE %]
<label for="altcontactaddress3">
[% END %]
City:</label>
City: </label>
[% IF cities.count %]
<select class="select_city" data-addressfield="altcontact" name="select_city">
<option value="|||"></option>
@ -161,7 +161,7 @@
[% ELSE %]
<label for="altcontactstate">
[% END %]
State:</label>
State: </label>
<input type="text" name="altcontactstate" id="altcontactstate" value="[% patron.altcontactstate | html %]" size="20" />
[% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %]
</li>
@ -176,7 +176,7 @@
[% ELSE %]
<label for="altcontactcountry">
[% END %]
Country:</label>
Country: </label>
<input type="text" name="altcontactcountry" id="altcontactcountry" value="[% patron.altcontactcountry | html %]" size="20" />
[% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %]
</li>
@ -191,7 +191,7 @@
[% ELSE %]
<label for="altcontactphone">
[% END %]
Phone:</label>
Phone: </label>
<input type="text" name="altcontactphone" id="altcontactphone" value="[% patron.altcontactphone | html %]" />
[% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %]
</li>

5
koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc

@ -6,7 +6,10 @@
[% ELSE %]
$( window ).load(function() {
window.print();
setTimeout('window.close()', 1);
window.onafterprint = function () {
window.close();
}
setTimeout('window.close()', 1000); //Hack from Chrome < 63
});
[% END %]
</script>

8
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref

@ -146,8 +146,14 @@ Administration:
yes: "Yes"
no: "No"
-
- "URL of the CAS Authentication Server: "
- "URL of the Central Authentication Service (CAS) server: "
- pref: casServerUrl
-
- "Version of the CAS server Koha will connect to: "
- pref: casServerVersion
choices:
2: 'CAS 2 or earlier'
3: 'CAS 3 or later'
SSL client certificate authentication:
-
- "Field to use for SSL client certificate authentication: "

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref

@ -262,7 +262,7 @@ Circulation:
no: "Don't use"
- the transport cost matrix for calculating optimal holds filling between libraries.
-
- Use the checkout and fines rules of
- Use the calendar and circulation rules of
- pref: CircControl
type: choice
choices:

13
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

@ -2,6 +2,7 @@
[% USE Asset %]
[% USE Koha %]
[% USE KohaDates %]
[% USE KohaPlugins %]
[% USE AuthorisedValues %]
[% USE Branches %]
[% USE Biblio %]
@ -30,6 +31,8 @@
[% END %]
[% END %]
[% SET plugins_intranet_catalog_biblio_tabs = KohaPlugins.get_plugins_intranet_catalog_biblio_tab %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Catalog &rsaquo;
@ -260,8 +263,8 @@
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
<li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
[% END %]
[% FOREACH tab IN tabs %]
<li><a href="#[% tab.id | uri %]">[% tab.title | html %]</a></li>
[% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
<li><a href="#[% plugins_intranet_catalog_biblio_tab.id | uri %]">[% plugins_intranet_catalog_biblio_tab.title | html %]</a></li>
[% END %]
</ul>
@ -936,9 +939,9 @@ Note that permanent location is a code, and location may be an authval.
</div>
[% END %]
[% FOREACH tab IN tabs %]
<div id="[% tab.id | html %]">
[% tab.content | $raw %]
[% FOREACH plugins_intranet_catalog_biblio_tab IN plugins_intranet_catalog_biblio_tabs %]
<div id="[% plugins_intranet_catalog_biblio_tab.id | html %]">
[% plugins_intranet_catalog_biblio_tab.content | $raw %]
</div>
[% END %]

22
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

@ -127,7 +127,7 @@
[% IF ( collectionItemNeedsTransferred ) %]
<div id="rotating-collection" class="dialog message">
<h3>Please transfer item to: [% Branches.GetName( collectionBranch ) | html %]</h3>
<p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p>
<p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a></p>
<p>This item is part of a rotating collection.</p>
<p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&amp;branchcode=[% collectionBranch | uri %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button></p>
</div>
@ -188,7 +188,7 @@
<div class="dialog alert audio-alert-warning">
<h3>Check in message</h3>
[% IF itembiblionumber %]
<p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p>
<p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% item.barcode | html %]: [% title | html %]</a></p>
[% END %]
[% FOREACH errmsgloo IN errmsgloop %]
[% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
@ -282,7 +282,11 @@
<h5>Cannot check in</h5>
<p><strong>NOT CHECKED IN</strong></p>
[% END %]
<p class="problem ret_withdrawn">Item is withdrawn.</p>
<p class="problem ret_withdrawn">
<span>Item has been withdrawn</span>
[% item_withdrawn_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) %]
[% IF (item_withdrawn_lib) %]<span class="ci-withdrawn">([% item_withdrawn_lib | html %])</span>[% END %]
</p>
[% END %]
[% IF ( errmsgloo.debarred ) %]
<p class="problem ret_debarred"><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% errmsgloo.debarborrowernumber | uri %]">[% errmsgloo.debarname | html %]([% errmsgloo.debarcardnumber | html %])</a> is now debarred until [% errmsgloo.debarred | $KohaDates %].</p>
@ -327,7 +331,7 @@
</div>
<div class="modal-footer">
<form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
<input type="hidden" name="barcode" value="[% itembarcode | html %]" />
<input type="hidden" name="barcode" value="[% item.barcode | html %]" />
<input type="hidden" name="multiple_confirm" value="1" />
[% FOREACH inputloo IN inputloop %]
<input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
@ -356,7 +360,7 @@
<div class="modal-body">
<p>
<a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
[% itembarcode | html %]: [% title | html %]
[% item.barcode | html %]: [% title | html %]
</a>
</p>
<p>
@ -399,7 +403,7 @@
<div class="modal-body">
<p>
<a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
[% itembarcode | html %]: [% title | html %]
[% item.barcode | html %]: [% title | html %]
</a>
</p>
[% INCLUDE all_checkin_messages %]
@ -441,7 +445,7 @@
<br/>
<a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
<div class="hold-found-barcode">
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% itembarcode | html %]</a>
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% item.barcode | html %]</a>
</div>
</h3>
</div>
@ -544,7 +548,7 @@
<div class="modal-body">
<p>
<a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
[% itembarcode | html %]: [% title | html %]
[% item.barcode | html %]: [% title | html %]
</a>
</p>
[% IF !transfer %]
@ -600,7 +604,7 @@
<br/>
<a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
<div class="hold-found-barcode">
(<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% itembarcode | html %]</a>)
(<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% item.barcode | html %]</a>)
</div>
</h3>
</div>

5
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt

@ -434,7 +434,10 @@
<script>
$( document ).ready(function() {
window.print();
setTimeout('window.close()', 1);
window.onafterprint = function () {
window.close();
}
setTimeout('window.close()', 1000); // Hack for Chrome < 63
});
</script>
[% END %]

2
koha-tmpl/opac-tmpl/bootstrap/css/opac-rtl.css

File diff suppressed because one or more lines are too long

2
koha-tmpl/opac-tmpl/bootstrap/css/opac.css

File diff suppressed because one or more lines are too long

4
koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss

@ -2618,4 +2618,8 @@ $star-selected: #EDB867;
}
}
.branchaddress {
margin-bottom: 1rem;
}
@import "responsive";

81
koha-tmpl/opac-tmpl/bootstrap/en/includes/display-library-address.inc

@ -0,0 +1,81 @@
[%~ USE Koha ~%]
[%~ USE raw ~%]
[%~ BLOCK 'display-library-address' ~%]
[%~ SET line_break = "<br/>" ~%]
[%~ IF no_line_break %][% SET line_break = " " %][% END ~%]
[%~ IF Koha.Preference( 'AddressFormat' ) == "us" ~%]
[%~ PROCESS 'display-library-address-us' ~%]
[%~ ELSE ~%]
[%~ PROCESS 'display-library-address-de-fr' ~%]
[%~ END ~%]
[%~ END ~%]
[%~ BLOCK 'display-library-address-us' ~%]
[%~ IF ( library.branchaddress1 or library.branchaddress2 ) ~%]
<span property="streetAddress">
[%~ IF ( library.branchaddress1 ) ~%]
<div class="branchaddress1">
[% library.branchaddress1 | html %]
</div>
[%~ END ~%]
[%~ IF ( library.branchaddress2 ) ~%]
<div class="branchaddress2">
[%~ library.branchaddress2 |html ~%]
</div>
[%~ END ~%]
[%~ IF ( library.branchaddress3 ) ~%]
<span class="branchaddress3">
[%~ library.branchaddress3 | html ~%]
</span>
[% line_break | $raw %]
[%~ END ~%]
</span>
[%~ END ~%]
[%~ IF ( library.branchcity ) ~%]
<div class="branchcity">
<span property="addressLocality">[%~ library.branchcity |html ~%]</span>
[%~ IF ( library.branchstate ) %]<span property="addressRegion">, [% library.branchstate |html ~%]</span>[%~ END ~%]
[%~ IF ( library.branchzip ) %]
<span property="postalCode">
[%~ library.branchzip |html ~%]
</span>
[%~ END ~%]
[%~ IF ( library.branchcountry ) %]
<div property="addressCountry">
[% library.branchcountry |html ~%]
</div>
[%~ END ~%]
</div>
[%~ END ~%]
[%~ END ~%]
[%~ BLOCK 'display-library-address-de-fr' ~%]
[%~ IF ( library.branchaddress1 or library.branchaddress2 ) ~%]
<span property="streetAddress">
[%~ IF ( library.branchaddress1 ) ~%]
<span class="branchaddress1">
[%~ library.branchaddress1 | html ~%]
</span>
[% line_break | $raw %]
[%~ END ~%]
[%~ IF ( library.branchaddress2 ) ~%]
<span class="branchaddress2">
[%~ library.branchaddress2 | html ~%]
</span>
[% line_break | $raw %]
[%~ END ~%]
[%~ IF ( library.branchaddress3 ) ~%]
<span class="branchaddress3">
[%~ library.branchaddress3 | html ~%]
</span>
[% line_break | $raw %]
[%~ END ~%]
</span>
[%~ END ~%]
[%~ IF ( library.branchcity ) ~%]
<span class="branchcity">
[%~ IF ( library.branchzip ) ~%]<span property="postalCode">[%~ library.branchzip | html %]</span> [% END ~%]<span property="addressLocality">[%~ library.branchcity | html ~%]</span>[%~ IF ( library.branchstate ) ~%][% line_break | $raw %]<span property="addressRegion">[%~ library.branchstate | html ~%]</span>[%~ END ~%]
[%~ IF ( library.branchcountry ) ~%][% line_break | $raw %]<span property="addressCountry">[%~ library.branchcountry | html ~%]</span>[%~ END ~%]
</span>
[%~ END ~%]
[%~ END ~%]

5
koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc

@ -5,7 +5,10 @@
[% ELSE %]
$( window ).load(function() {
window.print();
setTimeout('window.close()', 1);
window.onafterprint = function () {
window.close();
}
setTimeout('window.close()', 1000); //Hack from Chrome < 63
});
[% END %]
</script>

2
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authorities-home.tt

@ -55,7 +55,7 @@
<select name="operator" id="anywhere">
<option value="contains">contains</option>
<option value="start">starts with</option>
<option value="is">is exactly</option>
<option value="exact">is exactly</option>
</select>
</li>
<li>

45
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt

@ -1,6 +1,7 @@
[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% PROCESS 'display-library-address.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>
[% IF ( LibraryNameTitle ) %]
@ -26,40 +27,18 @@
[% END %]
[% BLOCK library_info %]
<div property="address" typeof="PostalAddress">
<span property="streetAddress">
[% IF ( library.branchaddress1 ) %]
[% library.branchaddress1 | html %]
[% END %]
[% IF ( library.branchaddress2 ) %]
<br />[% library.branchaddress2 | html %]
[% END %]
[% IF ( library.branchaddress3 ) %]
<br />[% library.branchaddress3 | html %]
[% END %]
</span><br>
[% IF ( library.branchcity ) %]
<span property="addressLocality">[% library.branchcity | html %]</span>
[% END %]
[% IF ( library.branchstate ) %]
<span property="addressRegion">[% library.branchstate | html %]</span>
[% END %]
[% IF ( library.branchzip ) %]
<span property="postalCode">[% library.branchzip | html %]</span>
[% END %]
[% IF ( library.branchcountry ) %]
<br /><span property="addressCountry">[% library.branchcountry | html %]</span>
[% END %]
[% IF ( library.branchphone ) %]
<p>Phone: <a href="tel:[% library.branchphone | url %]" property="telephone">[% library.branchphone | html %]</a></p>
[% END %]
[% IF ( library.branchfax ) %]
<p>Fax: <span property="faxNumber">[% library.branchfax | html %]</span></p>
[% END %]
[% IF ( library.branchurl ) %]
<p><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p>
[% END %]
<div class="branchaddress" property="address" typeof="PostalAddress">
[% PROCESS 'display-library-address' %]
</div> <!-- /div property=address -->
[% IF ( library.branchphone ) %]
<p>Phone: <a href="tel:[% library.branchphone | url %]" property="telephone">[% library.branchphone | html %]</a></p>
[% END %]
[% IF ( library.branchfax ) %]
<p>Fax: <span property="faxNumber">[% library.branchfax | html %]</span></p>
[% END %]
[% IF ( library.branchurl ) %]
<p><a href="[% library.branchurl | url %]" property="url">[% library.branchurl | html %]</a></p>
[% END %]
[% END %]
<div class="main">

4
members/memberentry.pl

@ -243,7 +243,7 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' )
qr/^\d+-DAYS/,
qr/^patron_attr_/,
qr/^csrf_token$/,
qr/^add_debarment$/, qr/^debarred_expiration$/, qr/^remove_debarment$/, # We already dealt with debarments previously
qr/^add_debarment$/, qr/^debarred_comment$/,qr/^debarred_expiration$/, qr/^remove_debarment$/, # We already dealt with debarments previously
qr/^housebound_chooser$/, qr/^housebound_deliverer$/,
qr/^select_city$/,
qr/^new_guarantor_/,
@ -531,8 +531,6 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){
delete $newdata{'B_email'};
}
$newdata{debarredcomment} = $newdata{debarred_comment};
delete $newdata{debarred_comment};
delete $newdata{password2};
eval {

19
misc/migration_tools/fix_onloan.pl

@ -1,19 +0,0 @@
#!/usr/bin/perl
use Modern::Perl;
use Koha::Script;
use Koha::Items;
#
# the items.onloan field did not exist in koha 2.2
# in koha 3.0, it's used to define item availability
# this script takes the items.onloan field
# and put it in the MARC::Record of the item
#
my $items = Koha::Items->({ onloan => { '!=' => undef } });
$|=1;
while ( my $item = $items->next ) {
$item->store;
print sprintf "Onloan : %s for %s / %s\n", $item->onloan, $item->biblionumber, $item->itemnumber;
}

59
t/db_dependent/Auth_with_cas.t

@ -17,7 +17,10 @@
use Modern::Perl;
use Test::More tests => 4;
use Test::More tests => 5;
use Test::MockModule;
use Test::MockObject;
use CGI;
use t::lib::Mocks;
@ -62,3 +65,57 @@ $ENV{SCRIPT_NAME} = '/cgi-bin/koha/circ/circulation-home.pl';
is(C4::Auth_with_cas::_url_with_get_params($cgi, 'intranet'),
"$staff_base_url/cgi-bin/koha/circ/circulation-home.pl?bar=baz",
"Intranet URL should be returned when using intranet login (Bug 13507)");
subtest 'logout_cas() tests' => sub {
plan tests => 4;
my $cas_url = "https://mycasserver.url";
my $auth_with_cas_mock = Test::MockModule->new('C4::Auth_with_cas');
$auth_with_cas_mock->mock( '_get_cas_and_service', sub
{
my $cas = Test::MockObject->new();
$cas->mock( 'logout_url', sub {
return "$cas_url/logout/?url=https://mykoha.url";
});
return ( $cas, "$cas_url?logout.x=1" );
}
);
my $cas_version;
my $expected_logout_url;
# Yeah, this gets funky
my $cgi_mock = Test::MockModule->new('CGI');
$cgi_mock->mock( 'redirect', sub {
my ( $self, $url ) = @_;
return $url;
});
# Test CAS 2.0 behavior
$cas_version = 2;
$expected_logout_url = "$cas_url/logout/?url=https://mykoha.url";
my $redirect_output = '';
close(STDOUT);
open(STDOUT, ">", \$redirect_output) or die "Error opening STDOUT";
t::lib::Mocks::mock_preference( 'casServerVersion', $cas_version );
C4::Auth_with_cas::logout_cas( CGI->new, 'anything' );
is( $redirect_output, $expected_logout_url, "The generated URL is correct (v$cas_version\.0)" );
unlike( $redirect_output, qr/logout\.x\=1/, 'logout.x=1 gets removed' );
# Test CAS 3.0 behavior
$redirect_output = '';
close(STDOUT);
open(STDOUT, ">", \$redirect_output) or die "Error opening STDOUT";
$cas_version = 3;
$expected_logout_url = "$cas_url/logout/?service=https://mykoha.url";
t::lib::Mocks::mock_preference( 'casServerVersion', $cas_version );
C4::Auth_with_cas::logout_cas( CGI->new, 'anything' );
is( $redirect_output, $expected_logout_url, "The generated URL is correct (v$cas_version\.0)" );
unlike( $redirect_output, qr/logout\.x\=1/, 'logout.x=1 gets removed' );
};

Loading…
Cancel
Save