integrate RTx::Statistics package, part of merging spiritone RT changes (#1661)
[freeside.git] / rt / html / Reports / Activity / Elements / Tabs
1 <& /Elements/Tabs, 
2     tabs => $tabs,
3     subtabs => $subtabs,
4     current_toptab => 'Tools/Offline.html', 
5     current_tab => 'Reports/Activity/index.html'.$args, 
6     Title => $Title &>
7
8 <%INIT>
9 my $subtabs = {};
10
11 my $top = $m->caller_args(-1);
12 my $args = "?" . $m->comp( '/Elements/QueryString',
13                            query => $top->{query},
14                            start => $top->{start},
15                            end   => $top->{end});
16 if ($m->caller_args(-1)->{'query'}) {
17     $current_subtab .= $args;
18     $subtabs = {
19                 a => { title => 'Activity detail',
20                        path  => 'Reports/Activity/ActivityDetail.html'.$args,
21                      },
22                 b => { title => 'Activity summary',
23                        path  => 'Reports/Activity/ActivitySummary.html'.$args,
24                      },
25                 c => { title => 'Resolution comments',
26                        path  => 'Reports/Activity/ResolutionComments.html'.$args,
27                      },
28                 d => { title => 'Resolution statistics',
29                        path  => 'Reports/Activity/ResolutionStatistics.html'.$args,
30                      },
31                };
32 }
33
34 my $tabs = {
35             a => { title => loc('Offline'),
36                    path  => 'Tools/Offline.html',
37                  },
38             r => { title => loc('Reports'),
39                    path  => 'Reports/Activity/index.html'.$args,
40                    subtabs => $subtabs,
41                    current_subtab => $current_subtab,
42                  }
43              };
44
45 </%INIT>
46
47
48 <%ARGS>
49 $current_tab => undef
50 $current_subtab => undef
51 $Title => undef
52 </%ARGS>