+
+if ( (defined $actions->{A} || defined $actions->{B} || defined $actions->{C})
+ && (defined $actions->{E} || defined $actions->{F} || defined $actions->{G}) ) {
+
+ if (defined $actions->{C}) { $actions->{C}->{separator} = 1 }
+ elsif (defined $actions->{B}) { $actions->{B}->{separator} = 1 }
+ elsif (defined $actions->{A}) { $actions->{A}->{separator} = 1 }
+}
+
+my $args;
+$args= "?" . $m->comp(
+ '/Elements/QueryString',
+ Query => $ARGS{'Query'} || $session{'CurrentSearchHash'}->{'Query'},
+ Format => $ARGS{'Format'} || $session{'CurrentSearchHash'}->{'Format'},
+ OrderBy => $ARGS{'OrderBy'} || $session{'CurrentSearchHash'}->{'OrderBy'},
+ Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'},
+ Page => $ARGS{'Page'} || $session{'CurrentSearchHash'}->{'Page'},
+ Rows => $ARGS{'Rows'},
+ ) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'});
+$args ||= '';
+
+$tabs->{"f"} = { path => "Search/Build.html?NewQuery=1",
+ title => loc('New Search')};
+$tabs->{"g"} = { path => "Search/Build.html$args",
+ title => loc('Edit Search')};
+$tabs->{"h"} = { path => "Search/Edit.html$args",
+ title => loc('Advanced'),
+ separator => 1 };
+if ($args) {
+ $tabs->{"i"} = { path => "Search/Results.html$args",
+ title => loc('Show Results'),
+ };
+ if ($current_tab =~ m{Search/Results.html}) {
+ $current_tab = "Search/Results.html$args";
+ }
+ $tabs->{"j"} = { path => "Search/Bulk.html$args",
+ title => loc('Bulk Update'),
+ };
+ if ($current_tab =~ m{Search/Bulk.html}) {
+ $current_tab = "Search/Bulk.html$args";
+ }
+ foreach my $searchtab (keys %{$searchtabs}) {
+ ($searchtab =~ /^_/) ? $tabs->{"s".$searchtab} = $searchtabs->{$searchtab} : $tabs->{"z_".$searchtab} = $searchtabs->{$searchtab};
+ }
+}
+
+