Bug 2889: Removed toggle variable from auth_tag_structure.pl and auth_subfields_structure.pl
Removed toggle variable from auth_tag_structure.pl and .tmpl. Used template __odd__ in auth_tag_structure.tmpl. Removed toggle variable from auth_subfields_structure.pl and .tmpl. Use __odd__. Removed a type in the highlight class definition. Fixed a minor xhtml error. Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
11916ad734
commit
f18df06e5d
4 changed files with 11 additions and 25 deletions
|
@ -134,16 +134,10 @@ if ($op eq 'add_form') {
|
|||
my $sth=$dbh->prepare("select * from auth_subfield_structure where tagfield=? and authtypecode=?"); # and tagsubfield='$tagsubfield'");
|
||||
$sth->execute($tagfield,$authtypecode);
|
||||
my @loop_data = ();
|
||||
my $toggle=1;
|
||||
my $i=0;
|
||||
while ($data =$sth->fetchrow_hashref) {
|
||||
|
||||
my %row_data; # get a fresh hash for the row data
|
||||
if ($toggle eq 1){
|
||||
$toggle=0;
|
||||
} else {
|
||||
$toggle=1;
|
||||
}
|
||||
$row_data{tab} = CGI::scrolling_list(-name=>'tab',
|
||||
-id=>"tab$i",
|
||||
-values =>
|
||||
|
@ -250,7 +244,6 @@ if ($op eq 'add_form') {
|
|||
-value => 1,
|
||||
-label => '');
|
||||
$row_data{row} = $i;
|
||||
$row_data{toggle} = $toggle;
|
||||
push(@loop_data, \%row_data);
|
||||
$i++;
|
||||
}
|
||||
|
@ -365,7 +358,6 @@ if ($op eq 'add_form') {
|
|||
-tabindex=>'',
|
||||
-multiple=>0,
|
||||
);
|
||||
$row_data{toggle} = $toggle;
|
||||
$row_data{row} = $i;
|
||||
push(@loop_data, \%row_data);
|
||||
}
|
||||
|
@ -498,14 +490,8 @@ if ($op eq 'add_form') {
|
|||
################## DEFAULT ##################################
|
||||
} else { # DEFAULT
|
||||
my ($count,$results)=string_search($tagfield,$authtypecode);
|
||||
my $toggle=1;
|
||||
my @loop_data = ();
|
||||
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
|
||||
if ($toggle eq 1){
|
||||
$toggle=0;
|
||||
} else {
|
||||
$toggle=1;
|
||||
}
|
||||
my %row_data; # get a fresh hash for the row data
|
||||
$row_data{tagfield} = $results->[$i]{'tagfield'};
|
||||
$row_data{tagsubfield} = $results->[$i]{'tagsubfield'};
|
||||
|
@ -521,7 +507,6 @@ if ($op eq 'add_form') {
|
|||
$row_data{hidden} = $results->[$i]{'hidden'} if($results->[$i]{'hidden'} gt "000") ;
|
||||
$row_data{isurl} = $results->[$i]{'isurl'};
|
||||
$row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}."&authtypecode=$authtypecode";
|
||||
$row_data{toggle} = $toggle;
|
||||
if ($row_data{tab} eq -1) {
|
||||
$row_data{subfield_ignored} = 1;
|
||||
}
|
||||
|
|
|
@ -219,14 +219,8 @@ if ($op eq 'add_form') {
|
|||
$template->param(searchfield => $searchfield);
|
||||
}
|
||||
my ($count,$results)=StringSearch($searchfield,$authtypecode);
|
||||
my $toggle=1;
|
||||
my @loop_data = ();
|
||||
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
|
||||
if ($toggle eq 1){
|
||||
$toggle=0;
|
||||
} else {
|
||||
$toggle=1;
|
||||
}
|
||||
my %row_data; # get a fresh hash for the row data
|
||||
$row_data{tagfield} = $results->[$i]{'tagfield'};
|
||||
$row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
|
||||
|
@ -236,7 +230,6 @@ if ($op eq 'add_form') {
|
|||
$row_data{subfield_link} = "auth_subfields_structure.pl?tagfield=" . $results->[$i]{'tagfield'} . "&authtypecode=" . $authtypecode;
|
||||
$row_data{edit} = "$script_name?op=add_form&searchfield=" . $results->[$i]{'tagfield'} . "&authtypecode=" . $authtypecode;
|
||||
$row_data{delete} = "$script_name?op=delete_confirm&searchfield=" . $results->[$i]{'tagfield'} . "&authtypecode=" . $authtypecode;
|
||||
$row_data{toggle} = $toggle;
|
||||
push(@loop_data, \%row_data);
|
||||
}
|
||||
$template->param(loop => \@loop_data,
|
||||
|
|
|
@ -158,7 +158,11 @@ function displayMoreConstraint(numlayer){
|
|||
<th>Delete</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP NAME="loop" -->
|
||||
<!-- TMPL_IF NAME="toggle" --><tr class="highlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
|
||||
<!-- TMPL_UNLESS NAME="__odd__" -->
|
||||
<tr class="highlight">
|
||||
<!-- TMPL_ELSE -->
|
||||
<tr>
|
||||
<!-- /TMPL_IF -->
|
||||
<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
|
||||
<td>
|
||||
<!-- TMPL_IF NAME="subfield_ignored" -->
|
||||
|
@ -202,7 +206,7 @@ function displayMoreConstraint(numlayer){
|
|||
</form>
|
||||
|
||||
<!-- TMPL_IF NAME="previous" -->
|
||||
<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0" >
|
||||
<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0" />
|
||||
</a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="next" -->
|
||||
|
|
|
@ -212,7 +212,11 @@ return false;
|
|||
<th>Delete</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP NAME="loop" -->
|
||||
<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
|
||||
<!-- TMPL_UNLESS NAME="__odd__" -->
|
||||
<tr class="highlight">
|
||||
<!-- TMPL_ELSE -->
|
||||
<tr>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
|
||||
<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
|
||||
<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
|
||||
|
|
Loading…
Reference in a new issue