[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.100, Sun Sep 24 15:22:58 2006 UTC revision 1.102, Thu Sep 28 22:59:05 2006 UTC
# Line 182  Line 182 
182      # Find the HTML header      # Find the HTML header
183      #      #
184    
185      ### TRS ### "tail_name" has no value here.      my $tail_name = $options->{tail_name} ? $options->{tail_name} : "html.tail";
186      my $html_tail_file = ""; # "./Html/$tail_name";      my $html_tail_file = "./Html/$tail_name";
187  #    if (! -f $html_tail_file)      if (! -f $html_tail_file)
188  #    {      {
189  #        $html_tail_file = "$FIG_Config::fig/CGI/Html/$tail_name";          $html_tail_file = "$FIG_Config::fig/CGI/Html/$tail_name";
190  #    }      }
191    
192      my $user = $cgi->param('user') || "";      my $user = $cgi->param('user') || "";
193      my @html_hdr;      my @html_hdr;
# Line 808  Line 808 
808      return "<a href=$link>$role</a>";      return "<a href=$link>$role</a>";
809  }  }
810    
811  #  =head2 fid_link
812  # Local means to eliminate the fig|org.peg from the  
813  # text of the link.  Get a link to a fid.
814  #  
815    use: my $html=&HTML::fid_link($cgi, $fid, Local, Just_URL, Full_Path);
816    
817    Local is a boolean means to eliminate the fig|org.peg from the text of the link.
818    
819    Just_URL will only return the URL and not the HTML code. The default is to return the full code.
820    
821    Full_Path is a boolean that will get the full path to the URL not just a relative path. This is required in pages where the base href changes (e.g. if an image is imported like on the metabolic pages).
822    
823    =cut
824    
825    
826  sub fid_link {  sub fid_link {
827      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
828      my($cgi,$fid,$local,$just_url) = @_;      my($cgi,$fid,$local,$just_url,$fullpath) = @_;
829    
830        my $err=join(" ", $cgi,$fid,$local,$just_url,$fullpath);
831        print STDERR "Creating link : $err\n";
832    
833      my($n);      my($n);
834    
835      my $top = top_link();      my $top = top_link();
836        if ($fullpath) {$top=$FIG_Config::cgi_url}
837    
838        print STDERR "Top is $top because full path is $fullpath\n";
839    
840      if ($fid =~ /^fig\|\d+\.\d+\.([a-z]+)\.(\d+)/)      if ($fid =~ /^fig\|\d+\.\d+\.([a-z]+)\.(\d+)/)
841      {      {
# Line 984  Line 1002 
1002      for ($j=$i-1; ($j > 0) && ($out->[$j] !~ /FIG search/); $j--) {}      for ($j=$i-1; ($j > 0) && ($out->[$j] !~ /FIG search/); $j--) {}
1003      if ($j > 0)      if ($j > 0)
1004      {      {
1005           ### TRS ###          #
1006  #        my @tmp = `cat $html_tail_file`;          # Hm. We would have tried using the options here:
1007  #        my $n = @tmp;          # my $tail_name = $options{tail_name} ? $options{tail_name} : "html.tail";
1008  #        splice(@$out,$j-$n,$n+1);          # but they're not passed in. So use the default html.tail.
1009            #
1010            my $html_tail_file = "./Html/html.tail";
1011            my @tmp = `cat $html_tail_file`;
1012            my $n = @tmp;
1013            splice(@$out,$j-$n,$n+1);
1014      }      }
1015  }  }
1016    
# Line 1397  Line 1420 
1420      {      {
1421          return "<a href='http://www.gene.ucl.ac.uk/cgi-bin/nomenclature/searchgenes.pl?field=symbol&anchor=equals&match=$1&symbol_search=Search&number=50&format=html&sortby=symbol' target=_blank>$hgnc</a>";          return "<a href='http://www.gene.ucl.ac.uk/cgi-bin/nomenclature/searchgenes.pl?field=symbol&anchor=equals&match=$1&symbol_search=Search&number=50&format=html&sortby=symbol' target=_blank>$hgnc</a>";
1422      }      }
1423      ### TRS ###: was $mim, changed to $hgnc  
1424      return $hgnc;      return $hgnc;
1425  }  }
1426    
# Line 1678  Line 1701 
1701    
1702   my @files=("SEED.rss");   my @files=("SEED.rss");
1703   if ($args->{"type"}) {   if ($args->{"type"}) {
     ### TRS ### "$type" had no value here, so guessed what it should be.  
1704      my $type = $args->{type};      my $type = $args->{type};
1705      push @files, "SEED.$type.rss"      push @files, "SEED.$type.rss"
1706  }  }

Legend:
Removed from v.1.100  
changed lines
  Added in v.1.102

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3