[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.16, Mon May 5 20:31:27 2008 UTC revision 1.21, Tue Oct 7 09:37:32 2008 UTC
# Line 101  Line 101 
101    # Build nice tab menu here    # Build nice tab menu here
102    $menu->add_category( 'Subsystem Info', "SubsysEditor.cgi?page=ShowSubsystem&subsystem=$esc_name" );    $menu->add_category( 'Subsystem Info', "SubsysEditor.cgi?page=ShowSubsystem&subsystem=$esc_name" );
103    $menu->add_category( 'Functional Roles', "SubsysEditor.cgi?page=ShowFunctionalRoles&subsystem=$esc_name" );    $menu->add_category( 'Functional Roles', "SubsysEditor.cgi?page=ShowFunctionalRoles&subsystem=$esc_name" );
104      $menu->add_category( 'Subsets', "SubsysEditor.cgi?page=ShowSubsets&subsystem=$esc_name" );
105    $menu->add_category( 'Diagram', "SubsysEditor.cgi?page=ShowDiagram&subsystem=$esc_name" );    $menu->add_category( 'Diagram', "SubsysEditor.cgi?page=ShowDiagram&subsystem=$esc_name" );
106    $menu->add_category( 'Illustrations', "SubsysEditor.cgi?page=ShowIllustrations&subsystem=$esc_name" );    $menu->add_category( 'Illustrations', "SubsysEditor.cgi?page=ShowIllustrations&subsystem=$esc_name" );
107    $menu->add_category( 'Spreadsheet', "SubsysEditor.cgi?page=ShowSpreadsheet&subsystem=$esc_name" );    $menu->add_category( 'Spreadsheet', "SubsysEditor.cgi?page=ShowSpreadsheet&subsystem=$esc_name" );
# Line 184  Line 185 
185      $subsystem->write_subsystem();      $subsystem->write_subsystem();
186    }    }
187    
   print STDERR $name."\n";  
   
188    $subsystem = new Subsystem( $name, $fig, 0 );    $subsystem = new Subsystem( $name, $fig, 0 );
189    
190    $content .= $self->start_form( 'form', { subsystem => $name } );    $content .= $self->start_form( 'form', { subsystem => $name } );
# Line 251  Line 250 
250    
251      $infotable .= "<TR><TH>Literature</TH><TD><TABLE><TR><TD><SPAN ID='LitSpan'>$litstring</SPAN></TD><TD>$editLitButton</TD><TD><INPUT TYPE=TEXT STYLE='width: 200px; display: none;' NAME='SUBSYSLIT' ID='SUBSYSLIT' VALUE='$litvoid'></TD><TD><SPAN ID='TEXTSPAN' STYLE='display: none;'>Multiple PMIDs should be separated by \', \'</SPAN></TD></TR></TABLE></TD></TR>";      $infotable .= "<TR><TH>Literature</TH><TD><TABLE><TR><TD><SPAN ID='LitSpan'>$litstring</SPAN></TD><TD>$editLitButton</TD><TD><INPUT TYPE=TEXT STYLE='width: 200px; display: none;' NAME='SUBSYSLIT' ID='SUBSYSLIT' VALUE='$litvoid'></TD><TD><SPAN ID='TEXTSPAN' STYLE='display: none;'>Multiple PMIDs should be separated by \', \'</SPAN></TD></TR></TABLE></TD></TR>";
252      $infotable .= "<TR><TH>Websites</TH><TD><TABLE><TR><TD><SPAN ID='WLSpan'>$wl</SPAN></TD><TD>$editWLButton</TD><TD><TEXTAREA ROWS=3 STYLE='width: 400px; display: none;' NAME='SUBSYSWL' ID='SUBSYSWL'>$wlvoid</TEXTAREA></TD><TD><SPAN ID='AREASPAN' STYLE='display: none;'>Please use the following format:<BR>Description1 http://www.xyz.org/...<BR>Description2 http://www.xzy.de/...</SPAN></TD></TR></TABLE></TD></TR>";      $infotable .= "<TR><TH>Websites</TH><TD><TABLE><TR><TD><SPAN ID='WLSpan'>$wl</SPAN></TD><TD>$editWLButton</TD><TD><TEXTAREA ROWS=3 STYLE='width: 400px; display: none;' NAME='SUBSYSWL' ID='SUBSYSWL'>$wlvoid</TEXTAREA></TD><TD><SPAN ID='AREASPAN' STYLE='display: none;'>Please use the following format:<BR>Description1 http://www.xyz.org/...<BR>Description2 http://www.xzy.de/...</SPAN></TD></TR></TABLE></TD></TR>";
253      $infotable .= "<TR><TH>Description</TH><TD><TEXTAREA NAME='SSDESC' ROWS=6 STYLE='width: 772px;'>$ssdesc</TEXTAREA></TD></TR>";      $infotable .= "<TR><TH>Description</TH><TD><TEXTAREA NAME='SSDESC' ROWS=15 STYLE='width: 772px;'>$ssdesc</TEXTAREA></TD></TR>";
254      $infotable .= "<TR><TH>Notes</TH><TD><TEXTAREA NAME='SSNOTES' ROWS=6 STYLE='width: 772px;'>$ssnotes</TEXTAREA></TD></TR>";      $infotable .= "<TR><TH>Notes</TH><TD><TEXTAREA NAME='SSNOTES' ROWS=15 STYLE='width: 772px;'>$ssnotes</TEXTAREA></TD></TR>";
255    }    }
256    else {    else {
257      # do a little formating because the notes often contain many many blanks and newlines      # do a little formating because the notes often contain many many blanks and newlines
# Line 294  Line 293 
293    $infotable .= "</TABLE>";    $infotable .= "</TABLE>";
294    
295    if ( $can_alter ) {    if ( $can_alter ) {
296      $infotable .= "<INPUT TYPE=SUBMIT VALUE='Save Changes' ID='SUBMIT' NAME='SUBMIT'>";      $infotable .= "<INPUT TYPE=SUBMIT VALUE='Save Changes' ID='SUBMIT' NAME='SUBMIT' STYLE='background-color: red;'>";
297    }    }
298    
299      if ( $can_alter ) {
300        $content .= "<INPUT TYPE=SUBMIT VALUE='Save Changes' ID='SUBMIT' NAME='SUBMIT'  STYLE='background-color: red;'>";
301      }
302    $content .= $infotable;    $content .= $infotable;
303    $content .= $self->end_form();    $content .= $self->end_form();
304    
# Line 436  Line 438 
438    my $esc_name = uri_escape($name);    my $esc_name = uri_escape($name);
439    
440    my $frpubs;    my $frpubs;
441    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$esc_name, "SUBSYSTEM_PUBMED_RELEVANT" );    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$name, "SUBSYSTEM_PUBMED_RELEVANT" );
442    
443    foreach my $k ( @rel_lit_num ) {    foreach my $k ( @rel_lit_num ) {
444      my ( $ss, $key, $value ) = @$k;      my ( $ss, $key, $value ) = @$k;
# Line 457  Line 459 
459    my $links;    my $links;
460    my $linksstring = '';    my $linksstring = '';
461    my $linksvoid = '';    my $linksvoid = '';
462    my @rel_link_num = $fig->get_attributes( 'Subsystem:'.$esc_name, "SUBSYSTEM_WEBLINKS" );    my @rel_link_num = $fig->get_attributes( 'Subsystem:'.$name, "SUBSYSTEM_WEBLINKS" );
463    
464    foreach my $k ( @rel_link_num ) {    foreach my $k ( @rel_link_num ) {
465      my ( $ss, $key, @value ) = @$k;      my ( $ss, $key, @value ) = @$k;
# Line 477  Line 479 
479    my $esc_name = uri_escape($name);    my $esc_name = uri_escape($name);
480    
481    my @values;    my @values;
482    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$esc_name, "SUBSYSTEM_PUBMED_RELEVANT" );    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$name, "SUBSYSTEM_PUBMED_RELEVANT" );
483    
484    foreach my $k ( @rel_lit_num ) {    foreach my $k ( @rel_lit_num ) {
485      my ( $ss, $key, $value ) = @$k;      my ( $ss, $key, $value ) = @$k;
486      $fig->delete_matching_attributes( "Subsystem:$esc_name", "SUBSYSTEM_PUBMED_RELEVANT", $value );      $fig->delete_matching_attributes( "Subsystem:$name", "SUBSYSTEM_PUBMED_RELEVANT" );
487    }    }
488    
489    foreach my $np ( @$newpubs ) {    foreach my $np ( @$newpubs ) {
490      $fig->add_attribute( "Subsystem:$esc_name", "SUBSYSTEM_PUBMED_RELEVANT", $np );      $fig->add_attribute( "Subsystem:$name", "SUBSYSTEM_PUBMED_RELEVANT", $np );
491    }    }
492  }  }
493    
# Line 498  Line 500 
500    my $esc_name = uri_escape($name);    my $esc_name = uri_escape($name);
501    
502    my @values;    my @values;
503    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$esc_name, "SUBSYSTEM_WEBLINKS" );    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$name, "SUBSYSTEM_WEBLINKS" );
504    
505    foreach my $k ( @rel_lit_num ) {    foreach my $k ( @rel_lit_num ) {
506      my ( $ss, $key, $value ) = @$k;      my ( $ss, $key, $value ) = @$k;
507      $fig->delete_matching_attributes( "Subsystem:$esc_name", "SUBSYSTEM_WEBLINKS", $value );      $fig->delete_matching_attributes( "Subsystem:$name", "SUBSYSTEM_WEBLINKS" );
508    }    }
509    
510    foreach my $np ( @$newpubs ) {    foreach my $np ( @$newpubs ) {
511      my @h = split( /\s+/, $np );      my @h = split( /\s+/, $np );
512      $fig->add_attribute( "Subsystem:$esc_name", "SUBSYSTEM_WEBLINKS", @h );      $fig->add_attribute( "Subsystem:$name", "SUBSYSTEM_WEBLINKS", @h );
513    }    }
514  }  }
515    

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.21

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3