View | Details | Raw Unified | Return to bug 5082
Collapse All | Expand All

(-)a/catalogue/MARCdetail.pl (-24 / +16 lines)
Lines 89-118 my $itemcount = GetItemsCount($biblionumber); Link Here
89
$template->param( count => $itemcount,
89
$template->param( count => $itemcount,
90
					bibliotitle => $biblio->{title}, );
90
					bibliotitle => $biblio->{title}, );
91
91
92
#Getting the list of all frameworks
92
# Getting the list of all frameworks
93
my $queryfwk =
93
# get framework list
94
  $dbh->prepare("select frameworktext, frameworkcode from biblio_framework");
94
my $frameworks = getframeworks;
95
$queryfwk->execute;
95
my @frameworkcodeloop;
96
my %select_fwk;
96
foreach my $thisframeworkcode ( keys %$frameworks ) {
97
my @select_fwk;
97
	warn $thisframeworkcode;
98
my $curfwk;
98
	my %row = (
99
push @select_fwk, "Default";
99
		value         => $thisframeworkcode,
100
$select_fwk{"Default"} = "Default";
100
		frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
101
101
	);
102
while ( my ( $description, $fwk ) = $queryfwk->fetchrow ) {
102
	if ($frameworkcode eq $thisframeworkcode){
103
    push @select_fwk, $fwk;
103
		$row{'selected'}="selected=\"selected\"";
104
    $select_fwk{$fwk} = $description;
104
		}
105
}
105
	push @frameworkcodeloop, \%row;
106
$curfwk=$frameworkcode;
106
} 
107
my $framework=CGI::scrolling_list( -name     => 'Frameworks',
107
$template->param( frameworkcodeloop => \@frameworkcodeloop );
108
            -id => 'Frameworks',
109
            -default => $curfwk,
110
            -OnChange => 'Changefwk(this);',
111
            -values   => \@select_fwk,
112
            -labels   => \%select_fwk,
113
            -size     => 1,
114
            -multiple => 0 );
115
$template->param(framework => $framework);
116
# fill arrays
108
# fill arrays
117
my @loop_data = ();
109
my @loop_data = ();
118
my $tag;
110
my $tag;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl (-2 / +6 lines)
Lines 36-42 function Changefwk(FwkList) { Link Here
36
36
37
<!-- /TMPL_UNLESS -->
37
<!-- /TMPL_UNLESS -->
38
38
39
    <p><b>With Framework :<!--TMPL_VAR Name="framework" --></b></p>
39
    <p><b>With Framework : <select name="Frameworks" id="Frameworks" onchange="Changefwk(this);">
40
                            <option value="">Default</option>
41
                            <!-- TMPL_LOOP NAME="frameworkcodeloop" -->
42
                            <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value"-->" selected="selected"><!-- TMPL_VAR NAME="frameworktext" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="frameworktext" --></option><!-- /TMPL_IF -->
43
                            <!-- /TMPL_LOOP -->
44
            </select></b></p>
40
    
45
    
41
<div id="bibliotabs" class="toptabs numbered">
46
<div id="bibliotabs" class="toptabs numbered">
42
	<ul>
47
	<ul>
43
- 

Return to bug 5082