[Bio] / FigWebServices / frame.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/frame.cgi

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

revision 1.5, Thu Feb 23 19:40:15 2006 UTC revision 1.6, Thu Feb 23 21:38:42 2006 UTC
# Line 50  Line 50 
50    use constant FIG_EXTBIN    => "$FIG_Config::ext_bin/";    use constant FIG_EXTBIN    => "$FIG_Config::ext_bin/";
51    use constant FIG_NR        => "$FIG_Config::global/nr";    use constant FIG_NR        => "$FIG_Config::global/nr";
52    
53    
54      # check if the user directory exists, else create it
55    mkdir USER_DIR, 0777 unless (-e USER_DIR);    mkdir USER_DIR, 0777 unless (-e USER_DIR);
56    
57    # initialize content variables    # initialize content variables
# Line 132  Line 134 
134    # create configuration button    # create configuration button
135    my $config_button = qq~<td id='login'><img src="~ . $params->{image_base} . qq~config.gif" onclick="go_configmode();" class="login"></td>~;    my $config_button = qq~<td id='login'><img src="~ . $params->{image_base} . qq~config.gif" onclick="go_configmode();" class="login"></td>~;
136    
137      # check for action, otherwise set action to startpage
138      if (defined($cgi->param("action"))) {
139        $action = $cgi->param("action");
140      } else {
141    
142        # workaround for links to the protein page to pipe through frame.cgi
143        if (defined($cgi->param("prot"))) {
144          $action = "proteinpage";
145        } else {
146          $action = $params->{user_preferences}->{'framework:start_page'};
147        }
148      }
149      $params->{action} = $action;
150    
151    # disable configuration for user Guest    # disable configuration for user Guest
152    if ($user eq "Guest") {    if ($user eq "Guest") {
153      $config_button = "";      $config_button = "";
# Line 141  Line 157 
157    $session = qq~    $session = qq~
158  <form method='post' action='frame.cgi' name='login_form'>  <form method='post' action='frame.cgi' name='login_form'>
159  <table width=100%>  <table width=100%>
160     <tr><td colspan=3 style="border-top: 1px solid #000088;"></td></tr>     <tr><td colspan=3 style="border-top: 1px solid lightblue;"></td></tr>
161     <tr style="vertical-align: bottom;">     <tr style="vertical-align: bottom;">
162        <td width='40px' height='28px'><b>User:</b></td><td width='100%'><input type='text' name='user' value='~ . $user . qq~' style="width: 100px;"></td>~ . $config_button . qq~        <td width='40px' height='28px'><b>User:</b></td><td width='100%'><input type='text' name='user' value='~ . $user . qq~' style="width: 100px;">~;
    </tr>  
 </table>  
 </form>  
 ~;  
163    
164    # check for action, otherwise set action to startpage    # store current cgi
165    if (defined($cgi->param("action"))) {    my @old_cgi;
166      $action = $cgi->param("action");    my @names = $cgi->param;
167    } else {    foreach my $name (@names) {
168        unless (($name eq "layout") or ($name eq "config")) {
169          push(@old_cgi, { 'preserve_name' => $name, 'preserve_value' => $cgi->param($name) } );
170    
171      # workaround for links to the protein page to pipe through frame.cgi        # store current params in login form
172      if (defined($cgi->param("prot"))) {        unless ($name eq "user") {
173        $action = "proteinpage";          $session .= "<input type='hidden' name='" . $name . "' value='" . $cgi->param($name) . "'>";
174      } else {        }
       $action = $params->{user_preferences}->{'framework:start_page'};  
175      }      }
176    }    }
177    $params->{action} = $action;  
178      # finish session html
179      $session .= qq~</td>~ . $config_button . qq~
180       </tr>
181    </table>
182    </form>
183    ~;
184    
185  #################  #################
186  # Modify this section to add new actions  # Modify this section to add new actions
# Line 211  Line 230 
230    $logo  .= FigWebServices::SeedComponents::Framework::get_logo($params);    $logo  .= FigWebServices::SeedComponents::Framework::get_logo($params);
231    $menu  .= FigWebServices::SeedComponents::Framework::get_menu($params);    $menu  .= FigWebServices::SeedComponents::Framework::get_menu($params);
232    
   # store current cgi  
   my @old_cgi;  
   my @names = $cgi->param;  
   foreach my $name (@names) {  
     unless (($name eq "layout") or ($name eq "config")) {  
       push(@old_cgi, { 'preserve_name' => $name, 'preserve_value' => $cgi->param($name) } );  
     }  
   }  
   
233    # create output template    # create output template
234    my $template = HTML::Template->new(filename => TEMPLATE_PATH . 'frame.tmpl');    my $template = HTML::Template->new(filename => TEMPLATE_PATH . 'frame.tmpl');
235    
# Line 245  Line 255 
255    my $preferences = {};    my $preferences = {};
256    
257    $preferences->{'framework:start_page'}              = "welcome";    $preferences->{'framework:start_page'}              = "welcome";
258    $preferences->{'framework:menu_layout'}             = "extlinks,element,1,1,blue;intlinks,element,1,1,blue;services,element,1,1,blue;neighborhood,group,1,0,0,1,0,0,1,1,0,0,0,1,1;contig_context,section,0;identicalproteins,section,0;compare_region,section,1;subsystems_connections,section,0;relatedlinks,section,0;proteinfamilies,section,0;identicalproteins_table,group,1,1,1,1,1;proteinfamilies_table,group,1,1,1;subsystems_connections_table,group,1,1,1;relatedlinks_table,group,1,1,1,1,1;";    $preferences->{'framework:menu_layout'}             = "extlinks,element,1,1,blue;intlinks,element,1,1,blue;services,element,1,1,blue;neighborhood,group,1,0,0,1,0,0,1,1,0,0,0,1,1;contig_context,section,0;identicalproteins,section,0;compare_region,section,0;subsystems_connections,section,0;relatedlinks,section,0;proteinfamilies,section,0;identicalproteins_table,group,1,1,1,1,1;proteinfamilies_table,group,1,1,1;subsystems_connections_table,group,1,1,1;relatedlinks_table,group,1,1,1,1,1;similarities_table,group,1,1,1,1,1,1,1,1,1,1,1;";
259    $preferences->{'framework:sort_subsystem'}          = "by_phylo";    $preferences->{'framework:sort_subsystem'}          = "by_phylo";
260    $preferences->{'framework:show_clusters_subsystem'} = "1";    $preferences->{'framework:show_clusters_subsystem'} = "1";
261    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3