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

(-)a/catalogue/MARCdetail.pl (-23 / +14 lines)
Lines 90-119 my $itemcount = GetItemsCount($biblionumber); Link Here
90
$template->param( count => $itemcount,
90
$template->param( count => $itemcount,
91
					bibliotitle => $biblio->{title}, );
91
					bibliotitle => $biblio->{title}, );
92
92
93
#Getting the list of all frameworks
93
# Getting the list of all frameworks
94
my $queryfwk =
94
# get framework list
95
  $dbh->prepare("select frameworktext, frameworkcode from biblio_framework");
95
my $frameworks = getframeworks;
96
$queryfwk->execute;
96
my @frameworkcodeloop;
97
my %select_fwk;
97
foreach my $thisframeworkcode ( keys %$frameworks ) {
98
my @select_fwk;
98
    my %row = (
99
my $curfwk;
99
        value         => $thisframeworkcode,
100
push @select_fwk, "Default";
100
        frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
101
$select_fwk{"Default"} = "Default";
101
    );
102
102
    if ($frameworkcode eq $thisframeworkcode){
103
while ( my ( $description, $fwk ) = $queryfwk->fetchrow ) {
103
        $row{'selected'}= 1;
104
    push @select_fwk, $fwk;
104
        }
105
    $select_fwk{$fwk} = $description;
105
    push @frameworkcodeloop, \%row;
106
}
106
}
107
$curfwk=$frameworkcode;
107
$template->param( frameworkcodeloop => \@frameworkcodeloop, );
108
my $framework=CGI::scrolling_list( -name     => 'Frameworks',
109
            -id => 'Frameworks',
110
            -default => $curfwk,
111
            -OnChange => 'Changefwk(this);',
112
            -values   => \@select_fwk,
113
            -labels   => \%select_fwk,
114
            -size     => 1,
115
            -multiple => 0 );
116
$template->param(framework => $framework);
117
# fill arrays
108
# fill arrays
118
my @loop_data = ();
109
my @loop_data = ();
119
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