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

(-)a/admin/marctagstructure.pl (-12 / +10 lines)
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
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt (-3 / +2 lines)
Lines 217-224 MARC frameworks › Administration › Koha Link Here
217
        Create framework for [% framework.frameworkcode | html %] ([% framework.frameworktext | html %]) using
217
        Create framework for [% framework.frameworkcode | html %] ([% framework.frameworktext | html %]) using
218
        <select name="existingframeworkcode">
218
        <select name="existingframeworkcode">
219
            <option value="">Default</option>
219
            <option value="">Default</option>
220
        [% FOREACH existingframeworkloo IN existingframeworkloop %]
220
        [% FOREACH fw IN existing_frameworks%]
221
            <option value="[% existingframeworkloo.value | html %]">[% existingframeworkloo.frameworktext | html %]</option>
221
            <option value="[% fw.frameworkcode | html %]">[% fw.frameworktext | html %]</option>
222
        [% END %]
222
        [% END %]
223
        </select>
223
        </select>
224
        <input type="submit" value="OK" />
224
        <input type="submit" value="OK" />
225
- 

Return to bug 28207