# 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, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=head1 NAME
=head1 SYNOPSIS
+=cut
=head1 DESCRIPTION
=head1 FUNCTIONS
-=over 2
-
=cut
use strict;
+#use warnings; FIXME - Bug 2505
use C4::Auth;
use C4::Context;
use C4::Items;
use C4::Acquisition;
use C4::Serials; #uses getsubscriptionsfrombiblionumber GetSubscriptionsFromBiblionumber
+use C4::Search; # enabled_staff_search_views
my $query = new CGI;
$template->param( count => $itemcount,
bibliotitle => $biblio->{title}, );
-#Getting the list of all frameworks
-my $queryfwk =
- $dbh->prepare("select frameworktext, frameworkcode from biblio_framework");
-$queryfwk->execute;
-my %select_fwk;
-my @select_fwk;
-my $curfwk;
-push @select_fwk, "Default";
-$select_fwk{"Default"} = "Default";
-
-while ( my ( $description, $fwk ) = $queryfwk->fetchrow ) {
- push @select_fwk, $fwk;
- $select_fwk{$fwk} = $description;
+# Getting the list of all frameworks
+# get framework list
+my $frameworks = getframeworks;
+my @frameworkcodeloop;
+foreach my $thisframeworkcode ( keys %$frameworks ) {
+ my %row = (
+ value => $thisframeworkcode,
+ frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
+ );
+ if ($frameworkcode eq $thisframeworkcode){
+ $row{'selected'}= 1;
+ }
+ push @frameworkcodeloop, \%row;
}
-$curfwk=$frameworkcode;
-my $framework=CGI::scrolling_list( -name => 'Frameworks',
- -id => 'Frameworks',
- -default => $curfwk,
- -OnChange => 'Changefwk(this);',
- -values => \@select_fwk,
- -labels => \%select_fwk,
- -size => 1,
- -multiple => 0 );
-$template->param(framework => $framework);
+$template->param( frameworkcodeloop => \@frameworkcodeloop, );
# fill arrays
my @loop_data = ();
my $tag;
popup => $popup,
hide_marc => C4::Context->preference('hide_marc'),
marcview => 1,
+ z3950_search_params => C4::Search::z3950_search_args($biblio),
+ C4::Search::enabled_staff_search_views,
);
output_html_with_http_headers $query, $cookie, $template->output;