[freeside-commits] freeside/rt/html/Reports/Activity/Elements LimitReport, NONE, 1.1.2.2 MiniPlot, NONE, 1.1.2.2 PrintFooter, NONE, 1.1.2.2 PrintHeader, NONE, 1.1.2.2 ScreenFooter, NONE, 1.1.2.2 ScreenHeader, NONE, 1.1.2.2 Tabs, NONE, 1.1.2.2 Wrapper, NONE, 1.1.2.2
Ivan,,,
ivan at wavetail.420.am
Wed Jun 20 15:29:42 PDT 2007
- Previous message: [freeside-commits] freeside/rt/html/Reports/Activity ActivityDetail.html, NONE, 1.1.2.2 ActivitySummary.html, NONE, 1.1.2.2 ResolutionComments.html, NONE, 1.1.2.2 ResolutionStatistics.html, NONE, 1.1.2.2 index.html, NONE, 1.1.2.2
- Next message: [freeside-commits] freeside/rt/html/Developer/CronTool autohandler, NONE, 1.1.2.2 index.html, NONE, 1.1.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/rt/html/Reports/Activity/Elements
In directory wavetail:/tmp/cvs-serv10375/rt/html/Reports/Activity/Elements
Added Files:
Tag: FREESIDE_1_7_BRANCH
LimitReport MiniPlot PrintFooter PrintHeader ScreenFooter
ScreenHeader Tabs Wrapper
Log Message:
integrate RTx::Statistics, RT::Extension::ActivityReports package, and RTx::WebCronTool packages, as part of merging spiritone RT changes (#1661)
--- NEW FILE: LimitReport ---
<form action="index.html" method="POST" enctype="multipart/form-data">
Query:
<textarea name="query" rows="5" cols="80"><% $query %></textarea><br />
Report type: <select name="type">
<option value="ActivityDetail" <% $ARGS{path} =~ /ActivityDetail/ ? 'selected' : '' %>>Activity detail</option>
<option value="ActivitySummary" <% $ARGS{path} =~ /ActivitySummary/ ? 'selected' : '' %>>Activity summary</option>
<option value="ResolutionComments" <% $ARGS{path} =~ /ResolutionComments/ ? 'selected' : '' %>>Resolution comments</option>
<option value="ResolutionStatistics" <% $ARGS{path} =~ /ResolutionStatistics/ ? 'selected' : '' %>>Resolution statistics</option>
</select><br />
Start date: <input type="text" name="start" value="<% $start %>" /><br />
End date: <input type="text" name="end" value="<% $end %>" /><br />
<& /Elements/Submit, Label => loc('Report') &>
</form>
<%args>
$type => undef
$start => undef
$end => undef
$query => undef
</%args>
<%init>
</%init>
--- NEW FILE: PrintFooter ---
<hr/>
<div style="text-align: center;">
<%$RT::ReportFooterMessage || 'Proprietary and Confidential' %>
</div>
</body>
</html>
%$m->abort();
--- NEW FILE: Tabs ---
<& /Elements/Tabs,
tabs => $tabs,
subtabs => $subtabs,
current_toptab => 'Tools/Offline.html',
current_tab => 'Reports/Activity/index.html'.$args,
Title => $Title &>
<%INIT>
my $subtabs = {};
my $top = $m->caller_args(-1);
my $args = "?" . $m->comp( '/Elements/QueryString',
query => $top->{query},
start => $top->{start},
end => $top->{end});
if ($m->caller_args(-1)->{'query'}) {
$current_subtab .= $args;
$subtabs = {
a => { title => 'Activity detail',
path => 'Reports/Activity/ActivityDetail.html'.$args,
},
b => { title => 'Activity summary',
path => 'Reports/Activity/ActivitySummary.html'.$args,
},
c => { title => 'Resolution comments',
path => 'Reports/Activity/ResolutionComments.html'.$args,
},
d => { title => 'Resolution statistics',
path => 'Reports/Activity/ResolutionStatistics.html'.$args,
},
};
}
my $tabs = {
a => { title => loc('Offline'),
path => 'Tools/Offline.html',
},
r => { title => loc('Reports'),
path => 'Reports/Activity/index.html'.$args,
subtabs => $subtabs,
current_subtab => $current_subtab,
}
};
</%INIT>
<%ARGS>
$current_tab => undef
$current_subtab => undef
$Title => undef
</%ARGS>
--- NEW FILE: ScreenFooter ---
<& LimitReport, %ARGS &>
% if ($show_print_link) {
<div align="right">
% my %printable_args = %ARGS;
% delete $printable_args{$_} for (qw/path title mode/);
% $printable_args{'mode'} = 'print';
% my $url = $ARGS{'path'} .'?'. join(';', map { $_."=".$printable_args{$_} } keys %printable_args);
<a href="<%$RT::WebPath|n%>/<%$url|n%>"><&|/l&>Printable version</&></a>
</div>
% }
<%args>
$show_print_link => 1
</%args>
--- NEW FILE: Wrapper ---
<%args>
$mode => 'screen'
</%args>
% if ($mode eq 'print') {
<& PrintHeader, %ARGS &>
%} else {
<& ScreenHeader, %ARGS &>
% }
<%$m->content |n%>
% if ($mode eq 'print') {
<& PrintFooter, %ARGS &>
%} else {
<& ScreenFooter, %ARGS &>
% }
--- NEW FILE: PrintHeader ---
<%args>
$title => undef
$path => undef
$query => undef
</%args>
<HTML>
<HEAD>
<TITLE><%$title%></TITLE>
<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" />
<link media="all" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css" />
<link media="print" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/printrt.css" type="text/css" />
%# XXX TODO THIS SHOULD NOT BE A TABLE
<body>
<table width="100%">
<tr>
<td align="left">
<div id="username">User: <%$session{'CurrentUser'}->Name%></div>
<div id="reportdate">
%my $d= RT::Date->new($session{'CurrentUser'}); $d->SetToNow;
<%$d->AsString%></div>
</td>
<td align="center">
<h1><%$title%></h1>
</td>
<td align="right">
<img src="<%$RT::LogoURL%>" alt="RT Logo"/>
</td>
</tr>
</table>
<hr/>
<&|/l&>Report criteria:</&> <%$query%>
<hr />
--- NEW FILE: ScreenHeader ---
<%args>
$title => undef
$path => undef
</%args>
<& /Elements/Header, Title => $title &>
<& Tabs,
current_subtab => $path,
Title => $title &>
--- NEW FILE: MiniPlot ---
<table class="miniplot"><tr>
% for my $major (@major) {
<td><div class="graph">
<ul>
% my $i = 0;
% for my $minor (@minor) {
% my $percent = int( 100 * ($data->{$major}{$minor} || 0) / $max );
<li class="c<% ($i % 6) + 1%>" style="width: <% $barwidth %>%;
left: <% $baroffset + $each * $i %>%;
height: <% $percent %>%;"><div class="data"><% $minor %>: <% $percent %>%</div></li>
% $i++;
% }
</ul>
</div></td>
% }
</tr><tr>
% for my $major (@major) {
<th class="legend"><% $major %></th>
% }
</tr>
</table>
<table class="miniplot"><tr>
% my $i = 0;
% for my $minor (@minor) {
<th><span class="demoblock c<% ($i++ % 6) + 1 %>"></span> <% $minor %></th>
% }
</tr>
</table>
<%args>
$data
$major => undef
$minor => undef
</%args>
<%init>
my $max = 1;
my %minor;
for my $major (keys %{$data}) {
for (keys %{$data->{$major}}) {
$minor{$_}++;
$max = $data->{$major}{$_} if $data->{$major}{$_} > $max;
}
}
my @major = $major ? @{$major} : sort keys %{$data};
my @minor = $minor ? @{$minor} : sort keys %minor;
return unless @minor and @major;
my $each = int( (100 / @minor) );
my $barwidth = int( (100 / @minor) * (3/4) );
my $baroffset = int( (100 / @minor) * (1/8) );
</%init>
- Previous message: [freeside-commits] freeside/rt/html/Reports/Activity ActivityDetail.html, NONE, 1.1.2.2 ActivitySummary.html, NONE, 1.1.2.2 ResolutionComments.html, NONE, 1.1.2.2 ResolutionStatistics.html, NONE, 1.1.2.2 index.html, NONE, 1.1.2.2
- Next message: [freeside-commits] freeside/rt/html/Developer/CronTool autohandler, NONE, 1.1.2.2 index.html, NONE, 1.1.2.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list