Merge remote branch 'kc/master' into new/enh/bug_5917

This commit is contained in:
Chris Cormack 2011-03-23 16:56:55 +13:00
commit fbb48436b7
17 changed files with 85 additions and 7 deletions

View file

@ -533,9 +533,11 @@ sub getRecords {
# fix the length that will display in the label,
my $facet_label_value = $one_facet;
my $facet_max_length =
C4::Context->preference('FacetLabelTruncationLength') || 20;
$facet_label_value =
substr( $one_facet, 0, 20 ) . "..."
unless length($facet_label_value) <= 20;
substr( $one_facet, 0, $facet_max_length ) . "..."
if length($facet_label_value) > $facet_max_length;
# if it's a branch, label by the name, not the code,
if ( $link_value =~ /branch/ ) {

View file

@ -380,6 +380,7 @@ $tabsysprefs{OPACGroupResults} = "OPAC";
$tabsysprefs{XSLTDetailsDisplay} = "OPAC";
$tabsysprefs{XSLTResultsDisplay} = "OPAC";
$tabsysprefs{OPACShowCheckoutName} = "OPAC";
$tabsysprefs{AllowPurchaseSuggestionBranchChoice} = "OPAC";
# Serials
$tabsysprefs{RoutingListAddReserves} = "Serials";

View file

@ -142,6 +142,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('defaultSortOrder',NULL,'Specify the default sort order','asc|dsc|az|za','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortField',NULL,'Specify the default field used for sorting','relevance|popularity|call_number|pubdate|acqdate|title|author','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortOrder',NULL,'Specify the default sort order','asc|dsc|za|az','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FacetLabelTruncationLength',20,'Specify the facet max length in OPAC',NULL,'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('staffClientBaseURL','','Specify the base URL of the staff client',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('minPasswordLength',3,'Specify the minimum length of a patron/staff password',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noItemTypeImages',0,'If ON, disables item-type images',NULL,'YesNo');
@ -293,3 +294,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo ');

View file

@ -143,6 +143,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('defaultSortOrder',NULL,'Specify the default sort order','asc|dsc|az|za','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortField',NULL,'Specify the default field used for sorting','relevance|popularity|call_number|pubdate|acqdate|title|author','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortOrder',NULL,'Specify the default sort order','asc|dsc|za|az','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FacetLabelTruncationLength',20,'Specify the facet max length in OPAC',NULL,'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('staffClientBaseURL','','Specify the base URL of the staff client',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('minPasswordLength',3,'Specify the minimum length of a patron/staff password',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noItemTypeImages',0,'If ON, disables item-type images',NULL,'YesNo');
@ -293,3 +294,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo');

View file

@ -295,3 +295,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FacetLabelTruncationLength',20,'Specify the facet max length in OPAC',NULL,'Integer');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo');

View file

@ -118,6 +118,7 @@ insert into `systempreferences` (`variable`, `value`, `options`, `explanation`,
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('opaccredits','','70|10','Per impostare i credits HTML in fondo alla pagina dell\'OPAC','Textarea');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('OPACdefaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specifica il campo usato di default per l\'ordinamento','Choice');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('OPACdefaultSortOrder','asc','asc|dsc|za|az','Specifica l\'ordine di default ','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FacetLabelTruncationLength',20,'Specify the facet max length in OPAC',NULL,'Integer');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('OPACFRBRizeEditions','1','','Se ON, Koha farà delle richieste a uno o più ISBN web services per trovare gli ISBN associabili e li visualizzarà in un tab \'Edizioni\' nella visualizzazione dettagliata','YesNo');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('opacheader','','70|10','Inserire qui HTML da includere come header nell\'OPAC','Textarea');
insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('OpacHighlightedWords','1','','Se impostato, le parole cercate nell\'OPAC vengono poi evidenziate ','YesNo');
@ -280,3 +281,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo');

View file

@ -141,6 +141,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('defaultSortOrder',NULL,'Specify the default sort order','asc|dsc|az|za','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortField',NULL,'Specify the default field used for sorting','relevance|popularity|call_number|pubdate|acqdate|title|author','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortOrder',NULL,'Specify the default sort order','asc|dsc|za|az','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FacetLabelTruncationLength',20,'Specify the facet max length in OPAC',NULL,'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('staffClientBaseURL','','Specify the base URL of the staff client',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('minPasswordLength',3,'Specify the minimum length of a patron/staff password',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noItemTypeImages',0,'If ON, disables item-type images',NULL,'YesNo');
@ -292,3 +293,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo');

View file

@ -170,6 +170,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('defaultSortOrder',NULL,'Specify the default sort order','asc|dsc|az|za','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortField',NULL,'Specify the default field used for sorting','relevance|popularity|call_number|pubdate|acqdate|title|author','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortOrder',NULL,'Specify the default sort order','asc|dsc|za|az','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FacetLabelTruncationLength',20,'Specify the facet max length in OPAC',NULL,'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('staffClientBaseURL','','Specify the base URL of the staff client',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('minPasswordLength',3,'Specify the minimum length of a patron/staff password',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noItemTypeImages',0,'If ON, disables item-type images',NULL,'YesNo');
@ -347,3 +348,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo');

View file

@ -169,6 +169,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('defaultSortOrder',NULL,'Specify the default sort order','asc|dsc|az|za','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortField',NULL,'Specify the default field used for sorting','relevance|popularity|call_number|pubdate|acqdate|title|author','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACdefaultSortOrder',NULL,'Specify the default sort order','asc|dsc|za|az','Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('FacetLabelTruncationLength',20,'Specify the facet max length in OPAC',NULL,'Integer');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('staffClientBaseURL','','Specify the base URL of the staff client',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('minPasswordLength',3,'Specify the minimum length of a patron/staff password',NULL,'free');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noItemTypeImages',0,'If ON, disables item-type images',NULL,'YesNo');
@ -372,3 +373,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo');

View file

@ -4090,7 +4090,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
$DBversion = '3.03.00.027'; #FIXME
$DBversion = '3.03.00.027';
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('displayFacetCount', '0', NULL, NULL, 'YesNo')");
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('maxRecordsForFacets', '20', NULL, NULL, 'Integer')");
@ -4098,6 +4098,22 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
$DBversion = "3.03.00.028";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('FacetLabelTruncationLength', 20, 'Truncate facets length to','','free')");
print "Upgrade to $DBversion done (Add FacetLabelTruncationLength syspref to control facets displayed length)\n";
SetVersion ($DBversion);
}
$DBversion = "3.03.00.029";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowPurchaseSuggestionBranchChoice', 0, 'Allow user to choose branch when making a purchase suggestion','1','YesNo')");
print "Upgrade to $DBversion done (Add syspref to control if user can choose branch when making purchase suggestion)\n";
SetVersion ($DBversion);
}
=head1 FUNCTIONS
=head2 DropAllForeignKeys($table)

View file

@ -274,6 +274,19 @@ OPAC:
yes: Show
no: "Don't show"
- purchase suggestions from other patrons on the OPAC.
-
- pref: AllowPurchaseSuggestionBranchChoice
default: 0
choices:
no: "Don't allow"
yes: Allow
- patrons to select branch when making a purchase suggestion
-
- pref: SearchMyLibraryFirst
choices:
yes: Limit
no: "Don't limit"
- "patrons' searches to the library they are registered at."
Privacy:
-
- pref: AnonSuggestions

View file

@ -154,3 +154,8 @@ Searching:
yes: Show
no: "Don't show"
- "an item's branch, location and call number in OPAC search results."
-
- Truncate facets length to
- pref: FacetLabelTruncationLength
class: integer
- characters, in OPAC/staff interface.

View file

@ -152,7 +152,7 @@ h4.collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { di
</table></li></ol>
</fieldset>
<fieldset class="rows"> <legend>Acquisition information</legend><ol>
<li><label for="branchcode">Branchcode:</label>
<li><label for="branchcode">Library:</label>
<select name="branchcode" id="branchcode">
<option value="">Any</option><!-- TMPL_LOOP name="branchloop" -->
<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="value" -->" selected="selected"><!-- TMPL_VAR name="branchname" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->

View file

@ -18,7 +18,7 @@
<!-- TMPL_IF NAME="type_label_Libraries" -->Libraries<!-- /TMPL_IF -->
<!-- /TMPL_UNLESS -->
<ul>
<!-- TMPL_LOOP NAME="facets" --><li><a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi" ESCAPE="HTML" --><!-- TMPL_IF NAME="sort_by" -->&amp;sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->&amp;limit=<!-- TMPL_VAR NAME="type_link_value" -->:<!-- TMPL_VAR NAME="facet_link_value" -->" title="<!-- TMPL_VAR NAME="facet_title_value" ESCAPE="HTML" -->"><!-- TMPL_VAR NAME="facet_label_value" --></a> <!-- TMPL_IF NAME="displayFacetCount">(<!-- TMPL_VAR NAME="facet_count" -->)<!-- /TMPL_IF --></li><!-- /TMPL_LOOP --><!-- TMPL_IF NAME="expandable" -->
<!-- TMPL_LOOP NAME="facets" --><li><a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi" ESCAPE="HTML" --><!-- TMPL_IF NAME="sort_by" -->&amp;sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->&amp;limit=<!-- TMPL_VAR NAME="type_link_value" -->:<!-- TMPL_VAR NAME="facet_link_value" -->" title="<!-- TMPL_VAR NAME="facet_title_value" ESCAPE="HTML" -->"><!-- TMPL_VAR NAME="facet_label_value" --></a> <!-- TMPL_IF NAME="displayFacetCount" -->(<!-- TMPL_VAR NAME="facet_count" -->)<!-- /TMPL_IF --></li><!-- /TMPL_LOOP --><!-- TMPL_IF NAME="expandable" -->
<li class="showmore"><a href="/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR NAME="query_cgi" --><!-- TMPL_VAR NAME="limit_cgi" ESCAPE="HTML" --><!-- TMPL_IF NAME="sort_by" -->&amp;sort_by=<!-- TMPL_VAR NAME="sort_by" --><!-- /TMPL_IF -->&amp;offset=<!-- TMPL_VAR NAME="offset" -->&amp;expand=<!-- TMPL_VAR NAME="expand" -->#<!-- TMPL_VAR NAME="type_id" -->">Show More</a></li>
<!-- /TMPL_IF -->
</ul></li>

View file

@ -91,6 +91,19 @@ $.tablesorter.addParser({
<!-- TMPL_IF name="selected" --><option value="<!-- TMPL_VAR name="itemtype"-->" selected="selected"> <!--TMPL_ELSE--><option value="<!-- TMPL_VAR name="itemtype" -->"> <!--/TMPL_IF--> <!-- TMPL_VAR name="description" --></option>
<!-- /TMPL_LOOP -->
</select> </li>
<!-- TMPL_IF NAME="branch_loop" -->
<li><label for="branch">Branch:</label>
<select name="branch" id="branch">
<!-- TMPL_LOOP NAME="branch_loop" -->
<!-- TMPL_IF name="selected" -->
<option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</li>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="patron_reason_loop" --><li><label for="patronreason">Reason for suggestion: </label><select name="patronreason" id="patronreason"><option value="">-- Choose --</option><!-- TMPL_LOOP NAME="patron_reason_loop" -->
<option value="<!-- TMPL_VAR NAME="authorised_value" -->"><!--TMPL_VAR NAME="lib" --></option>
<!-- /TMPL_LOOP --></select></li><!-- /TMPL_IF -->

View file

@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
use strict;
sub kohaversion {
our $VERSION = '3.03.00.027';
our $VERSION = '3.03.00.029';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install

View file

@ -20,6 +20,7 @@ use warnings;
use CGI;
use C4::Auth; # get_template_and_user
use C4::Members;
use C4::Branch;
use C4::Koha;
use C4::Output;
@ -77,7 +78,7 @@ if ( $op eq "add_confirm" ) {
}
else {
$$suggestion{'suggesteddate'}=C4::Dates->today;
$$suggestion{'branchcode'}=C4::Context->userenv->{"branch"};
$$suggestion{'branchcode'}= $input->param('branch') || C4::Context->userenv->{"branch"};
&NewSuggestion($suggestion);
# empty fields, to avoid filter in "SearchSuggestion"
$$suggestion{$_}='' foreach qw<title author publishercode copyrightdate place collectiontitle isbn STATUS>;
@ -122,6 +123,18 @@ foreach my $suggestion(@$suggestions_loop) {
my $patron_reason_loop = GetAuthorisedValues("OPAC_SUG");
# Is the person allowed to choose their branch
if ( C4::Context->preference("AllowPurchaseSuggestionBranchChoice") ) {
my ( $borr ) = GetMemberDetails( $borrowernumber );
# pass the pickup branch along....
my $branch = $input->param('branch') || $borr->{'branchcode'} || C4::Context->userenv->{branch} || '' ;
# make branch selection options...
my $CGIbranchloop = GetBranchesLoop($branch);
$template->param( branch_loop => $CGIbranchloop );
}
$template->param(
%$suggestion,
itemtypeloop=> $supportlist,