[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.122, Wed Apr 2 21:23:07 2008 UTC revision 1.123, Tue Apr 29 05:43:12 2008 UTC
# Line 20  Line 20 
20  use strict;  use strict;
21  use Tracer;  use Tracer;
22  use FIG;  use FIG;
23    use FIGRules;
24  use Carp;  use Carp;
25  use Data::Dumper;  use Data::Dumper;
26  use LWP::UserAgent;  use LWP::UserAgent;
# Line 837  Line 838 
838      my($cgi,$fid,$local,$just_url,$fullpath) = @_;      my($cgi,$fid,$local,$just_url,$fullpath) = @_;
839      Trace("Creating link for feature $fid.") if T(4);      Trace("Creating link for feature $fid.") if T(4);
840      my $err=join(" ", $cgi,$fid,$local,$just_url,$fullpath);      my $err=join(" ", $cgi,$fid,$local,$just_url,$fullpath);
841        if (FIGRules::nmpdr_mode($cgi)) {
842            # We're NMPDR. Compute the link to the seed viewer feature page.
843            my $link = "seedviewer.cgi?page=Annotation;feature=$fid";
844            if ($fullpath) {
845                # Full-path mode: add the base URL.
846                $link = "$FIG_Config::cgi_url/$link";
847            }
848            if ($just_url) {
849                # URL-only mode: return the link.
850                return $link;
851            } else {
852                # HTML mode. We need to compute the link text.
853                my $text = $fid;
854                # If we're in local mode, we remove everything but the final number from the fig ID.
855                if ($local) {
856                    $fid =~ s/^.+\.//;
857                }
858                # Return the full HTML for the link.
859                return "<a href=\"$link\">$text</a>";
860            }
861        }
862      my($n);      my($n);
863    
864      my $top = top_link();      my $top = top_link();

Legend:
Removed from v.1.122  
changed lines
  Added in v.1.123

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3