@@ -, +, @@
suggestion for biblio
that should be editable are: quantity, item type, library, reason for
suggestion, and notes
---
.../bootstrap/en/modules/opac-suggestions.tt | 38 +++++++++++++++----
opac/opac-suggestions.pl | 11 ++++++
2 files changed, 41 insertions(+), 8 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
@@ -84,7 +84,10 @@
[% END %]
- [% IF ( title_required ) %]
+ [% IF biblionumber %]
+ Title:
+ [% title | html %]
+ [% ELSIF ( title_required ) %]
Title:
Required
@@ -95,7 +98,10 @@
[% UNLESS ( author_hidden ) %]
- [% IF ( author_required ) %]
+ [% IF biblionumber %]
+ Author:
+ [% author | html %]
+ [% ELSIF ( author_required ) %]
Author:
Required
@@ -108,21 +114,28 @@
[% UNLESS ( copyrightdate_hidden )%]
- [% IF ( copyrightdate_required ) %]
+ [% IF biblionumber %]
+
Publication year:
+
[% copyrightdate | html %]
+ [% ELSIF ( copyrightdate_required ) %]
Publication year:
Required
+
Copyright or publication year, for example: 2022
[% ELSE %]
Publication year:
+
Copyright or publication year, for example: 2022
[% END %]
-
Copyright or publication year, for example: 2022
[% END %]
[% UNLESS ( isbn_hidden or Koha.Preference('OPACSuggestionAutoFill') ) %]
- [% IF ( isbn_required ) %]
+ [% IF biblionumber %]
+ Standard number (ISBN, ISSN or other):
+ [% isbn | html %]
+ [% ELSIF ( isbn_required ) %]
Standard number (ISBN, ISSN or other):
Required
@@ -134,7 +147,10 @@
[% END %]
[% UNLESS ( publishercode_hidden ) %]
- [% IF ( publishercode_required ) %]
+ [% IF biblionumber %]
+ Publisher:
+ [% publishercode | html %]
+ [% ELSIF ( publishercode_required ) %]
Publisher:
Required
@@ -146,7 +162,10 @@
[% END %]
[% UNLESS ( collectiontitle_hidden ) %]
- [% IF ( collectiontitle_required ) %]
+ [% IF biblionumber %]
+ Collection title:
+ [% collectiontitle | html %]
+ [% ELSIF ( collectiontitle_required ) %]
Collection title:
Required
@@ -158,7 +177,10 @@
[% END %]
[% UNLESS ( place_hidden ) %]
- [% IF ( place_required ) %]
+ [% IF biblionumber %]
+ Publication place:
+ [% place | html %]
+ [% ELSIF ( place_required ) %]
Publication place:
Required
--- a/opac/opac-suggestions.pl
+++ a/opac/opac-suggestions.pl
@@ -199,6 +199,17 @@ if ( $op eq "add_confirm" ) {
$suggestion->{suggesteddate} = dt_from_string;
$suggestion->{branchcode} = $input->param('branchcode') || C4::Context->userenv->{"branch"};
$suggestion->{STATUS} = 'ASKED';
+ if ( $biblionumber ) {
+ my $biblio = Koha::Biblios->find($biblionumber);
+ $suggestion->{biblionumber} = $biblio->biblionumber;
+ $suggestion->{title} = $biblio->title;
+ $suggestion->{author} = $biblio->author;
+ $suggestion->{copyrightdate} = $biblio->copyrightdate;
+ $suggestion->{isbn} = $biblio->biblioitem->isbn;
+ $suggestion->{publishercode} = $biblio->biblioitem->publishercode;
+ $suggestion->{collectiontitle} = $biblio->biblioitem->collectiontitle;
+ $suggestion->{place} = $biblio->biblioitem->place;
+ }
&NewSuggestion($suggestion);
$patrons_pending_suggestions_count++;
--