[Bio] / WebApplication / WebMenu.pm Repository:
ViewVC logotype

Diff of /WebApplication/WebMenu.pm

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

revision 1.4, Thu Jun 14 16:34:57 2007 UTC revision 1.5, Wed Jun 27 21:04:32 2007 UTC
# Line 62  Line 62 
62                   entries => {},                   entries => {},
63                   categories => [],                   categories => [],
64                   categories_index => {},                   categories_index => {},
65                     search => 0,
66      };      };
67      bless $self, $class;      bless $self, $class;
68    
# Line 83  Line 84 
84      $self->{entries} = {};      $self->{entries} = {};
85      $self->{categories} = [];      $self->{categories} = [];
86      $self->{categories_index} = {};      $self->{categories_index} = {};
87        $self->{search} = 0;
88      return $self;      return $self;
89  }  }
90    
# Line 189  Line 191 
191      return keys(%{$_[0]->{categories_index}});      return keys(%{$_[0]->{categories_index}});
192  }  }
193    
194    =pod
195    
196    =item * B<search> (I<search_component>)
197    
198    Getter / Setter for the search component of the menu
199    
200    =cut
201    
202    sub search {
203      my ($self, $search) = @_;
204    
205      if (defined($search)) {
206        $self->{search} = $search;
207      }
208    
209      return $self->{search};
210    }
211    
212  =pod  =pod
213    
# Line 276  Line 295 
295    
296    $html .= "\t</ul>\n";    $html .= "\t</ul>\n";
297    
298      $html .= "<table style='position: absolute; right: 10px;'><tr>";
299      # check for search module
300      if ($self->search()) {
301        $html .= "<td>".$self->search->output()."</td>";
302      }
303    
304    # display user string    # display user string
305    if ($application->session->user) {    if ($application->session->user) {
306      $html .= qq~<div id="user" style="padding-top: 4px; padding-right: 5px; text-align: right;">      $html .= qq~<td><div id="user" style="padding-top: 2px;">
307                  <img height="15px" src="./Html/user.gif" title="Current User" />                  <img height="15px" src="./Html/user.gif" title="Current User" />
308                  <strong>~ . $application->session->user->firstname . " " . $application->session->user->lastname . qq~</strong></div>~;                  <strong>~ . $application->session->user->firstname . " " . $application->session->user->lastname . qq~</strong></div></td>~;
309    }    }
310      $html .= "</tr></table>";
311    
312    $html .= "</div>\n";    $html .= "</div>\n";
313    

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3