Merge pull request #42 from solgenomics/topic/duplicate_image_warning
[cxgn-corelibs.git] / lib / CXGN / Insitu / Toolbar.pm
blobc72c197c3ebc7db0c4797112b6d2362b9c05808b
2 use strict;
4 package CXGN::Insitu::Toolbar;
6 use Exporter;
7 our @ISA = qw(Exporter);
8 our @EXPORT = qw / display_toolbar /; # symbols to export on request
12 use CXGN::Page::FormattingHelpers qw/page_title_html modesel/;
14 sub display_toolbar {
15 my $hilite = shift;
17 # my $page = CXGN::Page->new();
18 my @tabs = (
19 ["/insitu/", "Home"],
20 ["/insitu/search.pl", "Search"],
21 ["/insitu/manage.pl", "Manage"],
22 ["/insitu/help.pl", "Help"]
25 # my @tabfuncs = (
26 # \&home
27 # \&unigene_tab,
28 # \&marker_tab,
29 # \&bac_tab,
30 # \&annotation_tab,
31 # \&est_tab,
32 # \&directory_tab,
33 # );
35 #get the search type
36 # my ($search) = $page -> get_arguments("search");
37 # $search ||= 'unigene'; #default
39 my $tabsel =
40 ($hilite=~ //i) ? 0
41 : ($hilite =~ /home/i) ? 0
42 : ($hilite =~ /search/i) ? 1
43 : ($hilite =~ /manage/i) ? 2
44 : ($hilite =~ /help/i) ? 3
47 : print STDERR "Invalid search type.";
50 print modesel(\@tabs,$tabsel); #print out the tabs
54 # my $hilite = shift;
56 # my $home = "Insitu home";
57 # my $search = "Search";
58 # my $manage = "Manage";
59 # my $help = "Help";
61 # my %links = (
62 # "$home" => "/insitu/",
63 # "$search" => "/insitu/search.pl",
64 # "$manage" => "/insitu/manage.pl",
65 # "$help" => "/insitu/help.pl",
66 # );
67 # my @link_order = ( $home, $search, $manage, $help );
69 # print qq { <table><tr> };
71 # foreach my $k (@link_order) {
72 # my $bgcolor = "#FFFFFF";
73 # if ($hilite eq $k) {
74 # $bgcolor="#FFFF00";
75 # }
76 # print qq { <td bgcolor="$bgcolor"><a href="$links{$k}">$k</a></td><td>|</td> }
77 # }
78 # print qq { </tr></table><br /><br /> };
79 # }
81 return 1;