bugfixes + improvment in navigation
This commit is contained in:
parent
ba69be3a92
commit
6d74968993
|
|
@ -108,7 +108,12 @@ if ($op eq 'add_form') {
|
|||
$toggle="white";
|
||||
}
|
||||
$row_data{tab} = CGI::scrolling_list(-name=>'tab[]',
|
||||
-values=>['','0','1','2','3','4','5','6','7','8','9','items'],
|
||||
-values=>['','0','1','2','3','4','5','6','7','8','9','10'],
|
||||
-labels => {'' =>'','0'=>'0','1'=>'1',
|
||||
'2' =>'2','3'=>'3','4'=>'4',
|
||||
'5' =>'5','6'=>'6','7'=>'7',
|
||||
'8' =>'8','9'=>'9','10'=>'items (10)',
|
||||
},
|
||||
-default=>$data->{'tab'},
|
||||
-size=>1,
|
||||
-multiple=>0,
|
||||
|
|
@ -131,7 +136,7 @@ if ($op eq 'add_form') {
|
|||
# add an empty line for add if needed
|
||||
my %row_data; # get a fresh hash for the row data
|
||||
$row_data{tab} = CGI::scrolling_list(-name=>'tab[]',
|
||||
-values=>['','0','1','2','3','4','5','6','7','8','9','items'],
|
||||
-values=>['','0','1','2','3','4','5','6','7','8','9','items (10)'],
|
||||
-default=>"",
|
||||
-size=>1,
|
||||
-multiple=>0,
|
||||
|
|
@ -141,7 +146,12 @@ if ($op eq 'add_form') {
|
|||
$row_data{libopac} = "";
|
||||
$row_data{repeatable} = CGI::checkbox('repeatable[]','',1,'');
|
||||
$row_data{mandatory} = CGI::checkbox('mandatory[]','',1,'');
|
||||
$row_data{kohafield} = '';
|
||||
$row_data{kohafield}= CGI::scrolling_list( -name=>'kohafield[]',
|
||||
-values=> \@kohafields,
|
||||
-default=> "",
|
||||
-size=>1,
|
||||
-multiple=>0,
|
||||
);
|
||||
$row_data{bgcolor} = $toggle;
|
||||
push(@loop_data, \%row_data);
|
||||
|
||||
|
|
@ -162,7 +172,6 @@ if ($op eq 'add_form') {
|
|||
my @mandatory = $input->param('mandatory[]');
|
||||
my @kohafield = $input->param('kohafield[]');
|
||||
my @tab = $input->param('tab[]');
|
||||
warn "taille : $#tagsubfield";
|
||||
for (my $i=0; $i<= $#tagsubfield ; $i++) {
|
||||
my $tagfield =$input->param('tagfield');
|
||||
my $tagsubfield =$tagsubfield[$i];
|
||||
|
|
@ -184,7 +193,7 @@ if ($op eq 'add_form') {
|
|||
}
|
||||
}
|
||||
$sth->finish;
|
||||
print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marctagstructure.pl\"></html>";
|
||||
print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marc_subfields_structure.pl?tagfield=$tagfield\"></html>";
|
||||
exit;
|
||||
|
||||
# END $OP eq ADD_VALIDATE
|
||||
|
|
@ -197,6 +206,9 @@ if ($op eq 'add_form') {
|
|||
my $data=$sth->fetchrow_hashref;
|
||||
$sth->finish;
|
||||
$template->param(liblibrarian => $data->{'liblibrarian'},
|
||||
tagsubfield => $tagsubfield,
|
||||
delete_link => $script_name,
|
||||
tagfield =>$tagfield,
|
||||
tagsubfield => $tagsubfield,
|
||||
);
|
||||
# END $OP eq DELETE_CONFIRM
|
||||
|
|
@ -207,6 +219,9 @@ if ($op eq 'add_form') {
|
|||
my $sth=$dbh->prepare($reqdel);
|
||||
$sth->execute;
|
||||
$sth->finish;
|
||||
print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marc_subfields_structure.pl?tagfield=$tagfield\"></html>";
|
||||
exit;
|
||||
$template->param(tagfield => $tagfield);
|
||||
# END $OP eq DELETE_CONFIRMED
|
||||
################## DEFAULT ##################################
|
||||
} else { # DEFAULT
|
||||
|
|
@ -228,7 +243,7 @@ if ($op eq 'add_form') {
|
|||
$row_data{repeatable} = $results->[$i]{'repeatable'};
|
||||
$row_data{mandatory} = $results->[$i]{'mandatory'};
|
||||
$row_data{tab} = $results->[$i]{'tab'};
|
||||
$row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagfield'};
|
||||
$row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'};
|
||||
$row_data{bgcolor} = $toggle;
|
||||
push(@loop_data, \%row_data);
|
||||
}
|
||||
|
|
@ -240,7 +255,7 @@ if ($op eq 'add_form') {
|
|||
}
|
||||
if ($offset+$pagesize<$count) {
|
||||
my $nextpage =$offset+$pagesize;
|
||||
$template->param(next => "a href=$script_name?offset=".$nextpage.'Next >></a>');
|
||||
$template->param(next => "<a href=$script_name?offset=".$nextpage.'Next >></a>');
|
||||
}
|
||||
} #---- END $OP eq DEFAULT
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<TMPL_IF name="add_form">
|
||||
<!-------------------------------------------------------------------------------------------------->
|
||||
<H1><TMPL_VAR name="action"></H1>
|
||||
<form action='<TMPL_VAR name="script_name">' name=Aform method=post>
|
||||
<form action='<TMPL_VAR name="script_name">' name=Aform method=put>
|
||||
<input type=hidden name=op value='add_validate'>
|
||||
<table>
|
||||
<tr><th>Tag/subfield</th>
|
||||
|
|
@ -32,19 +32,21 @@
|
|||
<!-------------------------------------------------------------------------------------------------->
|
||||
<table border=0 cellspacing=0 cellpadding=5>
|
||||
<tr valign=top bgcolor=#99cc33>
|
||||
<td background="/images/background-mem.gif"><b>tag</b></td>
|
||||
<td background="/images/background-mem.gif"><b>Subfield</b></td>
|
||||
<td background="/images/background-mem.gif"><b><TMPL_VAR name="searchfield"></b></td>
|
||||
</tr>
|
||||
<tr><td> </td><td><TMPL_VAR name="liblibrarian"></td></tr>
|
||||
<form action='<TMPL_VAR name="script_name">' method=post><input type=hidden name=op value=delete_confirmed><input type=hidden name=searchfield value='<TMPL_VAR name="searchfield">'>
|
||||
<form action='<TMPL_VAR name="delete_link">' method=post><input type=hidden name=op value=delete_confirmed><input type=hidden name=searchfield value='<TMPL_VAR name="searchfield">'>
|
||||
<input type=hidden name=tagfield value='<TMPL_VAR name="tagfield">'>
|
||||
<input type=hidden name=tagsubfield value='<TMPL_VAR name="tagsubfield">'>
|
||||
<tr><td colspan=2 align=center>CONFIRM DELETION</td></tr>
|
||||
<tr><td><INPUT type=submit value='YES'></form></td><td><form action='<TMPL_VAR name="script_name">' method=post><input type=submit value=NO></form></td></tr>
|
||||
<tr><td><INPUT type=submit value='YES'></form></td><td><form action='<TMPL_VAR name="script_name">' method=post><input type="hidden" name="tagfield" value="<TMPL_VAR name="tagfield">"><input type=submit value=NO></form></td></tr>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF name="delete_confirmed">
|
||||
<!-------------------------------------------------------------------------------------------------->
|
||||
data deleted
|
||||
<form action='<TMPL_VAR name="script_name">' method=post>
|
||||
<form action='<TMPL_VAR name="script_name"> method=post><input type="hidden" name="tagfield" value="<TMPL_VAR name="tagfield">">
|
||||
<input type=submit value=OK>
|
||||
</form>
|
||||
</TMPL_IF>
|
||||
|
|
@ -52,14 +54,18 @@
|
|||
<!-------------------------------------------------------------------------------------------------->
|
||||
<TMPL_IF name="else">
|
||||
<font SIZE=6><em>MARC subfield structure admin for <TMPL_VAR name="tagfield"></em></font>
|
||||
<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>
|
||||
<p>The column <b>koha field</b> shows that the subfield is linked with a "koha field". Koha can manage a marc interface, or a koha interface. This link
|
||||
ensure that both DB are synchronized, thus you can change from MARC to KOHA interface easily.</p>
|
||||
<table border=0 cellspacing=0 cellpadding=5>
|
||||
<tr valign=top bgcolor=#99cc33>
|
||||
<td background="/images/background-mem.gif" width=5%><b>Subfield</b></td>
|
||||
<td background="/images/background-mem.gif" width=50%><b>Lib</b></td>
|
||||
<td background="/images/background-mem.gif" width=10%><b>koha field</b> <span style="font-size:8" title="the koha-DB field linked to this subfield">?</span></td>
|
||||
<td background="/images/background-mem.gif" width=8%><b>Rep</b> <span style="font-size:8" title="subfield may be repeated (1=yes, 0=no)">?</span></td>
|
||||
<td background="/images/background-mem.gif" width=8%><b>Mand</b> <span style="font-size:8" title="subfield is mandatory (1=yes, 0=no)">?</span></td>
|
||||
<td background="/images/background-mem.gif" width=9%><b>Tab</b> <span style="font-size:8" title="subfield is shown in which tab (0-9 or item)">?</span></td>
|
||||
<td background="/images/background-mem.gif" width=42%><b>Lib</b></td>
|
||||
<td background="/images/background-mem.gif" width=10%><b>koha field</b> <span style="font-size:8;color:red" title="the koha-DB field linked to this subfield">?</span></td>
|
||||
<td background="/images/background-mem.gif" width=8%><b>Rep</b> <span style="font-size:8;color:red" title="subfield may be repeated (1=yes, 0=no)">?</span></td>
|
||||
<td background="/images/background-mem.gif" width=8%><b>Mand</b> <span style="font-size:8;color:red" title="subfield is mandatory (1=yes, 0=no)">?</span></td>
|
||||
<td background="/images/background-mem.gif" width=8%><b>Tab</b> <span style="font-size:8;color:red" title="subfield is shown in which tab (0-9 or item)">?</span></td>
|
||||
<td background="/images/background-mem.gif" width=8%>
|
||||
<TMPL_LOOP name="loop">
|
||||
<tr valign=top bgcolor='<TMPL_VAR name="bgcolor">'>
|
||||
<td><TMPL_VAR name="tagsubfield"></td>
|
||||
|
|
@ -68,14 +74,16 @@
|
|||
<td><TMPL_IF name="repeatable">Yes<TMPL_ELSE>No</TMPL_IF></td>
|
||||
<td><TMPL_IF name="mandatory">Yes<TMPL_ELSE>No</TMPL_IF></td>
|
||||
<td><TMPL_VAR name="tab"></td>
|
||||
<td><a href="<TMPL_VAR name="delete">">delete</a></td>
|
||||
</tr>
|
||||
</TMPL_LOOP>
|
||||
</table>
|
||||
<TMPL_VAR name="edit">
|
||||
<table width=40%>
|
||||
<table width=60%>
|
||||
<tr>
|
||||
<td width=50%><TMPL_VAR name="previous"></td>
|
||||
<td width=50%><TMPL_VAR name="next"></td>
|
||||
<td width=33%><TMPL_VAR name="previous"></td>
|
||||
<td width=33%><TMPL_VAR name="next"></td>
|
||||
<td width=33%><a href="marctagstructure.pl">Back to Tags</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</TMPL_IF>
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@
|
|||
<tr valign=top bgcolor=#99cc33>
|
||||
<td background="/images/background-mem.gif"><b>Tag</b></td>
|
||||
<td background="/images/background-mem.gif"><b>Lib</b></td>
|
||||
<td background="/images/background-mem.gif"><b>Subfields</b></td>
|
||||
<td background="/images/background-mem.gif"><b>Repeatable</b></td>
|
||||
<td background="/images/background-mem.gif"><b>Mandatory</b></td>
|
||||
<td background="/images/background-mem.gif"><b>Subfields</b></td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue