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

(-)a/C4/Biblio.pm (-48 / +8 lines)
Lines 934-940 sub GetMarcStructure { Link Here
934
        ORDER BY tagfield"
934
        ORDER BY tagfield"
935
    );
935
    );
936
    $sth->execute($frameworkcode);
936
    $sth->execute($frameworkcode);
937
    my ( $liblibrarian, $libopac, $tag, $res, $tab, $mandatory, $repeatable, $important, $ind1_defaultvalue, $ind2_defaultvalue );
937
    my ( $liblibrarian, $libopac, $tag, $res, $mandatory, $repeatable, $important, $ind1_defaultvalue, $ind2_defaultvalue );
938
938
939
    while ( ( $tag, $liblibrarian, $libopac, $mandatory, $repeatable, $important, $ind1_defaultvalue, $ind2_defaultvalue ) = $sth->fetchrow ) {
939
    while ( ( $tag, $liblibrarian, $libopac, $mandatory, $repeatable, $important, $ind1_defaultvalue, $ind2_defaultvalue ) = $sth->fetchrow ) {
940
        $res->{$tag}->{lib}        = ( $forlibrarian or !$libopac ) ? $liblibrarian : $libopac;
940
        $res->{$tag}->{lib}        = ( $forlibrarian or !$libopac ) ? $liblibrarian : $libopac;
Lines 946-998 sub GetMarcStructure { Link Here
946
    $res->{$tag}->{ind2_defaultvalue} = $ind2_defaultvalue;
946
    $res->{$tag}->{ind2_defaultvalue} = $ind2_defaultvalue;
947
    }
947
    }
948
948
949
    $sth = $dbh->prepare(
949
    my $mss = Koha::MarcSubfieldStructures->search( { frameworkcode => $frameworkcode } )->unblessed;
950
        "SELECT tagfield,tagsubfield,liblibrarian,libopac,tab,mandatory,repeatable,authorised_value,authtypecode,value_builder,kohafield,seealso,hidden,isurl,link,defaultvalue,maxlength,important, display_order
950
    for my $m (@$mss) {
951
         FROM   marc_subfield_structure 
951
        $res->{ $m->{tagfield} }->{ $m->{tagsubfield} } = {
952
         WHERE  frameworkcode=? 
952
            lib => ( $forlibrarian or !$m->{libopac} ) ? $m->{liblibrarian} : $m->{libopac},
953
         ORDER BY tagfield, tagsubfield
953
            subfield => $m->{tagsubfield},
954
        "
954
            %$m
955
    );
955
        };
956
957
    $sth->execute($frameworkcode);
958
959
    my $subfield;
960
    my $authorised_value;
961
    my $authtypecode;
962
    my $value_builder;
963
    my $kohafield;
964
    my $seealso;
965
    my $hidden;
966
    my $isurl;
967
    my $link;
968
    my $defaultvalue;
969
    my $maxlength;
970
    my $display_order;
971
972
    while (
973
        (   $tag,          $subfield,      $liblibrarian, $libopac, $tab,    $mandatory, $repeatable, $authorised_value,
974
            $authtypecode, $value_builder, $kohafield,    $seealso, $hidden, $isurl,     $link,       $defaultvalue,
975
            $maxlength, $important, $display_order
976
        )
977
        = $sth->fetchrow
978
      ) {
979
        $res->{$tag}->{$subfield}->{lib}              = ( $forlibrarian or !$libopac ) ? $liblibrarian : $libopac;
980
        $res->{$tag}->{$subfield}->{tab}              = $tab;
981
        $res->{$tag}->{$subfield}->{subfield}         = $subfield;
982
        $res->{$tag}->{$subfield}->{mandatory}        = $mandatory;
983
        $res->{$tag}->{$subfield}->{important}        = $important;
984
        $res->{$tag}->{$subfield}->{repeatable}       = $repeatable;
985
        $res->{$tag}->{$subfield}->{authorised_value} = $authorised_value;
986
        $res->{$tag}->{$subfield}->{authtypecode}     = $authtypecode;
987
        $res->{$tag}->{$subfield}->{value_builder}    = $value_builder;
988
        $res->{$tag}->{$subfield}->{kohafield}        = $kohafield;
989
        $res->{$tag}->{$subfield}->{seealso}          = $seealso;
990
        $res->{$tag}->{$subfield}->{hidden}           = $hidden;
991
        $res->{$tag}->{$subfield}->{isurl}            = $isurl;
992
        $res->{$tag}->{$subfield}->{'link'}           = $link;
993
        $res->{$tag}->{$subfield}->{defaultvalue}     = $defaultvalue;
994
        $res->{$tag}->{$subfield}->{maxlength}        = $maxlength;
995
        $res->{$tag}->{$subfield}->{display_order}    = $display_order;
996
    }
956
    }
997
957
998
    $cache->set_in_cache($cache_key, $res);
958
    $cache->set_in_cache($cache_key, $res);
(-)a/Koha/MarcSubfieldStructures.pm (-1 / +5 lines)
Lines 35-41 Koha::MarcSubfieldStructures - Koha MarcSubfieldStructure Object set class Link Here
35
35
36
=cut
36
=cut
37
37
38
=head3 type
38
=head3 _type
39
39
40
=cut
40
=cut
41
41
Lines 43-48 sub _type { Link Here
43
    return 'MarcSubfieldStructure';
43
    return 'MarcSubfieldStructure';
44
}
44
}
45
45
46
=head3 object_class
47
48
=cut
49
46
sub object_class {
50
sub object_class {
47
    return 'Koha::MarcSubfieldStructure';
51
    return 'Koha::MarcSubfieldStructure';
48
}
52
}
(-)a/admin/auth_subfields_structure.pl (-153 / +83 lines)
Lines 26-59 use C4::Koha; Link Here
26
26
27
use Koha::Authority::Types;
27
use Koha::Authority::Types;
28
use Koha::AuthorisedValues;
28
use Koha::AuthorisedValues;
29
use Koha::AuthSubfieldStructures;
29
30
30
use List::MoreUtils qw( uniq );
31
use List::MoreUtils qw( uniq );
31
32
32
sub string_search  {
33
	my ($searchstring,$authtypecode)=@_;
34
	my $dbh = C4::Context->dbh;
35
	$searchstring=~ s/\'/\\\'/g;
36
	my @data=split(' ',$searchstring);
37
    my $sth=$dbh->prepare("Select * from auth_subfield_structure where (tagfield like ? and authtypecode=?) order by tagfield, display_order");
38
	$sth->execute("$searchstring%",$authtypecode);
39
	my $results = $sth->fetchall_arrayref({});
40
	return (scalar(@$results), $results);
41
}
42
43
sub auth_subfield_structure_exists {
44
	my ($authtypecode, $tagfield, $tagsubfield) = @_;
45
	my $dbh  = C4::Context->dbh;
46
	my $sql  = "select tagfield from auth_subfield_structure where authtypecode = ? and tagfield = ? and tagsubfield = ?";
47
	my $rows = $dbh->selectall_arrayref($sql, {}, $authtypecode, $tagfield, $tagsubfield);
48
	return @$rows > 0;
49
}
50
51
my $input        = CGI->new;
33
my $input        = CGI->new;
52
my $tagfield     = $input->param('tagfield');
34
my $tagfield     = $input->param('tagfield');
53
my $tagsubfield  = $input->param('tagsubfield');
35
my $tagsubfield  = $input->param('tagsubfield');
54
my $authtypecode = $input->param('authtypecode');
36
my $authtypecode = $input->param('authtypecode');
55
my $offset       = $input->param('offset');
56
$offset = 0 if not defined $offset or $offset < 0;
57
my $op           = $input->param('op') || '';
37
my $op           = $input->param('op') || '';
58
my $script_name  = "/cgi-bin/koha/admin/auth_subfields_structure.pl";
38
my $script_name  = "/cgi-bin/koha/admin/auth_subfields_structure.pl";
59
39
Lines 123-157 if ($op eq 'add_form') { Link Here
123
        @value_builder= sort {$a cmp $b} @value_builder;
103
        @value_builder= sort {$a cmp $b} @value_builder;
124
	closedir DIR;
104
	closedir DIR;
125
105
126
	# build values list
106
    my @loop_data;
127
    my $sth=$dbh->prepare("select * from auth_subfield_structure where tagfield=? and authtypecode=? order by display_order"); # and tagsubfield='$tagsubfield'");
107
    my $asses = Koha::AuthSubfieldStructures->search({ tagfield => $tagfield, authtypecode => $authtypecode}, {order_by => 'display_order'})->unblessed;
128
	$sth->execute($tagfield,$authtypecode);
108
    my $i;
129
	my @loop_data = ();
109
    for my $ass ( @$asses ) {
130
	my $i=0;
110
        my %row_data = %$ass;
131
    while ( my $data = $sth->fetchrow_hashref ) {
132
        my %row_data;    # get a fresh hash for the row data
133
        $row_data{defaultvalue}      = $data->{defaultvalue};
134
        $row_data{tab}               = $data->{tab};
135
        $row_data{ohidden}           = $data->{'hidden'};
136
        $row_data{tagsubfield}       = $data->{'tagsubfield'};
137
        $row_data{liblibrarian}      = $data->{'liblibrarian'};
138
        $row_data{libopac}           = $data->{'libopac'};
139
        $row_data{seealso}           = $data->{'seealso'};
140
        $row_data{kohafields}        = \@kohafields;
111
        $row_data{kohafields}        = \@kohafields;
141
        $row_data{kohafield}         = $data->{'kohafield'};
142
        $row_data{authorised_values} = \@authorised_value_categories;
112
        $row_data{authorised_values} = \@authorised_value_categories;
143
        $row_data{authorised_value}  = $data->{'authorised_value'};
144
        $row_data{frameworkcodes}    = \@authtypes;
113
        $row_data{frameworkcodes}    = \@authtypes;
145
        $row_data{frameworkcode}     = $data->{'frameworkcode'};
146
        $row_data{value_builders}    = \@value_builder;
114
        $row_data{value_builders}    = \@value_builder;
147
        $row_data{value_builder}     = $data->{'value_builder'};
115
        $row_data{row}               = $i++;
148
        $row_data{repeatable}        = $data->{repeatable};
149
        $row_data{mandatory}         = $data->{mandatory};
150
        $row_data{hidden}            = $data->{hidden};
151
        $row_data{isurl}             = $data->{isurl};
152
        $row_data{row}               = $i;
153
        push( @loop_data, \%row_data );
116
        push( @loop_data, \%row_data );
154
        $i++;
155
    }
117
    }
156
118
157
    # Add a new row for the "New" tab
119
    # Add a new row for the "New" tab
Lines 187-198 if ($op eq 'add_form') { Link Here
187
# called by add_form, used to insert/modify data in DB
149
# called by add_form, used to insert/modify data in DB
188
} elsif ($op eq 'add_validate') {
150
} elsif ($op eq 'add_validate') {
189
	$template->param(tagfield => "$input->param('tagfield')");
151
	$template->param(tagfield => "$input->param('tagfield')");
190
#	my $sth=$dbh->prepare("replace auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,frameworkcode,value_builder,hidden,isurl)
191
#									values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
192
    my $sth_insert = $dbh->prepare("insert into auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,frameworkcode,value_builder,hidden,isurl,defaultvalue, display_order)
193
                                    values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
194
    my $sth_update = $dbh->prepare("update auth_subfield_structure set authtypecode=?, tagfield=?, tagsubfield=?, liblibrarian=?, libopac=?, repeatable=?, mandatory=?, kohafield=?, tab=?, seealso=?, authorised_value=?, frameworkcode=?, value_builder=?, hidden=?, isurl=?, defaultvalue=?, display_order=?
195
                                    where authtypecode=? and tagfield=? and tagsubfield=?");
196
	my @tagsubfield	= $input->multi_param('tagsubfield');
152
	my @tagsubfield	= $input->multi_param('tagsubfield');
197
	my @liblibrarian	= $input->multi_param('liblibrarian');
153
	my @liblibrarian	= $input->multi_param('liblibrarian');
198
	my @libopac		= $input->multi_param('libopac');
154
	my @libopac		= $input->multi_param('libopac');
Lines 224-278 if ($op eq 'add_form') { Link Here
224
        my $defaultvalue = $defaultvalue[$i];
180
        my $defaultvalue = $defaultvalue[$i];
225
		my $hidden = $ohidden[$i]; #collate from 3 hiddens;
181
		my $hidden = $ohidden[$i]; #collate from 3 hiddens;
226
		my $isurl = $input->param("isurl$i")?1:0;
182
		my $isurl = $input->param("isurl$i")?1:0;
227
		if ($liblibrarian) {
183
        if ($liblibrarian) {
228
				if (auth_subfield_structure_exists($authtypecode, $tagfield, $tagsubfield)) {
184
            my $ass = Koha::AuthSubfieldStructures->find(
229
					$sth_update->execute(
185
                {
230
						$authtypecode,
186
                    authtypecode => $authtypecode,
231
						$tagfield,
187
                    tagfield     => $tagfield,
232
						$tagsubfield,
188
                    tagsubfield  => $tagsubfield
233
						$liblibrarian,
189
                }
234
						$libopac,
190
            );
235
						$repeatable,
191
            my $attributes = {
236
						$mandatory,
192
                liblibrarian     => $liblibrarian,
237
						$kohafield,
193
                libopac          => $libopac,
238
						$tab,
194
                repeatable       => $repeatable,
239
						$seealso,
195
                mandatory        => $mandatory,
240
						$authorised_value,
196
                kohafield        => $kohafield,
241
						$frameworkcode,
197
                tab              => $tab,
242
						$value_builder,
198
                seealso          => $seealso,
243
						$hidden,
199
                authorised_value => $authorised_value,
244
						$isurl,
200
                frameworkcode    => $frameworkcode,
245
                        $defaultvalue,
201
                value_builder    => $value_builder,
246
                        $display_order->{$tagfield} || 0,
202
                hidden           => $hidden,
247
						(
203
                isurl            => $isurl,
248
							$authtypecode,
204
                defaultvalue     => $defaultvalue,
249
							$tagfield,
205
                display_order    => $display_order->{$tagfield} || 0,
250
							$tagsubfield
206
            };
251
						),
207
252
					);
208
            if ($ass) {
253
				} else {
209
                $ass->update($attributes);
254
					$sth_insert->execute(
210
            }
255
						$authtypecode,
211
            else {
256
						$tagfield,
212
                Koha::AuthSubfieldStructure->new(
257
						$tagsubfield,
213
                    {
258
						$liblibrarian,
214
                        authtypecode => $authtypecode,
259
						$libopac,
215
                        tagfield     => $tagfield,
260
						$repeatable,
216
                        tagsubfield  => $tagsubfield,
261
						$mandatory,
217
                        %$attributes
262
						$kohafield,
218
                    }
263
						$tab,
219
                )->store;
264
						$seealso,
220
            }
265
						$authorised_value,
266
						$frameworkcode,
267
						$value_builder,
268
						$hidden,
269
						$isurl,
270
                        $defaultvalue,
271
                        display_order    => $display_order->{$tagfield} || 0,
272
					);
273
				}
274
            $display_order->{$tagfield}++;
221
            $display_order->{$tagfield}++;
275
		}
222
        }
276
	}
223
	}
277
    print $input->redirect("/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=$tagfield&amp;authtypecode=$authtypecode");
224
    print $input->redirect("/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=$tagfield&amp;authtypecode=$authtypecode");
278
    exit;
225
    exit;
Lines 280-341 if ($op eq 'add_form') { Link Here
280
													# END $OP eq ADD_VALIDATE
227
													# END $OP eq ADD_VALIDATE
281
################## DELETE_CONFIRM ##################################
228
################## DELETE_CONFIRM ##################################
282
# called by default form, used to confirm deletion of data in DB
229
# called by default form, used to confirm deletion of data in DB
283
} elsif ($op eq 'delete_confirm') {
230
}
284
	my $sth=$dbh->prepare("select * from auth_subfield_structure where tagfield=? and tagsubfield=? and authtypecode=?");
231
elsif ( $op eq 'delete_confirm' ) {
285
	$sth->execute($tagfield,$tagsubfield,$authtypecode);
232
  my $ass = Koha::AuthSubfieldStructures->find(
286
	my $data=$sth->fetchrow_hashref;
233
      {
287
	$template->param(liblibrarian => $data->{'liblibrarian'},
234
          authtypecode => $authtypecode,
288
							tagsubfield => $data->{'tagsubfield'},
235
          tagfield     => $tagfield,
289
							delete_link => $script_name,
236
          tagsubfield  => $tagsubfield
290
							tagfield      =>$tagfield,
237
      }
291
							tagsubfield => $tagsubfield,
238
  );
292
							authtypecode => $authtypecode,
239
  $template->param(
293
							);
240
      ass         => $ass,
294
													# END $OP eq DELETE_CONFIRM
241
      delete_link => $script_name,
295
################## DELETE_CONFIRMED ##################################
242
  );
296
# called by delete_confirm, used to effectively confirm deletion of data in DB
243
}
297
} elsif ($op eq 'delete_confirmed') {
244
elsif ( $op eq 'delete_confirmed' ) {
298
    my $sth=$dbh->prepare("delete from auth_subfield_structure where tagfield=? and tagsubfield=? and authtypecode=?");
245
    Koha::AuthSubfieldStructures->find(
299
    $sth->execute($tagfield,$tagsubfield,$authtypecode);
246
        {
247
            authtypecode => $authtypecode,
248
            tagfield     => $tagfield,
249
            tagsubfield  => $tagsubfield
250
        }
251
    )->delete;
300
    print $input->redirect("/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=$tagfield&amp;authtypecode=$authtypecode");
252
    print $input->redirect("/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=$tagfield&amp;authtypecode=$authtypecode");
301
    exit;
253
    exit;
302
													# END $OP eq DELETE_CONFIRMED
254
}
303
################## DEFAULT ##################################
255
else {    # DEFAULT
304
} else { # DEFAULT
256
    my $ass = Koha::AuthSubfieldStructures->search(
305
	my ($count,$results)=string_search($tagfield,$authtypecode);
257
        {
306
	my @loop_data = ();
258
            tagfield      => { -like => "$tagfield%" },
307
	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
259
            authtypecode  => $authtypecode,
308
		my %row_data;  # get a fresh hash for the row data
260
        },
309
		$row_data{tagfield} = $results->[$i]{'tagfield'};
261
        { order_by => [ 'tagfield', 'display_order' ] }
310
		$row_data{tagsubfield} = $results->[$i]{'tagsubfield'};
262
    )->unblessed;
311
		$row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
263
312
		$row_data{kohafield} = $results->[$i]{'kohafield'};
264
    $template->param( loop => $ass );
313
		$row_data{repeatable} = $results->[$i]{'repeatable'};
265
    $template->param(
314
		$row_data{mandatory} = $results->[$i]{'mandatory'};
266
        edit_tagfield      => $tagfield,
315
		$row_data{tab} = $results->[$i]{'tab'};
267
        edit_authtypecode  => $authtypecode,
316
		$row_data{seealso} = $results->[$i]{'seealso'};
268
    );
317
		$row_data{authorised_value} = $results->[$i]{'authorised_value'};
318
		$row_data{authtypecode}	= $results->[$i]{'authtypecode'};
319
		$row_data{value_builder}	= $results->[$i]{'value_builder'};
320
		$row_data{hidden}	= $results->[$i]{'hidden'} if($results->[$i]{'hidden'} gt "000") ;
321
		$row_data{isurl}	= $results->[$i]{'isurl'};
322
		if ($row_data{tab} eq -1) {
323
			$row_data{subfield_ignored} = 1;
324
		}
325
269
326
		push(@loop_data, \%row_data);
327
	}
328
	$template->param(loop => \@loop_data);
329
	$template->param(edit_tagfield => $tagfield,
330
		edit_authtypecode => $authtypecode);
331
	
332
	if ($offset>0) {
333
		my $prevpage = $offset-$pagesize;
334
		$template->param(prev =>"<a href=\"$script_name?offset=$prevpage\">");
335
	}
336
	if ($offset+$pagesize<$count) {
337
		my $nextpage =$offset+$pagesize;
338
		$template->param(next => "<a href=\"$script_name?offset=$nextpage\">");
339
	}
340
} #---- END $OP eq DEFAULT
270
} #---- END $OP eq DEFAULT
341
output_html_with_http_headers $input, $cookie, $template->output;
271
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/admin/marc_subfields_structure.pl (-138 / +55 lines)
Lines 29-66 use Koha::Filter::MARC::ViewPolicy; Link Here
29
29
30
use List::MoreUtils qw( uniq );
30
use List::MoreUtils qw( uniq );
31
31
32
sub string_search {
33
    my ( $searchstring, $frameworkcode ) = @_;
34
    my $dbh = C4::Context->dbh;
35
    $searchstring =~ s/\'/\\\'/g;
36
    my @data  = split( ' ', $searchstring );
37
    my $count = @data;
38
    my $sth   =
39
      $dbh->prepare(
40
"Select * from marc_subfield_structure where (tagfield like ? and frameworkcode=?) order by tagfield, display_order"
41
      );
42
    $sth->execute( "$searchstring%", $frameworkcode );
43
    my @results;
44
    my $cnt = 0;
45
    my $u   = 1;
46
47
    while ( my $data = $sth->fetchrow_hashref ) {
48
        push( @results, $data );
49
        $cnt++;
50
        $u++;
51
    }
52
    $sth->finish;
53
    return ( $cnt, \@results );
54
}
55
56
sub marc_subfield_structure_exists {
57
    my ($tagfield, $tagsubfield, $frameworkcode) = @_;
58
    my $dbh  = C4::Context->dbh;
59
    my $sql  = "select tagfield from marc_subfield_structure where tagfield = ? and tagsubfield = ? and frameworkcode = ?";
60
    my $rows = $dbh->selectall_arrayref($sql, {}, $tagfield, $tagsubfield, $frameworkcode);
61
    return @$rows > 0;
62
}
63
64
my $input         = CGI->new;
32
my $input         = CGI->new;
65
my $tagfield      = $input->param('tagfield');
33
my $tagfield      = $input->param('tagfield');
66
my $tagsubfield   = $input->param('tagsubfield');
34
my $tagsubfield   = $input->param('tagsubfield');
Lines 159-200 if ( $op eq 'add_form' ) { Link Here
159
    closedir DIR;
127
    closedir DIR;
160
128
161
    # build values list
129
    # build values list
162
    my $sth =
130
    my $mss = Koha::MarcSubfieldStructures->search(
163
      $dbh->prepare(
131
        { tagfield => $tagfield, frameworkcode => $frameworkcode },
164
"select * from marc_subfield_structure where tagfield=? and frameworkcode=? order by display_order"
132
        { order_by => 'display_order' }
165
      );    # and tagsubfield='$tagsubfield'");
133
    )->unblessed;
166
    $sth->execute( $tagfield, $frameworkcode );
167
    my @loop_data = ();
134
    my @loop_data = ();
168
    my $i         = 0;
135
    my $i         = 0;
169
    while ( my $data = $sth->fetchrow_hashref ) {
136
    for my $m ( @$mss ) {
170
        my %row_data;    # get a fresh hash for the row data
137
        my %row_data = %$m;    # get a fresh hash for the row data
171
        $row_data{defaultvalue}      = $data->{defaultvalue};
138
        $row_data{subfieldcode}      = $m->{tagsubfield};
172
        $row_data{maxlength}         = $data->{maxlength};
173
        $row_data{tab}               = $data->{tab};
174
        $row_data{tagsubfield}       = $data->{tagsubfield};
175
        $row_data{subfieldcode}      = $data->{'tagsubfield'};
176
        $row_data{urisubfieldcode}   = $row_data{subfieldcode} eq '%' ? 'pct' : $row_data{subfieldcode};
139
        $row_data{urisubfieldcode}   = $row_data{subfieldcode} eq '%' ? 'pct' : $row_data{subfieldcode};
177
        $row_data{liblibrarian}      = $data->{'liblibrarian'};
178
        $row_data{libopac}           = $data->{'libopac'};
179
        $row_data{seealso}           = $data->{'seealso'};
180
        $row_data{kohafields}        = \@kohafields;
140
        $row_data{kohafields}        = \@kohafields;
181
        $row_data{kohafield}         = $data->{kohafield};
182
        $row_data{authorised_values} = \@authorised_values;
141
        $row_data{authorised_values} = \@authorised_values;
183
        $row_data{authorised_value}  = $data->{authorised_value};
184
        $row_data{value_builders}    = \@value_builder;
142
        $row_data{value_builders}    = \@value_builder;
185
        $row_data{value_builder}     = $data->{'value_builder'};
186
        $row_data{authtypes}         = \@authtypes;
143
        $row_data{authtypes}         = \@authtypes;
187
        $row_data{authtypecode}      = $data->{'authtypecode'};
188
        $row_data{repeatable}        = $data->{repeatable};
189
        $row_data{mandatory}         = $data->{mandatory};
190
        $row_data{important}         = $data->{important};
191
        $row_data{hidden}            = $data->{hidden};
192
        $row_data{isurl}             = $data->{isurl};
193
        $row_data{row}               = $i;
144
        $row_data{row}               = $i;
194
        $row_data{link}              = $data->{'link'};
195
145
196
        if ( defined $data->{kohafield}
146
        if ( defined $m->{kohafield}
197
            and $data->{kohafield} eq 'biblio.biblionumber' )
147
            and $m->{kohafield} eq 'biblio.biblionumber' )
198
        {
148
        {
199
            my $hidden_opac = Koha::Filter::MARC::ViewPolicy->should_hide_marc(
149
            my $hidden_opac = Koha::Filter::MARC::ViewPolicy->should_hide_marc(
200
                    {
150
                    {
Lines 262-271 if ( $op eq 'add_form' ) { Link Here
262
elsif ( $op eq 'add_validate' ) {
212
elsif ( $op eq 'add_validate' ) {
263
    my $dbh = C4::Context->dbh;
213
    my $dbh = C4::Context->dbh;
264
    $template->param( tagfield => "$input->param('tagfield')" );
214
    $template->param( tagfield => "$input->param('tagfield')" );
265
    my $sth_update = $dbh->prepare(qq{
266
        update marc_subfield_structure set tagfield=?, tagsubfield=?, liblibrarian=?, libopac=?, repeatable=?, mandatory=?, important=?, kohafield=?, tab=?, seealso=?, authorised_value=?, authtypecode=?, value_builder=?, hidden=?, isurl=?, frameworkcode=?,  link=?, defaultvalue=?, maxlength=?, display_order=?
267
        where tagfield=? and tagsubfield=? and frameworkcode=?
268
    });
269
    my @tagsubfield       = $input->multi_param('tagsubfield');
215
    my @tagsubfield       = $input->multi_param('tagsubfield');
270
    my @liblibrarian      = $input->multi_param('liblibrarian');
216
    my @liblibrarian      = $input->multi_param('liblibrarian');
271
    my @libopac           = $input->multi_param('libopac');
217
    my @libopac           = $input->multi_param('libopac');
Lines 303-335 elsif ( $op eq 'add_validate' ) { Link Here
303
        my $maxlength = $maxlength[$i] ? $maxlength[$i] : 9999;
249
        my $maxlength = $maxlength[$i] ? $maxlength[$i] : 9999;
304
        
250
        
305
        if (defined($liblibrarian) && $liblibrarian ne "") {
251
        if (defined($liblibrarian) && $liblibrarian ne "") {
306
            if (marc_subfield_structure_exists($tagfield, $tagsubfield, $frameworkcode)) {
252
            my $mss = Koha::MarcSubfieldStructures->find({tagfield => $tagfield, tagsubfield => $tagsubfield, frameworkcode => $frameworkcode });
307
                $sth_update->execute(
253
            if ($mss) {
308
                    $tagfield,
254
                $mss->update(
309
                    $tagsubfield,
255
                    {
310
                    $liblibrarian,
256
                        liblibrarian     => $liblibrarian,
311
                    $libopac,
257
                        libopac          => $libopac,
312
                    $repeatable,
258
                        repeatable       => $repeatable,
313
                    $mandatory,
259
                        mandatory        => $mandatory,
314
                    $important,
260
                        important        => $important,
315
                    $kohafield,
261
                        kohafield        => $kohafield,
316
                    $tab,
262
                        tab              => $tab,
317
                    $seealso,
263
                        seealso          => $seealso,
318
                    $authorised_value,
264
                        authorised_value => $authorised_value,
319
                    $authtypecode,
265
                        authtypecode     => $authtypecode,
320
                    $value_builder,
266
                        value_builder    => $value_builder,
321
                    $hidden,
267
                        hidden           => $hidden,
322
                    $isurl,
268
                        isurl            => $isurl,
323
                    $frameworkcode,
269
                        link             => $link,
324
                    $link,
270
                        defaultvalue     => $defaultvalue,
325
                    $defaultvalue,
271
                        maxlength        => $maxlength,
326
                    $maxlength,
272
                        display_order    => $display_order->{$tagfield} || 0
327
                    $display_order->{$tagfield} || 0,
273
                    }
328
                    (
329
                        $tagfield,
330
                        $tagsubfield,
331
                        $frameworkcode,
332
                    )
333
                );
274
                );
334
            } else {
275
            } else {
335
                if( $frameworkcode ne q{} ) {
276
                if( $frameworkcode ne q{} ) {
Lines 365-371 elsif ( $op eq 'add_validate' ) { Link Here
365
            $display_order->{$tagfield}++;
306
            $display_order->{$tagfield}++;
366
        }
307
        }
367
    }
308
    }
368
    $sth_update->finish;
369
    $cache->clear_from_cache("MarcStructure-0-$frameworkcode");
309
    $cache->clear_from_cache("MarcStructure-0-$frameworkcode");
370
    $cache->clear_from_cache("MarcStructure-1-$frameworkcode");
310
    $cache->clear_from_cache("MarcStructure-1-$frameworkcode");
371
    $cache->clear_from_cache("default_value_for_mod_marc-");
311
    $cache->clear_from_cache("default_value_for_mod_marc-");
Lines 379-400 elsif ( $op eq 'add_validate' ) { Link Here
379
    # called by default form, used to confirm deletion of data in DB
319
    # called by default form, used to confirm deletion of data in DB
380
}
320
}
381
elsif ( $op eq 'delete_confirm' ) {
321
elsif ( $op eq 'delete_confirm' ) {
382
    my $dbh = C4::Context->dbh;
322
    my $mss = Koha::MarcSubfieldStructures->find(
383
    my $sth =
323
        {
384
      $dbh->prepare(
324
            tagfield      => $tagfield,
385
"select * from marc_subfield_structure where tagfield=? and tagsubfield=? and frameworkcode=?"
325
            tagsubfield   => $tagsubfield,
386
      );
326
            frameworkcode => $frameworkcode
387
327
        }
388
    $sth->execute( $tagfield, $tagsubfield, $frameworkcode );
328
    );
389
    my $data = $sth->fetchrow_hashref;
390
    $sth->finish;
391
    $template->param(
329
    $template->param(
392
        liblibrarian  => $data->{'liblibrarian'},
330
        mss => $mss,
393
        tagsubfield   => $data->{'tagsubfield'},
394
        delete_link   => $script_name,
331
        delete_link   => $script_name,
395
        tagfield      => $tagfield,
396
        tagsubfield   => $tagsubfield,
397
        frameworkcode => $frameworkcode,
398
    );
332
    );
399
333
400
    # END $OP eq DELETE_CONFIRM
334
    # END $OP eq DELETE_CONFIRM
Lines 402-414 elsif ( $op eq 'delete_confirm' ) { Link Here
402
  # called by delete_confirm, used to effectively confirm deletion of data in DB
336
  # called by delete_confirm, used to effectively confirm deletion of data in DB
403
}
337
}
404
elsif ( $op eq 'delete_confirmed' ) {
338
elsif ( $op eq 'delete_confirmed' ) {
405
    my $dbh = C4::Context->dbh;
339
    Koha::MarcSubfieldStructures->find(
406
    my $sth =
340
        {
407
      $dbh->prepare(
341
            tagfield      => $tagfield,
408
"delete from marc_subfield_structure where tagfield=? and tagsubfield=? and frameworkcode=?"
342
            tagsubfield   => $tagsubfield,
409
      );
343
            frameworkcode => $frameworkcode
410
    $sth->execute( $tagfield, $tagsubfield, $frameworkcode );
344
        }
411
    $sth->finish;
345
    )->delete;
346
412
    $cache->clear_from_cache("MarcStructure-0-$frameworkcode");
347
    $cache->clear_from_cache("MarcStructure-0-$frameworkcode");
413
    $cache->clear_from_cache("MarcStructure-1-$frameworkcode");
348
    $cache->clear_from_cache("MarcStructure-1-$frameworkcode");
414
    $cache->clear_from_cache("default_value_for_mod_marc-");
349
    $cache->clear_from_cache("default_value_for_mod_marc-");
Lines 420-452 elsif ( $op eq 'delete_confirmed' ) { Link Here
420
################## DEFAULT ##################################
355
################## DEFAULT ##################################
421
}
356
}
422
else {    # DEFAULT
357
else {    # DEFAULT
423
    my ( $count, $results ) = string_search( $tagfield, $frameworkcode );
358
    my $mss = Koha::MarcSubfieldStructures->search(
424
    my @loop_data = ();
359
        {
425
    for ( my $i = 0; $i < $count; $i++ ) {
360
            tagfield      => { -like => "$tagfield%" },
426
        my %row_data;    # get a fresh hash for the row data
361
            frameworkcode => $frameworkcode
427
        $row_data{tagfield}         = $results->[$i]{'tagfield'};
362
        },
428
        $row_data{tagsubfield}      = $results->[$i]{'tagsubfield'};
363
        { order_by => [ 'tagfield', 'display_order' ] }
429
        $row_data{liblibrarian}     = $results->[$i]{'liblibrarian'};
364
    )->unblessed;
430
        $row_data{kohafield}        = $results->[$i]{'kohafield'};
431
        $row_data{repeatable}       = $results->[$i]{'repeatable'};
432
        $row_data{mandatory}        = $results->[$i]{'mandatory'};
433
        $row_data{important}        = $results->[$i]{'important'};
434
        $row_data{tab}              = $results->[$i]{'tab'};
435
        $row_data{seealso}          = $results->[$i]{'seealso'};
436
        $row_data{authorised_value} = $results->[$i]{'authorised_value'};
437
        $row_data{authtypecode}     = $results->[$i]{'authtypecode'};
438
        $row_data{value_builder}    = $results->[$i]{'value_builder'};
439
        $row_data{hidden}           = $results->[$i]{'hidden'};
440
        $row_data{isurl}            = $results->[$i]{'isurl'};
441
        $row_data{link}             = $results->[$i]{'link'};
442
443
        if ( $row_data{tab} eq -1 ) {
444
            $row_data{subfield_ignored} = 1;
445
        }
446
365
447
        push( @loop_data, \%row_data );
366
    $template->param( loop => $mss );
448
    }
449
    $template->param( loop => \@loop_data );
450
    $template->param(
367
    $template->param(
451
        edit_tagfield      => $tagfield,
368
        edit_tagfield      => $tagfield,
452
        edit_frameworkcode => $frameworkcode
369
        edit_frameworkcode => $frameworkcode
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt (-24 / +3 lines)
Lines 18-24 Link Here
18
  [% ELSE %]<a href="/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;tagsubfield=[% tagsubfield | uri %]&amp;authtypecode=[% authtypecode |uri %]">Authority MARC subfield structure for [% tagfield | html %]</a> &rsaquo;
18
  [% ELSE %]<a href="/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;tagsubfield=[% tagsubfield | uri %]&amp;authtypecode=[% authtypecode |uri %]">Authority MARC subfield structure for [% tagfield | html %]</a> &rsaquo;
19
  [% END %]
19
  [% END %]
20
  [% IF ( delete_confirm ) %]Confirm deletion of subfield [% tagsubfield | html %]?[% END %]
20
  [% IF ( delete_confirm ) %]Confirm deletion of subfield [% tagsubfield | html %]?[% END %]
21
  [% IF ( delete_confirmed ) %]Data deleted[% END %]
22
  [% IF ( add_form ) %]
21
  [% IF ( add_form ) %]
23
  [% IF ( use_heading_flags_p ) %]
22
  [% IF ( use_heading_flags_p ) %]
24
  [% IF ( heading_edit_subfields_p ) %]Edit MARC subfields constraints[% END %]
23
  [% IF ( heading_edit_subfields_p ) %]Edit MARC subfields constraints[% END %]
Lines 111-117 Link Here
111
                        <ol>
110
                        <ol>
112
                            <li><label for="ohidden[% loo.row | html %]">Select to display or not:</label>
111
                            <li><label for="ohidden[% loo.row | html %]">Select to display or not:</label>
113
                                <select name="ohidden" size="1" id="ohidden[% loo.row | html %]">
112
                                <select name="ohidden" size="1" id="ohidden[% loo.row | html %]">
114
                                    [%- IF ( loo.ohidden ==  0 ) -%]
113
                                    [%- IF ( loo.hidden ==  0 ) -%]
115
                                    <option value= "0" selected="selected">Show all</option>
114
                                    <option value= "0" selected="selected">Show all</option>
116
                                    <option value="1">Hide all</option>
115
                                    <option value="1">Hide all</option>
117
                                    [%- ELSE -%]
116
                                    [%- ELSE -%]
Lines 248-263 Link Here
248
    </form></div>
247
    </form></div>
249
[% END %]
248
[% END %]
250
249
251
[% IF ( delete_confirmed ) %]
252
253
   <div class="dialog message"> <h3>Data deleted</h3>
254
    <form action="[% script_name | html %]" method="post">
255
        <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
256
        <input type="submit" class="approve" value="OK" />
257
    </form></div>
258
[% END %]
259
260
261
[% IF ( else ) %]
250
[% IF ( else ) %]
262
<h1>Authority MARC subfield structure admin for [% tagfield | html %] (authority: [% authtypecode | html %])</h1>
251
<h1>Authority MARC subfield structure admin for [% tagfield | html %] (authority: [% authtypecode | html %])</h1>
263
<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit.</p>
252
<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit.</p>
Lines 279-292 Link Here
279
            <a href="/cgi-bin/koha/admin/auth_subfields_structure.pl?op=add_form&tagfield=[% tagfield | uri %]&authtypecode=[% authtypecode | uri %]#sub[% loo.tagsubfield | uri %]field">[% loo.tagsubfield | html %]</a>
268
            <a href="/cgi-bin/koha/admin/auth_subfields_structure.pl?op=add_form&tagfield=[% tagfield | uri %]&authtypecode=[% authtypecode | uri %]#sub[% loo.tagsubfield | uri %]field">[% loo.tagsubfield | html %]</a>
280
        </td>
269
        </td>
281
        <td>
270
        <td>
282
            [% IF ( loo.subfield_ignored ) %]
271
            [% IF loo.tab == -1 %]
283
                    <em>[% loo.liblibrarian | html_entity %]</em>
272
                    <em>[% loo.liblibrarian | html_entity %]</em>
284
            [% ELSE %]
273
            [% ELSE %]
285
                    [% loo.liblibrarian | html_entity %]
274
                    [% loo.liblibrarian | html_entity %]
286
            [% END %]
275
            [% END %]
287
        </td>
276
        </td>
288
        <td>
277
        <td>
289
            [% IF ( loo.subfield_ignored ) %]
278
            [% IF loo.subfield_ignored == -1 %]
290
                    <em>subfield ignored</em>
279
                    <em>subfield ignored</em>
291
            [% ELSE %]
280
            [% ELSE %]
292
                <strong>Tab:</strong>[% loo.tab | html %],
281
                <strong>Tab:</strong>[% loo.tab | html %],
Lines 323-338 Link Here
323
    <a class="cancel" href="auth_tag_structure.pl?searchfield=[% tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]">Cancel</a></fieldset>
312
    <a class="cancel" href="auth_tag_structure.pl?searchfield=[% tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]">Cancel</a></fieldset>
324
    </form>
313
    </form>
325
314
326
    [% IF ( previous ) %]
327
    <input type="image" src="[% interface | html %]/[% theme | html %]/images/1leftarrow.png" title="previous" alt="previous" />
328
    </a>
329
    [% END %]
330
    [% IF ( next ) %]
331
        [% next | html %]
332
    <input type="image" src="[% interface | html %]/[% theme | html %]/images/1rightarrow.png" title="next" alt="next" />
333
    </a>
334
    [% END %]
335
336
[% END %]
315
[% END %]
337
316
338
            </main>
317
            </main>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt (-30 / +13 lines)
Lines 14-23 Link Here
14
        [%- END -%]
14
        [%- END -%]
15
    [%- END -%]
15
    [%- END -%]
16
    [%- IF ( delete_confirm ) -%]
16
    [%- IF ( delete_confirm ) -%]
17
        MARC subfield structure &rsaquo; Confirm deletion of subfield [%- tagsubfield | html -%]
17
        MARC subfield structure &rsaquo; Confirm deletion of subfield [%- mss.tagsubfield | html -%]
18
    [%- END -%]
19
    [%- IF ( delete_confirmed ) -%]
20
        MARC subfield structure &rsaquo; Subfield deleted
21
    [%- END -%]
18
    [%- END -%]
22
    [%- IF ( else ) -%]
19
    [%- IF ( else ) -%]
23
        MARC subfield structure
20
        MARC subfield structure
Lines 48-57 Link Here
48
            [% END %]
45
            [% END %]
49
        [% END %]
46
        [% END %]
50
        [% IF ( delete_confirm ) %]
47
        [% IF ( delete_confirm ) %]
51
            <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] Subfield structure</a> &rsaquo; Confirm deletion of subfield [% tagsubfield | html %]
48
            <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% mss.tagfield | uri %]&amp;frameworkcode=[% mss.frameworkcode | uri %]">Tag [% mss.tagfield | html %] Subfield structure</a> &rsaquo; Confirm deletion of subfield [% mss.tagsubfield | html %]
52
        [% END %]
53
        [% IF ( delete_confirmed ) %]
54
            <a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?tagfield=[% tagfield | uri %]&amp;frameworkcode=[% frameworkcode | uri %]">Tag [% tagfield | html %] subfield structure</a> &rsaquo; Subfield deleted
55
        [% END %]
49
        [% END %]
56
        [% IF ( else ) %]
50
        [% IF ( else ) %]
57
            Tag [% tagfield | html %] Subfield structure
51
            Tag [% tagfield | html %] Subfield structure
Lines 286-322 Link Here
286
280
287
                    [% IF ( delete_confirm ) %]
281
                    [% IF ( delete_confirm ) %]
288
                        <div class="dialog alert">
282
                        <div class="dialog alert">
289
                            <h3>Confirm deletion of subfield [% tagsubfield | html %]?</h3>
283
                            <h3>Confirm deletion of subfield [% mss.tagsubfield | html %]?</h3>
290
                            <p>Subfield: [% tagsubfield | html %]</p>
284
                            <p>Subfield: [% mss.tagsubfield | html %]</p>
291
                            <p>Description: [% liblibrarian | html_entity %]</p>
285
                            <p>Description: [% mss.liblibrarian | html_entity %]</p>
292
286
293
                            <form action="[% delete_link | html %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
287
                            <form action="[% delete_link | html %]" method="post"><input type="hidden" name="op" value="delete_confirmed" />
294
                                <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
288
                                <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
295
                                <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
289
                                <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
296
                                <input type="hidden" name="tagsubfield" value="[% tagsubfield | html %]" />
290
                                <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
297
                                <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
298
                                <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
291
                                <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this subfield</button>
299
                            </form>
292
                            </form>
300
293
301
294
302
                            <form action="[% script_name | html %]" method="post">
295
                            <form action="[% script_name | html %]" method="post">
303
                                <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
296
                                <input type="hidden" name="tagfield" value="[% mss.tagfield | html %]" />
304
                                <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
297
                                <input type="hidden" name="tagsubfield" value="[% mss.tagsubfield | html %]" />
305
                                <input type="hidden" name="tagsubfield" value="[% tagsubfield | html %]" />
298
                                <input type="hidden" name="frameworkcode" value="[% mss.frameworkcode | html %]" />
306
                                <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" />
307
                                <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
299
                                <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
308
                            </form>
300
                            </form>
309
                        </div> <!-- /.dialog.alert -->
301
                        </div> <!-- /.dialog.alert -->
310
                    [% END # /IF ( delete_confirm ) %]
302
                    [% END # /IF ( delete_confirm ) %]
311
303
312
                    [% IF ( delete_confirmed ) %]
313
                        <h3>Data deleted</h3>
314
                        <form action="[% script_name | html %]" method="post">
315
                            <input type="hidden" name="tagfield" value="[% tagfield | html %]" />
316
                            <input type="submit" value="OK" />
317
                        </form>
318
                    [% END %]
319
320
                    [% IF ( else ) %]
304
                    [% IF ( else ) %]
321
                        <h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
305
                        <h1>MARC subfield structure admin for [% tagfield | html %] [% IF ( frameworkcode ) %](framework [% frameworkcode | html %])[% ELSE %](default framework)[% END %]</h1>
322
306
Lines 337-350 Link Here
337
                                    <tr>
321
                                    <tr>
338
                                        <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&amp;tagfield=[% loo.tagfield | uri %]&amp;frameworkcode=[% frameworkcode | uri %]#sub[% loo.tagsubfield | uri %]field">[% loo.tagsubfield | html %]</a></td>
322
                                        <td><a href="/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&amp;tagfield=[% loo.tagfield | uri %]&amp;frameworkcode=[% frameworkcode | uri %]#sub[% loo.tagsubfield | uri %]field">[% loo.tagsubfield | html %]</a></td>
339
                                        <td>
323
                                        <td>
340
                                            [% IF ( loo.subfield_ignored ) %]
324
                                            [% IF loo.tab == -1 %]
341
                                                <em>[% loo.liblibrarian | html_entity %]</em>
325
                                                <em>[% loo.liblibrarian | html_entity %]</em>
342
                                            [% ELSE %]
326
                                            [% ELSE %]
343
                                                [% loo.liblibrarian | html_entity %]
327
                                                [% loo.liblibrarian | html_entity %]
344
                                            [% END %]
328
                                            [% END %]
345
                                        </td>
329
                                        </td>
346
                                        <td>
330
                                        <td>
347
                                            [% IF ( loo.subfield_ignored ) %]
331
                                            [% IF loo.tab == -1 %]
348
                                                <em>subfield ignored</em>
332
                                                <em>subfield ignored</em>
349
                                            [% ELSE %]
333
                                            [% ELSE %]
350
                                                Tab:[% loo.tab | html %],
334
                                                Tab:[% loo.tab | html %],
351
- 

Return to bug 8976