[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.14, Mon Apr 7 21:02:18 2008 UTC revision 1.15, Mon May 5 15:11:51 2008 UTC
# Line 96  Line 96 
96    
97    my $menu = $self->application->menu();    my $menu = $self->application->menu();
98    
99      my $esc_name = uri_escape($name);
100    
101    # Build nice tab menu here    # Build nice tab menu here
102    $menu->add_category( 'Subsystem Info', "SubsysEditor.cgi?page=ShowSubsystem&subsystem=$name" );    $menu->add_category( 'Subsystem Info', "SubsysEditor.cgi?page=ShowSubsystem&subsystem=$esc_name" );
103    $menu->add_category( 'Functional Roles', "SubsysEditor.cgi?page=ShowFunctionalRoles&subsystem=$name" );    $menu->add_category( 'Functional Roles', "SubsysEditor.cgi?page=ShowFunctionalRoles&subsystem=$esc_name" );
104    $menu->add_category( 'Diagram', "SubsysEditor.cgi?page=ShowDiagram&subsystem=$name" );    $menu->add_category( 'Diagram', "SubsysEditor.cgi?page=ShowDiagram&subsystem=$esc_name" );
105    $menu->add_category( 'Illustrations', "SubsysEditor.cgi?page=ShowIllustrations&subsystem=$name" );    $menu->add_category( 'Illustrations', "SubsysEditor.cgi?page=ShowIllustrations&subsystem=$esc_name" );
106    $menu->add_category( 'Spreadsheet', "SubsysEditor.cgi?page=ShowSpreadsheet&subsystem=$name" );    $menu->add_category( 'Spreadsheet', "SubsysEditor.cgi?page=ShowSpreadsheet&subsystem=$esc_name" );
107    $menu->add_category( 'Show Check', "SubsysEditor.cgi?page=ShowCheck&subsystem=$name" );    $menu->add_category( 'Show Check', "SubsysEditor.cgi?page=ShowCheck&subsystem=$esc_name" );
108    $menu->add_category( 'Show Connections', "SubsysEditor.cgi?page=ShowTree&subsystem=$name" );    $menu->add_category( 'Show Connections', "SubsysEditor.cgi?page=ShowTree&subsystem=$esc_name" );
109    
110    
111    ##############################    ##############################
# Line 182  Line 184 
184      $subsystem->write_subsystem();      $subsystem->write_subsystem();
185    }    }
186    
187      print STDERR $name."\n";
188    
189    $subsystem = new Subsystem( $name, $fig, 0 );    $subsystem = new Subsystem( $name, $fig, 0 );
190    
191    $content .= $self->start_form( 'form', { subsystem => $name } );    $content .= $self->start_form( 'form', { subsystem => $name } );
# Line 429  Line 433 
433  sub getLiteratures {  sub getLiteratures {
434    my ( $fig, $name ) = @_;    my ( $fig, $name ) = @_;
435    
436      my $esc_name = uri_escape($name);
437    
438    my $frpubs;    my $frpubs;
439    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$name, "SUBSYSTEM_PUBMED_RELEVANT" );    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$esc_name, "SUBSYSTEM_PUBMED_RELEVANT" );
440    
441    foreach my $k ( @rel_lit_num ) {    foreach my $k ( @rel_lit_num ) {
442      my ( $ss, $key, $value ) = @$k;      my ( $ss, $key, $value ) = @$k;
# Line 446  Line 452 
452  sub getLinks {  sub getLinks {
453    my ( $fig, $name ) = @_;    my ( $fig, $name ) = @_;
454    
455      my $esc_name = uri_escape($name);
456    
457    my $links;    my $links;
458    my $linksstring = '';    my $linksstring = '';
459    my $linksvoid = '';    my $linksvoid = '';
460    my @rel_link_num = $fig->get_attributes( 'Subsystem:'.$name, "SUBSYSTEM_WEBLINKS" );    my @rel_link_num = $fig->get_attributes( 'Subsystem:'.$esc_name, "SUBSYSTEM_WEBLINKS" );
461    
462    foreach my $k ( @rel_link_num ) {    foreach my $k ( @rel_link_num ) {
463      my ( $ss, $key, @value ) = @$k;      my ( $ss, $key, @value ) = @$k;
# Line 466  Line 474 
474  sub setLiteratures {  sub setLiteratures {
475    my ( $fig, $name, $newpubs ) = @_;    my ( $fig, $name, $newpubs ) = @_;
476    
477      my $esc_name = uri_escape($name);
478    
479    my @values;    my @values;
480    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$name, "SUBSYSTEM_PUBMED_RELEVANT" );    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$esc_name, "SUBSYSTEM_PUBMED_RELEVANT" );
481    
482    foreach my $k ( @rel_lit_num ) {    foreach my $k ( @rel_lit_num ) {
483      my ( $ss, $key, $value ) = @$k;      my ( $ss, $key, $value ) = @$k;
484      $fig->delete_matching_attributes( "Subsystem:$name", "SUBSYSTEM_PUBMED_RELEVANT", $value );      $fig->delete_matching_attributes( "Subsystem:$esc_name", "SUBSYSTEM_PUBMED_RELEVANT", $value );
485    }    }
486    
487    foreach my $np ( @$newpubs ) {    foreach my $np ( @$newpubs ) {
488      $fig->add_attribute( "Subsystem:$name", "SUBSYSTEM_PUBMED_RELEVANT", $np );      $fig->add_attribute( "Subsystem:$esc_name", "SUBSYSTEM_PUBMED_RELEVANT", $np );
489    }    }
490  }  }
491    
# Line 485  Line 495 
495  sub setWeblinks {  sub setWeblinks {
496    my ( $fig, $name, $newpubs ) = @_;    my ( $fig, $name, $newpubs ) = @_;
497    
498      my $esc_name = uri_escape($name);
499    
500    my @values;    my @values;
501    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$name, "SUBSYSTEM_WEBLINKS" );    my @rel_lit_num = $fig->get_attributes( 'Subsystem:'.$esc_name, "SUBSYSTEM_WEBLINKS" );
502    
503    foreach my $k ( @rel_lit_num ) {    foreach my $k ( @rel_lit_num ) {
504      my ( $ss, $key, $value ) = @$k;      my ( $ss, $key, $value ) = @$k;
505      $fig->delete_matching_attributes( "Subsystem:$name", "SUBSYSTEM_WEBLINKS", $value );      $fig->delete_matching_attributes( "Subsystem:$esc_name", "SUBSYSTEM_WEBLINKS", $value );
506    }    }
507    
508    foreach my $np ( @$newpubs ) {    foreach my $np ( @$newpubs ) {
509      my @h = split( /\s+/, $np );      my @h = split( /\s+/, $np );
510      $fig->add_attribute( "Subsystem:$name", "SUBSYSTEM_WEBLINKS", @h );      $fig->add_attribute( "Subsystem:$esc_name", "SUBSYSTEM_WEBLINKS", @h );
511    }    }
512  }  }
513    

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3