[Bio] / FigKernelPackages / HTML.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/HTML.pm

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

revision 1.83, Wed Jan 25 02:20:42 2006 UTC revision 1.88, Fri Feb 3 18:42:27 2006 UTC
# Line 78  Line 78 
78      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
79      my($additional_insert, $user, %options ) = @_;      my($additional_insert, $user, %options ) = @_;
80    
81        local $/ = "\n";
82    
83      my $header_name = $options{header_name} ? $options{header_name} : "html.hdr";      my $header_name = $options{header_name} ? $options{header_name} : "html.hdr";
84      my $tail_name = $options{tail_name} ? $options{tail_name} : "html.tail";      my $tail_name = $options{tail_name} ? $options{tail_name} : "html.tail";
85    
# Line 156  Line 158 
158  sub show_page {  sub show_page {
159      #warn "SHOWPAGE: cgi=", Dumper(@_);      #warn "SHOWPAGE: cgi=", Dumper(@_);
160      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
161      my($cgi,$html,$no_home, $alt_header, $css, $javasrc, $cookie) = @_;      my($cgi,$html,$no_home, $alt_header, $css, $javasrc, $cookie, $options) = @_;
162      my $i;      my $i;
163    
164      my $top = top_link();      my $top = top_link();
# Line 171  Line 173 
173      #               the sheet named "Sans Serif" is considered to the the first alternate, and if this is not set it points at $FIG_Config::HTML/css/sanserif.css      #               the sheet named "Sans Serif" is considered to the the first alternate, and if this is not set it points at $FIG_Config::HTML/css/sanserif.css
174      #     $javasrc is a reference to an array of URLs to javascripts to be included (e.g. "FIG/Html/css/styleswitcher.js")      #     $javasrc is a reference to an array of URLs to javascripts to be included (e.g. "FIG/Html/css/styleswitcher.js")
175      #     $cookie is the name and value of the cookie to set. Note that you should probably use raelib->cookie to get/set your cookies      #     $cookie is the name and value of the cookie to set. Note that you should probably use raelib->cookie to get/set your cookies
176        #     $options is a reference to a hash of options that you can pass around the pages
177      #      #
178      # Find the HTML header      # Find the HTML header
179      #      #
# Line 189  Line 192 
192      }      }
193      else      else
194      {      {
195          @html_hdr = compute_html_header(undef,$user);          @html_hdr = compute_html_header(undef,$user,%$options);
196      }      }
197    
198      # RAE: I am offloading the handling of cookies to CGI.pm since I don't know how they are set up.      # RAE: I am offloading the handling of cookies to CGI.pm since I don't know how they are set up.
# Line 845  Line 848 
848          }          }
849          else          else
850          {          {
851              return "<a href=$link>$n</a>";              return "<a href='$link'>$n</a>";
852          }          }
853      }      }
854      return $fid;      return $fid;
# Line 988  Line 991 
991          $after = $3;          $after = $3;
992          return &set_prot_links($cgi,$before) . &HTML::gi_link($cgi,$match) . &set_prot_links($cgi,$after);          return &set_prot_links($cgi,$before) . &HTML::gi_link($cgi,$match) . &set_prot_links($cgi,$after);
993      }      }
994      elsif ($x =~ /^(.*)(tigr\|[0-9a-zA-Z]+)(.*)/s)      elsif ($x =~ /^(.*)(tigr\|\w+)(.*)/s)
995      {      {
996          $before = $1;          $before = $1;
997          $match = $2;          $match = $2;
998          $after = $3;          $after = $3;
999          return &set_prot_links($cgi,$before) . &HTML::tigr_link($cgi,$match) . &set_prot_links($cgi,$after);          return &set_prot_links($cgi,$before) . &HTML::tigr_link($cgi,$match) . &set_prot_links($cgi,$after);
1000      }      }
1001      elsif ($x =~ /^(.*)\beric\|\w+\b(.*)/s)      elsif ($x =~ /^(.*)\b(eric\|\S+)\b(.*)/s)
1002      {      {
1003          $before = $1;          $before = $1;
1004          $match = $2;          $match = $2;
# Line 1463  Line 1466 
1466      my($sub_link);      my($sub_link);
1467    
1468      my $user = $cgi->param('user');      my $user = $cgi->param('user');
     if ($user)  
     {  
1469          my $esc_sub = uri_escape( $sub );          my $esc_sub = uri_escape( $sub );
1470          $sub =~ s/\_/ /g;          $sub =~ s/\_/ /g;
1471        if ($user)
1472        {
1473          $sub_link = "<a href=./subsys.cgi?ssa_name=$esc_sub&request=show_ssa&user=$user>$sub</a>";          $sub_link = "<a href=./subsys.cgi?ssa_name=$esc_sub&request=show_ssa&user=$user>$sub</a>";
1474      }      }
1475      else      else
1476      {      {
1477          $sub_link = $sub;          $sub_link = "<a href=\"display_subsys.cgi?ssa_name=$esc_sub&request=show_ssa&sort=by_phylo\">$sub</a>";
1478      }      }
1479      return $sub_link;      return $sub_link;
1480  }  }

Legend:
Removed from v.1.83  
changed lines
  Added in v.1.88

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3