[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.128, Fri Jul 1 02:09:16 2005 UTC revision 1.129, Wed Jul 6 04:17:38 2005 UTC
# Line 613  Line 613 
613  sub print_kv_pairs {  sub print_kv_pairs {
614      my($is_sprout, $fig_or_sprout,$cgi,$html,$peg) = @_;      my($is_sprout, $fig_or_sprout,$cgi,$html,$peg) = @_;
615    
616        warn "Printing KV pairs, is_sprout=$is_sprout\n";
617      # we don't want to do this for SPROUT      # we don't want to do this for SPROUT
618      return if ($is_sprout);      if ($is_sprout)
619        {
620            return print_kv_pairs_sprout($fig_or_sprout,$cgi,$html,$peg);
621        }
622    
623      # RAE: modified this to allow the users to edit the key/value pairs.      # RAE: modified this to allow the users to edit the key/value pairs.
624      # there will be two choices: when the "Edit Attributes" button is pressed      # there will be two choices: when the "Edit Attributes" button is pressed
# Line 706  Line 710 
710      push( @$html, $cgi->end_form );      push( @$html, $cgi->end_form );
711  }  }
712    
713    sub print_kv_pairs_sprout
714    {
715        my($fig_or_sprout, $cgi, $html, $peg) = @_;
716    
717        my @props = $fig_or_sprout->get_attributes($peg);
718    
719        my @col_hdrs = ("Key", "Value");
720    
721        my @tab;
722    
723        for my $prop (@props)
724        {
725            my($name, $value, $evidence) = @$prop;
726            my $txt;
727            if ($evidence =~ /^http/)
728            {
729                $txt = qq(<a href="$evidence">$value</a>);
730            }
731            else
732            {
733                $txt = $value;
734            }
735            push(@tab, [$name, $txt]);
736        }
737    
738        push(@$html, &HTML::make_table(\@col_hdrs, \@tab, "Attributes"), $cgi->hr);
739    
740        print STDERR Dumper($html);
741    }
742    
743    
744  sub print_protein_fams {  sub print_protein_fams {
745    
746      ############## RAE      ############## RAE

Legend:
Removed from v.1.128  
changed lines
  Added in v.1.129

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3