[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.41, Thu Apr 28 20:56:37 2005 UTC revision 1.43, Thu Jun 23 21:24:48 2005 UTC
# Line 22  Line 22 
22  sub compute_html_header  sub compute_html_header
23  {  {
24      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
25      my($additional_insert,$user) = @_;      my($additional_insert, $user, %options ) = @_;
26      my $html_hdr_file = "./Html/html.hdr";  
27        my $header_name = $options{header_name} ? $options{header_name} : "html.hdr";
28        my $tail_name = $options{tail_name} ? $options{tail_name} : "html.tail";
29    
30        my $html_hdr_file = "./Html/$header_name";
31      if (! -f $html_hdr_file)      if (! -f $html_hdr_file)
32      {      {
33          $html_hdr_file = "$FIG_Config::fig/CGI/Html/html.hdr";          $html_hdr_file = "$FIG_Config::fig/CGI/Html/$header_name";
34      }      }
35      my @html_hdr = &FIG::file_read($html_hdr_file);      my @html_hdr = &FIG::file_read($html_hdr_file);
36      push( @html_hdr, "<br><a href=\"index.cgi?user=$user\">FIG search</a>\n" );  
37        $options{no_fig_search} or push( @html_hdr, "<br><a href=\"index.cgi?user=$user\">FIG search</a>\n" );
38    
39      if (@html_hdr)      if (@html_hdr)
40      {      {
41          my $insert_stuff;          my $insert_stuff;
42    
43            if (not $options{no_release_info})
44            {
45          my @ver = &FIG::file_head("$FIG_Config::fig_disk/CURRENT_RELEASE", 1);          my @ver = &FIG::file_head("$FIG_Config::fig_disk/CURRENT_RELEASE", 1);
46          my $ver = $ver[0];          my $ver = $ver[0];
47          chomp $ver;          chomp $ver;
# Line 45  Line 53 
53          }          }
54          my $host = &FIG::get_local_hostname();          my $host = &FIG::get_local_hostname();
55          $insert_stuff = "SEED version <b>$ver</b> on $host";          $insert_stuff = "SEED version <b>$ver</b> on $host";
56            }
57    
58          if ($additional_insert)          if ($additional_insert)
59          {          {
60              $insert_stuff .= "<br>" . $additional_insert;              $insert_stuff .= "<br>" . $additional_insert;
# Line 69  Line 79 
79      my($cgi,$html,$no_home, $alt_header, $css, $javasrc) = @_;      my($cgi,$html,$no_home, $alt_header, $css, $javasrc) = @_;
80      my $i;      my $i;
81    
   
82      # ARGUMENTS:      # ARGUMENTS:
83      #     $cgi is the CGI method      #     $cgi is the CGI method
84      #     $html is an array with all the html in it. It is just joined by "\n" (and not <br> or <p>      #     $html is an array with all the html in it. It is just joined by "\n" (and not <br> or <p>
# Line 83  Line 92 
92      # Find the HTML header      # Find the HTML header
93      #      #
94    
95      my $html_tail_file = "./Html/html.tail";      my $html_tail_file = "./Html/$tail_name";
96      if (! -f $html_tail_file)      if (! -f $html_tail_file)
97      {      {
98          $html_tail_file = "$FIG_Config::fig/CGI/Html/html.tail";          $html_tail_file = "$FIG_Config::fig/CGI/Html/$tail_name";
99      }      }
100    
101      my $user = $cgi->param('user') || "";      my $user = $cgi->param('user') || "";
# Line 400  Line 409 
409      #      #
410      # Apparently the above still breaks things. This is the correct code:      # Apparently the above still breaks things. This is the correct code:
411    
412      print @$html;      foreach $_ (@$html)
413        {
414            print $_;
415        }
416  }  }
417    
418  sub make_table {  sub make_table {

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.43

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3