|
Lines 187-204
if ($op eq 'add_form') {
Link Here
|
| 187 |
################## ITEMTYPE_CREATE ################################## |
187 |
################## ITEMTYPE_CREATE ################################## |
| 188 |
# called automatically if an unexisting frameworkis selected |
188 |
# called automatically if an unexisting frameworkis selected |
| 189 |
} elsif ($op eq 'framework_create') { |
189 |
} elsif ($op eq 'framework_create') { |
| 190 |
$sth = $dbh->prepare("select count(*),marc_tag_structure.frameworkcode,frameworktext from marc_tag_structure,biblio_framework where biblio_framework.frameworkcode=marc_tag_structure.frameworkcode group by marc_tag_structure.frameworkcode"); |
190 |
my $frameworks = Koha::BiblioFrameworks->search( |
| 191 |
$sth->execute; |
191 |
{ |
| 192 |
my @existingframeworkloop; |
192 |
'marc_tag_structure.frameworkcode' => { '!=' => undef } |
| 193 |
while (my ($tot,$thisframeworkcode,$frameworktext) = $sth->fetchrow) { |
193 |
}, |
| 194 |
if ($tot>0) { |
194 |
{ |
| 195 |
push @existingframeworkloop, { |
195 |
join => 'marc_tag_structure', |
| 196 |
value => $thisframeworkcode, |
196 |
distinct => 1 |
| 197 |
frameworktext => $frameworktext, |
197 |
} |
| 198 |
}; |
198 |
); |
| 199 |
} |
199 |
$template->param( existing_frameworks => $frameworks ); |
| 200 |
} |
|
|
| 201 |
$template->param( existingframeworkloop => \@existingframeworkloop ); |
| 202 |
|
200 |
|
| 203 |
################## DEFAULT ################################## |
201 |
################## DEFAULT ################################## |
| 204 |
} else { # DEFAULT |
202 |
} else { # DEFAULT |