[Bio] / SubsystemEditor / WebPage / ShowSubsystem.pm Repository:
ViewVC logotype

Diff of /SubsystemEditor/WebPage/ShowSubsystem.pm

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

revision 1.11, Thu Mar 13 20:19:04 2008 UTC revision 1.12, Thu Mar 20 19:26:57 2008 UTC
# Line 19  Line 19 
19    my ( $self ) = @_;    my ( $self ) = @_;
20    
21    $self->application->register_component( 'Table', 'sstable'  );    $self->application->register_component( 'Table', 'sstable'  );
22      $self->application->register_component(  'Table', 'VarDescTable'  );
23  }  }
24    
25  #################################  #################################
# Line 227  Line 228 
228      $litvoid = join( ', ', @$lit );      $litvoid = join( ', ', @$lit );
229    }    }
230    
231      my $variants = $subsystem->get_variants();
232    
233    if ( $can_alter ) {    if ( $can_alter ) {
234    
235      my $editLitButton = "<INPUT TYPE=BUTTON ID='EditLitButton' VALUE='Edit Literature' ONCLICK='MakeEditableLit( \"0\" );'><INPUT TYPE=BUTTON ID='ShowLitButton' VALUE='Show Links' STYLE='display: none;' ONCLICK='MakeEditableLit( \"1\" );'>";      my $editLitButton = "<INPUT TYPE=BUTTON ID='EditLitButton' VALUE='Edit Literature' ONCLICK='MakeEditableLit( \"0\" );'><INPUT TYPE=BUTTON ID='ShowLitButton' VALUE='Show Links' STYLE='display: none;' ONCLICK='MakeEditableLit( \"1\" );'>";
# Line 246  Line 249 
249      $infotable .= "<TR><TH>Description</TH><TD>$ssdesc_brs</TD></TR>";      $infotable .= "<TR><TH>Description</TH><TD>$ssdesc_brs</TD></TR>";
250      $infotable .= "<TR><TH>Notes</TH><TD>$ssnotes_brs</TD></TR>";      $infotable .= "<TR><TH>Notes</TH><TD>$ssnotes_brs</TD></TR>";
251    }    }
252      # variants
253      my $vartable = $self->application->component( 'VarDescTable' );
254      $vartable->columns( [ { name => "Variant" }, { name => "Description" } ] );
255    
256      my $vardata;
257      my $has_variants = 0;
258      foreach my $kv ( sort keys %$variants ) {
259        $has_variants = 1;
260        push @$vardata, [ $kv, $variants->{ $kv } ];
261      }
262      $vartable->data( $vardata );
263      $infotable .= "<TR><TH>Variants</TH><TD>";
264      if ( $has_variants ) {
265        $infotable .= $vartable->output();
266      }
267    
268      if ( $can_alter ) {
269        my $variant_outside = "<INPUT TYPE=BUTTON VALUE='Edit Variants in Variant Overview' NAME='EditVariantsOverview' ID='EditVariantsOverview' ONCLICK='window.open( \"".$self->application->url()."?page=ShowVariants&subsystem=$name\" )'>";
270      $infotable .= $variant_outside;
271      }
272    
273      $infotable .= "</TD</TR>";
274    
275    $infotable .= $classification_stuff;    $infotable .= $classification_stuff;
276    $infotable .= "</TABLE>";    $infotable .= "</TABLE>";
277    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3