X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FElements%2FChart;h=05a0422b1f2c780216ec1e2634c795ff86d0237f;hp=e25a9efd0b7851076d33e752ed77436fdf5b554f;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984 diff --git a/rt/share/html/Search/Elements/Chart b/rt/share/html/Search/Elements/Chart index e25a9efd0..05a0422b1 100644 --- a/rt/share/html/Search/Elements/Chart +++ b/rt/share/html/Search/Elements/Chart @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -48,7 +48,6 @@ <%args> $Query => "id > 0" $PrimaryGroupBy => 'Queue' -$SecondaryGroupBy => undef $ChartStyle => 'bars' <%init> @@ -89,65 +88,66 @@ my %loc_keys; foreach my $key (@keys) { $data{$key} = shift @values; $loc_keys{$key} = loc($key); } my @sorted_keys = map { $loc_keys{$_}} sort { $loc_keys{$a} cmp $loc_keys{$b} } keys %loc_keys; my @sorted_values = map { $data{$_}} sort { $loc_keys{$a} cmp $loc_keys{$b} } keys %loc_keys; - - my $query_string = $m->comp('/Elements/QueryString', %ARGS); - - -<% loc('Query:') %> <% $Query %>
+my ($i,$total); + +
+ % if (RT->Config->Get('DisableGD')) { <% loc('Graphical charts are not available.') %>
% } else { -
+ % } - - + +
-% my ($i,$total); -% while (my $key = shift @sorted_keys) { -% $i++; -% my $value = shift @sorted_values; -% $total += $value; - +<%perl> + while (my $key = shift @sorted_keys) { + $i++; + my $value = shift @sorted_values; + $total += $value; + + +<%perl> +# TODO sadly we don't have "creator.city is null" or alike support yet +# so no link if the key is undef for now + if ( $PrimaryGroupBy !~ /(Hourly|Daily|Monthly|Annually)$/ + && $key ne loc('(no value)') ) { + my $group = $PrimaryGroupBy; $group =~ s! !.!; + my %orig_keys = reverse %loc_keys; + my $QueryString = $m->comp('/Elements/QueryString', + Query => "$Query and $group = '$orig_keys{$key}'", + Format => $ARGS{Format}, + Rows => $ARGS{Rows}, + OrderBy => $ARGS{OrderBy}, + Order => $ARGS{Order}, + ); + +% } else { + + +% } % } %$i++; - - - + + +
<% loc($tix->Label($PrimaryGroupBy)) %> <&|/l&>Tickets
-%# TODO sadly we don't have "creator.city is null" or alike support yet -%# so no link if the key is undef for now -% if ( $PrimaryGroupBy !~ /(Hourly|Daily|Monthly|Annually)$/ -% && $key ne loc('(no value)') ) { -% my $group = $PrimaryGroupBy; $group =~ s! !.!; -% my %orig_keys = reverse %loc_keys; -% my $QueryString = $m->comp('/Elements/QueryString', -% Query => "$Query and $group = '$orig_keys{$key}'", -% Format => $ARGS{Format}, -% Rows => $ARGS{Rows}, -% OrderBy => $ARGS{OrderBy}, -% Order => $ARGS{Order}, -% ); -Config->Get('WebURL') %>Search/Results.html?<%$QueryString%>><%$key%> -% } else { -<% $key %> -% } +Config->Get('WebPath') %>/Search/Results.html?<%$QueryString%>><%$key%> -<%$value%> +Config->Get('WebPath') %>/Search/Results.html?<%$QueryString%>><%$value%> <% $key %><% $value %>
-<%loc('Total')%> - -<%$total||''%> -
<%loc('Total')%><%$total||'0'%>
+
<% loc('Query') %>:<% $Query %>
+