[Bps-public-commit] rtx-calendar branch, default-search-format, created. 1.00-1-ga6a1915

Dustin Graves dustin at bestpractical.com
Mon Mar 14 18:23:07 EDT 2016


The branch, default-search-format has been created
        at  a6a1915c39ce9251d7ef512c22b341face7af736 (commit)

- Log -----------------------------------------------------------------
commit a6a1915c39ce9251d7ef512c22b341face7af736
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Mon Mar 14 22:21:38 2016 +0000

    include DefaultSearchResultFormat if format not specified for Calendar link for consistency

diff --git a/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged b/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
index 9173352..c67d1df 100644
--- a/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
@@ -47,6 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
 my $request_path = $HTML::Mason::Commands::r->path_info;
+my $request_args = $m->request_args;
 
 my $query_string = sub {
     my %args = @_;
@@ -55,11 +56,14 @@ my $query_string = sub {
     return $u->query;
 };
 
-if ( $request_path =~ qr{^/Search/} && $m->request_args->{Query} ) {
+if ( $request_path =~ qr{^/Search/} && $request_args->{Query} ) {
     my $tabs = PageMenu;
     my $chart = $tabs->child('chart');
+
+    $request_args->{Format} = RT->Config->Get('DefaultSearchResultFormat') unless $request_args->{Format};
+
     $chart->add_after( 'calendar' => title => loc('Calendar'),
-                       path => '/Search/Calendar.html?' . $query_string->( %{$m->request_args} ) );
+                       path => '/Search/Calendar.html?' . $query_string->( %$request_args ) );
 }
 
 </%INIT>

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


More information about the Bps-public-commit mailing list