[Bio] / FigWebServices / protein.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/protein.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.137, Thu Jul 14 15:53:54 2005 UTC revision 1.138, Sun Jul 17 19:04:27 2005 UTC
# Line 634  Line 634 
634    
635        foreach my $key (@attr) {        foreach my $key (@attr) {
636           unless ($cgi->param("key.".$key->[1])) {           unless ($cgi->param("key.".$key->[1])) {
637              if (&delete_attribute($fig_or_sprout, $peg, $key->[1])) {              if (&delete_attribute($fig_or_sprout, $peg, $key->[1], $cgi->param("value.".$key->[1]), $cgi->param("url.".$key->[1]))) {
638                push @$deleted, [@$key, ["deleted", "td colspan=2 style=\"text-align: center\""]];                push @$deleted, [@$key, ["deleted", "td colspan=2 style=\"text-align: center\""]];
639              }              }
640           }           }
641           if (($cgi->param("value.".$key->[1]) ne $key->[2]) || ($cgi->param("url.".$key->[1]) ne $key->[3])) {           if (($cgi->param("value.".$key->[1]) ne $key->[2]) || ($cgi->param("url.".$key->[1]) ne $key->[3])) {
642              if (&change_attribute($fig_or_sprout,$peg, $key->[1], $cgi->param("value.".$key->[1]), $cgi->param("url.".$key->[1]))) {              if (&change_attribute($fig_or_sprout,$peg, $key->[1], $key->[2], $key->[3], $cgi->param("value.".$key->[1]), $cgi->param("url.".$key->[1]))) {
643                push @$changed, [@$key, $cgi->param("value.".$key->[1]), $cgi->param("url.".$key->[1])];                push @$changed, [@$key, $cgi->param("value.".$key->[1]), $cgi->param("url.".$key->[1])];
644              }              }
645           }           }
# Line 647  Line 647 
647        for (my $i=0; $i<=5; $i++) {        for (my $i=0; $i<=5; $i++) {
648           if ($cgi->param("key.$i")) {           if ($cgi->param("key.$i")) {
649              if (&add_attribute($fig_or_sprout,$peg, $cgi->param("key.$i"), $cgi->param("value.$i"), $cgi->param("url.$i"))) {              if (&add_attribute($fig_or_sprout,$peg, $cgi->param("key.$i"), $cgi->param("value.$i"), $cgi->param("url.$i"))) {
650               push @$added, [$cgi->param("key.$i"), ["added", "td colspan=2 style=\"text-align: center\""], $cgi->param("value.$i"), $cgi->param("url.$i")];               push @$added, [$cgi->param("key.$i"), ["added", "td colspan=3 style=\"text-align: center\""], $cgi->param("value.$i"), $cgi->param("url.$i")];
651              }              }
652              else {              else {
653               print STDERR $peg, " and ", $cgi->param("key.$i"), " not added\n";               print STDERR $peg, " and ", $cgi->param("key.$i"), " not added\n";
# Line 658  Line 658 
658        if ($changed || $deleted || $added) {        if ($changed || $deleted || $added) {
659          my $tab = [];          my $tab = [];
660          my $col_hdrs=["Peg", "Attribute", "Original Value", "Original URL", "New Value", "New URL"];          my $col_hdrs=["Peg", "Attribute", "Original Value", "Original URL", "New Value", "New URL"];
661          if ($changed) {push @$tab, [["<strong>Changed Attributes", "td colspan=5 bgcolor=gray style=\"text-align: center\""]], @$changed}          if ($changed) {push @$tab, [["<strong>Changed Attributes", "td colspan=6 bgcolor=gray style=\"text-align: center\""]], @$changed}
662          if ($deleted) {push @$tab, [["<strong>Deleted Attributes", "td colspan=5 bgcolor=gray style=\"text-align: center\""]], @$deleted}          if ($deleted) {push @$tab, [["<strong>Deleted Attributes", "td colspan=6 bgcolor=gray style=\"text-align: center\""]], @$deleted}
663          if ($added)   {push @$tab, [["<strong>Added Attributes",   "td colspan=5 bgcolor=gray style=\"text-align: center\""]], @$added}          if ($added)   {push @$tab, [["<strong>Added Attributes",   "td colspan=6 bgcolor=gray style=\"text-align: center\""]], @$added}
664    
665          push(@$html,&HTML::make_table($col_hdrs,$tab,"Changed Data"));          push(@$html,&HTML::make_table($col_hdrs,$tab,"Changed Data"));
666          @attr=&get_attributes($fig_or_sprout, $peg);          @attr=&get_attributes($fig_or_sprout, $peg);
# Line 681  Line 681 
681                 }                 }
682              }              }
683        }        }
684        if (scalar(@$explanations)) {        if ($explanations) {
685          my $col_hdrs=["Peg", "Attribute", "Value", "URL", "Explanation"];          my $col_hdrs=["Peg", "Attribute", "Value", "URL", "Explanation"];
686          push(@$html,&HTML::make_table($col_hdrs,$explanations,"Explanations"));          push(@$html,&HTML::make_table($col_hdrs,$explanations,"Explanations"));
687        }        }

Legend:
Removed from v.1.137  
changed lines
  Added in v.1.138

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3