[Bps-public-commit] rt-extension-jsgantt branch, hide-for-new-simple-search, created. 1.03-2-gd1d59e9

Dustin Graves dustin at bestpractical.com
Fri Apr 1 20:02:15 EDT 2016


The branch, hide-for-new-simple-search has been created
        at  d1d59e9937fa59a4783871b43bd9feb181220fd6 (commit)

- Log -----------------------------------------------------------------
commit d1d59e9937fa59a4783871b43bd9feb181220fd6
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Mon Mar 28 20:46:48 2016 +0000

    show Gantt chart link on simple search when we already searched
    
    The previous link to the Gantt chart on simple search added in 01ab4582
    added the link not only on the search results page, but also on the
    simple search page if you navigated there without a search. Since
    there's nothing to graph yet, it doesn't make sense at that point, and
    so we update to show only when there is a query.

diff --git a/html/Callbacks/JSGantt/Elements/Tabs/Privileged b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
index b8745a4..27bb1fb 100644
--- a/html/Callbacks/JSGantt/Elements/Tabs/Privileged
+++ b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
@@ -52,7 +52,7 @@ if ( $request_path =~ qr{^/Search/} ) {
     if ( $request_path =~ qr{^/Search/JSGantt.html} && $DECODED_ARGS->{Ticket} ) {
         PageMenu->child( 'gantt' => title => loc('Gantt Chart'), path => '/Search/JSGantt.html?Ticket=' . $DECODED_ARGS->{Ticket} );
     }
-    else {
+    elsif ( $request_path !~ qr{^/Search/Simple.html$} || $DECODED_ARGS->{q} ) {
         my $current_search = $session{"CurrentSearchHash"} || {};
         my $query = $DECODED_ARGS->{'Query'} || $current_search->{'Query'};
         if ( $query ) {

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list