@@ -, +, @@
---
admin/preferences.pl | 17 +++++++++++++++++
.../prog/en/modules/admin/preferences.tt | 14 ++++++++++++++
.../prog/en/modules/admin/preferences/opac.pref | 2 +-
.../bootstrap/en/modules/opac-auth-detail.tt | 3 ++-
.../bootstrap/en/modules/opac-detail.tt | 3 ++-
5 files changed, 36 insertions(+), 3 deletions(-)
--- a/admin/preferences.pl
+++ a/admin/preferences.pl
@@ -161,8 +161,25 @@ sub _get_chunk {
}
keys %{ $options{multiple} }
];
+ } elsif ( $options{'multiple_sortable'} ) {
+ my @values;
+ @values = split /,/, $value if defined($value);
+ $chunk->{type} = 'multiple_sortable';
+ $chunk->{CHOICES} = [
+ sort { $a->{'text'} cmp $b->{'text'} }
+ map {
+ my $option_value = $_;
+ {
+ text => $options{multiple_sortable}->{$option_value},
+ value => $option_value,
+ selected => (grep { $_ eq $option_value } @values) ? 1 : 0,
+ }
+ }
+ keys %{ $options{multiple_sortable} }
+ ];
}
+
$chunk->{ 'type_' . $chunk->{'type'} } = 1;
return $chunk;
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
@@ -151,6 +151,20 @@
[% END %]
+ [% ELSIF ( CHUNK.type_multiple_sortable ) %]
+
[% ELSIF ( CHUNK.type_textarea )%]
[% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -527,7 +527,7 @@ OPAC:
-
- "Display the following information for authors and contributors to the detail pages in the OPAC."
- pref: OPACAuthorIdentifiersAndInformation
- multiple:
+ multiple_sortable:
activity: Activity (372$a$s$t)
address: Address (371$a$b$d$e)
associated_group: Associated group (373$a$s$t$u$v$0)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt
@@ -185,7 +185,8 @@
Identifiers/information
- [% FOR info IN author_information.keys %]
+ [% FOR info IN Koha.Preference( 'OPACAuthorIdentifiersAndInformation' ).split(',') %]
+ [% NEXT IF author_information.keys.grep(info).size <= 0 %]
[% PROCESS "authority-information.inc" information => author_information.$info, info_type => info %]
[% END %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
@@ -949,7 +949,8 @@